From 918b87d1c71402b4e9b480a84caf77e001b1d0e9 Mon Sep 17 00:00:00 2001 From: markus Date: Tue, 15 Jan 2019 20:10:36 +0100 Subject: [PATCH 001/498] Show column f.ref always for navigation --- htdocs/compta/facture/list.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 7a06e6f66df..7039234e44e 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -13,6 +13,7 @@ * Copyright (C) 2015-2016 Ferran Marcet * Copyright (C) 2017 Josep Lluís Amador * Copyright (C) 2018 Charlene Benke + * Copyright (C) 2018 Markus Welters * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -683,13 +684,11 @@ if ($resql) // Filters lines print ''; - // Ref - if (! empty($arrayfields['f.ref']['checked'])) - { + // Ref show always print ''; print ''; print ''; - } + // Ref customer if (! empty($arrayfields['f.ref_client']['checked'])) { @@ -856,7 +855,7 @@ if ($resql) print "\n"; print ''; - if (! empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($arrayfields['f.ref']['label'],$_SERVER['PHP_SELF'],'f.ref','',$param,'',$sortfield,$sortorder); + print_liste_field_titre($arrayfields['f.ref']['label'],$_SERVER['PHP_SELF'],'f.ref','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['f.ref_client']['checked'])) print_liste_field_titre($arrayfields['f.ref_client']['label'],$_SERVER["PHP_SELF"],'f.ref_client','',$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.date']['checked'])) print_liste_field_titre($arrayfields['f.date']['label'],$_SERVER['PHP_SELF'],'f.datef','',$param,'align="center"',$sortfield,$sortorder); @@ -938,8 +937,6 @@ if ($resql) } print ''; - if (! empty($arrayfields['f.ref']['checked'])) - { print ''; print ''; @@ -958,7 +955,7 @@ if ($resql) print "\n"; if (! $i) $totalarray['nbfield']++; - } + // Customer ref if (! empty($arrayfields['f.ref_client']['checked'])) From 00597477e49412b549ef1a1fd3f25d9313a6df3e Mon Sep 17 00:00:00 2001 From: markus Date: Thu, 17 Jan 2019 15:57:17 +0100 Subject: [PATCH 002/498] Fix #10263 --- ChangeLog | 328 +++++++++---------- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/reception/class/reception.class.php | 2 +- htdocs/societe/class/societe.class.php | 2 +- 4 files changed, 167 insertions(+), 167 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff5b8cd9805..a5f33450ba1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,7 +29,7 @@ NEW: Experimental module "Data Privacy" NEW: Experimental module "Email Collector" NEW: Dolibarr can provide information in page title when multicompany is enabled of not, making Android application like DoliDroid able to provide native features for multicompany module. -NEW: Compatibility with PHP 7.3 => +NEW: Compatibility with PHP 7.3 => NEW: Add admin page for modulebuilder NEW: Add civility in list of members. Close #9251 NEW: Add configuration to disable "customer/prospect" thirdparty type @@ -447,7 +447,7 @@ NEW: Filter export model is now by user NEW: Finish implementation of option PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES NEW: generalize use of button to create new element from list NEW: hidden conf AGENDA_NB_WEEKS_IN_VIEW_PER_USER to set nb weeks to show into per user view -NEW: hidden conf to assign category to thirparty that are neither customer nor prospect or supplier +NEW: hidden conf to assign category to thirdparty that are neither customer nor prospect or supplier NEW: hidden conf to set nb weeks to show into user view NEW: hidden option MAIN_DISABLE_FREE_LINES NEW: improve way of adding users/sales representative to thirdparty @@ -521,10 +521,10 @@ WARNING: Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: * Remove old deprecated hook 'insertExtraFields'. Triggers must be used for action on CRUD events. * Hook 'maildao' was renamed into 'mail' into the method sendfile that send emails, and method was renamed from - 'doaction' into 'sendMail'. + 'doaction' into 'sendMail'. * Rename trigger CONTRACT_SERVICE_ACTIVATE into LINECONTRACT_ACTIVATE and CONTRACT_SERVICE_CLOSE into LINECONTRACT_CLOSE -* Remove triggers *_CLONE. The trigger CREATE with context 'createfromclone' is already called so this is +* Remove triggers *_CLONE. The trigger CREATE with context 'createfromclone' is already called so this is a duplicated feature. Cloning is not a business event, the business event is CREATE, so no trigger required. * PHP 5.3 is no more supported. Minimum PHP is now 5.4+ * Remove the old deprecated code of doActions and getInstanceDao in canvas. The doActions of standard hooks are @@ -533,10 +533,10 @@ Following changes may create regressions for some external modules, but were nec * The hook contaxt commcard has been renamed thirdpartycomm * The hook contaxt thirdpartycard has been renamed thirdpartycontact * Remove method Categorie:get_nb_categories() that was not used. -* Hook getnomurltooltip provide a duplicate feature compared to hook getNomUrl so all hooks getnomurltooltip +* Hook getnomurltooltip provide a duplicate feature compared to hook getNomUrl so all hooks getnomurltooltip are now replaced with hook getNomUrl. * The substitution key __CONTACTCIVNAME__ is no longer present, it has been replaced by __CONTACT_NAME_{TYPE}__ - where {TYPE} is contact type code (BILLING, SHIPPING, CUSTOMER, ... see contact type dictionnary). + where {TYPE} is contact type code (BILLING, SHIPPING, CUSTOMER, ... see contact type dictionnary). ***** ChangeLog for 7.0.5 compared to 7.0.4 ***** @@ -1085,16 +1085,16 @@ way to save data for final version has changed. Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: * The methode "cloture" on contract were renamed into "closeAll". -* The method "is_erasable" of invoice return a value <= 0 if not erasable (value is meaning) instead of always 0. -* The substitution key for reference of objects is now __REF__ whatever is the object (it replaces __ORDERREF__, +* The method "is_erasable" of invoice return a value <= 0 if not erasable (value is meaning) instead of always 0. +* The substitution key for reference of objects is now __REF__ whatever is the object (it replaces __ORDERREF__, __PROPALREF__, ...) -* The substition key __SIGNATURE__ was renamed into __USER_SIGNATURE__ to follow naming conventions. +* The substition key __SIGNATURE__ was renamed into __USER_SIGNATURE__ to follow naming conventions. * Substitution keys with syntax %XXX% were renamed into __XXX__ to match others. * Removed old deprecated REST API (APIs found into '/root' section of the REST API explorer in Dolibarr v6). -* Some REST API to access setup features, like dictionaries (country, town, extrafields, ...) were moved into a +* Some REST API to access setup features, like dictionaries (country, town, extrafields, ...) were moved into a common API "/setup". -* The REST API /documents were renamed into /documents/download and /documents/upload. -* Page bank/index.php, bank/bankentries.php and comm/actions/listactions.php were renamed into +* The REST API /documents were renamed into /documents/download and /documents/upload. +* Page bank/index.php, bank/bankentries.php and comm/actions/listactions.php were renamed into bank/list.php, bank/bankentries_list.php and comm/actions/list.php to follow page naming conventions (so default filter/sort order features can also work for this pages). * The trigger ORDER_SUPPLIER_STATUS_ONPROCESS was renamed into ORDER_SUPPLIER_STATUS_ORDERED. @@ -1102,17 +1102,17 @@ Following changes may create regressions for some external modules, but were nec * The parameter note into method cloture() is added at end of private note (previously in v6, it replaced). * The parameter $user is now mandatory for method createFromOrder and createFromPropal. * Removed js library 'fileupload' that was not used by core code. -* Jquery plugin tableDnd updated. You now need to use decodeURI on the return value of tableDnDSerialize() - and add 'td.' to the beginning of the dragHandle match string. -* IE8 and earlier and Firefox 12 and earlier (< 2012) are no more supported. -* The module ExpenseReport use numbering rules that you can setup (like other modules do). If you need to +* Jquery plugin tableDnd updated. You now need to use decodeURI on the return value of tableDnDSerialize() + and add 'td.' to the beginning of the dragHandle match string. +* IE8 and earlier and Firefox 12 and earlier (< 2012) are no more supported. +* The module ExpenseReport use numbering rules that you can setup (like other modules do). If you need to keep the hard coded numbering rule of expenses report used in 6.0, just add constant EXPENSEREPORT_USE_OLD_NUMBERING_RULE to 1. * If you use the external module "multicompany", you must also upgrade the module. Multicompany module for Dolibarr v7 is required because with Dolibarr v7, payment modes and payment conditions are management as data that are dedicated to each company. If you keep your old version of multicompany module, mode and - condition of payments will appears empty in all companies that are not the first one. By upgrading the - multicompany module to a version that support Dolibarr v7, everything should work as expected. + condition of payments will appears empty in all companies that are not the first one. By upgrading the + multicompany module to a version that support Dolibarr v7, everything should work as expected. ***** ChangeLog for 6.0.8 compared to 6.0.7 ***** @@ -1193,7 +1193,7 @@ NEW: field commerciaux and categ export CustomersInvoicesAndPayments ***** ChangeLog for 6.0.5 compared to 6.0.4 ***** FIX: security vulnerability reported by ADLab of Venustech - CVE-2017-17897, CVE-2017-17898, CVE-2017-17899, CVE-2017-17900 + CVE-2017-17897, CVE-2017-17898, CVE-2017-17899, CVE-2017-17900 FIX: #7379: Compatibility with PRODUCT_USE_OLD_PATH_FOR_PHOTO variable FIX: #7903 FIX: #7933 @@ -1334,11 +1334,11 @@ FIX: Upgrade missing on field FIX: View of timespent for another user FIX: ODT generation FIX: CVE-2017-9840, CVE-2017-14238, CVE-2017-14239, CVE-2017-14240, CVE-2017-14241, - CVE-2017-14242 - + CVE-2017-14242 + ***** ChangeLog for 6.0.0 compared to 5.0.* ***** NEW: Add experimental BlockeLog module (to log business events in a non reversible log file). -NEW: Add a payment module for Stripe. +NEW: Add a payment module for Stripe. NEW: Add module "Product variant" (like red, blue for the product shoes) NEW: Accountancy - Activate multi-journal & Add journal_label to database (FEC) NEW: Add a tracking id into mass emailing. @@ -1364,8 +1364,8 @@ NEW: Can add a background image on login page NEW: Can change customer from POS NEW: Can clone expense report on another user NEW: Can control constants values into file integrity checker -NEW: Can define default values for create forms. -NEW: Can define default filters for list pages. +NEW: Can define default values for create forms. +NEW: Can define default filters for list pages. NEW: Can define default sort order for list pages. NEW: Can deploy an external module from the module setup area. NEW: Can disable all overwrote translations in one click. @@ -1459,16 +1459,16 @@ NEW: Removed commande_pdf_create, contract_pdf_create,expedition_pdf_create, fac NEW: tooltip can be on hover or on click with textwithpicto function. NEW: Upgrade jquery to 3.3.1 and jquery-ui to 1.12 -WARNING: +WARNING: Following changes may create regression for some external modules, but were necessary to make Dolibarr better: * The hook getNodeList has been replaced by a normalized 'addreplace' hook getDirList. * The trigger USER_SETINGROUP and USER_REMOVEFROMGROUP has been replaced with trigger USER_MODIFY. * The page societe/soc.php was renamed into societe/card.php to match page naming conventions. * The page compta/facture.php was renamed into compta/facture/card.php to match page naming conventions. -* The signature of method ->delete() of class Product and PriceExpression was changed from +* The signature of method ->delete() of class Product and PriceExpression was changed from ->delete(id, notrigger) to ->delete(User, notrigger) to match standard dev rules. -* The signature of method ->delete() of class Adherent was changed from +* The signature of method ->delete() of class Adherent was changed from ->delete(id) to ->delete(id, User, notrigger) to match standard dev rules. * Removed CommonObject::displayMarginInfos (was deprecated in 3.8). Use same method into html.formmargin.class.php @@ -1476,14 +1476,14 @@ Following changes may create regression for some external modules, but were nece * Removed the trigger file of PAYPAL module that stored data that was not used by Dolibarr. The trigger event still exists, but if an external module need action on it, it must provides itself its trigger file. * Use $conf->global->MULTICOMPANY_TRANSVERSE_MODE instead $conf->multicompany->transverse_mode. So, if you set var - $multicompany_transverse_mode to 1 into your conf file, you must remove this line and a new key into + $multicompany_transverse_mode to 1 into your conf file, you must remove this line and a new key into the Home - setup - other admin page. * If you use Multicompany transverse mode, it will be necessary to check the activation of the modules in the children entities and to review completely the rights of the groups and the users. * Use getEntity('xxx') instead getEntity('xxx', 1) and use getEntity('xxx', 0) instead getEntity('xxx') -* Some other change were done in the way we read permission of a user when module multicompany is enabled. You can +* Some other change were done in the way we read permission of a user when module multicompany is enabled. You can retreive the old behavior by adding constant MULTICOMPANY_BACKWARD_COMPATIBILITY to 1. -* The hook formObjectOptions was not implemented correctly in previous version. Sometimes, you had to return output +* The hook formObjectOptions was not implemented correctly in previous version. Sometimes, you had to return output content by doing a print into function, sometimes by returning content into "resprint". This has been fixed to follow hook specifications so you must return output into "resprint". @@ -1645,11 +1645,11 @@ FIX: origin & origin id on supplier order line FIX: param php doc FIX: Picto of project on dol_banner and box FIX: Some errors when downloading files. - + ***** ChangeLog for 5.0.0 compared to 4.0.* ***** For users: NEW: Add module mulicurrency. -NEW: Add module accoutancy expert (double party accountancy). +NEW: Add module accoutancy expert (double party accountancy). NEW: Better responsive design, above all on smartphone. NEW: #5801 More complete change to allow to disable supplier invoice document generation. NEW: #5830 Can choose a generic email or use remail in the mail from field. @@ -1684,7 +1684,7 @@ NEW: Better filtering of automatic/manually inserted events. NEW: Bill orders from order list. NEW: Can add event from the card listing events. NEW: Can change thirdparty when cloning a project. -NEW: Can create expense report for someone else (advanced permission). +NEW: Can create expense report for someone else (advanced permission). NEW: Can clone an expense report. NEW: Can edit a label for each price segment when using several segment prices for products. NEW: Can filter on fields on admin translation page. @@ -1769,7 +1769,7 @@ NEW: Hook on stock product card NEW: param socid find_min_price_product_fournisseur() function NEW: More phpunit tests -WARNING: +WARNING: Following changes may create regression for some external modules, but were necessary to make Dolibarr better: @@ -1783,10 +1783,10 @@ Dolibarr better: Method warehouse->delete(id) has been replace with ->delete(user) This is to follow good practice to make a fetch on object before deleting it. - The form to add a product to a draft proposal/order/invoice, from the product card, is hidden by default. - It was not commonly used and usage generates some problems (cost price for margin calculation not entered, vat setting). + It was not commonly used and usage generates some problems (cost price for margin calculation not entered, vat setting). Set constant PRODUCT_ADD_FORM_ADD_TO to retrieve it. - The javascript "datatables" library was previously provided into Dolibarr sources, but it was not used by application. - So there is no reason to maintain its compatibility with other dolibarr components. If an external module need this + So there is no reason to maintain its compatibility with other dolibarr components. If an external module need this library, this external module must embed the library in his own sources/packages. - Trigger name SUPPLIER_PROPOSAL_CREATE has been renamed into PROPOSAL_SUPPLIER_CREATE. - A new paramater sqlfilters was introduced to allow filter on any fields int the REST API. Few old parameters, @@ -1874,7 +1874,7 @@ FIX: repair tool was ko to restore extrafields with type select. FIX: Security access problem with external users on projects/tasks FIX: We must not drop extrafield column if there is still record on other entities. FIX: regression with sedning email when introducing security options to restrict nb of email sending. -t +t ***** ChangeLog for 4.0.3 to 4.0.2 ***** FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1 FIX: #5958 no discount on supplier command made by replenishment @@ -1986,7 +1986,7 @@ For users: NEW: Add recurring invoice feature and automatic generation of invoices. NEW: Add module "Loan" as stable. NEW: Add module "Supplier commercial proposal" (price request) with stable status. -NEW: Can select dynamicaly number of lines to show on page on product, shipment, contact, orders, thirdparties. +NEW: Can select dynamicaly number of lines to show on page on product, shipment, contact, orders, thirdparties. NEW: Can select fields to show on list also for list of customer orders, supplier orders, shipments, proposals and invoices. NEW: Show into badge on tab head, the number of dedicated contacts for all objects. NEW: Add a checkbox to select/unselect all lines on page that support mass actions (like invoice list page) @@ -1996,15 +1996,15 @@ NEW: Add date_rum into table of thirdparty bank account. NEW: The probability of lead/opportunity can be defined per lead. NEW: Added Malta VAT into migration script NEW: Add Expense report into accountancy report -NEW: Add Expense report to approve into workboard +NEW: Add Expense report to approve into workboard NEW: Selection of boxes is moved on top of home page NEW: Add filter on a keyword, status and nature into list of modules. NEW: Add hidden option BANK_DISABLE_CHECK_DEPOSIT to disable check deposit feature. NEW: Add hidden option MAIN_PUBLIC_NOTE_IN_ADDRESS -NEW: Add index on invoice status +NEW: Add index on invoice status NEW: Add constant MAIN_LOGTOHTML to 0 into setup by default to save time when we need to make debug on hosted instance. NEW: Add list of billed -NEW: Add minimum stock and desired stock into import/export profiles. +NEW: Add minimum stock and desired stock into import/export profiles. NEW: Add state into thirdparty export fields. NEW: Add more trackable events (create, submit and receive supplier order). NEW: Add hidden option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN @@ -2016,7 +2016,7 @@ NEW: Add statistics on number of projets on home page NEW: Add statistics and late records into dashboard for supplier proposals. NEW: Add the admin info on combo of type of contact NEW: Add the event BILL_PAYED to the list of supported events for module notification. -NEW: Add total weight and volume on PDF. +NEW: Add total weight and volume on PDF. NEW: Add hidden option to hide column qty ordered on shipments. NEW: Add view of virtual stock into product list (when appropriate) NEW: Add warning on tasks when they are late (add also the warning tolerance parameter) @@ -2090,7 +2090,7 @@ NEW: TimeZone can be supplied to mktime NEW: hook in shipment card NEW: Deprecated Societe::set_prospect_level, Societe::set_commnucation_level, Societe::set_OutstandingBill functions NEW: A module can add, into its import profiles, a sql request to execute at end of import. This allow to update dernormalized data after import. -NEW: Add hook pdf_build_address +NEW: Add hook pdf_build_address NEW: Add a parameter on graph function to show a generic graph when no data are available. NEW: Add $object in parameter of pdf_build_address so we could include hook into the function. NEW: Add a tool for developers to purge database with no loose of setup @@ -2109,7 +2109,7 @@ NEW: More phpunit tests. Include some REST API into automatic tests. NEW: Move Expense report menu from module to menu files. -WARNING: +WARNING: Dolibarr 4.0 should be compatible with PHP 7 but more feedbacks are still expected to confirm that. @@ -2118,7 +2118,7 @@ Dolibarr better: - Function log() of class CommandeFournisseur has been removed. Using it is no more required. - Class Resource was renamed into DolResource to avoid conflict with a reserved PHP word. - Method commonobject->add_thumb() has been renamed into commonobject->addThumbs(). -- Method select_type_comptes_financiers() has been renamed into selectTypeOfBankAccount() +- Method select_type_comptes_financiers() has been renamed into selectTypeOfBankAccount() - Property ->client that was deprecated 6 years ago, is replaced in all core code with ->thirdparty. - File '/core/tpl/document_actions_pre_headers.tpl.php' were renamed into '/core/actions_linkedfiles.inc.php'. So if you included it into your module, change your code like this to be compatible with all version: @@ -2286,7 +2286,7 @@ FIX: end of select when no fournprice FIX: Filter on assigned to was preselected on current user on list "All events" (instead of no filtering) FIX: Filter on category tag for suppliers FIX: hook on group card called but not initialized -FIX: Infinite loop on menu tree output for edition +FIX: Infinite loop on menu tree output for edition FIX: Can show tree of entries added by external modules using fk_mainmenu and fk_leftmenu instead of fk_menu. FIX: init var at wrong place report incorrect "shippable" flag on draft order. FIX: It doesn't check if there is enough stock to update the lines of orders/invoices @@ -2378,7 +2378,7 @@ FIX: When using option Price per level, when adding a predefined product, the va ***** ChangeLog for 3.9.0 compared to 3.8.* ***** For users: NEW: A new and more modern look for "eldy" theme. -NEW: Introduce a new theme called "Material Design". +NEW: Introduce a new theme called "Material Design". NEW: #3767 Allow changing multiple prices of a product at once NEW: Add a button to purge criteria in user list NEW: Add a filter field to restrict list of member when doing a LDAP list request. Use also this filter into ldap command line script making sync from ldap to dolibarr. @@ -2428,7 +2428,7 @@ NEW: Can set default value of event type when creating an event (if option "mana NEW: Can upload files on leave requests. Use more standard permissions. NEW: Can use a "|" to make a OR search on several different criterias into search text filters of tables. NEW: Can use the * as a joker characters into search boxes of lists. -NEW: Clean code into salary module, debug and add indexes +NEW: Clean code into salary module, debug and add indexes NEW: Can filter on user list and salary payments on user with naural search. NEW: Can clone agenda events. NEW: Color category is visible onto the thumb of tags on thirdparty, or products cards. @@ -2462,7 +2462,7 @@ NEW: Print event type on third party card tab agenda list (only if AGENDA_USE_EV NEW: Provide an easier way to understand if an order can be shipped. NEW: Quick search filter works also on invoice, proposal, order, intervention, contract and expense reports. NEW: Replace category edition page on members with new select2 component. -NEW: Show photo of logged user into login top right block. +NEW: Show photo of logged user into login top right block. NEW: If no photo is available for user, we show a generic photo depending on gender. NEW: Show photo of user into user list. NEW: Show which fields were used for search when doing a "generic search" from the "quick search" form on left menu. @@ -2475,7 +2475,7 @@ NEW: The thirdparties tabs, the contacts tabs and the members tabs are now prese NEW: Thumbs for statistics on main page are fully clicable (not only link inside the thumb) NEW: Translate extrafield's labels. NEW: Use new select2 component for juridical status, country and state selection. -NEW: When creating order, proposal or invoice from thirdparty card, the project is asked during creation. A link to create project if it does not exists is also available. +NEW: When creating order, proposal or invoice from thirdparty card, the project is asked during creation. A link to create project if it does not exists is also available. NEW: Uniformize form creation of proposal to add public and private notes during creation like for order and invoice. NEW: More robust antiXSS engine. NEW: Compatibility with Mysql 5.7+ @@ -2509,13 +2509,13 @@ NEW: ODT generators can now also set meta properties of ODT file. NEW: Add missing columns into llx_expedition to match other tables. NEW: A new function getImageFileNameForSize was also introduced to choose image best size according to usage to save bandwith. NEW: Support logging to a Sentry server -NEW: Prepare database to have agenda able to store more detailed emails events. +NEW: Prepare database to have agenda able to store more detailed emails events. -WARNING: +WARNING: Dolibarr 3.9 is not yet fully compatible with PHP 7 even if most features seems to work. -Mysql minimum version is now 5.0.3 +Mysql minimum version is now 5.0.3 Following changes may create regression for some external modules, but were necessary to make Dolibarr better: @@ -2523,7 +2523,7 @@ Dolibarr better: - Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use table llx_overwrite_trans instead. - Trigger LINECONTRACT_INSERT has been renamed into LINECONTRACT_CREATE to match common denomination. - A lot hooks used into PDF generation were not correctly implemented. We had to fix this. The result si that -the following hook were set as hook of type "replace". This means if your module implement such hooks, it must +the following hook were set as hook of type "replace". This means if your module implement such hooks, it must return 0 to execute standard code or 1 to replace standard code (value to output should be set into resPrints instead). This is list of hooks modified: 'pdf_getlinenum', 'pdf_getlineref', 'pdf_getlineref_supplier', 'pdf_getlinevatrate', 'pdf_getlineupexcltax', @@ -2690,7 +2690,7 @@ FIX: the view my task must show only task you are assigned to FIX: to allow phpunit of migration process for 3.4 to 3.5 FIX: to allow phpunit of migration process for 3.5 to 3.6 FIX: userlocaltax -FIX: view of product image when using old path +FIX: view of product image when using old path FIX: size of image uploaded on user. FIX: We must ue the "small" size of imge to show on card pages. FIX: When we make a direct assignement on a task to a user, we must check he is also assigned to project (and if not assign it) @@ -3107,13 +3107,13 @@ NEW: Introduce function dolGetFirstLineOfText. WARNING: Following changes may create regression for some external modules, but were necessary to make Dolibarr better: -- Removed hook supplierorderdao into supplier order creation. This is a business event, so we must use the +- Removed hook supplierorderdao into supplier order creation. This is a business event, so we must use the trigger ORDER_SUPPLIER_CREATE instead. - Hooks 'printLeftBlock' and 'formConfirm' are now compliant with hook development rules. They are - "addreplace" hooks, so you must return content with "->resprints='mycontent'" and not with "return 'mycontent'" + "addreplace" hooks, so you must return content with "->resprints='mycontent'" and not with "return 'mycontent'" - All fields "fk_societe" and "fk_soc" are now named "fk_soc" (same name for all fields). - Method select_PriceBaseType and load_PriceBaseType were merged into selectPriceBaseType. -- The triggers USER_LOGIN* are deprecated. They are still working but you should prefer use the +- The triggers USER_LOGIN* are deprecated. They are still working but you should prefer use the hook afterLogin or afterLoginFailed instead. - The trigger USER_CREATE_FROM_CONTACT has been replace with USER_CREATE and property context is now filled to make difference between creation from contact or not. @@ -3446,7 +3446,7 @@ You may also experience troubles with Mysql 5.5.41 with error "Lost connection" Upgrading to any other version or database system is abolutely required BEFORE trying to make a Dolibarr upgrade. -WARNING: +WARNING: Following changes may create regression for some external modules, but was necessary to make Dolibarr better: @@ -3602,7 +3602,7 @@ For users: - Fix: Salaries payment - Field date value is now required and add control on it. - Fix: Iban was used instead of Bic into SEPA file. - Fix: Must unaccent strings into SEPA file. -- Fix: Extrafield feature select from table should try to translate multiple column when not needed +- Fix: Extrafield feature select from table should try to translate multiple column when not needed - Fix: cents for indian ruppes are called paisa and paise. - Fix: Invoices payments may be older than invoices. - Fix: Withdrawal total amount is double @@ -3641,7 +3641,7 @@ For users: note of generated documents. - New: Add warning if supplier payment is higher that due amount. - New: Increase length of url into bookmark module. -- New: Automatic events sending mails add info about linked objects into email content. +- New: Automatic events sending mails add info about linked objects into email content. - New: Price management enhancement (multiprice level, price by customer, if MAIN_FEATURES_LEVEL=2 Price by qty). - New: Add option MAIN_FAVICON_URL. - New: Created {line_price_ht_locale}, {line_price_vat_locale} and {line_price_ttc_locale} ODT tags. @@ -3655,13 +3655,13 @@ For users: - New: Prepare generation of SEPA files into module withdrawal. - New: [ task #1164 ] Add "Ref. supplier" search box in supplier orders - New: [ task #1345 ] Can filter on status for supplier order. -- New: Add option FACTURE_SENDBYEMAIL_FOR_ALL_STATUS to allow to send invoice by email +- New: Add option FACTURE_SENDBYEMAIL_FOR_ALL_STATUS to allow to send invoice by email whatever is its status. - New: Add filter date in bank writing list page. - New: Extrafields can be used as substitution key %EXTRA_XXX% into emails texts for members. - New: Add categories translation. - New: Enable option "clone target emailing". -- New: Improved tax module: Add specific page for salaries payment +- New: Improved tax module: Add specific page for salaries payment - New: Add composer.json file so Dolibarr can be publish onto packagist.org. - New: The combo list of juridical status is now sorted - New: [ task #926 ] Add extrafield feature on order lines. @@ -3694,7 +3694,7 @@ For developers: - New: Add path file of trigger into admin trigger list page. - New: More phpunit tests. - New: Payments and supplier payment pages tabs can now be extended from modules. -- New: Add option 'aZ' into GETPOST function to check parameters contains +- New: Add option 'aZ' into GETPOST function to check parameters contains only a to z or A to Z characters. - New: Opensurvey polls tab cards can now be extended from external modules. - New: Triggers OPENSURVEY_CREATE, OPENSURVEY_DELETE added. @@ -3714,12 +3714,12 @@ WARNING: Following change may create regression for some external modules, but w Dolibarr better: - The deprecated way (with 4 parameters) to declare a new tab into a module descriptor file has been -removed. You must now use the 6 parameters way. See file modMyModule.class.php for example. +removed. You must now use the 6 parameters way. See file modMyModule.class.php for example. - Remove the javascript function ac_delay() that is not used anymore by core code. - Properties "dictionnaries" into module descriptor files have been renamed into "dictionaries". - Method form->select_currency() has been removed. Use instead print form->selectCurrency(). - Method form->select_methodes_commande() has been renamed into english name selectInputMethod(). -- The following hooks are now 'addreplace' hooks: "formCreateThirdpartyOptions" +- The following hooks are now 'addreplace' hooks: "formCreateThirdpartyOptions" So check that return value is 0 to keep default standard behaviour after hook, or 1 to disable default standard behaviour. - Properties "civilite_id" were renamed into "civility_id". @@ -3823,9 +3823,9 @@ Fix: The object deliverycompany was not used anymore and output of Fix: [ bug #1445 ] html fix : missing Fix: [ bug #1415 ] Intervention document model name and suppliers model names is not shown properly in module configuration -Fix: [ bug #1416 ] Supplier order does not list document models in the select box of the +Fix: [ bug #1416 ] Supplier order does not list document models in the select box of the supplier order card -Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice label or +Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice label or limit date for payment Fix: Filter on status was not visible when selected from url. Fix: Filtering on status was last when asking to sort. @@ -3834,7 +3834,7 @@ Fix: [ bug #1449 ] Trigger ORDER_CREATE, LINEORDER_DELETE, LINEORDER_UPDATE and Fix: [ bug #1450 ] Several Customer order's triggers do not report the error from the trigger handler. Fix: [ bug #1451 ] Interrupted order clone through trigger, loads nonexistent order. Fix: [ bug #1454 ] Mention de bas de page erroné -Fix: Do not display dictionary for non activated module +Fix: Do not display dictionary for non activated module Fix: Link element from element project pages Fix: [ bug #1509 ] Expedition admin free text & watermark submit error Fix: [ bug #1349 ] AJAX contact selector does not work fine in Project card @@ -3859,7 +3859,7 @@ Fix: [ bug #1351 ] VIES verification link broken. Fix: [ bug #1352 ] Removing a shipping does not remove the delivery. Fix: Option MAIN_INVERT_SENDER_RECIPIENT broken with typhon template. Fix: Can disable features with PHPEXCEL (no DLSF compatible). -Fix: Can disable features with CKEDITOR. +Fix: Can disable features with CKEDITOR. Fix: Pb of records not correctly cleaned when module marge is uninstalled (conflict between 'margin' and 'margins'). Fix: [ bug #1341 ] Lastname not added by file or direct input in mass e-mailing. @@ -3910,8 +3910,8 @@ Fix: When select_date is called with '' as preselected date, Fix: First param of select_date must always be forged with a dolibarr date function and not time(). Fix: fix can't add line with product in supplier order -Fix: [bug #1309] -Fix: Solve pb of too many embedded tables +Fix: [bug #1309] +Fix: Solve pb of too many embedded tables Fix: [ bug #1306 ] Fatal error when adding an external calendar Fix: A fix to manage automatic creation of code for import. Fix: Try to add code to provide easy way to fix warning on timezone not @@ -3919,7 +3919,7 @@ Fix: Try to add code to provide easy way to fix warning on timezone not Fix: Several fix into workflow/condition for invoice payments or convert into discount. Fix: Option MAIN_PDF_DASH_BETWEEN_LINES was not working when tcpdf was - making a pagebreak higher than 2 pages. + making a pagebreak higher than 2 pages. Fix: form to add images should not show link form. Fix: Correction when adding order line with price as '0'. Fix: [ bug #1283 ] ROUGET Shipment PDF. @@ -3931,7 +3931,7 @@ Fix: bug #1295: Error when creating an agenda extrafield with a number as refere Fix: Translation of number for pt_PT. Fix: Error on ajax_constantonoff function. Fix: [ bug #1323 ] problème pour générer un odt depuis les taches dans projet. -Fix: Can not make withdrawals +Fix: Can not make withdrawals ***** ChangeLog for 3.5.1 compared to 3.5.0 ***** Fix: Do not report trigger errors twice. @@ -3947,17 +3947,17 @@ Fix: Link to paypal was invalid into email text. Fix: ref and date of supplier invoice. Fix: Check on bank account. Fix: Problem with file upload and download. -Fix: Page load not ending when large number of thirdparties. We +Fix: Page load not ending when large number of thirdparties. We added option MAIN_DISABLE_AJAX_COMBOX to disable javascript combo feature that is root cause of problem. Fix: [ bug #1231 ] PDF always generated in interventions Fix: Be sure there is no duplicate default rib. Fix: Enable extrafields for customer order, proposal and invoice lines. This feature was developed for 3.5 but was disabled (hidden) because of a bug not possible to - fix enough quickly for 3.5.0 release. + fix enough quickly for 3.5.0 release. Fix: user right on Holiday for month report nor working. Fix: [ bug #1250 ] "Supplier Ref. product" sidebar search box does not work -Fix: Bad space in predefined messages. +Fix: Bad space in predefined messages. Fix: [ bug #1256 ] Signature was not added for email sent from thirdparty page. Fix: Action event SHIPPING_VALIDATE is not implemented Fix: The customer code was set to uppercase when using numbering module leopard. We @@ -4003,7 +4003,7 @@ For users: - New: Add a cron module to define scheduled jobs. - New: Add new graphical boxes (customer and supplier invoices and orders per month). - New: [ task #286 ] Enhance rounding function of prices to allow round of sum instead of sum of rounding. -- New: Can add an event automatically when a project is create. +- New: Can add an event automatically when a project is create. - New: Add option MAIN_GENERATE_DOCUMENT_WITH_PICTURE. - New: Add option excludethirdparties and onlythirdparties into merge pdf scripts. - New: [ task #925 ] Add ODT document generation for Tasks in project module. @@ -4025,7 +4025,7 @@ For users: - New : Add ability to copy contact address to clipboard. - New: Can use tag {mm} before {yy} even when there is a reset into numbering masks. - New: [ task #1060 ] Register fields localtax(1|2)_type into details tables. -- New: [ task #923 ] Localtax support for ODT templates. +- New: [ task #923 ] Localtax support for ODT templates. - New: [ task #90 ] Barcode search. - New: Add hidden option MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS. - New: Can send an email from thirdparty card. @@ -4077,26 +4077,26 @@ For developers: - New: A trigger can return an array of error strings instead of one error string. - New: Add method to use a dictionary as a combo box. - New: Add update method for web service product. -- Fix also several bugs with old code. +- Fix also several bugs with old code. WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: -1) We started to clean hooks code. -If your hook want to modify value of $actions, it's role of your hook to modify it. Dolibarr +1) We started to clean hooks code. +If your hook want to modify value of $actions, it's role of your hook to modify it. Dolibarr hook code will no more decide this for your module. If your action class for hook was returning -a string or an array, instead your module must set $actionclassinstance->results (to return array) -or $actionclassinstance->resprints (to return string) to return same thing. The return value must +a string or an array, instead your module must set $actionclassinstance->results (to return array) +or $actionclassinstance->resprints (to return string) to return same thing. The return value must be replaced by a "return 0"; -Goal is to fix old compatibility code that does not match hook specifications: - http://wiki.dolibarr.org/index.php/Hooks_system +Goal is to fix old compatibility code that does not match hook specifications: + http://wiki.dolibarr.org/index.php/Hooks_system 2) If you implemented hook printTopRightMenu, check that output does not include ''; print ''; } print ''; From ab3ad77704aaea548c00bab00f24c85b87fe8262 Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Fri, 3 May 2019 10:55:51 +0200 Subject: [PATCH 404/498] FIX : Sale representative column didn't increase nbfield variable on proposal list --- htdocs/comm/propal/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index a253b1e2eb1..24c53d26526 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -968,6 +968,7 @@ if ($resql) print ' '; } print ''; + if (! $i) $totalarray['nbfield']++; } // Extra fields From 9115df743944e10464ae61cbdd1b5193c78f7477 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 3 May 2019 11:25:53 +0200 Subject: [PATCH 405/498] Debug v10 --- htdocs/admin/dict.php | 46 +++++++++++-------------- htdocs/core/modules/modTicket.class.php | 7 ++-- htdocs/fourn/facture/card.php | 2 +- 3 files changed, 25 insertions(+), 30 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index ae4fde1876b..ab5803a086a 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -652,6 +652,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) 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'); } @@ -1053,11 +1054,12 @@ if ($id) continue; } - // Determine le nom du champ par rapport aux noms possibles - // dans les dictionnaires de donnees + // Define field friedly name from its technical name $valuetoshow=ucfirst($fieldlist[$field]); // Par defaut $valuetoshow=$langs->trans($valuetoshow); // try to translate $class=''; + + if ($fieldlist[$field]=='pos') { $valuetoshow=$langs->trans("Position"); $class='width100'; } if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); } if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); } if ($fieldlist[$field]=='taux') { @@ -1125,6 +1127,7 @@ if ($id) 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'); } if ($id == 2) // Special cas for state page { @@ -1197,8 +1200,10 @@ if ($id) print ''; + print '
'; + print '
'; print ''; print ''; @@ -1221,7 +1226,7 @@ if ($id) print '
'; print '
' tags any more. All content added must be tagged by a '
' with css class="login_block_elem" 3) Some methods object->addline used a first parameter that was object->id, some not. Of course -this was not a good practice, since object->id is already known, there is no need to provide id as -parameter. All methods addline in this case were modified to remove this parameter. +this was not a good practice, since object->id is already known, there is no need to provide id as +parameter. All methods addline in this case were modified to remove this parameter. 4) Method ->classer_facturee() is deprecated. It must be replace with ->classifyBilled(). @@ -4154,7 +4154,7 @@ Fix: update extrafield do not display immediatly after update. Fix: Fix bug with canvas thirdparty. Fix: [ bug #1037 ] Consumption> Supplier invoices related. Fix: User group name do not display in card (view or edit mode). -Fix: Link "Show all supplier invoice" on suplier card not working. +Fix: Link "Show all supplier invoice" on suplier card not working. Fix: [ bug #1039 ] Pre-defined invoices conversion. Fix: If only service module is activated, it's impossible to delete service. Fix: [ bug #1043 ] Bad interventions ref numbering. @@ -4185,7 +4185,7 @@ For users: - New: Add hidden option MAIN_PDF_TITLE_BACKGROUND_COLOR. - New: Merge tab customer and prospect. - New: Add ES formated address country rule. -- New: Can define a hierarchical responsible on user and add a tree view to +- New: Can define a hierarchical responsible on user and add a tree view to see hierarchy of users. - New: Can expand/collapse menus, categories and users list. - New: extra parameters are supported into ODT/ODS templates. @@ -4217,7 +4217,7 @@ For users: - New: [ task #773 ] Add Project document in GED(ECM) modules. - New: [ task #783 ] Add more types for extra parameters (lists, phone, emails, checkbox, prices, radio). -- New: [ task #798 ] Add range limit date on product/services as it is done on order +- New: [ task #798 ] Add range limit date on product/services as it is done on order and invoice. - New: [ task #814 ] Add extrafield feature for projects ands tasks. - New: [ task #770 ] Add ODT document generation for Projects module. @@ -4234,12 +4234,12 @@ For translators: - Update language files. For developers: -- System of menu managers has been rewritten to reduce code to do same things. +- System of menu managers has been rewritten to reduce code to do same things. - An external module can force its theme. - Add function dol_set_focus('#xxx'). - A mymodule can bring its own core/modules/mymodule/modules_mymodule.php file. - Removed not used libraries. -- More web services. +- More web services. - Renamed some database fields, code variables and parameters from french to english. - First change to manage margins on contracts. - Add hook getFormMail. @@ -4247,25 +4247,25 @@ For developers: into conf->liste_limit). - New: Add option dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen, dol_no_mouse_hover and dol_use_jmobile onto login page (to support different terminal). -- New: dol_syslog method accept a suffix to use different log files for log. +- New: dol_syslog method accept a suffix to use different log files for log. - New: Type of fields are received by export format handlers. - New: when adding an action, we can define a free code to tag it for a specific need. -- New: Enhance Dolibarr migration process to include migration script of external +- New: Enhance Dolibarr migration process to include migration script of external modules. - New: [ task #811 ] Uniformanize note field. - + WARNING: If you used external modules, some of them may need to be upgraded due to: - Fields of classes were renamed to be normalized (nom, prenom, cp, ville, adresse, tel were renamed into lastname, firstname, zip, town, address, phone). This may also be true for some fields into web services. -- If module use hook pdf_writelinedesc, module may have to add return 1 at end of +- If module use hook pdf_writelinedesc, module may have to add return 1 at end of function to keep same behaviour. TODO: backport commit 53672dff75f4fdaeeed037ff9d15f860968022ca to fix confirm with jmobile backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contract - + ***** ChangeLog for 3.3.5 compared to 3.3.4 ***** @@ -4297,7 +4297,7 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac - Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment - Fix: [ bug #789 ] VAT not being calculated in POS - Fix: [ bug #790 ] Spanish localtax RE not being correctly calculated -- Fix: [ bug #794 ] Lost filter on zipcode in prospect list +- Fix: [ bug #794 ] Lost filter on zipcode in prospect list - Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price - Fix: [ bug #810 ] Cannot update ODT template path - Fix: [ bug #816 ] Sales journal does not reflect localtaxes @@ -4318,7 +4318,7 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac ***** ChangeLog for 3.3.1 compared to 3.3 ***** - Fix: [ bug #733 ] Mass emailing tools do not support '; - print ' + print '
'; -
-
'; + print ''; print ''."\n"; print ''."\n"; @@ -1860,41 +1878,60 @@ if (preg_match('/^dopayment/', $action)) print ''; print ''; - print ' - - -
'; + if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) || ! empty($paymentintent)) + { + print ' + + +
'; + + if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) + { + print '
'; + } + + print ' +
+ + '; + + if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) + { + print '
'; + } + + print '
+ +
+ + + + +
+ +
'; + + print ''; + print ''; + + print ' +
'; + } if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { - print '
'; + if (empty($paymentintent)) + { + print '
'.$langs->trans("Error").'
'; + } + else + { + print ''; + //$_SESSION["paymentintent_id"] = $paymentintent->id; + } } - print ' -
- - '; - - if (! empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { - print '
'; - } - - print '
- -
- - - - -
'; - - print '
- - -
- -
'."\n"; + print ''."\n"; print ''."\n"; @@ -1931,7 +1968,6 @@ if (preg_match('/^dopayment/', $action)) }; var cardElement = elements.create('card', {style: style}); - var cardholderName = document.getElementById('cardholder-name'); // Add an instance of the card Element into the `card-element`
cardElement.mount('#card-element'); @@ -1940,44 +1976,70 @@ if (preg_match('/^dopayment/', $action)) cardElement.addEventListener('change', function(event) { var displayError = document.getElementById('card-errors'); if (event.error) { - console.log("Show event error"); + console.log("Show event error (like 'Incorrect card number', ...)"); displayError.textContent = event.error.message; } else { - console.log("No error"); + 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; cardButton.addEventListener('click', function(event) { - stripe.handleCardPayment( - clientSecret, cardElement, { - source_data: { - owner: { - name: cardholderName.value, + 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 = 'trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CardOwner"))); ?>'; + } + else + { + stripe.handleCardPayment( + clientSecret, cardElement, { + payment_method_data: { + billing_details: { + name: cardholderName.value + , email: '', + thirdparty)) { ?>, phone: thirdparty->phone; ?>', + thirdparty)) { + print ', address: {'."\n"; + print ' city: '.$object->thirdparty->town.','; + print ' country: '.$object->thirdparty->country_code.','; + print ' line1: '.$object->thirdparty->address.','; + print ' postal_code: '.$object->thirdparty->zip; + print '}'."\n"; + } ?> + } /* TODO Add all other known data like emails, ... to be SCA compliant */ + }, + save_payment_method: false } - } + ).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(); + } + }); } - ).then(function(result) { - jQuery('#buttontopay').hide(); - jQuery('#hourglasstopay').show(); - 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 { - console.log("No error on result of handleCardPayment, so we submit the form"); - // Submit the form - jQuery('#buttontopay').hide(); - jQuery('#hourglasstopay').show(); - } - }); }); diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 62d709fc674..52413921f90 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -280,7 +280,7 @@ $fulltag = $FULLTAG; $tmptag=dolExplodeIntoArray($fulltag, '.', '='); -dol_syslog("ispaymentok=".$ispaymentok, LOG_DEBUG, 0, '_payment'); +dol_syslog("ispaymentok=".$ispaymentok." tmptag=".var_export($tmptag, true), LOG_DEBUG, 0, '_payment'); // Make complementary actions @@ -296,7 +296,7 @@ if ($ispaymentok) $user->rights->facture->creer = 1; $user->rights->adherent->cotisation->creer = 1; - if (in_array('MEM', array_keys($tmptag))) + if (array_key_exists('MEM', $tmptag) && $tmptag['MEM'] > 0) { // Validate member // Create subscription @@ -583,7 +583,7 @@ if ($ispaymentok) $ispostactionok = -1; } } - elseif (in_array('INV', array_keys($tmptag))) + elseif (array_key_exists('INV', $tmptag) && $tmptag['INV'] > 0) { // Record payment include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -769,14 +769,14 @@ if ($ispaymentok) $urlback=$_SERVER["REQUEST_URI"]; $topic='['.$appli.'] '.$companylangs->transnoentitiesnoconv("NewOnlinePaymentReceived"); $content=""; - if (in_array('MEM', array_keys($tmptag))) + if (array_key_exists('MEM', $tmptag)) { $url=$urlwithroot."/adherents/subscription.php?rowid=".$tmptag['MEM']; $content.=''.$companylangs->trans("PaymentSubscription")."

\n"; $content.=$companylangs->trans("MemberId").': '.$tmptag['MEM']."
\n"; $content.=$companylangs->trans("Link").': '.$url.''."
\n"; } - elseif (in_array('INV', array_keys($tmptag))) + elseif (array_key_exists('INV', $tmptag)) { $url=$urlwithroot."/compta/facture/card.php?id=".$tmptag['INV']; $content.=''.$companylangs->trans("Payment")."

\n"; diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 1f2f39719a8..ee1c1a67f0a 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -243,6 +243,7 @@ class Stripe extends CommonObject * @param double $amount Amount * @param string $currency_code Currency code * @param string $tag Tag + * @param string $description Description * @param Societe $object Object to pay with Stripe * @param string $customer Stripe customer ref 'cus_xxxxxxxxxxxxx' via customerStripe() * @param string $key ''=Use common API. If not '', it is the Stripe connect account 'acc_....' to use Stripe connect @@ -252,10 +253,14 @@ class Stripe extends CommonObject * @param boolean $confirmnow false=default, true=try to confirm immediatly after create (if conditions are ok) * @return \Stripe\PaymentIntent|null Stripe PaymentIntent or null if not found */ - public function getPaymentIntent($amount, $currency_code, $tag, $object = null, $customer = null, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic', $confirmnow = false) + public function getPaymentIntent($amount, $currency_code, $tag, $description = '', $object = null, $customer = null, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic', $confirmnow = false) { global $conf, $user, $mysoc; + dol_syslog("getPaymentIntent"); + + $error = 0; + if (empty($status)) $service = 'StripeTest'; else $service = 'StripeLive'; @@ -305,6 +310,7 @@ class Stripe extends CommonObject } catch(Exception $e) { + $error++; $this->error = $e->getMessage(); } } @@ -314,9 +320,6 @@ class Stripe extends CommonObject if (empty($paymentintent)) { $ipaddress=getUserRemoteIP(); - // Not enough space for a ref so we store id. Also with multicompany we can have same ref for 2 different - // object and we need a unique (this is used later as idempotency_key) - $description=$tag; $metadata = array('dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>$ipaddress); if (is_object($object)) { @@ -330,12 +333,14 @@ class Stripe extends CommonObject "amount" => $stripeamount, "currency" => $currency_code, "payment_method_types" => ["card"], - "statement_descriptor" => dol_trunc($description, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description) + "description" => $description, + "statement_descriptor" => dol_trunc($tag, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description) "metadata" => $metadata ); if (! is_null($customer)) $dataforintent["customer"]=$customer; // save_payment_method = true, // payment_method = + //var_dump($dataforintent); if ($conf->entity!=$conf->global->STRIPECONNECT_PRINCIPAL && $fee>0) { @@ -353,9 +358,12 @@ class Stripe extends CommonObject if (empty($key)) { // If the Stripe connect account not set, we use common API usage $paymentintent = \Stripe\PaymentIntent::create($dataforintent, array("idempotency_key" => "$description")); + //$paymentintent = \Stripe\PaymentIntent::create($dataforintent, array()); } else { $paymentintent = \Stripe\PaymentIntent::create($dataforintent, array("idempotency_key" => "$description", "stripe_account" => $key)); + //$paymentintent = \Stripe\PaymentIntent::create($dataforintent, array("stripe_account" => $key)); } + //var_dump($paymentintent); // Store the payment intent if (is_object($object)) @@ -366,6 +374,7 @@ class Stripe extends CommonObject $resql = $this->db->query($sql); if (! $resql) { + $error++; $this->error = $this->db->lasterror(); dol_syslog(get_class($this) . "::PaymentIntent failed to insert paymentintent with id=".$paymentintent->id." into database."); } @@ -377,10 +386,18 @@ class Stripe extends CommonObject } catch(Exception $e) { + /*var_dump($dataforintent); + var_dump($description); + var_dump($key); + var_dump($paymentintent); + var_dump($e->getMessage());*/ + $error++; $this->error = $e->getMessage(); } } + dol_syslog("getPaymentIntent return error=".$error); + return $paymentintent; } diff --git a/htdocs/stripe/lib/stripe.lib.php b/htdocs/stripe/lib/stripe.lib.php index d806d6a39b3..100ce840e24 100644 --- a/htdocs/stripe/lib/stripe.lib.php +++ b/htdocs/stripe/lib/stripe.lib.php @@ -87,12 +87,12 @@ function showStripePaymentUrl($type, $ref) * @param string $freetag Free tag * @return string Url string */ -function getStripePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_free_tag') +function getStripePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_tag') { global $conf; $ref=str_replace(' ', '', $ref); - + if ($type == 'free') { $out=DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?amount='.($mode?'':'').$amount.($mode?'':'').'&tag='.($mode?'':'').$freetag.($mode?'':''); diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index b8ffa08fbaf..7302191fc84 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -132,19 +132,27 @@ input.smallpadd { /* Used for timesheet input */ input.buttongen { vertical-align: middle; } -input.buttonpayment { +input.buttonpayment, button.buttonpayment, div.buttonpayment { min-width: 320px; margin-bottom: 15px; background-image: none; line-height: 24px; padding: 8px; background: none; - padding-left: 38px; - text-align: ; - border: 1px solid #ddd; - background-color: #eee; + text-align: center; + border: 0; + background-color: #9999bb; white-space: normal; - box-shadow: 1px 1px 8px #bbb; + box-shadow: 1px 1px 4px #bbb; + color: #fff; + border-radius: 4px; +} +div.buttonpayment input { + background-color: unset; + color: #fff; + border-bottom: unset; + font-weight: bold; + text-transform: uppercase; } input.buttonpaymentcb { background-image: url(); @@ -3569,6 +3577,7 @@ div#card-errors { color: #fa755a; text-align: center; padding-top: 3px; + max-width: 320px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 755736eb79f..2906da3729c 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -352,18 +352,25 @@ input.smallpadd { /* Used for timesheet input */ input.buttongen { vertical-align: middle; } -input.buttonpayment { +input.buttonpayment, button.buttonpayment, div.buttonpayment { min-width: 320px; margin-bottom: 15px; background-image: none; line-height: 24px; padding: 8px; background: none; - padding-left: 30px; - text-align: ; + text-align: center; border: 2px solid #ccc; background-color: #eee; white-space: normal; + color: #888 !important; +} +div.buttonpayment input { + background-color: unset; + border-bottom: unset; + font-weight: bold; + text-transform: uppercase; + color: #333; } input.buttonpaymentcb { background-image: url(); @@ -3660,6 +3667,7 @@ div#card-errors { color: #fa755a; text-align: center; padding-top: 3px; + max-width: 320px; } From e0c3cf8360a03d7c1ed1705a7b1c02840893821d Mon Sep 17 00:00:00 2001 From: atm-greg Date: Fri, 3 May 2019 10:24:49 +0200 Subject: [PATCH 403/498] fix project link for stock correction --- htdocs/product/stock/tpl/stockcorrection.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 3d2e1c99e9b..4a9f23301a8 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -100,7 +100,7 @@ if (empty($conf) || ! is_object($conf)) { print '
'.$langs->trans('Project').''; - $formproject->select_projects(0, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300'); + $formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300'); print '
'; - // Title line with search boxes + // Title line with search input fields print ''; $filterfound=0; foreach ($fieldlist as $field => $value) @@ -1276,17 +1281,12 @@ if ($id) // dans les dictionnaires de donnees $showfield=1; // By defaut $align="left"; + $cssprefix=''; $sortable=1; - $valuetoshow=''; - /* - $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 + + // Special cases if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); } if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); } if ($fieldlist[$field]=='taux') { @@ -1304,10 +1304,7 @@ if ($id) if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); } if ($fieldlist[$field]=='position') { $align='right'; } if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Label"); } - if ($fieldlist[$field]=='libelle_facture') { - //$valuetoshow=$form->textwithtooltip($langs->trans("LabelOnDocuments"), $langs->trans("LabelUsedByDefault"),2,1,img_help(1,'')); - $valuetoshow=$langs->trans("LabelOnDocuments"); - } + 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"); $align="center"; } if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); } @@ -1316,7 +1313,6 @@ if ($id) 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') { $showfield=0; } 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; } @@ -1347,11 +1343,14 @@ if ($id) 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'); } - // Affiche nom du champ + if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } + + // Show field title if ($showfield) { - print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder); + print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder, $cssprefix); } } // Favorite - Only activated on country dictionary @@ -1806,7 +1805,6 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') if (in_array('region_id', $fieldlist)) { print ''; continue; } // For state page, we do not show the country input (we link to region, not country) @@ -1912,7 +1910,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { - print ''; + print ''; } elseif ($fieldlist[$field]=='unit') { print ''; + print ''; } /* From 6797c951644e2cea922d42c2495d5a9295e175de Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 3 May 2019 12:10:29 +0200 Subject: [PATCH 406/498] Fix syntax error --- .../accountancy/bookkeeping/thirdparty_lettering_supplier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index 3795099c78d..fab30066982 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -197,7 +197,7 @@ if ($resql) { print ''; print ''; - $letteringbutton = '\'; + $letteringbutton = ''; print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, $letteringbutton, '', $limit); From 61547e3f824c8c68c9a800a8cace7c1857b14cfe Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 3 May 2019 14:08:20 +0200 Subject: [PATCH 407/498] NEW Manage account sell_intra & sell_export in page default product --- htdocs/accountancy/admin/productaccount.php | 141 +++++++++++++++----- htdocs/langs/en_US/accountancy.lang | 4 + 2 files changed, 111 insertions(+), 34 deletions(-) diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 537eddfceb4..bd79791f709 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2019 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Ari Elbaz (elarifr) @@ -111,6 +111,8 @@ if ($action == 'update') { $accounting_product_modes = array ( 'ACCOUNTANCY_SELL', + 'ACCOUNTANCY_SELL_INTRA', + 'ACCOUNTANCY_SELL_EXPORT', 'ACCOUNTANCY_BUY' ); @@ -158,6 +160,12 @@ if ($action == 'update') { if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { $sql .= " SET accountancy_code_sell = " . $accounting->account_number; } + if ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { + $sql .= " SET accountancy_code_sell_intra = " . $accounting->account_number; + } + if ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { + $sql .= " SET accountancy_code_sell_export = " . $accounting->account_number; + } $sql .= " WHERE rowid = " . $productid; dol_syslog("/accountancy/admin/productaccount.php sql=" . $sql, LOG_DEBUG); @@ -193,15 +201,19 @@ $form = new FormAccounting($db); // so we need to get those default value rowid first $accounting = new AccountingAccount($db); // TODO: we should need to check if result is a really exist accountaccount rowid..... -$aarowid_servbuy = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1); -$aarowid_prodbuy = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT, 1); -$aarowid_servsell = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1); -$aarowid_prodsell = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT, 1); +$aarowid_servbuy = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1); +$aarowid_prodbuy = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT, 1); +$aarowid_servsell = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1); +$aarowid_prodsell = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT, 1); +$aarowid_prodsell_intra = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT, 1); +$aarowid_prodsell_export = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT, 1); -$aacompta_servbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodsell_intra = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodsell_export = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); llxHeader('', $langs->trans("ProductsBinding")); @@ -209,27 +221,45 @@ $pcgverid = $conf->global->CHARTOFACCOUNTS; $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version'); if (empty($pcgvercode)) $pcgvercode=$pcgverid; -$sql = "SELECT p.rowid, p.ref, p.label, p.description, p.tosell, p.tobuy, p.accountancy_code_sell, p.accountancy_code_buy, p.tms, p.fk_product_type as product_type,"; +$sql = "SELECT p.rowid, p.ref, p.label, p.description, p.tosell, p.tobuy, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.tms, p.fk_product_type as product_type,"; $sql.= " aa.rowid as aaid"; $sql.= " FROM " . MAIN_DB_PREFIX . "product as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON"; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { $sql.=" p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; } -else +elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { $sql.=" p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; } +elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') +{ + $sql.=" p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; +} +else +{ + $sql.=" p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; +} $sql.= ' WHERE p.entity IN ('.getEntity('product').')'; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_buy", $search_current_account); } -} else { +} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_sell", $search_current_account); } } +elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { + if (strlen(trim($search_current_account))) { + $sql .= natural_search("p.accountancy_code_sell_intra", $search_current_account); + } +} +else { + if (strlen(trim($search_current_account))) { + $sql .= natural_search("p.accountancy_code_sell_export", $search_current_account); + } +} if ($search_current_account_valid == 'withoutvalidaccount') { $sql .= " AND aa.account_number IS NULL"; @@ -280,7 +310,7 @@ if ($result) if ($search_current_account > 0) $param.="&search_current_account=".urlencode($search_current_account); if ($search_current_account_valid && $search_current_account_valid != '-1') $param.="&search_current_account_valid=".urlencode($search_current_account_valid); if ($accounting_product_mode) $param.='&accounting_product_mode='.urlencode($accounting_product_mode); - + print ''; if ($optioncss != '') print ''; print ''; @@ -301,9 +331,15 @@ if ($result) print ''; print ''; print "\n"; - print ''; + print ''; print '\n"; + print ''; + print '\n"; + print ''; + print '\n"; print ''; print '\n"; print "
'; - //print join(',',$fieldlist); print ''; @@ -1972,12 +1970,8 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') $classtd=''; $class=''; if ($fieldlist[$field]=='code') $classtd='width100'; - if ($fieldlist[$field]=='affect') $class='maxwidth50'; - if ($fieldlist[$field]=='delay') $class='maxwidth50'; - if ($fieldlist[$field]=='position') $class='maxwidth50'; - if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $class='quatrevingtpercent'; - if ($fieldlist[$field]=='tracking') $class='quatrevingtpercent'; - if ($fieldlist[$field]=='sortorder' || $fieldlist[$field]=='sens' || $fieldlist[$field]=='category_type') $class='maxwidth50'; + if (in_array($fieldlist[$field], array('pos', 'use_default', 'affect', 'delay', 'position', 'sortorder', 'sens', 'category_type'))) $class='maxwidth50'; + if (in_array($fieldlist[$field], array('libelle', 'label', 'tracking'))) $class='quatrevingtpercent'; print ''; $transfound=0; if (in_array($fieldlist[$field], array('label','libelle'))) diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php index 5aef264a11e..871bc94670d 100644 --- a/htdocs/core/modules/modTicket.class.php +++ b/htdocs/core/modules/modTicket.class.php @@ -120,15 +120,16 @@ class modTicket extends DolibarrModules } $this->dictionaries = array( 'langs' => 'ticket', - 'tabname' => array(MAIN_DB_PREFIX . "c_ticket_type", MAIN_DB_PREFIX . "c_ticket_category", MAIN_DB_PREFIX . "c_ticket_severity"), - 'tablib' => array("TicketDictType", "TicketDictCategory", "TicketDictSeverity"), - '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_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_severity as f'), + 'tabname' => array(MAIN_DB_PREFIX . "c_ticket_type", MAIN_DB_PREFIX . "c_ticket_severity", MAIN_DB_PREFIX . "c_ticket_category"), + 'tablib' => array("TicketDictType", "TicketDictSeverity", "TicketDictCategory"), + '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'), 'tabsqlsort' => array("pos ASC", "pos ASC", "pos ASC"), 'tabfield' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"), 'tabfieldvalue' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"), 'tabfieldinsert' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"), 'tabrowid' => array("rowid", "rowid", "rowid"), 'tabcond' => array($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"))), ); // Boxes diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 5c47aa41f40..f7a1c800443 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2789,7 +2789,7 @@ else } else { - print '
'.$langs->trans("None").'
'.$langs->trans("None").'
' . $langs->trans('Options') . '' . $langs->trans('Description') . '
' . $langs->trans('OptionModeProductSell') . '
' . $langs->trans('OptionModeProductSell') . ''.$langs->trans('OptionModeProductSellDesc'); print "
' . $langs->trans('OptionModeProductSellIntra') . ''.$langs->trans('OptionModeProductSellIntraDesc'); + print "
' . $langs->trans('OptionModeProductSellExport') . ''.$langs->trans('OptionModeProductSellExportDesc'); + print "
' . $langs->trans('OptionModeProductBuy') . ''.$langs->trans('OptionModeProductBuyDesc')."
\n"; @@ -318,9 +354,9 @@ if ($result) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - $buttonsave = ''; - //print '
'.$buttonsave.'
'; - + $buttonsave = ''; + //print '
'.$buttonsave.'
'; + $texte=$langs->trans("ListOfProductsServices"); print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $buttonsave, $num, $nbtotalofrecords, '', 0, '', '', $limit); @@ -332,7 +368,7 @@ if ($result) print ''; if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print ''; // On sell - if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print ''; + if ($accounting_product_mode == 'ACCOUNTANCY_SELL' || $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') print ''; // On buy if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print ''; // Current account @@ -352,10 +388,19 @@ if ($result) print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder); if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder); - if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); - if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); - if ($accounting_product_mode == 'ACCOUNTANCY_BUY') $fieldtosortaccount="p.accountancy_code_buy"; - else $fieldtosortaccount="p.accountancy_code_sell"; + if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { + print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); + $fieldtosortaccount="p.accountancy_code_sell"; + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { + print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); + $fieldtosortaccount="p.accountancy_code_sell_intra"; + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { + print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); + $fieldtosortaccount="p.accountancy_code_sell_export"; + } else { + if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); + $fieldtosortaccount="p.accountancy_code_buy"; + } print_liste_field_titre("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder); print_liste_field_titre("AssignDedicatedAccountingAccount"); $clickpitco=$form->showCheckAddButtons('checkforselect', 1); @@ -378,10 +423,16 @@ if ($result) $product_static->status = $obj->tosell; $product_static->status_buy = $obj->tobuy; - if ($obj->product_type == 0) { + if ($obj->product_type == 0 && $accounting_product_mode == 'ACCOUNTANCY_SELL') { $compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell; - } else { + } elseif ($obj->product_type == 0 && $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { + $compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell_id = $aarowid_prodsell_intra; + } elseif ($obj->product_type == 0 && $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { + $compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell_id = $aarowid_prodsell_export; + } else { $compta_prodsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell; } @@ -411,7 +462,7 @@ if ($result) print '' . nl2br(dol_trunc($obj->description, $trunclengh)) . ''; } - if ($accounting_product_mode == 'ACCOUNTANCY_SELL') + if ($accounting_product_mode == 'ACCOUNTANCY_SELL' || $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') print ''.$product_static->getLibStatut(3, 0).''; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') @@ -422,12 +473,16 @@ if ($result) if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { print length_accountg($obj->accountancy_code_buy); if ($obj->accountancy_code_buy && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); - } - else - { - print length_accountg($obj->accountancy_code_sell); - if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); - } + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { + print length_accountg($obj->accountancy_code_sell); + if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { + print length_accountg($obj->accountancy_code_sell_intra); + if ($obj->accountancy_code_sell_intra && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); + } else { + print length_accountg($obj->accountancy_code_sell_export); + if ($obj->accountancy_code_sell_export && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); + } print ''; // Dedicated account @@ -441,7 +496,7 @@ if ($result) if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); print ''; - } else { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { // Accounting account sell print ''; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code @@ -451,7 +506,26 @@ if ($result) if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); print ''; - } + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { + // Accounting account sell intra (In EEC) + print ''; + //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code + if (empty($defaultvalue)) $defaultvalue=$compta_prodsell; + $codesell=length_accountg($obj->accountancy_code_sell_intra); + //var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell); + if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid + print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); + print ''; + } else { + // Accounting account sell export (Out of EEC) + print ''; + //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code + if (empty($defaultvalue)) $defaultvalue=$compta_prodsell; + $codesell=length_accountg($obj->accountancy_code_sell_export); + if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid + print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); + print ''; + } // Checkbox select print ''; @@ -462,7 +536,6 @@ if ($result) print ''; print ''; - // Example : Adding jquery code print ' - +global->TAKEPOS_NUM_TERMINALS!="1" && $_SESSION["takeposterminal"]=="") print '
'.$langs->trans('TerminalSelect').'
'; +?>
From 5317d0432da355b1c6a271d3892f59c994e5b948 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 May 2019 18:32:26 +0200 Subject: [PATCH 453/498] Fix bad link --- htdocs/stripe/charge.php | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index fb122948dd0..e8823119e30 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -150,27 +150,30 @@ if (!$rowid) print ''; - if (!empty($stripeacc)) $connect=$stripeacc.'/'; + if (!empty($stripeacc)) $connect=$stripeacc.'/'; // Ref $url='https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id; - if ($servicestatus) - { - $url='https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id; - } - print "".img_picto($langs->trans('ShowInStripe'), 'object_globe')." ".$charge->id."\n"; + if ($servicestatus) + { + $url='https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id; + } + print ""; + print "".img_picto($langs->trans('ShowInStripe'), 'object_globe')." ".$charge->id.""; + print "\n"; // Stripe customer print ""; - - 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) { - $url='https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer; + $url='https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer; } - print ''.img_picto($langs->trans('ShowInStripe'), 'object_globe').' '.$charge->customer.''; - - print "\n"; + if (! empty($charge->customer)) + { + print ''.img_picto($langs->trans('ShowInStripe'), 'object_globe').' '.$charge->customer.''; + } + print "\n"; // Link print ""; if ($societestatic->id > 0) From f6de2d091d365375565ef7f74ecf487f3ed60a6a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 May 2019 19:07:12 +0200 Subject: [PATCH 454/498] FIX Sending email to mass actions send same email on same customer --- htdocs/compta/facture/list.php | 2 -- htdocs/core/actions_massactions.inc.php | 15 ++++++++------- htdocs/core/tpl/massactions_pre.tpl.php | 3 ++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index f83b024e6ed..e24c0dc23d4 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -354,8 +354,6 @@ $facturestatic=new Facture($db); $formcompany=new FormCompany($db); $thirdpartystatic=new Societe($db); -// llxHeader('',$langs->trans('CustomersInvoices'),'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes'); - $sql = 'SELECT'; if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT'; $sql.= ' f.rowid as id, f.facnumber as ref, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,'; diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 910f9eca27a..381adbff567 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -365,8 +365,8 @@ if (! $error && $massaction == 'confirm_presend') $looparray[0]=$objectforloop; } //var_dump($looparray);exit; - dol_syslog("We have set an array of ".count($looparray)." emails to send"); - + 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 { // Make substitution in email content @@ -387,8 +387,8 @@ if (! $error && $massaction == 'confirm_presend') complete_substitutions_array($substitutionarray, $langs, $objecttmp, $parameters); - $subject=make_substitutions($subject, $substitutionarray); - $message=make_substitutions($message, $substitutionarray); + $subjectreplaced=make_substitutions($subject, $substitutionarray); + $messagereplaced=make_substitutions($message, $substitutionarray); $filepath = $attachedfiles['paths']; $filename = $attachedfiles['names']; @@ -416,10 +416,11 @@ if (! $error && $massaction == 'confirm_presend') } //var_dump($filepath); //var_dump($trackid);exit; + //var_dump($subjectreplaced); // Send mail (substitutionarray must be done just before this) require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid); + $mailfile = new CMailFile($subjectreplaced, $sendto, $from, $messagereplaced, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1, '', '', $trackid); if ($mailfile->error) { $resaction.='
'.$mailfile->error.'
'; @@ -451,9 +452,9 @@ if (! $error && $massaction == 'confirm_presend') if ($message) { if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subjectreplaced); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); + $actionmsg = dol_concatdesc($actionmsg, $messagereplaced); } $actionmsg2=''; diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index 9c586f82e9e..a5d7883f3e5 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -112,7 +112,8 @@ if ($massaction == 'presend') $formmail->withtoreadonly = 1; } - $formmail->withoptiononeemailperrecipient = (count($listofselectedref) == 1 || empty($liste))? 0 : ((GETPOST('oneemailperrecipient')=='on')?1:-1); + $formmail->withoptiononeemailperrecipient = ((count($listofselectedref) == 1 && count(reset($listofselectedref)) == 1) || empty($liste)) ? 0 : ((GETPOST('oneemailperrecipient')=='on')?1:-1); + $formmail->withto = empty($liste)?(GETPOST('sendto','alpha')?GETPOST('sendto','alpha'):array()):$liste; $formmail->withtofree = empty($liste)?1:0; $formmail->withtocc = 1; From bb4cda67194fe065216d23234713911827411043 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 May 2019 19:08:40 +0200 Subject: [PATCH 455/498] Fix phpcs --- .../accountancy/bookkeeping/thirdparty_lettering_customer.php | 2 +- .../accountancy/bookkeeping/thirdparty_lettering_supplier.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index 15de7204e93..81754d121b9 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -42,7 +42,7 @@ $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); -$socid = GETPOST('socid','int')?GETPOST('socid','int'):GETPOST('id','int'); +$socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int'); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index 16c13caa335..50b80c72338 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -41,7 +41,7 @@ $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); -$socid = GETPOST('socid','int')?GETPOST('socid','int'):GETPOST('id','int'); +$socid = GETPOST('socid', 'int')?GETPOST('socid', 'int'):GETPOST('id', 'int'); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); From c3693cb007f7c3ab607b4441d349aa3a2e435168 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 May 2019 19:10:12 +0200 Subject: [PATCH 456/498] Fix phpcs --- htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 825771f76cc..23e81826cf7 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -1312,7 +1312,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'); + $arrayidcontact=$object->getIdContact('external', 'CUSTOMER'); if (count($arrayidcontact) > 0) { $usecontact=true; From 96c021773e469236df4861718200d3f42e78e852 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 May 2019 19:11:17 +0200 Subject: [PATCH 457/498] Update takepos.lib.php --- htdocs/core/lib/takepos.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index 76c6a358c4b..896a46c8189 100644 --- a/htdocs/core/lib/takepos.lib.php +++ b/htdocs/core/lib/takepos.lib.php @@ -24,6 +24,7 @@ /** * Prepare array with list of tabs * + * @return array Array of tabs */ function takepos_prepare_head() { From 541da011a4db7a34ef87521337d15da84c3d2725 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 May 2019 21:59:55 +0200 Subject: [PATCH 458/498] Prepare 9.0.2 --- ChangeLog | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4be15921a53..143aa9859f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,39 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 9.0.3 compared to 9.0.2 ***** +FIX: #11013 +FIX: #11041 +FIX: actioncomm: sort events by date after external calendars and hook (into 7.0) +FIX: better test +FIX: Combo list was limited to 20 in stock correction +FIX: Confusion between expired and late +FIX: Cursor pointer in payment screen for autofill +FIX: CVE-2019-11199 +FIX: CVE-2019-11200 +FIX: CVE-2019-11201 +FIX: Default value on form to send email +FIX: error messages not displayed +FIX: Massive debug in lettering function +FIX: missing compatibility with multicompany +FIX: missing global $user +FIX: missing situation invoice in list +FIX: MultiEntity in lettering functionality +FIX: Product accountancey sell intra code must be visible if main feature level 1 +FIX: ref for table without ref manager are set to NULL. +FIX: Sending email to mass actions send same email on same customer +FIX: Several fixes on import of services/products +FIX: shipping default warehouse if only one warehouse +FIX: sortfield on lettering function +FIX: Status of opportunity should never be -1 +FIX: test to display create invoice button on supplier_order card +FIX: The autocopy feature was ko for suppliers +FIX: Total per day in timespent per week +FIX: Total per day shows 00:00 if the total time spent is equal to 12:00 +FIX: Update/delete currency on same languages +FIX: Wrong variable name make contact of supplier order not used on PDF. + ***** ChangeLog for 9.0.2 compared to 9.0.1 ***** FIX: #10822 FIX: Accountancy - Format EBP import From 08fcfded76bc9bf8334cf332477659fa586fc43f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 May 2019 21:59:55 +0200 Subject: [PATCH 459/498] Prepare 9.0.3 --- ChangeLog | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4be15921a53..143aa9859f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,39 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 9.0.3 compared to 9.0.2 ***** +FIX: #11013 +FIX: #11041 +FIX: actioncomm: sort events by date after external calendars and hook (into 7.0) +FIX: better test +FIX: Combo list was limited to 20 in stock correction +FIX: Confusion between expired and late +FIX: Cursor pointer in payment screen for autofill +FIX: CVE-2019-11199 +FIX: CVE-2019-11200 +FIX: CVE-2019-11201 +FIX: Default value on form to send email +FIX: error messages not displayed +FIX: Massive debug in lettering function +FIX: missing compatibility with multicompany +FIX: missing global $user +FIX: missing situation invoice in list +FIX: MultiEntity in lettering functionality +FIX: Product accountancey sell intra code must be visible if main feature level 1 +FIX: ref for table without ref manager are set to NULL. +FIX: Sending email to mass actions send same email on same customer +FIX: Several fixes on import of services/products +FIX: shipping default warehouse if only one warehouse +FIX: sortfield on lettering function +FIX: Status of opportunity should never be -1 +FIX: test to display create invoice button on supplier_order card +FIX: The autocopy feature was ko for suppliers +FIX: Total per day in timespent per week +FIX: Total per day shows 00:00 if the total time spent is equal to 12:00 +FIX: Update/delete currency on same languages +FIX: Wrong variable name make contact of supplier order not used on PDF. + ***** ChangeLog for 9.0.2 compared to 9.0.1 ***** FIX: #10822 FIX: Accountancy - Format EBP import From 50563ab126fd0ddd72047bfb0bdebf7b1d01b965 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 May 2019 22:03:16 +0200 Subject: [PATCH 460/498] Prepare 9.0.3 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 03f949c6fe6..3ad0cfa96e4 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr'); -if (! defined('DOL_VERSION')) define('DOL_VERSION','9.0.2'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (! defined('DOL_VERSION')) define('DOL_VERSION','9.0.3'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (! defined('EURO')) define('EURO',chr(128)); From ed98817f0da6a5401eb8c37d5f922812bc6311eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 10:15:38 +0200 Subject: [PATCH 461/498] Fix template for situation --- .../modules/facture/doc/pdf_crabe.modules.php | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 444a2cdcb4e..6e7acdc88ef 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -179,7 +179,7 @@ class pdf_crabe extends ModelePDFFactures // Define position of columns $this->posxdesc=$this->marge_gauche+1; - if($conf->global->PRODUCT_USE_UNITS) + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $this->posxtva=101; $this->posxup=118; @@ -192,8 +192,8 @@ class pdf_crabe extends ModelePDFFactures $this->posxup=126; $this->posxqty=145; } + $this->posxprogress=151; // Only displayed for situation invoices $this->posxdiscount=162; - $this->posxprogress=126; // Only displayed for situation invoices $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; $this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images @@ -382,8 +382,8 @@ class pdf_crabe extends ModelePDFFactures $this->posxtva -= $progress_width; $this->posxup -= $progress_width; $this->posxqty -= $progress_width; - if(empty($conf->global->PRODUCT_USE_UNITS)) { - $this->posxprogress += $progress_width; + if (empty($conf->global->PRODUCT_USE_UNITS)) { + $this->posxunit -= $progress_width; } /*$this->posxdiscount -= $progress_width; $this->posxprogress -= $progress_width;*/ @@ -444,7 +444,7 @@ class pdf_crabe extends ModelePDFFactures complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($notetoshow), 0, 1); $nexY = $pdf->GetY(); @@ -568,7 +568,6 @@ class pdf_crabe extends ModelePDFFactures $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); // Enough for 6 chars - if ($this->situationinvoice) { $pdf->MultiCell($this->posxprogress-$this->posxqty-0.8, 4, $qty, 0, 'R'); @@ -587,7 +586,7 @@ class pdf_crabe extends ModelePDFFactures { $progress = pdf_getlineprogress($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxprogress, $curY); - if($conf->global->PRODUCT_USE_UNITS) + if (! empty($conf->global->PRODUCT_USE_UNITS)) { $pdf->MultiCell($this->posxunit-$this->posxprogress-1, 3, $progress, 0, 'R'); } @@ -602,7 +601,7 @@ class pdf_crabe extends ModelePDFFactures } // Unit - if($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); @@ -1550,15 +1549,15 @@ class pdf_crabe extends ModelePDFFactures if($conf->global->PRODUCT_USE_UNITS) { - $pdf->MultiCell($this->posxunit-$this->posxprogress, 2, $outputlangs->transnoentities("Progress"), '', 'C'); + $pdf->MultiCell($this->posxunit-$this->posxprogress, 2, $outputlangs->transnoentities("%"), '', 'C'); } elseif ($this->atleastonediscount) { - $pdf->MultiCell($this->posxdiscount-$this->posxprogress, 2, $outputlangs->transnoentities("Progress"), '', 'C'); + $pdf->MultiCell($this->posxdiscount-$this->posxprogress, 2, $outputlangs->transnoentities("%"), '', 'C'); } else { - $pdf->MultiCell($this->postotalht-$this->posxprogress, 2, $outputlangs->transnoentities("Progress"), '', 'C'); + $pdf->MultiCell($this->postotalht-$this->posxprogress, 2, $outputlangs->transnoentities("%"), '', 'C'); } } } @@ -1582,16 +1581,6 @@ class pdf_crabe extends ModelePDFFactures } } - if ($this->situationinvoice) - { - $pdf->line($this->postotalht+4, $tab_top, $this->postotalht+4, $tab_top + $tab_height); - if (empty($hidetop)) - { - $pdf->SetXY($this->postotalht-19, $tab_top+1); - $pdf->MultiCell(30, 2, $outputlangs->transnoentities("Situation"), '', 'C'); - } - } - if ($this->atleastonediscount) { $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); From d3bbb93ada807222bb77ca755205f0862f8bf557 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 10:15:38 +0200 Subject: [PATCH 462/498] Fix template for situation Conflicts: htdocs/core/modules/facture/doc/pdf_crabe.modules.php --- .../commande/doc/pdf_einstein.modules.php | 36 ++-- .../commande/doc/pdf_eratosthene.modules.php | 9 - .../doc/pdf_standard.modules.php | 2 +- .../modules/facture/doc/pdf_crabe.modules.php | 164 ++++++------------ .../product/doc/pdf_standard.modules.php | 19 +- .../modules/propale/doc/pdf_azur.modules.php | 36 ++-- .../stock/doc/pdf_standard.modules.php | 80 +-------- .../pdf/pdf_canelle.modules.php | 38 ++-- .../pdf/pdf_muscadet.modules.php | 38 ++-- .../doc/pdf_aurore.modules.php | 36 ++-- htdocs/langs/en_US/main.lang | 1 + 11 files changed, 119 insertions(+), 340 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 7009773e582..def09507b92 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -180,6 +180,7 @@ class pdf_einstein extends ModelePDFCommandes $this->posxtva=110; $this->posxup=126; $this->posxqty=145; + $this->posxunit=162; } $this->posxdiscount=162; $this->postotalht=174; @@ -314,14 +315,16 @@ class pdf_einstein extends ModelePDFCommandes $this->atleastonediscount++; } } - if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) + if (empty($this->atleastonediscount)) { - $this->posxpicture+=($this->postotalht - $this->posxdiscount); - $this->posxtva+=($this->postotalht - $this->posxdiscount); - $this->posxup+=($this->postotalht - $this->posxdiscount); - $this->posxqty+=($this->postotalht - $this->posxdiscount); - $this->posxdiscount+=($this->postotalht - $this->posxdiscount); - //$this->postotalht; + $delta = ($this->postotalht - $this->posxdiscount); + $this->posxpicture+=$delta; + $this->posxtva+=$delta; + $this->posxup+=$delta; + $this->posxqty+=$delta; + $this->posxunit+=$delta; + $this->posxdiscount+=$delta; + // post of fields after are not modified, stay at same position } // New page @@ -475,15 +478,7 @@ class pdf_einstein extends ModelePDFCommandes // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); - // Enough for 6 chars - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit if($conf->global->PRODUCT_USE_UNITS) @@ -1185,14 +1180,7 @@ class pdf_einstein extends ModelePDFCommandes if (empty($hidetop)) { $pdf->SetXY($this->posxqty-1, $tab_top+1); - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } if($conf->global->PRODUCT_USE_UNITS) { diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 07173f7db13..835e20b2480 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -256,15 +256,6 @@ class pdf_eratosthene extends ModelePDFCommandes } } - if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) - { - $this->posxpicture+=($this->postotalht - $this->posxdiscount); - $this->posxtva+=($this->postotalht - $this->posxdiscount); - $this->posxup+=($this->postotalht - $this->posxdiscount); - $this->posxqty+=($this->postotalht - $this->posxdiscount); - $this->posxdiscount+=($this->postotalht - $this->posxdiscount); - //$this->postotalht; - } // New page $pdf->AddPage(); diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 596be42c96c..4dc07ad6140 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -915,7 +915,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxqty-1, $tab_top+1); - $pdf->MultiCell($this->postotalttc-$this->posxqty - 1,2, $outputlangs->transnoentities("Qty"),'','R'); + $pdf->MultiCell($this->postotalttc-$this->posxqty - 1,2, $outputlangs->transnoentities("Qty"),'','C'); } // Total with all taxes diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index c22b1d23ef7..d6eb5191bb4 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -117,7 +117,7 @@ class pdf_crabe extends ModelePDFFactures /** * Issuer - * @var Company object that emits + * @var Societe object that emits */ public $emetteur; @@ -179,7 +179,7 @@ class pdf_crabe extends ModelePDFFactures // Define position of columns $this->posxdesc=$this->marge_gauche+1; - if($conf->global->PRODUCT_USE_UNITS) + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $this->posxtva=101; $this->posxup=118; @@ -191,9 +191,10 @@ class pdf_crabe extends ModelePDFFactures $this->posxtva=110; $this->posxup=126; $this->posxqty=145; + $this->posxunit=162; } $this->posxdiscount=162; - $this->posxprogress=126; // Only displayed for situation invoices + $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; $this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images @@ -363,14 +364,16 @@ class pdf_crabe extends ModelePDFFactures $this->atleastonediscount++; } } - if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) // retreive space not used by discount + if (empty($this->atleastonediscount)) // retreive space not used by discount { - $this->posxpicture+=($this->postotalht - $this->posxdiscount); - $this->posxtva+=($this->postotalht - $this->posxdiscount); - $this->posxup+=($this->postotalht - $this->posxdiscount); - $this->posxqty+=($this->postotalht - $this->posxdiscount); - $this->posxdiscount+=($this->postotalht - $this->posxdiscount); - //$this->postotalht; + $delta = ($this->posxprogress - $this->posxdiscount); + $this->posxpicture+=$delta; + $this->posxtva+=$delta; + $this->posxup+=$delta; + $this->posxqty+=$delta; + $this->posxunit+=$delta; + $this->posxdiscount+=$delta; + // post of fields after are not modified, stay at same position } $progress_width = 0; @@ -378,15 +381,14 @@ class pdf_crabe extends ModelePDFFactures if ($object->situation_cycle_ref) { $this->situationinvoice = true; - $progress_width = 18; + $progress_width = 10; + $this->posxpicture -= $progress_width; $this->posxtva -= $progress_width; $this->posxup -= $progress_width; $this->posxqty -= $progress_width; - if(empty($conf->global->PRODUCT_USE_UNITS)) { - $this->posxprogress += $progress_width; - } - /*$this->posxdiscount -= $progress_width; - $this->posxprogress -= $progress_width;*/ + $this->posxunit -= $progress_width; + $this->posxdiscount -= $progress_width; + $this->posxprogress -= $progress_width; } // New page @@ -444,7 +446,7 @@ class pdf_crabe extends ModelePDFFactures complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - $pdf->SetFont('','', $default_font_size - 1); + $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($notetoshow), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; @@ -566,42 +568,10 @@ class pdf_crabe extends ModelePDFFactures // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); - // Enough for 6 chars - - if ($this->situationinvoice) - { - $pdf->MultiCell($this->posxprogress-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } - else if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } - - // Situation progress - if ($this->situationinvoice) - { - $progress = pdf_getlineprogress($object, $i, $outputlangs, $hidedetails); - $pdf->SetXY($this->posxprogress, $curY); - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxprogress-1, 3, $progress, 0, 'R'); - } - else if ($this->atleastonediscount) - { - $pdf->MultiCell($this->posxdiscount-$this->posxprogress-1, 3, $progress, 0, 'R'); - } - else - { - $pdf->MultiCell($this->postotalht-$this->posxprogress-1, 3, $progress, 0, 'R'); - } - } + $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit - if($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); @@ -613,7 +583,15 @@ class pdf_crabe extends ModelePDFFactures { $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'); + $pdf->MultiCell($this->posxprogress-$this->posxdiscount+2, 3, $remise_percent, 0, 'R'); + } + + // Situation progress + 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'); } // Total HT line @@ -1524,76 +1502,38 @@ class pdf_crabe extends ModelePDFFactures if (empty($hidetop)) { $pdf->SetXY($this->posxqty-1, $tab_top+1); - - if($this->situationinvoice) - { - $pdf->MultiCell($this->posxprogress-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } - else if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } - if ($this->situationinvoice) { - $pdf->line($this->posxprogress - 1, $tab_top, $this->posxprogress - 1, $tab_top + $tab_height); - - if (empty($hidetop)) { - - $pdf->SetXY($this->posxprogress, $tab_top+1); - - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C'); - } - else if ($this->atleastonediscount) - { - $pdf->MultiCell($this->posxdiscount-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C'); - } - else - { - $pdf->MultiCell($this->postotalht-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C'); - } - } - } - - if($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->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height); - 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->situationinvoice) - { - $pdf->line($this->postotalht+4, $tab_top, $this->postotalht+4, $tab_top + $tab_height); - if (empty($hidetop)) - { - $pdf->SetXY($this->postotalht-19, $tab_top+1); - $pdf->MultiCell(30,2, $outputlangs->transnoentities("Situation"),'','C'); + $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', 'C'); } } if ($this->atleastonediscount) { - $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); - } + $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 ($this->situationinvoice) { + $pdf->line($this->posxprogress - 1, $tab_top, $this->posxprogress - 1, $tab_top + $tab_height); + if (empty($hidetop)) { + $pdf->SetXY($this->posxprogress, $tab_top+1); + $pdf->MultiCell($this->postotalht-$this->posxprogress, 2, $outputlangs->transnoentities("ProgressShort"), '', 'C'); + } + } + + $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); + if (empty($hidetop)) { $pdf->SetXY($this->postotalht-1, $tab_top+1); diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index e9af5b9aa6e..cf3a31d5c3a 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -422,15 +422,7 @@ class pdf_standard extends ModelePDFProduct // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); - // Enough for 6 chars - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit if($conf->global->PRODUCT_USE_UNITS) @@ -663,14 +655,7 @@ class pdf_standard extends ModelePDFProduct if (empty($hidetop)) { $pdf->SetXY($this->posxqty-1, $tab_top+1); - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } if($conf->global->PRODUCT_USE_UNITS) { diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 3d7b5b44c34..8aef1aff7b0 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -179,6 +179,7 @@ class pdf_azur extends ModelePDFPropales $this->posxtva=110; $this->posxup=126; $this->posxqty=145; + $this->posxunit=162; } $this->posxdiscount=162; $this->postotalht=174; @@ -368,14 +369,16 @@ class pdf_azur extends ModelePDFPropales $this->atleastonediscount++; } } - if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) + if (empty($this->atleastonediscount)) { - $this->posxpicture+=($this->postotalht - $this->posxdiscount); - $this->posxtva+=($this->postotalht - $this->posxdiscount); - $this->posxup+=($this->postotalht - $this->posxdiscount); - $this->posxqty+=($this->postotalht - $this->posxdiscount); - $this->posxdiscount+=($this->postotalht - $this->posxdiscount); - //$this->postotalht; + $delta = ($this->postotalht - $this->posxdiscount); + $this->posxpicture+=$delta; + $this->posxtva+=$delta; + $this->posxup+=$delta; + $this->posxqty+=$delta; + $this->posxunit+=$delta; + $this->posxdiscount+=$delta; + // post of fields after are not modified, stay at same position } // New page @@ -573,15 +576,7 @@ class pdf_azur extends ModelePDFPropales // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); - // Enough for 6 chars - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit if($conf->global->PRODUCT_USE_UNITS) @@ -1389,14 +1384,7 @@ class pdf_azur extends ModelePDFPropales if (empty($hidetop)) { $pdf->SetXY($this->posxqty-1, $tab_top+1); - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } if($conf->global->PRODUCT_USE_UNITS) { diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index c27eb0e2f81..711bd84e8a3 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -636,89 +636,11 @@ class pdf_standard extends ModelePDFStock $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)) - { - $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); - $pdf->SetXY($this->posxtva, $curY); - $pdf->MultiCell($this->posxup-$this->posxtva-0.8, 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); - // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); // Enough for 6 chars - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } - - // Unit - if($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 - $pdf->SetXY($this->posxdiscount, $curY); - 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'); - } - - // Total HT line - $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); - $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 ($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; - $localtax1_rate=$object->lines[$i]->localtax1_tx; - $localtax2_rate=$object->lines[$i]->localtax2_tx; - $localtax1_type=$object->lines[$i]->localtax1_type; - $localtax2_type=$object->lines[$i]->localtax2_type; - - if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100; - if ($object->remise_percent) $localtax1ligne-=($localtax1ligne*$object->remise_percent)/100; - if ($object->remise_percent) $localtax2ligne-=($localtax2ligne*$object->remise_percent)/100; - - $vatrate=(string) $object->lines[$i]->tva_tx; - - // Retrieve type from database for backward compatibility with old records - if ((! isset($localtax1_type) || $localtax1_type=='' || ! isset($localtax2_type) || $localtax2_type=='') // if tax type not defined - && (! empty($localtax1_rate) || ! empty($localtax2_rate))) // and there is local tax - { - $localtaxtmp_array=getLocalTaxesFromRate($vatrate,0,$object->thirdparty,$mysoc); - $localtax1_type = $localtaxtmp_array[0]; - $localtax2_type = $localtaxtmp_array[2]; - } - - // retrieve global local tax - if ($localtax1_type && $localtax1ligne != 0) - $this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne; - if ($localtax2_type && $localtax2ligne != 0) - $this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne; - - if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*'; - if (! isset($this->tva[$vatrate])) $this->tva[$vatrate]=0; - $this->tva[$vatrate] += $tvaligne; + $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Add line if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index f44240daa83..88ad771d1cd 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -153,6 +153,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->posxtva=112; $this->posxup=126; $this->posxqty=145; + $this->posxunit=162; $this->posxdiscount=162; $this->postotalht=174; @@ -302,14 +303,16 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->atleastonediscount++; } } - if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) + if (empty($this->atleastonediscount)) { - $this->posxpicture+=($this->postotalht - $this->posxdiscount); - $this->posxtva+=($this->postotalht - $this->posxdiscount); - $this->posxup+=($this->postotalht - $this->posxdiscount); - $this->posxqty+=($this->postotalht - $this->posxdiscount); - $this->posxdiscount+=($this->postotalht - $this->posxdiscount); - //$this->postotalht; + $delta = ($this->postotalht - $this->posxdiscount); + $this->posxpicture+=$delta; + $this->posxtva+=$delta; + $this->posxup+=$delta; + $this->posxqty+=$delta; + $this->posxunit+=$delta; + $this->posxdiscount+=$delta; + // post of fields after are not modified, stay at same position } // New page @@ -447,15 +450,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); - // Enough for 6 chars - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit if($conf->global->PRODUCT_USE_UNITS) @@ -470,7 +465,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices 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'); + $pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent, 0, 'R'); } // Total HT line @@ -887,14 +882,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices if (empty($hidetop)) { $pdf->SetXY($this->posxqty-1, $tab_top+1); - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } if($conf->global->PRODUCT_USE_UNITS) { diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index e0546fd61aa..a6d7a71ef24 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -159,7 +159,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->emetteur=$mysoc; if (empty($this->emetteur->country_code)) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default, if was not defined - // Defini position des colonnes + // Define position of columns $this->posxdesc=$this->marge_gauche+1; $this->posxdiscount=162; $this->postotalht=174; @@ -174,6 +174,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->posxtva=110; $this->posxup=126; $this->posxqty=145; + $this->posxunit=162; } if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxup = $this->posxtva; // posxtva is picture position reference @@ -350,14 +351,16 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->atleastonediscount++; } } - if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) + if (empty($this->atleastonediscount)) { - $this->posxpicture+=($this->postotalht - $this->posxdiscount); - $this->posxtva+=($this->postotalht - $this->posxdiscount); - $this->posxup+=($this->postotalht - $this->posxdiscount); - $this->posxqty+=($this->postotalht - $this->posxdiscount); - $this->posxdiscount+=($this->postotalht - $this->posxdiscount); - //$this->postotalht; + $delta = ($this->postotalht - $this->posxdiscount); + $this->posxpicture+=$delta; + $this->posxtva+=$delta; + $this->posxup+=$delta; + $this->posxqty+=$delta; + $this->posxunit+=$delta; + $this->posxdiscount+=$delta; + // post of fields after are not modified, stay at same position } // New page @@ -526,15 +529,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); - // Enough for 6 chars - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit if($conf->global->PRODUCT_USE_UNITS) @@ -1072,14 +1067,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if (empty($hidetop)) { $pdf->SetXY($this->posxqty-1, $tab_top+1); - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } if($conf->global->PRODUCT_USE_UNITS) { 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 b9f9aa39dcf..8e2985369b6 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -171,6 +171,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->posxtva=102; $this->posxup=126; $this->posxqty=145; + $this->posxunit=162; } if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxup=$this->posxtva; @@ -339,14 +340,16 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->atleastonediscount++; } } - if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) + if (empty($this->atleastonediscount)) { - $this->posxpicture+=($this->postotalht - $this->posxdiscount); - $this->posxtva+=($this->postotalht - $this->posxdiscount); - $this->posxup+=($this->postotalht - $this->posxdiscount); - $this->posxqty+=($this->postotalht - $this->posxdiscount); - $this->posxdiscount+=($this->postotalht - $this->posxdiscount); - //$this->postotalht; + $delta = ($this->postotalht - $this->posxdiscount); + $this->posxpicture+=$delta; + $this->posxtva+=$delta; + $this->posxup+=$delta; + $this->posxqty+=$delta; + $this->posxunit+=$delta; + $this->posxdiscount+=$delta; + // post of fields after are not modified, stay at same position } // New page @@ -518,15 +521,7 @@ class pdf_aurore extends ModelePDFSupplierProposal // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); - // Enough for 6 chars - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 3, $qty, 0, 'R'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $qty, 0, 'R'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit if($conf->global->PRODUCT_USE_UNITS) @@ -1230,14 +1225,7 @@ class pdf_aurore extends ModelePDFSupplierProposal if (empty($hidetop)) { $pdf->SetXY($this->posxqty-1, $tab_top+1); - if($conf->global->PRODUCT_USE_UNITS) - { - $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } - else - { - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); - } + $pdf->MultiCell($this->posxunit-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } if($conf->global->PRODUCT_USE_UNITS) { diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 7891a7c1d7b..6efba19536b 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -827,6 +827,7 @@ RelatedObjects=Related Objects ClassifyBilled=Classify billed ClassifyUnbilled=Classify unbilled Progress=Progress +ProgressShort=Progr. FrontOffice=Front office BackOffice=Back office View=View From f1fd4108ae9d8e0833845289f6910682020fbe7f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 12:17:20 +0200 Subject: [PATCH 463/498] Debug/Clean code --- .../core/modules/bank/doc/pdf_ban.modules.php | 1 - .../bank/doc/pdf_sepamandate.modules.php | 9 ++------- .../commande/doc/pdf_eratosthene.modules.php | 18 +----------------- .../modules/propale/doc/pdf_cyan.modules.php | 16 ---------------- .../supplier_order/pdf/pdf_cornas.modules.php | 18 +----------------- 5 files changed, 4 insertions(+), 58 deletions(-) diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 53a38eb70ed..5deb40fc7ad 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -84,7 +84,6 @@ class pdf_ban extends ModeleBankAccountDoc $this->posxref=$this->marge_gauche+1; $this->posxlabel=$this->marge_gauche+25; $this->posxworkload=$this->marge_gauche+100; - $this->posxprogress=$this->marge_gauche+130; $this->posxdatestart=$this->marge_gauche+150; $this->posxdateend=$this->marge_gauche+170; } diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 1c10871eae1..9783c4690b2 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -83,12 +83,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined // Defini position des colonnes - $this->posxref=$this->marge_gauche+1; - $this->posxlabel=$this->marge_gauche+25; - $this->posxworkload=$this->marge_gauche+100; - $this->posxprogress=$this->marge_gauche+130; - $this->posxdatestart=$this->marge_gauche+150; - $this->posxdateend=$this->marge_gauche+170; + $this->posxref=$this->marge_gauche; } @@ -203,7 +198,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc 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); + $pdf->writeHTMLCell(190, 3, $this->posxref, $tab_top-2, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-($tab_top-2); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 3695576d0d3..2b059eec331 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -424,7 +424,7 @@ class pdf_eratosthene extends ModelePDFCommandes complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top -= 2; $pdf->startTransaction(); @@ -1711,22 +1711,6 @@ class pdf_eratosthene extends ModelePDFCommandes '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' => false, // add left line separator - ); - - if($this->situationinvoice) - { - $this->cols['progress']['status'] = true; - } - $rank = $rank + 10; $this->cols['unit'] = array( 'rank' => $rank, diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 5a71c060a51..14a2456157a 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1863,22 +1863,6 @@ class pdf_cyan extends ModelePDFPropales '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' => false, // add left line separator - ); - - if($this->situationinvoice) - { - $this->cols['progress']['status'] = true; - } - $rank = $rank + 10; $this->cols['unit'] = array( 'rank' => $rank, diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php index 0e3da7781cd..cf71d691715 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php @@ -376,7 +376,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top -= 2; $pdf->startTransaction(); @@ -1550,22 +1550,6 @@ class pdf_cornas extends ModelePDFSuppliersOrders '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' => false, // add left line separator - ); - - if($this->situationinvoice) - { - $this->cols['progress']['status'] = true; - } - $rank = $rank + 10; $this->cols['unit'] = array( 'rank' => $rank, From af8d2e0e1adf9de4ba156752e605d5ffecf85d0c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 12:31:51 +0200 Subject: [PATCH 464/498] Fix error message when module disabled --- htdocs/admin/emailcollector_card.php | 4 ++-- htdocs/admin/emailcollector_list.php | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index eaef18c9543..ca30af7ae69 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -33,8 +33,8 @@ include_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollectorfilter.class include_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollectoraction.class.php'; include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php'; -if (!$user->admin) - accessforbidden(); +if (!$user->admin) accessforbidden(); +if (empty($conf->emailcollector->enabled)) accessforbidden(); // Load traductions files requiredby by page $langs->loadLangs(array("admin", "mails", "other")); diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index cacebb8e55d..f56afd9074d 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; dol_include_once('/emailcollector/class/emailcollector.class.php'); if (!$user->admin) accessforbidden(); +if (empty($conf->emailcollector->enabled)) accessforbidden(); // Load traductions files requiredby by page $langs->loadLangs(array("admin", "other")); @@ -450,10 +451,10 @@ while ($i < min($num, $limit)) $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 (! empty($arrayfields['t.'.$key]['checked'])) { print ' Date: Thu, 9 May 2019 12:38:00 +0200 Subject: [PATCH 465/498] FIX: Add hidden option MAIN_PDF_HIDE_SITUATION to hide situation (quick hack to fix output pb). --- ChangeLog | 1 + htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 143aa9859f3..b92b23a0748 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,7 @@ FIX: Total per day in timespent per week FIX: Total per day shows 00:00 if the total time spent is equal to 12:00 FIX: Update/delete currency on same languages FIX: Wrong variable name make contact of supplier order not used on PDF. +FIX: Add hidden option MAIN_PDF_HIDE_SITUATION to hide situation (quick hack to fix output pb). ***** ChangeLog for 9.0.2 compared to 9.0.1 ***** FIX: #10822 diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index d6eb5191bb4..c1172587ab5 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -378,7 +378,7 @@ class pdf_crabe extends ModelePDFFactures $progress_width = 0; // Situation invoice handling - if ($object->situation_cycle_ref) + if ($object->situation_cycle_ref && empty($conf->global->MAIN_PDF_HIDE_SITUATION)) { $this->situationinvoice = true; $progress_width = 10; From 5aa7382aee2ee183f698de58e53294cba86b9f80 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 12:42:57 +0200 Subject: [PATCH 466/498] Fix packager for 10.0 --- build/makepack-dolibarr.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 96ae320e1b5..8f9951ef157 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -129,7 +129,7 @@ $BUILDROOT="$TEMP/buildroot"; $result = open( IN, "<" . $SOURCE . "/htdocs/filefunc.inc.php" ); if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; } while () { - if ( $_ =~ /define\('DOL_VERSION','([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; } + if ( $_ =~ /define\('DOL_VERSION',\s*'([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; } } close IN; ($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3); From 84714f39e21ea0be702a7f7e556471f787514f78 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 13:37:20 +0200 Subject: [PATCH 467/498] Fix setup of terminal --- htdocs/core/lib/takepos.lib.php | 4 ++-- htdocs/langs/en_US/cashdesk.lang | 3 ++- htdocs/takepos/admin/setup.php | 30 +++++++++++++++++------------ htdocs/takepos/admin/terminal.php | 32 ++++++++++++++++++------------- 4 files changed, 41 insertions(+), 28 deletions(-) diff --git a/htdocs/core/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index 896a46c8189..d5e2d3be854 100644 --- a/htdocs/core/lib/takepos.lib.php +++ b/htdocs/core/lib/takepos.lib.php @@ -37,8 +37,8 @@ function takepos_prepare_head() $head[$h][1] = $langs->trans("Parameters"); $head[$h][2] = 'setup'; $h++; - - for ($i = 2; $i <= $conf->global->TAKEPOS_NUM_TERMINALS; $i++) + + for ($i = 1; $i <= $conf->global->TAKEPOS_NUM_TERMINALS; $i++) { $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/terminal.php?terminal='.$i; $head[$h][1] = $langs->trans("Terminal"). " ".$i; diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 629416df6ed..f0e2d029878 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -64,5 +64,6 @@ EnableBarOrRestaurantFeatures=Enable features for Bar or Restaurant ConfirmDeletionOfThisPOSSale=Do your confirm the deletion of this current sale ? History=History ValidateAndClose=Validate and close -Terminals=Terminals +Terminal=Terminal +NumberOfTerminals=Number of Terminals TerminalSelect=Select terminal you want to use: \ No newline at end of file diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 7f51508dfc5..b685d9e97d2 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -64,6 +64,7 @@ if (GETPOST('action', 'alpha') == 'set') $db->begin(); 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); @@ -76,6 +77,8 @@ if (GETPOST('action', 'alpha') == 'set') } $res = dolibarr_set_const($db, "CASHDESK_ID_WAREHOUSE", (GETPOST('CASHDESK_ID_WAREHOUSE', 'alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE', 'alpha') : ''), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK", GETPOST('CASHDESK_NO_DECREASE_STOCK', 'alpha'), 'chaine', 0, '', $conf->entity); + */ + $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); @@ -140,6 +143,15 @@ print ''; print ''.$langs->trans("Parameters").''.$langs->trans("Value").''; print "\n"; +// Terminals +print ''; +print $langs->trans("NumberOfTerminals"); +print ''; +$array=array(1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5", 6=>"6", 7=>"7", 8=>"8", 9=>"9"); +print $form->selectarray('TAKEPOS_NUM_TERMINALS', $array, (empty($conf->global->TAKEPOS_NUM_TERMINALS)?'0':$conf->global->TAKEPOS_NUM_TERMINALS), 0); +print "\n"; + +// Services if (! empty($conf->service->enabled)) { print ''; @@ -148,14 +160,15 @@ if (! empty($conf->service->enabled)) print $form->selectyesno("CASHDESK_SERVICES", $conf->global->CASHDESK_SERVICES, 1); print "\n"; } + +// Auto print tickets print ''; print $langs->trans("AutoPrintTickets"); print ''; print $form->selectyesno("TAKEPOS_AUTO_PRINT_TICKETS", $conf->global->TAKEPOS_AUTO_PRINT_TICKETS, 1); print "\n"; - - +// Root category for products print ''; print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc")); print ''; @@ -253,19 +266,11 @@ else } print "\n"; -// Terminals -print ''; -print $langs->trans("Terminals"); -print ''; -$array=array(1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5"); -print $form->selectarray('TAKEPOS_NUM_TERMINALS', $array, (empty($conf->global->TAKEPOS_NUM_TERMINALS)?'0':$conf->global->TAKEPOS_NUM_TERMINALS), 0); -print "\n"; - print ''; print '
'; - +/* print ''; print ''; if (!$conf->global->TAKEPOS_NUM_TERMINALS || $conf->global->TAKEPOS_NUM_TERMINALS=="1") print ''; @@ -296,7 +301,7 @@ if (! empty($conf->banque->enabled)) $name="CASHDESK_ID_BANKACCOUNT_".$modep->code; print ''; print ''; } @@ -339,6 +344,7 @@ if (! empty($conf->stock->enabled)) print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'.$langs->trans("CashDeskBankAccountFor").' '.$langs->trans($modep->libelle).''; - $cour=preg_match('/^LIQ.*/', $modep->code)?2:1; + $cour=preg_match('|^LIQ.*|', $modep->code)?2:1; $form->select_comptes($conf->global->$name, $name, 0, "courant=".$cour, 1); print '
'; print '
'; +*/ print '
'; diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index fadf5b971f9..7085d904891 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -57,26 +57,31 @@ if($resql){ } } +$terminaltouse = $terminal; +if ($terminaltouse == '1') $terminaltouse = ''; + + /* * Actions */ + if (GETPOST('action', 'alpha') == 'set') { $db->begin(); if (GETPOST('socid', 'int') < 0) $_POST["socid"]=''; - $res = dolibarr_set_const($db, "CASHDESK_ID_THIRDPARTY".$terminal, (GETPOST('socid', 'int') > 0 ? GETPOST('socid', 'int') : ''), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "CASHDESK_ID_THIRDPARTY".$terminaltouse, (GETPOST('socid', 'int') > 0 ? GETPOST('socid', 'int') : ''), 'chaine', 0, '', $conf->entity); - $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CASH".$terminal, (GETPOST('CASHDESK_ID_BANKACCOUNT_CASH'.$terminal, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CASH'.$terminal, 'alpha') : ''), 'chaine', 0, '', $conf->entity); - $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CHEQUE".$terminal, (GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminal, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminal, 'alpha') : ''), 'chaine', 0, '', $conf->entity); - $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CB".$terminal, (GETPOST('CASHDESK_ID_BANKACCOUNT_CB'.$terminal, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CB'.$terminal, 'alpha') : ''), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CASH".$terminaltouse, (GETPOST('CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CHEQUE".$terminaltouse, (GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CB".$terminaltouse, (GETPOST('CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); foreach($paiements as $modep) { if (in_array($modep->code, array('LIQ', 'CB', 'CHQ'))) continue; - $name="CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminal; + $name="CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminaltouse; $res = dolibarr_set_const($db, $name, (GETPOST($name, 'alpha') > 0 ? GETPOST($name, 'alpha') : ''), 'chaine', 0, '', $conf->entity); } - $res = dolibarr_set_const($db, "CASHDESK_ID_WAREHOUSE".$terminal, (GETPOST('CASHDESK_ID_WAREHOUSE'.$terminal, 'alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE'.$terminal, 'alpha') : ''), 'chaine', 0, '', $conf->entity); - $res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK".$terminal, GETPOST('CASHDESK_NO_DECREASE_STOCK'.$terminal, 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "CASHDESK_ID_WAREHOUSE".$terminaltouse, (GETPOST('CASHDESK_ID_WAREHOUSE'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK".$terminaltouse, GETPOST('CASHDESK_NO_DECREASE_STOCK'.$terminaltouse, 'alpha'), 'chaine', 0, '', $conf->entity); dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); @@ -94,6 +99,7 @@ if (GETPOST('action', 'alpha') == 'set') } } + /* * View */ @@ -111,7 +117,7 @@ print '
'; // Mode -print ''; +print ''; print ''; print ''; @@ -122,26 +128,26 @@ print "\n"; print ''.$langs->trans("CashDeskThirdPartyForSell").''; print ''; -print $form->select_company($conf->global->{'CASHDESK_ID_THIRDPARTY'.$terminal}, 'socid', 's.client in (1, 3) AND s.status = 1', 1, 0, 0, array(), 0); +print $form->select_company($conf->global->{'CASHDESK_ID_THIRDPARTY'.$terminaltouse}, 'socid', 's.client in (1, 3) AND s.status = 1', 1, 0, 0, array(), 0); print ''; if (! empty($conf->banque->enabled)) { print ''.$langs->trans("CashDeskBankAccountForSell").''; print ''; - $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$terminal}, 'CASHDESK_ID_BANKACCOUNT_CASH'.$terminal, 0, "courant=2", 1); + $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse}, 'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse, 0, "courant=2", 1); print ''; print ''.$langs->trans("CashDeskBankAccountForCheque").''; print ''; - $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminal}, 'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminal, 0, "courant=1", 1); + $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse}, 'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse, 0, "courant=1", 1); print ''; print ''.$langs->trans("CashDeskBankAccountForCB").''; print ''; - $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$terminal}, 'CASHDESK_ID_BANKACCOUNT_CB'.$terminal, 0, "courant=1", 1); + $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse}, 'CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse, 0, "courant=1", 1); print ''; foreach($paiements as $modep) { if (in_array($modep->code, array('LIQ', 'CB', 'CHQ'))) continue; - $name="CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminal; + $name="CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminaltouse; print ''.$langs->trans("CashDeskBankAccountFor").' '.$langs->trans($modep->libelle).''; print ''; $cour=preg_match('/^LIQ.*/', $modep->code)?2:1; From 18071fb2384e965eae74690782f47c47135589bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 13:40:03 +0200 Subject: [PATCH 468/498] Works with 9 terminals --- htdocs/takepos/takepos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 0db03a20080..f5de960223d 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -549,7 +549,7 @@ function TerminalsDialog() { jQuery("#dialog-info").dialog({ resizable: false, - height:200, + height:220, width:400, modal: true, buttons: { From 3ddd5110efc54a6185770f8cbf07a43f6312d68c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 9 May 2019 13:42:32 +0200 Subject: [PATCH 469/498] Update adherent.class.php --- htdocs/adherents/class/adherent.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 68575d2e279..540ae425cb2 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1279,7 +1279,7 @@ class Adherent extends CommonObject $this->login = $obj->login; $this->societe = $obj->company; $this->company = $obj->company; - $this->fk_soc = $obj->fk_soc; + $this->socid = $obj->fk_soc; $this->address = $obj->address; $this->zip = $obj->zip; $this->town = $obj->town; From 3bf162dcd61152609a198565fbeacbd27962b383 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 14:36:48 +0200 Subject: [PATCH 470/498] Clean code for v10 --- .../compta/cashcontrol/cashcontrol_card.php | 49 +++++++++++----- htdocs/modulebuilder/template/admin/setup.php | 5 +- .../core/modules/modMyModule.class.php | 57 +++++++++++-------- 3 files changed, 73 insertions(+), 38 deletions(-) diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 8fc53fbdb53..5e16d090d3b 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -234,6 +234,8 @@ if ($action=="create" || $action=="start") { $posmodule = GETPOST('posmodule', 'alpha'); $terminalid = GETPOST('posnumber', 'alpha'); + $terminaltouse = $terminalid; + if ($terminaltouse == '1') $terminaltouse = ''; // Calculate $initialbalanceforterminal for terminal 0 foreach($arrayofpaymentmode as $key => $val) @@ -245,24 +247,33 @@ if ($action=="create" || $action=="start") } // Get the bank account dedicated to this point of sale module/terminal - $bankid = $conf->global->CASHDESK_ID_BANKACCOUNT_CASH; // This value is ok for 'Terminal 0' for module 'CashDesk' and 'TakePos' (they manage only 1 terminal) + $vartouse=CASHDESK_ID_BANKACCOUNT_CASH.$terminaltouse; + $bankid = $conf->global->$vartouse; // This value is ok for 'Terminal 0' for module 'CashDesk' and 'TakePos' (they manage only 1 terminal) // Hook to get the good bank id according to posmodule and posnumber. // @TODO add hook here - $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'); - - $resql = $db->query($sql); - if ($resql) + if ($bankid > 0) { - $obj = $db->fetch_object($resql); - if ($obj) $initialbalanceforterminal[$terminalid][$key] = $obj->total; + $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'); + + $resql = $db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + if ($obj) $initialbalanceforterminal[$terminalid][$key] = $obj->total; + } + else dol_print_error($db); + } + else + { + setEventMessages($langs->trans("SetupOfTerminalNotComplete", $terminalid), null, 'errors'); + $error++; } - else dol_print_error($db); } // Calculate $theoricalamountforterminal for terminal 0 @@ -332,7 +343,16 @@ if ($action=="create" || $action=="start") print ''; print ''.$form->selectarray('posmodule', $arrayofposavailable, GETPOST('posmodule', 'alpha'), (count($arrayofposavailable)>1?1:0)).''; - print ''; + print ''; + $array=array(1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5", 6=>"6", 7=>"7", 8=>"8", 9=>"9"); + $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 ''; + print ''; // Year print ''; $retstring=''; @@ -380,6 +400,7 @@ if ($action=="create" || $action=="start") print ''; print ''; + // Table to see/enter balance if ($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') { $posmodule = GETPOST('posmodule', 'alpha'); diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index e39d31c8c7a..a434833c792 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -59,15 +59,18 @@ $arrayofparameters=array( ); + /* * Actions */ + if ((float) DOL_VERSION >= 6) { include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; } + /* * View */ @@ -85,7 +88,7 @@ $head = mymoduleAdminPrepareHead(); dol_fiche_head($head, 'settings', '', -1, "mymodule@mymodule"); // Setup page goes here -echo $langs->trans("MyModuleSetupPage").'

'; +echo ''.$langs->trans("MyModuleSetupPage").'

'; if ($action == 'edit') diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 622e3fd0bac..9c04db22c12 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018-2019 Nicolas ZABOURI + * Copyright (C) 2018-2019 Nicolas ZABOURI * Copyright (C) 2019 Frédéric France * Copyright (C) ---Put here your own copyright and developer email--- * @@ -17,6 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + /** * \defgroup mymodule Module MyModule * \brief MyModule module descriptor. @@ -26,6 +27,7 @@ * \brief Description and activation file for module MyModule */ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; + /** * Description and activation class for module MyModule */ @@ -40,9 +42,10 @@ class modMyModule extends DolibarrModules { 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 id number for your module + $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','...' @@ -62,8 +65,9 @@ class modMyModule extends DolibarrModules $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 + // 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 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. @@ -96,7 +100,7 @@ class modMyModule extends DolibarrModules 'js' => array( // '/mymodule/js/mymodule.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 'all' + // 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', @@ -104,7 +108,7 @@ class modMyModule extends DolibarrModules // ), // 'entity' => '0', ), - // Set this to 1 if feature of module are opened to external users + // Set this to 1 if features of module are opened to external users 'moduleforexternal' => 0, ); // Data directories to create when module is enabled. @@ -120,8 +124,8 @@ class modMyModule 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("mymodule@mymodule"); - //$this->phpmin = array(5,4); // Minimum version of PHP required by module - $this->need_dolibarr_version = array(4,0); // Minimum version of Dolibarr required by module + $this->phpmin = array(5,5); // 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'...) //$this->automatic_activation = array('FR'=>'MyModuleWasAutomaticallyActivatedBecauseOfYourCountryChoice'); @@ -134,15 +138,18 @@ class modMyModule extends DolibarrModules $this->const = array( // 1 => array('MYMODULE_MYCONSTANT', 'chaine', 'avalue', 'This is a constant to add', 1, 'allentities', 1) ); + // 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->mymodule) || ! isset($conf->mymodule->enabled)) { $conf->mymodule=new stdClass(); $conf->mymodule->enabled=0; } + // Array to add new pages in new tabs $this->tabs = array(); // Example: @@ -198,15 +205,14 @@ class modMyModule extends DolibarrModules */ // Boxes/Widgets - // Add here list of php file(s) stored in mymodule/core/boxes that contains class to show a widget. + // Add here list of php file(s) stored in mymodule/core/boxes that contains a class to show a widget. $this->boxes = array( // 0 => array( // 'file' => 'mymodulewidget1.php@mymodule', // 'note' => 'Widget provided by MyModule', // 'enabledbydefaulton' => 'Home', // ), - //1=>array('file'=>'mymodulewidget2.php@mymodule','note'=>'Widget provided by MyModule'), - //2=>array('file'=>'mymodulewidget3.php@mymodule','note'=>'Widget provided by MyModule') + // ... ); // Cronjobs (List of cron jobs entries to add when module is enabled) @@ -232,29 +238,30 @@ class modMyModule extends DolibarrModules // 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'status'=>0, 'test'=>'$conf->mymodule->enabled', 'priority'=>50) // ); - // Permissions - $this->rights = array(); // Permission array used by this module + // 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 MyModule'; // Permission label - $this->rights[$r][3] = 0; // Permission by default for new user (0/1) $this->rights[$r][4] = 'read'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->mymodule->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 MyModule'; // Permission label - $this->rights[$r][3] = 0; // Permission by default for new user (0/1) $this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $r++; $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) $this->rights[$r][1] = 'Delete objects of MyModule'; // Permission label - $this->rights[$r][3] = 0; // Permission by default for new user (0/1) $this->rights[$r][4] = 'delete'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) + $r++; + /* END MODULEBUILDER PERMISSIONS */ - // Main menu entries - $this->menu = array(); // List of menus to add + // Main menu entries to add + $this->menu = array(); $r=0; // Add here entries to declare new menus /* BEGIN MODULEBUILDER TOPMENU */ @@ -304,7 +311,7 @@ class modMyModule extends DolibarrModules ); END MODULEBUILDER LEFTMENU MYOBJECT */ - // Exports + // Exports profiles provided by this module $r=1; /* BEGIN MODULEBUILDER EXPORT MYOBJECT */ /* @@ -324,7 +331,7 @@ class modMyModule extends DolibarrModules $r++; */ /* END MODULEBUILDER EXPORT MYOBJECT */ - // Imports + // Imports profiles provided by this module $r=1; /* BEGIN MODULEBUILDER IMPORT MYOBJECT */ /* @@ -344,6 +351,7 @@ class modMyModule extends DolibarrModules $r++; */ /* END MODULEBUILDER IMPORT MYOBJECT */ } + /** * Function called when module is enabled. * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. @@ -355,18 +363,21 @@ class modMyModule extends DolibarrModules public function init($options = '') { $result=$this->_load_tables('/mymodule/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') - // Create extrafields - include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); + 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('myattr1', "New Attr 1 label", 'boolean', 1, 3, 'thirdparty', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); //$result2=$extrafields->addExtraField('myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); //$result3=$extrafields->addExtraField('myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); //$result4=$extrafields->addExtraField('myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); //$result5=$extrafields->addExtraField('myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'mymodule@mymodule', '$conf->mymodule->enabled'); + $sql = array(); return $this->_init($sql, $options); } + /** * Function called when module is disabled. * Remove from database constants, boxes and permissions from Dolibarr database. From d78900478290f33441eeb7ef0a69ae8771a6b741 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 15:35:55 +0200 Subject: [PATCH 471/498] Update adherent.class.php --- htdocs/adherents/class/adherent.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 540ae425cb2..fc61e56115c 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1280,6 +1280,7 @@ class Adherent extends CommonObject $this->societe = $obj->company; $this->company = $obj->company; $this->socid = $obj->fk_soc; + $this->fk_soc = $obj->fk_soc; // For backward comaptibility $this->address = $obj->address; $this->zip = $obj->zip; $this->town = $obj->town; From 9672c7ccca2808c75923964f5e88d18f8cf6c259 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 16:21:53 +0200 Subject: [PATCH 472/498] Translation --- htdocs/langs/en_US/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index daba22fe660..0862719289b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -470,7 +470,7 @@ TheKeyIsTheNameOfHtmlField=This is the name of the HTML field. Technical knowled 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=
Example:
For the form to create a new third party, it is %s.
For URL of external modules installed into custom directory, do not include the "custom/", so use path like mymodule/mypage.php and not custom/mymodule/mypage.php.
If you want default value only if url has some parameter, you can use %s PageUrlForDefaultValuesList=
Example:
For the page that lists third parties, it is %s.
For URL of external modules installed into custom directory, do not include the "custom/" so use a path like mymodule/mypagelist.php and not custom/mymodule/mypagelist.php.
If you want default value only if url has some parameter, you can use %s -AlsoDefaultValuesAreEffectiveForActionCreate=Also note that overwritting default values for form creation works only for pages that were correctly designed (so with parameter action=create...) +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. From 2ffad20e9f094840efef76ad8717e2ce57effa9a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 16:37:46 +0200 Subject: [PATCH 473/498] fix typo --- htdocs/langs/en_US/modulebuilder.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index 5cb927dc8b7..c3f75301f67 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -25,7 +25,7 @@ EnterNameOfModuleToDeleteDesc=You can delete your module. WARNING: All coding fi 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 or your application so your are ready to distribute it on any Dolibarr. You can also distribute it or sell it on marketplace like DoliStore.com. +BuildPackageDesc=You can generate a zip package of your application so your are ready to distribute it on any Dolibarr. You can also distribute it or sell it on marketplace like DoliStore.com. BuildDocumentation=Build documentation ModuleIsNotActive=This module is not activated yet. Go to %s to make it live or click here: ModuleIsLive=This module has been activated. Any change may break a current live feature. From 57911150d16ca441aeb7a876d259d972c45d561e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 16:50:22 +0200 Subject: [PATCH 474/498] CSS --- htdocs/admin/modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index d06f5d393d9..0507596caec 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -709,8 +709,8 @@ if ($mode == 'common') { if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) print $langs->trans("Used"); else { - print img_picto($langs->trans("Required"), 'switch_on'); - print $langs->trans("Required"); + print img_picto($langs->trans("Required"), 'switch_on', '', false, 0, 0, '', 'opacitymedium'); + //print $langs->trans("Required"); } if (! empty($conf->multicompany->enabled) && $user->entity) $disableSetup++; } From b8f2f957bf52ea3399ac4c0bbd20bae78db1ac5e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 16:58:31 +0200 Subject: [PATCH 475/498] Sync transifex --- htdocs/langs/en_US/products.lang | 2 +- htdocs/langs/fr_FR/accountancy.lang | 5 +++++ htdocs/langs/fr_FR/admin.lang | 21 ++++++++++++++++----- htdocs/langs/fr_FR/assets.lang | 6 ++++++ htdocs/langs/fr_FR/cashdesk.lang | 5 +++++ htdocs/langs/fr_FR/companies.lang | 2 +- htdocs/langs/fr_FR/contracts.lang | 3 ++- htdocs/langs/fr_FR/cron.lang | 2 +- htdocs/langs/fr_FR/mails.lang | 2 ++ htdocs/langs/fr_FR/main.lang | 4 +++- htdocs/langs/fr_FR/members.lang | 10 +++++----- htdocs/langs/fr_FR/modulebuilder.lang | 26 ++++++++++++++++---------- htdocs/langs/fr_FR/mrp.lang | 13 +++++++++++++ htdocs/langs/fr_FR/multicurrency.lang | 4 ++-- htdocs/langs/fr_FR/paypal.lang | 4 +++- htdocs/langs/fr_FR/products.lang | 3 ++- htdocs/langs/fr_FR/projects.lang | 4 ++-- htdocs/langs/fr_FR/stripe.lang | 6 ++++-- htdocs/langs/fr_FR/ticket.lang | 9 +++++---- htdocs/langs/fr_FR/trips.lang | 2 +- htdocs/langs/fr_FR/website.lang | 2 ++ 21 files changed, 97 insertions(+), 38 deletions(-) create mode 100644 htdocs/langs/fr_FR/mrp.lang diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index be20d1a7504..5f07a7f2eb0 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -260,7 +260,7 @@ AddVariable=Add Variable AddUpdater=Add Updater GlobalVariables=Global variables VariableToUpdate=Variable to update -GlobalVariableUpdaters=Global variable updaters +GlobalVariableUpdaters=External updaters for variables GlobalVariableUpdaterType0=JSON data GlobalVariableUpdaterHelp0=Parses JSON data from specified URL, VALUE specifies the location of relevant value, GlobalVariableUpdaterHelpFormat0=Format for request {"URL": "http://example.com/urlofjson", "VALUE": "array1,array2,targetvalue"} diff --git a/htdocs/langs/fr_FR/accountancy.lang b/htdocs/langs/fr_FR/accountancy.lang index 7a47a8fe2e3..638afa65361 100644 --- a/htdocs/langs/fr_FR/accountancy.lang +++ b/htdocs/langs/fr_FR/accountancy.lang @@ -177,6 +177,7 @@ LabelAccount=Libellé du compte LabelOperation=Libellé opération Sens=Sens LetteringCode=Code de lettrage +Lettering=Lettrage Codejournal=Journal JournalLabel=Libellé journal NumPiece=Numéro de pièce @@ -299,8 +300,12 @@ DefaultBindingDesc=Cette page peut être utilisée pour définir un compte par d DefaultClosureDesc=Cette page peut être utilisée pour définir les paramètres pour clore un bilan. Options=Options OptionModeProductSell=Mode ventes +OptionModeProductSellIntra=Mode ventes exportées dans la CEE +OptionModeProductSellExport=Mode ventes exportées dans d'autres pays OptionModeProductBuy=Mode achats OptionModeProductSellDesc=Afficher tous les produits/services avec le compte comptable pour les ventes. +OptionModeProductSellIntraDesc=Afficher tous les produits avec un compte comptabilité pour les ventes dans la CEE. +OptionModeProductSellExportDesc=Afficher tous les produits avec un compte comptable pour les autres ventes à les autres pays. OptionModeProductBuyDesc=Afficher tous les produits/services avec le compte comptable pour les achats. CleanFixHistory=Effacer les données comptables des lignes qui n'existent pas dans le plan comptable CleanHistory=Réinitialiser tous les liens pour l'année sélectionnée diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index b60cd875f58..7503dc955ff 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -71,7 +71,9 @@ UseSearchToSelectCompanyTooltip=Si vous avez un nombre important de tiers (>100 UseSearchToSelectContactTooltip=Si vous avez un nombre important de contacts (>100 000), vous pourrez améliorer les performances en positionnant la constante CONTACT_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limité au début des chaines. DelaiedFullListToSelectCompany=Attendre que vous ayez appuyé sur une touche avant de charger le contenu de la liste déroulante des tiers.
Cela peut augmenter les performances si vous avez un grand nombre de tiers, mais cela est moins convivial. DelaiedFullListToSelectContact=Attendre que vous ayez appuyé sur une touche avant de charger le contenu de la liste déroulante des adresses de contact.
Cela peut augmenter les performances si vous avez un grand nombre de contacts, mais cela est moins convivial -NumberOfKeyToSearch=Nb carac. déclenchant recherche : %s +NumberOfKeyToSearch=Nb de caractère déclenchant la recherche : %s +NumberOfBytes=Nombre d'octets +SearchString=Chaîne de recherche NotAvailableWhenAjaxDisabled=Non disponible quand Ajax est désactivé AllowToSelectProjectFromOtherCompany=Sur les éléments d'un tiers, autorise la sélection d'un projet lié à un autre tiers JavascriptDisabled=Javascript désactivé @@ -329,7 +331,7 @@ CallUpdatePage=Aller à la page de mise à jour de la structure et des données LastStableVersion=Dernière version stable disponible LastActivationDate=Date de dernière activation LastActivationAuthor=Auteur de la dernière activation -LastActivationIP=Dernière adresse IP d'activation +LastActivationIP=Adresse IP dernière d'activation 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:
{000000} 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.
{000000+000} idem que précédemment mais un décalage correspondant au nombre à droite du + est appliqué dès la première %s.
{000000@x} 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.
{dd} jour (01 à 31).
{mm} mois (01 à 12).
{yy}, {yyyy} ou {y} année sur 2, 4 ou 1 chiffres.
@@ -457,7 +459,7 @@ ModuleCompanyCodeCustomerAquarium=%s suivi d'un code client tiers pour un code c ModuleCompanyCodeSupplierAquarium=%s suivi du code fournisseur tiers pour le code comptable fournisseur ModuleCompanyCodePanicum=Retourne un code comptable vide ModuleCompanyCodeDigitaria=Renvoie un code comptable composé suivant le code tiers. Le code est composé du caractère 'C' en première position suivi des 5 premiers caractères du code tiers. -Use3StepsApproval=Par défaut, les commandes fournisseurs nécessitent d'être créées et approuvées en deux étapes/utilisateurs (une étape/utilisateur pour créer et une étape/utilisateur pour approuver. Si un utilisateur à les deux permissions, ces deux actions sont effectuées en une seule fois). Cette option ajoute la nécessité d'une approbation par une troisième étape/utilisateur, si le montant de la commande est supérieur au montant d'une valeur définie (soit 3 étapes nécessaire: 1 =Validation, 2=Première approbation et 3=seconde approbation si le montant l'exige).
Laissez le champ vide si une seule approbation (2 étapes) sont suffisantes, placez une valeur très faibe (0.1) si une deuxième approbation (3 étapes) est toujours exigée. +Use3StepsApproval=Par défaut, les commandes fournisseurs nécessitent d'être créées et approuvées par 2 utilisateurs différents (une étape/utilisateur pour créer et une étape/utilisateur pour approuver. Notez que si un utilisateur à les deux permissions, ces deux actions sont effectuées en une seule fois). Cette option ajoute la nécessité d'une approbation par une troisième étape/utilisateur, si le montant de la commande est supérieur au montant d'une valeur définie (soit 3 étapes nécessaire: 1 =Validation, 2=Première approbation et 3=seconde approbation si le montant l'exige).
Laissez le champ vide si une seule approbation (2 étapes) est suffisante, placez une valeur très faible (0.1) si une deuxième approbation (3 étapes) est toujours exigée. UseDoubleApproval=Activer l'approbation en trois étapes si le montant HT est supérieur à... WarningPHPMail=Attention : Il est préférable de configurer les emails sortant pour utiliser le serveur email de votre fournisseur plutôt que la configuration par défaut. Certains fournisseurs email (comme Yahoo) ne permettent pas l'envoi d'e-mails depuis un autre serveur que le leur si l'adresse d'envoi utilisée est une adresse autre que la leur. Votre configuration actuelle utilise le serveur de l'application pour l'envoi d'e-mails et non le serveur de votre fournisseur de messagerie, aussi certains destinataires (ceux compatibles avec le protocole restrictif DMARC) demanderont au fournisseur d'email si ils peuvent accepter l'email et certains fournisseurs (comme Yahoo) peuvent répondre "non" car le serveur utilisé pour l'envoi n'est pas un serveur appartenant au fournisseur, aussi certains de vos emails envoyés peuvent ne pas etre accepté (faites attention aussi aux quotas de votre fournisseur d'email).
SI votre fournisseur d'email (comme Yahoo) impose cette restriction, vous devrez modifier votre configuration et opter pour l'autre méthode d'envoi "SMTP server" et saisir les identifiants SMTP de votre compte fournis par votre fournisseur d'e-mail (à demander à votre fournisseur d'e-mail) WarningPHPMail2=Si votre fournisseur de messagerie SMTP a besoin de restreindre le client de messagerie à certaines adresses IP (très rare), voici l'adresse IP du mail user agent (MUA) de votre application CRM ERP : %s . @@ -468,6 +470,7 @@ TheKeyIsTheNameOfHtmlField=C'est le nom du champ HTML. Cela nécessite d'avoir d PageUrlForDefaultValues=Vous devez entrer ici l'URL relative de la page. Si vous indiquez des paramètres dans l'URL, les valeurs par défaut seront effectives si tous les paramètres sont définis avec la même valeur. PageUrlForDefaultValuesCreate=
Example:
Pour le formulaire pour créer un nouveau tiers, c'est %s .
Pour l'URL des modules externes installés dans le répertoire custom, n'incluez pas le "custom/", aussi le chemin ressemblera à monmodule/mapage.php et non custom/monmodule/mapache.php.
Si voulez une valeur par défaut seulement si l'url a certains paramètres, vous pouvez utiliser %s PageUrlForDefaultValuesList=
Example:
Pour la page de liste des tiers, c'est %s,
Pour une URL des modules externes installés dans le répertoire custom, n'incluez pas le "custom/" aussi le chemin sera monmodule/mapage.php et non custom/monmodule/mapage.php.
Si vous voulez une valeur par défaut uniquement si l'url a certains paramètres, vous pouvez utiliser %s +AlsoDefaultValuesAreEffectiveForActionCreate=Notez également que le remplacement des valeurs par défaut pour la création de formulaire ne fonctionne que pour les pages correctement conçues (donc avec le paramètre action=create ou presend ...). EnableDefaultValues=Activer la fonction de valeurs par défaut personnalisées EnableOverwriteTranslation=Permettre la réécriture des traductions GoIntoTranslationMenuToChangeThis=Une traduction a été trouvée pour le code de cette valeur. Pour changer cette valeur, vous devez modifier le fichier depuis Accueil > Configuration > Traduction. @@ -1819,7 +1822,7 @@ ChartLoaded=Modèle de plan de compte chargé SocialNetworkSetup=Configuration du module Réseaux Sociaux EnableFeatureFor=Activer les fonctionnalités pour %s VATIsUsedIsOff=Remarque: l'option d'utilisation de la taxe de vente ou de la TVA a été définie sur Désactivée dans le menu %s - %s, aussi la taxe de vente ou la TVA utilisée sera toujours égale à 0 pour les ventes. -SwapSenderAndRecipientOnPDF=Échanger adresses expéditeurs et destinataires sur le PDF +SwapSenderAndRecipientOnPDF=Inverser la position des adresses expéditeurs et destinataires sur les documents PDF FeatureSupportedOnTextFieldsOnly=Attention, fonctionnalité prise en charge sur les champs de texte uniquement. De plus, un paramètre d'URL action=create ou action=edit doit être défini OU le nom de la page doit se terminer par 'new.php' pour déclencher cette fonctionnalité. EmailCollector=Collecteur de courrier électronique EmailCollectorDescription=Ajoute un travail planifié et une page de configuration pour analyser régulièrement les boîtes aux lettres (à l'aide du protocole IMAP) et enregistrer les courriers électroniques reçus dans votre application, au bon endroit et/ou créer automatiquement certains enregistrements (comme des opportunités). @@ -1828,7 +1831,9 @@ 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 +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 LastResult=Dernier résultat @@ -1849,7 +1854,7 @@ WithoutDolTrackingID=ID Tracker Dolibarr non trouvé FormatZip=Zip MainMenuCode=Code d'entrée du menu (mainmenu) ECMAutoTree=Afficher l'arborescence GED automatique -OperationParamDesc=Définissez les valeurs à utiliser pour l'action, ou comment extraire les valeurs. Par exemple:
objproperty1 = SET:abc
objproperty2 = EXTRACT: HEADER:X-Myheaderkey.*[^\\s]+(.*)
options_myextrafield=EXTRACT:SUBJECT:([^\\s]*)
object.objproperty4=EXTRACT:BODY:My company name is\\s([^\\s]*)

Utilisez un charactère ; comme séparateur pour extraire ou définir plusieurs propriétés. +OperationParamDesc=Définissez les valeurs à utiliser pour l'action, ou comment extraire les valeurs. Par exemple:
objproperty1 = SET:abc
objproperty2=SET:a value with replacement of __objproperty1__
objproperty3=SETIFEMPTY:abc
objproperty4 = EXTRACT: HEADER:X-Myheaderkey.*[^\\s]+(.*)
options_myextrafield=EXTRACT:SUBJECT:([^\\s]*)
object.objproperty4=EXTRACT:BODY:My company name is\\s([^\\s]*)

Utilisez un charactère ; comme séparateur pour extraire ou définir plusieurs propriétés. OpeningHours=Heures d'ouverture OpeningHoursDesc=Entrez ici les heures d'ouverture régulières de votre entreprise. ResourceSetup=Configuration du module Ressource @@ -1882,3 +1887,9 @@ SmallerThan=Plus petit que LargerThan=Plus grand que IfTrackingIDFoundEventWillBeLinked=Notez que si un ID de suivi est trouvé dans le courrier électronique entrant, l'événement sera automatiquement lié aux bons objets. WithGMailYouCanCreateADedicatedPassword=Avec un compte GMail, si vous avez activé la validation en 2 étapes, il est recommandé de créer un deuxième mot de passe dédié à l'application, au lieu d'utiliser votre propre mot de passe de compte, à partir de https://myaccount.google.com/. +IFTTTSetup=Configuration du module IFTTT +IFTTT_SERVICE_KEY=Clé de service IFTTT +IFTTT_DOLIBARR_ENDPOINT_SECUREKEY=Clé de sécurité pour sécuriser l'URL du point de terminaison utilisé par IFTTT pour envoyer des messages à votre Dolibarr. +IFTTTDesc=Ce module est conçu pour déclencher des événements sur IFTTT et/ou pour exécuter une action sur des déclencheurs IFTTT externes. +UrlForIFTTT=URL endpoint pour IFTTT +YouWillFindItOnYourIFTTTAccount=Vous le trouverez sur votre compte IFTTT diff --git a/htdocs/langs/fr_FR/assets.lang b/htdocs/langs/fr_FR/assets.lang index 847e5a6cb15..b277f033860 100644 --- a/htdocs/langs/fr_FR/assets.lang +++ b/htdocs/langs/fr_FR/assets.lang @@ -57,3 +57,9 @@ MenuTypeAssets = Type d'immobilisations MenuListAssets = Liste MenuNewTypeAssets = Nouveau type MenuListTypeAssets = Liste + +# +# Module +# +NewAssetType=Nouveau type d'immobilisation +NewAsset=Nouvelle immobilisation diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index 6bd8326e3ed..d69afd0f4e2 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -62,3 +62,8 @@ TicketVatGrouped=Grouper la TVA par taux sur les tickets AutoPrintTickets=Imprimer automatiquement les tickets EnableBarOrRestaurantFeatures=Activer les fonctionnalités pour bar ou restaurant ConfirmDeletionOfThisPOSSale=Confirmez-vous la suppression de cette vente en cours? +History=Historique +ValidateAndClose=Valider et fermer +Terminal=Terminal +NumberOfTerminals=Nombre de terminaux +TerminalSelect=Sélectionnez le terminal que vous souhaitez utiliser: diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 98888ae7fbd..0a666b88f2c 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -28,7 +28,7 @@ AliasNames=Nom alternatif (commercial, marque, ...) AliasNameShort=Nom alternatif Companies=Sociétés CountryIsInEEC=Pays de la Communauté Économique Européenne -PriceFormatInCurrentLanguage=Format de prix dans la langue actuelle +PriceFormatInCurrentLanguage=Format d'affichage du prix dans la langue et monnaie actuelle ThirdPartyName=Nom du tiers ThirdPartyEmail=E-mail de tiers ThirdParty=Tiers diff --git a/htdocs/langs/fr_FR/contracts.lang b/htdocs/langs/fr_FR/contracts.lang index 0166ecfd85a..491ab0e384e 100644 --- a/htdocs/langs/fr_FR/contracts.lang +++ b/htdocs/langs/fr_FR/contracts.lang @@ -64,7 +64,8 @@ DateStartRealShort=Date début DateEndReal=Date effective fin de service DateEndRealShort=Date effective fin CloseService=Fermer service -BoardRunningServices=Services actifs et expirés en contrat +BoardRunningServices=Services actifs +BoardExpiredServices=Services expirés ServiceStatus=Statut du service DraftContracts=Contrats brouillons CloseRefusedBecauseOneServiceActive=Le contrat ne peut pas être fermé car il y a au moins un service ouvert dessus diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang index 93d37547396..0952bae8f37 100644 --- a/htdocs/langs/fr_FR/cron.lang +++ b/htdocs/langs/fr_FR/cron.lang @@ -42,7 +42,7 @@ CronModule=Module CronNoJobs=Aucun travail enregistré CronPriority=Priorité CronLabel=Libellé -CronNbRun=Nb. lancements +CronNbRun=Nb. de lancements CronMaxRun=Nb max de lancement CronEach=Tous les JobFinished=Travail lancé et terminé diff --git a/htdocs/langs/fr_FR/mails.lang b/htdocs/langs/fr_FR/mails.lang index 79decf39473..459a02a91a7 100644 --- a/htdocs/langs/fr_FR/mails.lang +++ b/htdocs/langs/fr_FR/mails.lang @@ -19,6 +19,8 @@ MailTopic=Sujet du mail MailText=Message MailFile=Fichiers joints MailMessage=Corps du message +SubjectNotIn=Pas dans le Sujet +BodyNotIn=Pas dans le Message ShowEMailing=Afficher emailing ListOfEMailings=Liste des emailings NewMailing=Nouvel emailing diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 552c3334bbe..dabe27f0368 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -371,6 +371,7 @@ Percentage=Pourcentage Total=Total SubTotal=Sous-total TotalHTShort=Total HT +TotalHT100Short=Total 100%% HT TotalHTShortCurrency=Total HT (devise d'origine) TotalTTCShort=Total TTC TotalHT=Total HT @@ -834,6 +835,7 @@ RelatedObjects=Objets liés ClassifyBilled=Classer facturé ClassifyUnbilled=Classer non facturé Progress=Progression +ProgressShort=Progr. FrontOffice=Front office BackOffice=Back office View=Vue @@ -854,7 +856,7 @@ Download=Téléchargement DownloadDocument=Télécharger le document ActualizeCurrency=Mettre à jour le taux de devise Fiscalyear=Exercice fiscal -ModuleBuilder=Générateur de Module +ModuleBuilder=Générateur de Module et Application SetMultiCurrencyCode=Choisir la devise BulkActions=Actions de masse ClickToShowHelp=Cliquez pour montrer l'info-bulle d'aide diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index 979e59190e5..97951474aa0 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -128,11 +128,11 @@ ThisIsContentOfSubscriptionReminderEmail=Nous voulons vous informer que votre ad ThisIsContentOfYourCard=Ceci est un rappel des informations que nous avons vous concernant. N'hésitez pas à nous contacter en cas d'erreur.

DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Sujet de l'email reçu en cas d'auto-inscription d'un invité DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Email reçu en cas d'auto-inscription d'un invité -DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Modèle de courrier électronique à utiliser pour envoyer un courrier électronique à un membre lors de son inscription automatique -DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Modèle de courrier électronique à utiliser pour envoyer un courrier électronique à un membre lors de sa validation -DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Modèle de courrier électronique à utiliser pour envoyer un courrier électronique à un membre lors de l'enregistrement d'un nouvel abonnement -DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Modèle de courrier électronique à utiliser pour envoyer un rappel par courrier électronique lorsque l'abonnement est sur le point d'expirer -DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Modèle de courrier électronique à utiliser pour envoyer un courrier électronique à un membre lors d'une annulation de membre +DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Modèle Email à utiliser pour envoyer un email à un adhérent sur auto-adhésion de l'adhérent +DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Modèle d'email à utiliser pour envoyer un email à un membre sur la validation d'un membre +DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Modèle d'email électronique à utiliser pour envoyer un courrier électronique à un membre lors de l'enregistrement d'un nouvel abonnement +DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Modèle d'email électronique à utiliser pour envoyer un rappel par courrier électronique lorsque l'abonnement est sur le point d'expirer +DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Modèle d'email utilisé pour envoyer un email à un adhérent lors de l'annulation d'adhésion DescADHERENT_MAIL_FROM=Email émetteur pour les mails automatiques DescADHERENT_ETIQUETTE_TYPE=Format pages étiquettes DescADHERENT_ETIQUETTE_TEXT=Texte imprimé sur les planches d'adresses adhérent diff --git a/htdocs/langs/fr_FR/modulebuilder.lang b/htdocs/langs/fr_FR/modulebuilder.lang index f6795693cf1..e88221e1995 100644 --- a/htdocs/langs/fr_FR/modulebuilder.lang +++ b/htdocs/langs/fr_FR/modulebuilder.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - loan -ModuleBuilderDesc=Cet outil ne doit être utilisé que par des utilisateurs expérimentés ou des développeurs. Il vous fournit des utilitaires pour construire ou éditer votre propre module.
La documentation relative au développement manuel est ici . +ModuleBuilderDesc=Cet outil ne doit être utilisé que par des utilisateurs expérimentés ou des développeurs. Il vous fournit des utilitaires pour construire ou éditer votre propre module. La documentation relative au développement manuel est ici . EnterNameOfModuleDesc=Saisissez le nom du module/application à créer, sans espaces. Utilisez les majuscules pour identifier les mots (par exemple : MonModule, BoutiqueECommerce,...) EnterNameOfObjectDesc=Entrez le nom de l'objet à créer sans espaces. Utilisez les majuscules pour séparer des mots (par exemple: MyObject, Student, Teacher ...). Le fichier de classe CRUD, mais aussi le fichier API, les pages à afficher / ajouter / éditer / supprimer des objets et des fichiers SQL seront générés. ModuleBuilderDesc2=Chemin ou les modules sont générés/modifiés (premier répertoire pour les modules externes défini dans %s):%s @@ -10,7 +10,7 @@ NewObject=Nouvel objet ModuleKey=Clé du module ObjectKey=Clé de l'objet ModuleInitialized=Module initialisé -FilesForObjectInitialized=Fichiers pour les nouvel objet '%s' initialisés +FilesForObjectInitialized=Fichiers pour le nouvel objet '%s' initialisés FilesForObjectUpdated=Les fichiers pour l'objet '%s' ont été mis à jour ( fichiers .sql et .class.php ) ModuleBuilderDescdescription=Entrez ici toutes les informations générales qui décrivent votre module. ModuleBuilderDescspecifications=Vous pouvez entrer ici une description détaillée des spécifications de votre module qui n'est pas déjà structurée dans d'autres onglets. Vous avez donc à portée de main toutes les règles à développer. Ce contenu textuel sera également inclus dans la documentation générée (voir dernier onglet). Vous pouvez utiliser le format Markdown, mais il est recommandé d'utiliser le format Asciidoc (comparaison entre .md et .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown). @@ -21,13 +21,14 @@ ModuleBuilderDesctriggers=Vue des triggers ajoutés par votre module. Pour inclu ModuleBuilderDeschooks=Cet onglet est dédié aux points d'accroche. ModuleBuilderDescwidgets=Cet onglet est dédié à la gestion/construction de widgets. ModuleBuilderDescbuildpackage=Vous pouvez générer ici un fichier de package "prêt à distribuer" (un fichier .zip normalisé) de votre module et un fichier de documentation "prêt à distribuer". Cliquez simplement sur le bouton pour créer le paquet ou le fichier de documentation. -EnterNameOfModuleToDeleteDesc=Vous pouvez supprimer votre module. ATTENTION: Tous fichiers relatifs a ce module ET toutes bases de donnes seront supprimés! -EnterNameOfObjectToDeleteDesc=Vous pouvez effacer un objet. ATTENTION : Tous les fichiers reliés à cet objet seront définitivement perdus ! +EnterNameOfModuleToDeleteDesc=Vous pouvez supprimer votre module. ATTENTION: Tous les fichiers relatifs a ce module (générés ou créés manuellement) ET toutes les données et documentation seront supprimés! +EnterNameOfObjectToDeleteDesc=Vous pouvez effacer un objet. ATTENTION : Tous les fichiers (générés ou créés manuellement) en rapport avec cet objet seront définitivement effacés ! DangerZone=Zone de danger BuildPackage=Construire le package +BuildPackageDesc=Vous pouvez générer un package zip de votre application afin que vous soyez prêt à le distribuer sur n’importe quel Dolibarr. Vous pouvez également le distribuer ou le vendre sur une place de marché, comme DoliStore.com . BuildDocumentation=Générez la documentation ModuleIsNotActive=Le module n'est pas encore activé. Aller à %s pour l'activer ou cliquer ici : -ModuleIsLive=Ce module a été activé. Tout changement sur lui pourrait casser une fonctionnalité actuellement activée. +ModuleIsLive=Ce module a été activé. Tout changement dessus pourrait casser une fonctionnalité actuellement en ligne. DescriptionLong=Description longue EditorName=Nom de l'éditeur EditorUrl=URL de l'éditeur @@ -43,10 +44,11 @@ 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. FileNotYetGenerated=Fichier non encore généré -RegenerateClassAndSql=Effacer et générer à nouveau les fichiers de classe et SQL +RegenerateClassAndSql=Forcer la mise à jour des fichiers .class et .sql RegenerateMissingFiles=Générer les fichiers manquant SpecificationFile=Fichier de documentation LanguageFile=Fichier langue +ObjectProperties=Propriétés de l'objet ConfirmDeleteProperty=Voulez-vous vraiment supprimer la propriété %s ? Cela modifiera le code de la classe PHP, mais supprimera également la colonne de la définition de la table de l'objet. NotNull=Non NULL NotNullDesc=1=Définir le champ en base à NOT NULL. -1=Autoriser les valeurs nulles et forcer la valeur à NULL si vide ('' ou 0). @@ -62,7 +64,8 @@ ReadmeFile=Fichier Readme ChangeLog=Fichier ChangeLog TestClassFile=Fichier de tests unitaires PHP SqlFile=Fichier SQL -PageForLib=Fichier pour les librairies PHP +PageForLib=Fichier pour la librairie PHP +PageForObjLib=Fichier pour la librairie PHP dédiée à l'objet SqlFileExtraFields=Fichier SQL pour les attributs complémentaires SqlFileKey=Fichier SQL pour les clés et index AnObjectAlreadyExistWithThisNameAndDiffCase=Un objet existe déjà avec ce nom dans une casse différente @@ -81,15 +84,17 @@ IsAMeasureDesc=Peut-on cumuler la valeur du champ pour obtenir un total dans les SearchAllDesc=Le champ doit-il être utilisé pour effectuer une recherche à partir de l'outil de recherche rapide ? (Exemples: 1 ou 0) 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 (une fois définis, ils sont visibles dans l'éditeur de menu %s) -PermissionsDefDesc=Définissez ici les nouvelles permissions fournies par votre module (une fois définies, elles sont visibles dans la configuration des permissions %s) +MenusDefDesc=Définissez ici les menus fournis par votre 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 $this->menus dans le fichier descripteur de module. Vous pouvez modifier manuellement ce fichier ou utiliser l'éditeur intégré.

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. +PermissionsDefDescTooltip=Les autorisations fournies par votre module / application sont définies dans le tableau $this->rights dans le fichier descripteur de module. Vous pouvez modifier manuellement ce fichier ou utiliser l'éditeur intégré.

Remarque: une fois définies (et le module réactivé), les autorisations sont visibles dans la configuration par défaut des autorisations %s. HooksDefDesc=Définissez dans la propriété module_parts ['hooks'] , dans le descripteur de module, le contexte des hooks à gérer (la liste des contextes peut être trouvée par une recherche sur ' initHooks (' dans le code du noyau).
Editez le fichier hook pour ajouter le code de vos fonctions hookées (les fonctions hookables peuvent être trouvées par une recherche sur ' executeHooks ' dans le code core). TriggerDefDesc=Définissez dans le fichier trigger le code que vous souhaitez exécuter pour chaque événement métier exécuté. SeeIDsInUse=Voir les IDs utilisés dans votre installation SeeReservedIDsRangeHere=Voir la plage des ID réservés ToolkitForDevelopers=Boîte à outils pour développeurs Dolibarr TryToUseTheModuleBuilder=Si vous connaissez SQL et PHP, vous pouvez utiliser l'assistant de création de module natif.
Activez le module %s et utilisez l'assistant en cliquant sur la . dans le menu en haut à droite.
Avertissement: Il s'agit d'une fonctionnalité avancée pour les développeurs. Ne pas expérimenter sur votre site de production! -SeeTopRightMenu=Voir à droite de votre barre de menu principal +SeeTopRightMenu=Voir à 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) @@ -110,3 +115,4 @@ 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 diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang new file mode 100644 index 00000000000..a0169705681 --- /dev/null +++ b/htdocs/langs/fr_FR/mrp.lang @@ -0,0 +1,13 @@ +MRPArea=Espace MRP +MenuBOM=Nomenclatures BOM +LatestBOMModified=Le %sdernières BOMs modifiées +BillOfMaterials=Nomenclature BOM +BOMsSetup=Configuration du module BOM +ListOfBOMs=Liste des BOMs +NewBOM=Nouveau BOM +ProductBOMHelp=Produit à créer avec cette BOM +BOMsNumberingModules=Modèles de numérotation de BOMs +BOMsModelModule=Modèles de documents de BOMs +FreeLegalTextOnBOMs=Texte libre sur documents BOMs +WatermarkOnDraftBOMs=Filigrane sur les brouillons de BOMs +ConfirmCloneBillOfMaterials=Êtes-vous sûr de vouloir cloner cette nomenclature ? diff --git a/htdocs/langs/fr_FR/multicurrency.lang b/htdocs/langs/fr_FR/multicurrency.lang index 3270b11714e..73dd1aa7cf6 100644 --- a/htdocs/langs/fr_FR/multicurrency.lang +++ b/htdocs/langs/fr_FR/multicurrency.lang @@ -7,10 +7,10 @@ multicurrency_syncronize_error=Erreur de synchronisation: %s MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Utilisez la date du document pour trouver le taux de change, au lieu d'utiliser dernier taux connu multicurrency_useOriginTx=Quand un objet est créé à partir d'un autre, garder le taux original de l'objet source (sinon utiliser le dernier taux connu) CurrencyLayerAccount=API CurrencyLayer -CurrencyLayerAccount_help_to_synchronize=Vous devez créer un compte sur leur site web pour pouvoir utiliser cette fonctionnalité.
Obtenez votre Clé API
Si vous utilisez un compte gratuit, vous ne pouvez pas changer la devise source(USD par défaut)
Mais si votre devise principale n'est pas USD, vous pouvez utiliser une devise source alternative pour forcer votre devise principale

Vous êtes limité à 1000 synchronisations par mois. +CurrencyLayerAccount_help_to_synchronize=Vous devez créer un compte sur le site web %spour pouvoir utiliser cette fonctionnalité.
Obtenez votre Clé API.
Si vous utilisez un compte gratuit, vous ne pouvez pas changer la devise source(USD par défaut).
Mais si votre devise principale n'est pas USD, l'application la calulera automatiquement pour vous.

Vous êtes limité à 1000 synchronisations par mois. multicurrency_appId=Clé API multicurrency_appCurrencySource=Devise source -multicurrency_alternateCurrencySource=Devise du document source +multicurrency_alternateCurrencySource=Devise source alternative CurrenciesUsed=Devises utilisées CurrenciesUsed_help_to_add=Ajoutez les différentes devises et taux que vous devez utiliser pour vos propositions , commandes , etc. rate=taux diff --git a/htdocs/langs/fr_FR/paypal.lang b/htdocs/langs/fr_FR/paypal.lang index 4255bd0f6c7..c0d7a9adadb 100644 --- a/htdocs/langs/fr_FR/paypal.lang +++ b/htdocs/langs/fr_FR/paypal.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - paypal PaypalSetup=Configuration module PayPal PaypalDesc=Ce module permet d'offrir aux clients une page de paiement via le prestataire Paypal. Ceci peut être utiliser pour réaliser un paiement quelconque ou un paiement par rapport à un objet Dolibarr particulier (facture, commande…) -PaypalOrCBDoPayment=Payer avec Paypal (Carte de crédit ou Paypal) +PaypalOrCBDoPayment=Payer avec Paypal (Carte ou solde Paypal) PaypalDoPayment=Payer par PayPal PAYPAL_API_SANDBOX=Mode test/bac à sable (sandbox) PAYPAL_API_USER=Nom utilisateur API @@ -14,6 +14,7 @@ PaypalModeOnlyPaypal=PayPal seul ONLINE_PAYMENT_CSS_URL=URL optionnelle de la feuille de style CSS sur la page de paiement en ligne ThisIsTransactionId=Voici l'identifiant de la transaction: %s PAYPAL_ADD_PAYMENT_URL=Ajouter l'URL de paiement Paypal lors de l'envoi d'un document par email +YouAreCurrentlyInSandboxMode=Vous travaillez actuellement dans le mode "bac à sable" de %s NewOnlinePaymentReceived=Nouveau paiement en ligne reçu NewOnlinePaymentFailed=Nouvelle tentative de paiement en ligne échouée ONLINE_PAYMENT_SENDEMAIL=Email à prévenir en cas de paiement (succès ou non) @@ -32,3 +33,4 @@ PaypalImportPayment=Importer des paiements Paypal PostActionAfterPayment=Actions complémentaires après paiement ARollbackWasPerformedOnPostActions=Une annulation a été effectuée sur toutes les actions Post paiement. Vous devez compléter les actions complémentaires manuellement si elles sont nécessaires. ValidationOfPaymentFailed=La validation du paiement a échoué +CardOwner=Titulaire de la carte diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 21cf78ca23f..481710345f6 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -294,7 +294,7 @@ ProductSheet=Fiche produit ServiceSheet=Fiche service PossibleValues=Valeurs possibles GoOnMenuToCreateVairants=Allez sur le menu %s - %s pour ajouter les attributs de variantes (comme les couleurs, tailles, ...) -UseProductFournDesc=Utiliser les descriptions des produits des fournisseurs dans les documents fournisseurs +UseProductFournDesc=Ajouter une fonctionnalité pour définir les descriptions des produits définies par les fournisseurs en plus des descriptions pour les clients ProductSupplierDescription=Description du fournisseur du produit #Attributes VariantAttributes=Attributs de variante @@ -339,3 +339,4 @@ ErrorCopyProductCombinations=Une erreur s'est produite lors de la copie des vari ErrorDestinationProductNotFound=Produit destination non trouvé ErrorProductCombinationNotFound=Variante du produit non trouvé ActionAvailableOnVariantProductOnly=Action disponible uniquement sur la variante du produit +ProductsPricePerCustomer=Prix produit par clients diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index fbacef599f2..3c0fc3dbbf3 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -222,11 +222,11 @@ OppStatusPENDING=En attente OppStatusWON=Gagné OppStatusLOST=Perdu Budget=Budget -AllowToLinkFromOtherCompany=Permet de lier un projet d'une autre société

Valeurs compatibles :
- Conserver vide : Peut lier à n'importe quel projet de la société (défaut)
- "all" : Peut lier à tous les projets, y compris ceux d'autres sociétés
- Une liste de tiers ID séparés par des virgules: peut lier à tous les projets de ces tiers (Exemple:123,4795,53)
+AllowToLinkFromOtherCompany=Permettre de lier un projet à une autre société

Valeurs supportées:
- Conserver vide: Peut lier à n'importe quel projet de l'entreprise (défaut)
- "all": Peut lier à tous les projets, même le projet d'autres sociétés
- Une liste d'ID de tiers séparés par des virgules: Peut lier à tous les projets de ces tiers définis (Exemple: 123,4795,53)
LatestProjects=Les %s derniers projets LatestModifiedProjects=Les %s derniers projets modifiés OtherFilteredTasks=Autres tâches filtrées -NoAssignedTasks=Aucune tâche assignée trouvée (affectez le projet / les tâches à l'utilisateur actuel dans la zone de sélection supérieure pour saisir l'heure) +NoAssignedTasks=Aucune tâche assignée (assignez un projet/tâche à l'utilisateur depuis la liste déroulante utilisateur en haut pour pouvoir saisir du temps dessus) ThirdPartyRequiredToGenerateInvoice=Un tiers doit être défini sur le projet pour pouvoir le facturer. # Comments trans AllowCommentOnTask=Autoriser les utilisateurs à ajouter des commentaires sur les tâches diff --git a/htdocs/langs/fr_FR/stripe.lang b/htdocs/langs/fr_FR/stripe.lang index 9e7b3c3a640..f3b30d50615 100644 --- a/htdocs/langs/fr_FR/stripe.lang +++ b/htdocs/langs/fr_FR/stripe.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - stripe StripeSetup=Configuration module Stripe -StripeDesc=Ce module offre des pages pour autoriser les paiements sur Stripe par les clients. Elles peuvent êtres utilisées pour un paiement libre ou un paiement sur un objet particulier de Dolibarr ( facture, commande, ... ) +StripeDesc=Ce module offre des pages pour autoriser les paiements par carte sur Stripe par les clients. Elles peuvent êtres utilisées pour un paiement libre ou un paiement sur un objet particulier de Dolibarr (facture, commande, ... ) StripeOrCBDoPayment=Payez avec une carte bancaire ou Stripe FollowingUrlAreAvailableToMakePayments=Les URL suivantes sont disponibles pour permettre à un client de faire un paiement PaymentForm=Formulaire de paiement @@ -40,7 +40,7 @@ STRIPE_LIVE_WEBHOOK_KEY=Clé live des Webhooks ONLINE_PAYMENT_WAREHOUSE=Stock à utiliser pour diminuer le stock lorsque le paiement en ligne est effectué
(TODO Quand l'option de réduction de stock est effectuée sur une action sur facture et que le paiement en ligne génère lui-même la facture?) StripeLiveEnabled=Mode live activé (sinon mode test/bac a sable) StripeImportPayment=Importer paiements Stripe -ExampleOfTestCreditCard=Exemple de carte de crédit pour le test: %s (valide), %s (erreur CVC), %s (expiré), %s (paiement en échec) +ExampleOfTestCreditCard=Exemple de carte de crédit pour le test: %s => valide, %s => erreur CVC, %s => expiré, %s => paiement en échec StripeGateways=Stripe gateways OAUTH_STRIPE_TEST_ID=Stripe Connect ID client (ca _...) OAUTH_STRIPE_LIVE_ID=Stripe Connect ID client (ca _...) @@ -63,3 +63,5 @@ CreateCardOnStripe=Créer carte sur Stripe ShowInStripe=Afficher dans Stripe StripeUserAccountForActions=Compte d'utilisateur à utiliser pour certains e-mails de notification d'événements Stripe (Stripe payouts) StripePayoutList=Liste des paiements Stripe +ToOfferALinkForTestWebhook=Lien pour la configuration de Stripe WebHook pour appeler l'IPN (mode test) +ToOfferALinkForLiveWebhook=Lien pour la configuration de Stripe WebHook pour appeler l'IPN (mode actif) diff --git a/htdocs/langs/fr_FR/ticket.lang b/htdocs/langs/fr_FR/ticket.lang index f117d44db4b..cdf5e18a9ee 100644 --- a/htdocs/langs/fr_FR/ticket.lang +++ b/htdocs/langs/fr_FR/ticket.lang @@ -58,9 +58,10 @@ Notify_TICKET_SENTBYMAIL=Envoi d'un message du ticket par e-mail # Status NotRead=Non lu Read=Lu -Answered=Répondu Assigned=Assigné InProgress=En cours +NeedMoreInformation=En attente d'information +Answered=Répondu Waiting=En attente Closed=Fermé Deleted=Supprimé @@ -115,7 +116,7 @@ TicketsShowCompanyLogo=Afficher le logo de la société dans l'interface publiqu TicketsShowCompanyLogoHelp=Activez cette option pour masquer le logo de la société dans les pages de l'interface publique TicketsEmailAlsoSendToMainAddress=Envoyer également une notification à l'adresse e-mail principale TicketsEmailAlsoSendToMainAddressHelp=Activer cette option pour envoyer un email à "Email de notification de" adresse (voir configuration ci-dessous) -TicketsLimitViewAssignedOnly=Restreindre l'affichage aux tickets attribués à l'utilisateur actuel (non efficace pour les utilisateurs externes, toujours se limiter au tiers dont ils dépendent) +TicketsLimitViewAssignedOnly=Limiter l'afficher des tickets assignés à l'utilisateur courant (non valable pour les utilisateurs externes, toujours limité par le tiers dont ils dépendent) TicketsLimitViewAssignedOnlyHelp=Seuls les tickets affectés à l'utilisateur actuel seront visibles. Ne s'applique pas à un utilisateur disposant de droits de gestion des tickets. TicketsActivatePublicInterface=Activer l'interface publique TicketsActivatePublicInterfaceHelp=L'interface publique permet à tous les visiteurs de créer des tickets. @@ -216,7 +217,7 @@ TicketMailExchanges=Échanges de courrier TicketInitialMessageModified=Message initial modifié TicketMessageSuccesfullyUpdated=Message mis à jour avec succès TicketChangeStatus=Changer l'état -TicketConfirmChangeStatus=Confirmez le changement de statut: %s? +TicketConfirmChangeStatus=Confirmez le changement d'état: %s? TicketLogStatusChanged=Statut modifié: %s à %s TicketNotNotifyTiersAtCreate=Ne pas notifier l'entreprise à la création Unread=Non lu @@ -261,7 +262,7 @@ ViewTicket=Voir le ticket ViewMyTicketList=Voir la liste de mes tickets ErrorEmailMustExistToCreateTicket=Erreur: adresse email introuvable dans notre base de données TicketNewEmailSubjectAdmin=Nouveau ticket créé -TicketNewEmailBodyAdmin=

Le ticket vient d'être créé sous l'ID n ° %s, voir informations: +TicketNewEmailBodyAdmin=

Le ticket vient d'être créé avec l'ID # %s, voir les informations:

SeeThisTicketIntomanagementInterface=Voir ticket dans l'interface de gestion TicketPublicInterfaceForbidden=L'interface publique pour les tickets n'a pas été activée ErrorEmailOrTrackingInvalid=Mauvaise valeur pour l'ID de suivi ou l'e-mail diff --git a/htdocs/langs/fr_FR/trips.lang b/htdocs/langs/fr_FR/trips.lang index 41eb80a4349..cffe2cc14e8 100644 --- a/htdocs/langs/fr_FR/trips.lang +++ b/htdocs/langs/fr_FR/trips.lang @@ -148,4 +148,4 @@ nolimitbyEX_EXP=par ligne (sans limite) CarCategory=Catégorie de voiture ExpenseRangeOffset=Montant décalage: %s RangeIk=Barème kilométrique -AttachTheNewLineToTheDocument=Lié la nouvelle ligne à un document existant +AttachTheNewLineToTheDocument=Lié la ligne à un document téléversé diff --git a/htdocs/langs/fr_FR/website.lang b/htdocs/langs/fr_FR/website.lang index 5fe7de0a471..7b333653e0a 100644 --- a/htdocs/langs/fr_FR/website.lang +++ b/htdocs/langs/fr_FR/website.lang @@ -96,3 +96,5 @@ ThisPageIsTranslationOf=Cette page/container est la traduction de ThisPageHasTranslationPages=Cette page / container a une traduction NoWebSiteCreateOneFirst=Aucun site Web n'a encore été créé. Créez-en un d'abord. GoTo=Aller à +DynamicPHPCodeContainsAForbiddenInstruction=Vous ajoutez du code PHP dynamique contenant l'instruction PHP '%s ' qui est interdite par défaut en tant que contenu dynamique (voir les options masquées WEBSITE_PHP_ALLOW_xxx pour augmenter la liste des commandes autorisées). +NotAllowedToAddDynamicContent=Vous n'êtes pas autorisé à ajouter ou modifier du contenu dynamique PHP sur des sites Web. Demandez la permission ou conservez simplement le code dans les balises php non modifié. From a94c291b7680f3b63b5997f6f95110871ecb6d86 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 16:59:06 +0200 Subject: [PATCH 476/498] Dolibarization --- htdocs/commande/card.php | 0 htdocs/compta/facture/card.php | 0 htdocs/langs/en_GB/admin.lang | 1 - htdocs/product/admin/dynamic_prices.php | 16 ++++++++++------ 4 files changed, 10 insertions(+), 7 deletions(-) mode change 100755 => 100644 htdocs/commande/card.php mode change 100755 => 100644 htdocs/compta/facture/card.php diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php old mode 100755 new mode 100644 diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php old mode 100755 new mode 100644 diff --git a/htdocs/langs/en_GB/admin.lang b/htdocs/langs/en_GB/admin.lang index 71ab11d9bb9..29082562fee 100644 --- a/htdocs/langs/en_GB/admin.lang +++ b/htdocs/langs/en_GB/admin.lang @@ -9,7 +9,6 @@ ErrorModuleRequireDolibarrVersion=Error: This module requires Dolibarr version % ErrorDecimalLargerThanAreForbidden=Error: A precision higher than %s is not supported. ErrorReservedTypeSystemSystemAuto=Entry of 'system' and 'systemauto' for this type is reserved. You can use 'user' as a value to add your own record ErrorCodeCantContainZero=Code can't contain value 0 (zero) -NumberOfKeyToSearch=Number of characters to trigger search: %s MaxSizeForUploadedFiles=Maximum size for uploaded files (0 to prevent any uploads) CurrentValueSeparatorThousand=Thousands separator PositionByDefault=Default position diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index bbaa5f43e2f..91ef33694c5 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -153,12 +153,14 @@ llxHeader("", "", $langs->trans("CardProduct".$product->type)); $linkback=''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("DynamicPriceConfiguration"), $linkback, 'title_setup'); -print $langs->trans("DynamicPriceDesc").'
'; +print ''.$langs->trans("DynamicPriceDesc").'
'; print '
'; //Global variables table -if ($action != 'create_updater' && $action != 'edit_updater') { - print $langs->trans("GlobalVariables"); +if ($action != 'create_updater' && $action != 'edit_updater') +{ + print load_fiche_titre($langs->trans("GlobalVariables"), '', ''); + print ''; print ''; print ''; @@ -236,8 +238,10 @@ if ($action == 'create_variable' || $action == 'edit_variable') { } // Updaters table -if ($action != 'create_variable' && $action != 'edit_variable') { - print $langs->trans("GlobalVariableUpdaters"); +if ($action != 'create_variable' && $action != 'edit_variable') +{ + print load_fiche_titre($langs->trans("GlobalVariableUpdaters"), '', ''); + print '
'.$langs->trans("Variable").'
'; print ''; print ''; @@ -274,7 +278,7 @@ if ($action != 'create_variable' && $action != 'edit_variable') { } else { - print ''; } From 1c558c685c2c740b8ffe518663382ce6950c012e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 17:16:35 +0200 Subject: [PATCH 477/498] Fix class not found --- .../class/fournisseur.commande.class.php | 2 + .../install/mysql/migration/9.0.0-10.0.0.sql | 62 +++++++++++++++++++ htdocs/reception/class/reception.class.php | 6 +- 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index a0c31505d5e..e876d5caee2 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2639,6 +2639,8 @@ class CommandeFournisseur extends CommonOrder { global $user,$langs,$conf; + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + dol_syslog(get_class($this)."::initAsSpecimen"); $now=dol_now(); diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index e4cdd9351e6..39df4d2f59c 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -302,3 +302,65 @@ ALTER TABLE llx_inventorydet DROP COLUMN new_pmp; UPDATE llx_c_shipment_mode SET label = 'https://www.laposte.fr/outils/suivre-vos-envois?code={TRACKID}' WHERE code IN ('COLSUI'); UPDATE llx_c_shipment_mode SET label = 'https://www.laposte.fr/outils/suivre-vos-envois?code={TRACKID}' WHERE code IN ('LETTREMAX'); + + + +create table llx_reception +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + ref varchar(30) NOT NULL, + entity integer DEFAULT 1 NOT NULL, -- multi company id + fk_soc integer NOT NULL, + fk_projet integer DEFAULT NULL, + + ref_ext varchar(30), -- reference into an external system (not used by dolibarr) + ref_int varchar(30), -- reference into an internal system (used by dolibarr to store extern id like paypal info) + ref_supplier varchar(30), -- customer number + + date_creation datetime, -- date de creation + fk_user_author integer, -- author of creation + fk_user_modif integer, -- author of last change + date_valid datetime, -- date de validation + fk_user_valid integer, -- valideur + date_delivery datetime DEFAULT NULL, -- date planned of delivery + date_reception datetime, + fk_shipping_method integer, + tracking_number varchar(50), + fk_statut smallint DEFAULT 0, -- 0 = draft, 1 = validated, 2 = billed or closed depending on WORKFLOW_BILL_ON_SHIPMENT option + billed smallint DEFAULT 0, + + height float, -- height + width float, -- with + size_units integer, -- unit of all sizes (height, width, depth) + size float, -- depth + weight_units integer, -- unit of weight + weight float, -- weight + note_private text, + note_public text, + model_pdf varchar(255), + fk_incoterms integer, -- for incoterms + location_incoterms varchar(255), -- for incoterms + + import_key varchar(14), + extraparams varchar(255) -- for other parameters with json format +)ENGINE=innodb; + +ALTER TABLE llx_reception ADD UNIQUE INDEX idx_reception_uk_ref (ref, entity); + +ALTER TABLE llx_reception ADD INDEX idx_reception_fk_soc (fk_soc); +ALTER TABLE llx_reception ADD INDEX idx_reception_fk_user_author (fk_user_author); +ALTER TABLE llx_reception ADD INDEX idx_reception_fk_user_valid (fk_user_valid); +ALTER TABLE llx_reception ADD INDEX idx_reception_fk_shipping_method (fk_shipping_method); + +create table llx_reception_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_reception_extrafields ADD INDEX idx_reception_extrafields (fk_object); + + diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 0b416512ffa..15c021f53bc 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -1183,7 +1183,9 @@ class Reception extends CommonObject public function initAsSpecimen() { global $langs; - dol_include_once('/fourn/class/fournisseur.commande.dispatch.class.php'); + + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; $now=dol_now(); dol_syslog(get_class($this)."::initAsSpecimen"); @@ -1207,7 +1209,7 @@ class Reception extends CommonObject } } - $order=new Commande($this->db); + $order=new CommandeFournisseur($this->db); $order->initAsSpecimen(); // Initialise parametres From 46b0545c4a8ce13099ba1ba76daa334f2bd81eb1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 17:26:06 +0200 Subject: [PATCH 478/498] Debug module reception --- htdocs/admin/reception_setup.php | 13 +++++-------- htdocs/langs/en_US/receptions.lang | 9 ++++++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index a32d95e9c5e..f97c1d7823b 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -16,8 +16,8 @@ */ /** - * \file htdocs/admin/confexped.php - * \ingroup produit + * \file htdocs/admin/reception_setup.php + * \ingroup reception * \brief Page to setup reception module */ @@ -27,13 +27,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/reception.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; -$langs->load("admin"); -$langs->load("receptions"); -$langs->load('other'); +$langs->loadLangs(array("admin", "receptions", 'other')); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) accessforbidden(); $action=GETPOST('action', 'alpha'); $value=GETPOST('value', 'alpha'); @@ -225,7 +222,7 @@ clearstatcache(); foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/reception/"); - + if (is_dir($dir)) { $handle = opendir($dir); diff --git a/htdocs/langs/en_US/receptions.lang b/htdocs/langs/en_US/receptions.lang index 7fd8ba25202..0847d7550fc 100644 --- a/htdocs/langs/en_US/receptions.lang +++ b/htdocs/langs/en_US/receptions.lang @@ -1,10 +1,11 @@ # 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 +Reception=Product reception +Receptions=Reception ShowReception=Show Receptions ReceptionsArea=Receptions area ListOfReceptions=List of receptions @@ -39,4 +40,6 @@ ReceptionCreationIsDoneFromOrder=For the moment, creation of a new reception is 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. \ No newline at end of file +ValidateOrderFirstBeforeReception=You must first validate the order before being able to make receptions. +ReceptionsNumberingModules=Numbering module for receptions +ReceptionsReceiptModel=Document templates for receptions \ No newline at end of file From cdebca14a7678a0f1cb6b1c9dae41a87c2298329 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 17:32:13 +0200 Subject: [PATCH 479/498] Fix migration --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 39df4d2f59c..b53d0603be6 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -363,4 +363,7 @@ create table llx_reception_extrafields ALTER TABLE llx_reception_extrafields ADD INDEX idx_reception_extrafields (fk_object); +ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN fk_projet integer DEFAULT NULL; +ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN fk_reception integer DEFAULT NULL; + \ No newline at end of file From a1f0df9a301c86eb8857012826cd13c5c3f3ca0a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 17:45:16 +0200 Subject: [PATCH 480/498] Debug receipt module --- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/commande/dispatch.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index d1c8d444283..98048552911 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1958,7 +1958,7 @@ elseif (! empty($object->id)) print '"; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 7a8bb2bcd22..0c6091b694a 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -414,13 +414,13 @@ if ($id > 0 || ! empty($ref)) { print '
'; print '
'; - print '
'.$langs->trans("VariableToUpdate").'
'; + print '
'; print $langs->trans("None"); print '
'.$langs->trans("Date").''; if ($object->date_commande) { - print dol_print_date($object->date_commande, "dayhourtext")."\n"; + print dol_print_date($object->date_commande, "dayhour")."\n"; } print "
'; + print '
'; // Date if ($object->methode_commande_id > 0) { print '"; @@ -450,7 +450,7 @@ if ($id > 0 || ! empty($ref)) { // Line of orders if ($object->statut <= CommandeFournisseur::STATUS_ACCEPTED || $object->statut >= CommandeFournisseur::STATUS_CANCELED) { - print ''.$langs->trans("OrderStatusNotReadyToDispatch").''; + print '
'.$langs->trans("OrderStatusNotReadyToDispatch").''; } if ($object->statut == CommandeFournisseur::STATUS_ORDERSENT @@ -714,13 +714,12 @@ if ($id > 0 || ! empty($ref)) { print "
' . $langs->trans("Date") . ''; if ($object->date_commande) { - print dol_print_date($object->date_commande, "dayhourtext") . "\n"; + print dol_print_date($object->date_commande, "dayhour") . "\n"; } print "
\n"; print '
'; - print "
\n"; if ($nbproduct) { $checkboxlabel = $langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll')); - print '
'; + print '
'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook @@ -737,7 +736,7 @@ if ($id > 0 || ! empty($ref)) { } empty($conf->reception->enabled)?$dispatchBt=$langs->trans("DispatchVerb"):$dispatchBt=$langs->trans("Receive"); - print '
'; @@ -747,7 +746,8 @@ if ($id > 0 || ! empty($ref)) { // Message if nothing to dispatch if (! $nbproduct) { - if (empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) + print "
\n"; + if (empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) print '
'.$langs->trans("NoPredefinedProductToDispatch").'
'; // No predefined line at all else print '
'.$langs->trans("NoMorePredefinedProductToDispatch").'
'; // No predefined line that remain to be dispatched. From a5b1de4f6aeec2704c1d5e83af8b2b1202ce7867 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 17:52:55 +0200 Subject: [PATCH 481/498] Fix tab that should not be visible --- htdocs/comm/propal/card.php | 2 +- htdocs/core/lib/propal.lib.php | 4 ++-- htdocs/langs/fr_FR/orders.lang | 2 +- htdocs/langs/fr_FR/stocks.lang | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index abed072bc2c..4d7c0ac5181 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -507,7 +507,7 @@ if (empty($reshook)) // Reset fk_parent_line for no child products and special product if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { $fk_parent_line = 0; - } + 2 } // Extrafields if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index 2ef8d02e025..a8b8623cf4d 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -42,8 +42,8 @@ function propal_prepare_head($object) $head[$h][2] = 'comm'; $h++; - if ((empty($conf->commande->enabled) && ((! empty($conf->expedition_bon->enabled) && $user->rights->expedition->lire) - || (! empty($conf->livraison_bon->enabled) && $user->rights->expedition->livraison->lire)))) + if ((empty($conf->commande->enabled) && ((! empty($conf->expedition->enabled) && ! empty($conf->expedition_bon->enabled) && $user->rights->expedition->lire) + || (! empty($conf->expedition->enabled) && ! empty($conf->livraison_bon->enabled) && $user->rights->expedition->livraison->lire)))) { $langs->load("sendings"); $text = ''; diff --git a/htdocs/langs/fr_FR/orders.lang b/htdocs/langs/fr_FR/orders.lang index 98ff4d54671..a4a8827ca05 100644 --- a/htdocs/langs/fr_FR/orders.lang +++ b/htdocs/langs/fr_FR/orders.lang @@ -114,7 +114,7 @@ ConfirmCloneOrder=Êtes-vous sûr de vouloir cloner cette commande %s ? DispatchSupplierOrder=Réception de la commande fournisseur %s FirstApprovalAlreadyDone=Premier niveau d'approbation déjà réalisé SecondApprovalAlreadyDone=Deuxième niveau d'approbation déjà réalisé -SupplierOrderReceivedInDolibarr=Commande fournisseur %s reçue %s +SupplierOrderReceivedInDolibarr=Commande fournisseur %s réceptionné %s SupplierOrderSubmitedInDolibarr=Commande fournisseur %s soumise SupplierOrderClassifiedBilled=Commande fournisseur %s classée facturée OtherOrders=Autres commandes diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index 12ecdcd243e..224b81c9b8c 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -3,7 +3,7 @@ WarehouseCard=Fiche entrepôt Warehouse=Entrepôt Warehouses=Entrepôts ParentWarehouse=Entrepôt parent -NewWarehouse=Nouvel entrepôt ou zone de stockage +NewWarehouse=Nouvel entrepôt / emplacement WarehouseEdit=Édition entrepôt MenuNewWarehouse=Nouvel entrepôt WarehouseSource=Entrepôt source @@ -29,6 +29,8 @@ MovementId=Id du mouvement StockMovementForId=ID mouvement %d ListMouvementStockProject=Liste des mouvements de stocks associés au projet StocksArea=Espace entrepôts +AllWarehouses=Tous les entrepôts +IncludeAlsoDraftOrders=Inclure également les commandes brouillons Location=Lieu LocationSummary=Nom court du lieu NumberOfDifferentProducts=Nombre de produits différents @@ -53,12 +55,12 @@ PMPValue=Valorisation (PMP) PMPValueShort=PMP EnhancedValueOfWarehouses=Valorisation des stocks UserWarehouseAutoCreate=Créer automatiquement un stock/entrepôt propre à l'utilisateur lors de sa création -AllowAddLimitStockByWarehouse=Autoriser l'ajout d'une limite et d'un stock désiré par produit et entrepôt à la place de produit seul +AllowAddLimitStockByWarehouse=Gérez également les valeurs des stocks minimum et souhaités par paire (produit-entrepôt) en plus des valeurs par produit IndependantSubProductStock=Le stock du produit et le stock des sous-produits sont indépendant QtyDispatched=Quantité ventilée QtyDispatchedShort=Qté ventilée QtyToDispatchShort=Qté à ventiler -OrderDispatch=Biens reçus +OrderDispatch=Réceptions d'articles RuleForStockManagementDecrease=Règle de gestion des décrémentations automatiques de stock (la décrémentation manuelle est toujours possible, même si une décrémentation automatique est activée) RuleForStockManagementIncrease=Règle de gestion des incrémentations de stock (l'incrémentation manuelle est toujours possible, même si une incrémentation automatique est activée) DeStockOnBill=Décrémenter les stocks physiques sur validation des factures/avoirs clients @@ -68,8 +70,6 @@ DeStockOnShipmentOnClosing=Décrémenter les stocks physiques au classement "cl ReStockOnBill=Incrémenter les stocks physiques sur validation des factures/avoirs fournisseurs ReStockOnValidateOrder=Incrémenter les stocks physiques sur approbation des commandes fournisseurs ReStockOnDispatchOrder=Incrémenter les stocks physiques sur ventilation manuelle dans les entrepôts, après réception de la marchandise -StockOnReception=Augmenter les stocks physiques sur validation des réceptions -StockOnReceptionOnClosing=Augmenter les stocks réels au classement "clôturée" de la réception OrderStatusNotReadyToDispatch=La commande n'a pas encore ou n'a plus un statut permettant une ventilation en stock. StockDiffPhysicTeoric=Explication de l'écart stock physique-virtuel NoPredefinedProductToDispatch=Pas de produits prédéfinis dans cet objet. Aucune ventilation en stock n'est donc à faire. @@ -149,7 +149,7 @@ NoPendingReceptionOnSupplierOrder=Pas de réception en attente consécutive à d ThisSerialAlreadyExistWithDifferentDate=Ce lot/numéro de série (%s) existe déjà mais avec des dates de consommation ou péremption différente (trouvé %s mais vous avez entré %s). OpenAll=Accepte tous les mouvements OpenInternal=Limité aux mouvements internes -UseDispatchStatus=Utiliser le statut de la commande (approuvée/refusée) pour les lignes de produits sur les bons de réception fournisseur +UseDispatchStatus=Utiliser un statut de contrôle (approuvé / refusé) pour les lignes de produits lors de la réception de la commande OptionMULTIPRICESIsOn=L'option "plusieurs prix par tranches" est activée. Cela signifie qu'un produit à plusieurs prix de vente donc sa valeur de vente ne peut être calculée. ProductStockWarehouseCreated=Alerte de limite de stock et de stock désiré ajoutée ProductStockWarehouseUpdated=Alerte de limite de stock et de stock désiré actualisée @@ -173,14 +173,14 @@ inventoryValidate=Validé inventoryDraft=En service inventorySelectWarehouse=Chois de l'entrepôt inventoryConfirmCreate=Créer -inventoryOfWarehouse=Enventaire pour l'entrepôt: %s +inventoryOfWarehouse=Inventaire pour l'entrepôt: %s inventoryErrorQtyAdd=Erreur: une quantité est inférieure à zéro inventoryMvtStock=Par inventaire inventoryWarningProductAlreadyExists=Ce produit est déjà dans la liste SelectCategory=Filtre par catégorie SelectFournisseur=Filtre fournisseur inventoryOnDate=Inventaire -INVENTORY_DISABLE_VIRTUAL=Autoriser à ne pas déstocker les produits enfants d'un kit dans l'inventaire +INVENTORY_DISABLE_VIRTUAL=Autoriser à ne pas déstocker les produits enfants d'un produit virtuel (kit) dans l'inventaire INVENTORY_USE_MIN_PA_IF_NO_LAST_PA=Utiliser le prix d'achat si aucun dernier prix d'achat n'a pu être trouvé INVENTORY_USE_INVENTORY_DATE_FROM_DATEMVT=Le mouvement de stock a la date d'inventaire inventoryChangePMPPermission=Autoriser à changer la valeur PMP d'un produit From c3d80b217bd313522e520e02a13ed3922e328616 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 18:00:40 +0200 Subject: [PATCH 482/498] Fix css --- htdocs/theme/eldy/global.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 83e2989256f..b797ec69b9e 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2645,6 +2645,10 @@ table.paddingtopbottomonly tr td { .liste_titre_filter { background: rgb() !important; } +table:not(.listwithfilterbefore) tr.liste_titre_filter:first-of-type td.liste_titre { + padding-top: 5px; +} + tr.liste_titre_filter td.liste_titre { /* border-bottom: 1px solid #ddd; */ padding-top: 1px; From 2ff81cd2625579e5e9078b2903c4729e599ce163 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 18:08:23 +0200 Subject: [PATCH 483/498] Fix duplicate key --- htdocs/langs/en_US/paypal.lang | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/langs/en_US/paypal.lang b/htdocs/langs/en_US/paypal.lang index de2f0b19958..1db01a59012 100644 --- a/htdocs/langs/en_US/paypal.lang +++ b/htdocs/langs/en_US/paypal.lang @@ -14,7 +14,6 @@ PaypalModeOnlyPaypal=PayPal only ONLINE_PAYMENT_CSS_URL=Optional URL of CSS stylesheet on online payment page ThisIsTransactionId=This is id of transaction: %s PAYPAL_ADD_PAYMENT_URL=Include the PayPal payment url when you send a document by email -YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode 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) From 78c4a3cced35dfbf7d367ad45b1c1d7b327655cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 18:33:50 +0200 Subject: [PATCH 484/498] Fix lang --- htdocs/compta/journal/purchasesjournal.php | 2 +- htdocs/compta/journal/sellsjournal.php | 2 +- htdocs/langs/en_US/admin.lang | 3 --- htdocs/langs/en_US/bills.lang | 1 - htdocs/langs/en_US/main.lang | 2 -- 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index db69324d5e5..cd3bf06f43a 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; // Load translation files required by the page -$langs->loadlangs(array('companies', 'other', 'compta')); +$langs->loadlangs(array('companies', 'other', 'bills', 'compta')); $date_startmonth=GETPOST('date_startmonth'); $date_startday=GETPOST('date_startday'); diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index ea5f54639a1..fe51665163e 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; // Load translation files required by the page -$langs->loadLangs(array('companies', 'other', 'compta')); +$langs->loadLangs(array('companies', 'other', 'bills', 'compta')); $date_startmonth=GETPOST('date_startmonth'); $date_startday=GETPOST('date_startday'); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 0862719289b..8893626156b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -992,7 +992,6 @@ Port=Port VirtualServerName=Virtual server name OS=OS PhpWebLink=Web-Php link -Browser=Browser Server=Server Database=Database DatabaseServer=Database host @@ -1240,8 +1239,6 @@ BillsNumberingModule=Invoices and credit notes numbering model BillsPDFModules=Invoice documents models BillsPDFModulesAccordindToInvoiceType=Invoice documents models according to invoice type PaymentsPDFModules=Payment documents models -CreditNote=Credit note -CreditNotes=Credit notes ForceInvoiceDate=Force invoice date to validation date SuggestedPaymentModesIfNotDefinedInInvoice=Suggested payments mode on invoice by default if not defined for invoice SuggestPaymentByRIBOnAccount=Suggest payment by withdrawal on account diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 8aa6d8ffb52..8d9aa039fcd 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -89,7 +89,6 @@ PaymentTerm=Payment Term PaymentConditions=Payment Terms PaymentConditionsShort=Payment Terms PaymentAmount=Payment amount -ValidatePayment=Validate payment PaymentHigherThanReminderToPay=Payment higher than reminder to pay HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay.
Edit your entry, otherwise confirm and consider creating a credit note for the excess received for each overpaid invoice. HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay.
Edit your entry, otherwise confirm and consider creating a credit note for the excess paid for each overpaid invoice. diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 59c8ba3412c..f91cbd8f1eb 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -644,7 +644,6 @@ SendAcknowledgementByMail=Send confirmation email SendMail=Send email Email=Email NoEMail=No email -Email=Email AlreadyRead=Already read NotRead=Not read NoMobilePhone=No mobile phone @@ -672,7 +671,6 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value -CurrentValue=Current value PartialWoman=Partial TotalWoman=Total NeverReceived=Never received From acc57343a992548d3a198c5bfea51c7877e18e7e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 18:34:10 +0200 Subject: [PATCH 485/498] Trans --- htdocs/langs/en_US/compta.lang | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 02feb47ccb9..9a5f9768d24 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -80,7 +80,6 @@ AddSocialContribution=Add social/fiscal tax ContributionsToPay=Social/fiscal taxes to pay AccountancyTreasuryArea=Billing and payment area NewPayment=New payment -Payments=Payments PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment @@ -205,7 +204,6 @@ SellsJournal=Sales Journal PurchasesJournal=Purchases Journal DescSellsJournal=Sales Journal DescPurchasesJournal=Purchases Journal -InvoiceRef=Invoice ref. CodeNotDef=Not defined WarningDepositsNotIncluded=Down payment invoices are not included in this version with this accountancy module. DatePaymentTermCantBeLowerThanObjectDate=Payment term date can't be lower than object date. From 314dc26b87cda82f06e828c4e0775bf4bd501718 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 19:32:19 +0200 Subject: [PATCH 486/498] Look and feel v10 --- htdocs/core/lib/admin.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 62271148ff0..243e943143e 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -683,7 +683,7 @@ function translation_prepare_head() $head = array(); $head[$h][0] = DOL_URL_ROOT."/admin/translation.php?mode=overwrite"; - $head[$h][1] = $langs->trans("TranslationOverwriteKey"); + $head[$h][1] = $langs->trans("TranslationOverwriteKey").''; $head[$h][2] = 'overwrite'; $h++; From d8c1c24028db9d84061fe7b5c4b55b42584ce5da Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 19:46:10 +0200 Subject: [PATCH 487/498] Fix syntax error --- htdocs/comm/propal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 4d7c0ac5181..abed072bc2c 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -507,7 +507,7 @@ if (empty($reshook)) // Reset fk_parent_line for no child products and special product if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { $fk_parent_line = 0; - 2 } + } // Extrafields if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { From bc49f47718ee5aea8f293fde9a38e9f273c90845 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 19:48:13 +0200 Subject: [PATCH 488/498] Fix phpcs --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- htdocs/core/modules/product/doc/pdf_standard.modules.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index dd7c63d299a..a641e209f9e 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1523,7 +1523,7 @@ class pdf_crabe extends ModelePDFFactures if (empty($hidetop)) { $pdf->SetXY($this->posxdiscount-1, $tab_top+1); - $pdf->MultiCell($this->posxprogress-$this->posxdiscount+1, 2, $outputlangs->transnoentities("ReductionShort"),'','C'); + $pdf->MultiCell($this->posxprogress-$this->posxdiscount+1, 2, $outputlangs->transnoentities("ReductionShort"), '', 'C'); } } diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index fd25cb86a78..04d566248b9 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -661,7 +661,7 @@ class pdf_standard extends ModelePDFProduct if (empty($hidetop)) { $pdf->SetXY($this->posxqty-1, $tab_top+1); - $pdf->MultiCell($this->posxunit-$this->posxqty-1, 2, $outputlangs->transnoentities("Qty"),'','C'); + $pdf->MultiCell($this->posxunit-$this->posxqty-1, 2, $outputlangs->transnoentities("Qty"), '', 'C'); } if($conf->global->PRODUCT_USE_UNITS) { From 6cb96b926bd8cc6d070c0f56f5701f112dd998d0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 May 2019 21:34:22 +0200 Subject: [PATCH 489/498] Fix phpcs --- htdocs/compta/cashcontrol/cashcontrol_card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 5e16d090d3b..61acf6e3a89 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -350,7 +350,7 @@ if ($action=="create" || $action=="start") { $selectedposnumber=1; $showempty=0; } - print $form->selectarray('posnumber', $array, GETPOSTISSET('posnumber')?GETPOST('posnumber','int'):$selectedposnumber, $showempty); + print $form->selectarray('posnumber', $array, GETPOSTISSET('posnumber')?GETPOST('posnumber', 'int'):$selectedposnumber, $showempty); //print ''; print ''; // Year From 00f626587067a37710fc6ab6e9d94ede75930782 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 09:33:21 +0200 Subject: [PATCH 490/498] Fix responsive --- htdocs/core/boxes/box_project.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index 86e092de7c3..e7281708802 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -118,7 +118,7 @@ class box_project extends ModeleBoxes $projectstatic->public = $objp->public; $this->info_box_contents[$i][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $projectstatic->getNomUrl(1), 'asis' => 1 ); From e87a32e92fbf7b4807b5aae900c57de004286712 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 09:53:10 +0200 Subject: [PATCH 491/498] Fix Try to fix DAV pb with some buggy clients by disabling browser --- htdocs/admin/dav.php | 2 +- htdocs/dav/fileserver.php | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index 894706576b5..6ac210c1ddb 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -153,7 +153,7 @@ print "\n"; clearstatcache(); -print $langs->trans("WebDAVSetupDesc")."
\n"; +print ''.$langs->trans("WebDAVSetupDesc")."
\n"; print "
"; diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php index 55284036bea..3d484fa8b01 100644 --- a/htdocs/dav/fileserver.php +++ b/htdocs/dav/fileserver.php @@ -14,6 +14,9 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . + * + * You can test with the WebDav client cadaver: + * cadaver http://myurl/dav/fileserver.php */ /** @@ -59,7 +62,8 @@ $publicDir = $conf->dav->multidir_output[$entity].'/public'; $privateDir = $conf->dav->multidir_output[$entity].'/private'; $ecmDir = $conf->ecm->multidir_output[$entity]; $tmpDir = $conf->dav->multidir_temp[$entity]; -//var_dump($tmpDir);exit; +//var_dump($tmpDir);mkdir($tmpDir);exit; + // Authentication callback function $authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function ($username, $password) { @@ -147,13 +151,17 @@ if ((empty($conf->global->DAV_ALLOW_PUBLIC_DIR) $server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend)); } // Support for LOCK and UNLOCK +dol_mkdir($tmpDir); $lockBackend = new \Sabre\DAV\Locks\Backend\File($tmpDir . '/.locksdb'); $lockPlugin = new \Sabre\DAV\Locks\Plugin($lockBackend); $server->addPlugin($lockPlugin); // Support for html frontend -$browser = new \Sabre\DAV\Browser\Plugin(); -$server->addPlugin($browser); +if (empty($conf->global->DAV_DISABLE_BROWSER)) +{ + $browser = new \Sabre\DAV\Browser\Plugin(); + $server->addPlugin($browser); +} // Automatically guess (some) contenttypes, based on extension //$server->addPlugin(new \Sabre\DAV\Browser\GuessContentType()); From c12a45597d8038c274dec4bce1476058b03d31f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 09:57:15 +0200 Subject: [PATCH 492/498] Fix move .lockdb into root dir --- htdocs/dav/fileserver.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php index 3d484fa8b01..4e99cf92613 100644 --- a/htdocs/dav/fileserver.php +++ b/htdocs/dav/fileserver.php @@ -61,7 +61,7 @@ $entity = (GETPOST('entity', 'int') ? GETPOST('entity', 'int') : (!empty($conf-> $publicDir = $conf->dav->multidir_output[$entity].'/public'; $privateDir = $conf->dav->multidir_output[$entity].'/private'; $ecmDir = $conf->ecm->multidir_output[$entity]; -$tmpDir = $conf->dav->multidir_temp[$entity]; +$tmpDir = $conf->dav->multidir_output[$entity]; // We need root dir, not a dir that can be deleted //var_dump($tmpDir);mkdir($tmpDir);exit; @@ -151,7 +151,6 @@ if ((empty($conf->global->DAV_ALLOW_PUBLIC_DIR) $server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend)); } // Support for LOCK and UNLOCK -dol_mkdir($tmpDir); $lockBackend = new \Sabre\DAV\Locks\Backend\File($tmpDir . '/.locksdb'); $lockPlugin = new \Sabre\DAV\Locks\Plugin($lockBackend); $server->addPlugin($lockPlugin); From cd8f601cdc315bcb8fa331c291f8ada0d80beece Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 14:01:11 +0200 Subject: [PATCH 493/498] Fix length of vat number --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index e5c765383af..76d3d54515d 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -577,7 +577,7 @@ function isValidVATID($company) $vatprefix = $company->country_code; if ($vatprefix == 'GR') $vatprefix = '(EL|GR)'; else $vatprefix = preg_quote($vatprefix, '/'); - if (! preg_match('/^'.$vatprefix.'[a-zA-Z0-9\-\.]{5,10}$/', $company->tva_intra)) + if (! preg_match('/^'.$vatprefix.'[a-zA-Z0-9\-\.]{5,12}$/', $company->tva_intra)) { return 0; } From 71ba368d578aa49b0ce5bab0ace17d9ad20f1859 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 14:02:45 +0200 Subject: [PATCH 494/498] Fix phpdoc --- htdocs/core/ajax/getaccountcurrency.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/ajax/getaccountcurrency.php b/htdocs/core/ajax/getaccountcurrency.php index d4168b17174..a24133f4448 100644 --- a/htdocs/core/ajax/getaccountcurrency.php +++ b/htdocs/core/ajax/getaccountcurrency.php @@ -16,8 +16,8 @@ */ /** - * \file htdocs/core/ajax/vatrates.php - * \brief File to load vat rates combobox + * \file htdocs/core/ajax/getaccountcurrency.php + * \brief File to load currency rates */ if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal @@ -26,7 +26,8 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); require '../../main.inc.php'; -$id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); + /* * View From 0e7be8365c498f51a963c30b79d0433e4ed23c40 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 14:22:07 +0200 Subject: [PATCH 495/498] Fix size of box --- htdocs/societe/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 885d699b096..31328706271 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1370,7 +1370,7 @@ else print "\n"; print ''; print "\n"; From 7d2d12348cc9c8d32eda2d6fa008b20736a575bf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 14:27:48 +0200 Subject: [PATCH 496/498] Fix popup --- htdocs/societe/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 31328706271..292d109fd74 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1370,12 +1370,12 @@ else print "\n"; print ''; print "\n"; $s.=''.$langs->trans("VATIntraCheck").''; - $s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->trans("VATIntraCheck")), 1); + $s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->transnoentitiesnoconv("VATIntraCheck")), 1); } else { From 0e8184332e377c4e4b3f21047d203e78cb4827e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 14:39:05 +0200 Subject: [PATCH 497/498] Fix missing label on project tooltip --- htdocs/comm/propal/list.php | 25 +++++++++++++------------ htdocs/commande/list.php | 17 ++++++++++------- htdocs/compta/facture/list.php | 5 ++--- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 24c53d26526..e59700b78e0 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -265,13 +265,12 @@ $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, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,'; $sql.= ' p.datec as date_creation, p.tms as date_update,'; -$sql.= " pr.rowid as project_id, pr.ref as project_ref,"; -if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; +$sql.= " pr.rowid as project_id, pr.ref as project_ref, p.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"; - // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_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 @@ -725,6 +724,12 @@ if ($resql) $objectstatic->id=$obj->rowid; $objectstatic->ref=$obj->ref; + $companystatic->id=$obj->socid; + $companystatic->name=$obj->name; + $companystatic->client=$obj->client; + $companystatic->code_client=$obj->code_client; + $companystatic->email=$obj->email; + print ''; if (! empty($arrayfields['p.ref']['checked'])) @@ -777,20 +782,16 @@ if ($resql) { // Project ref print ''; - if ($obj->project_id) { - $projectstatic->fetch($obj->project_id); + 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 ''; if (! $i) $totalarray['nbfield']++; } - $companystatic->id=$obj->socid; - $companystatic->name=$obj->name; - $companystatic->client=$obj->client; - $companystatic->code_client=$obj->code_client; - $companystatic->email=$obj->email; - // Thirdparty if (! empty($arrayfields['s.nom']['checked'])) { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 13f9d2a2b1d..d991fb1cc97 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -245,11 +245,10 @@ $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,'; $sql.= ' c.date_valid, c.date_commande, 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,'; -$sql.= " p.rowid as project_id, p.ref as project_ref"; +$sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label"; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; - // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_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 @@ -936,10 +935,14 @@ if ($resql) // Project if (! empty($arrayfields['p.project_ref']['checked'])) { - $projectstatic->id=$obj->project_id; - $projectstatic->ref=$obj->project_ref; - print ''; - if ($obj->project_id > 0) print $projectstatic->getNomUrl(1); + print ''; + 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 ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index a418696c15d..7961ca58730 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -379,9 +379,8 @@ $sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label"; // 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 (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed'; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; - // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); +foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_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 @@ -1030,7 +1029,7 @@ if ($resql) // Project if (! empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; if ($obj->project_id > 0) { $projectstatic->id=$obj->project_id; From 9de0e694569d82c2b5110c36917d3ae49c37e887 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2019 15:11:06 +0200 Subject: [PATCH 498/498] FIX column project into list --- htdocs/comm/propal/list.php | 85 +++++++++++++++++++++------------- htdocs/commande/list.php | 75 +++++++++++++++++++----------- htdocs/compta/facture/list.php | 49 +++++++++++++++----- 3 files changed, 140 insertions(+), 69 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index e59700b78e0..19fe59062dd 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -62,6 +62,7 @@ $search_ref=GETPOST('sf_ref')?GETPOST('sf_ref', 'alpha'):GETPOST('search_ref', ' $search_refcustomer=GETPOST('search_refcustomer', 'alpha'); $search_refproject=GETPOST('search_refproject', 'alpha'); +$search_project=GETPOST('search_project', 'alpha'); $search_societe=GETPOST('search_societe', 'alpha'); $search_montant_ht=GETPOST('search_montant_ht', 'alpha'); @@ -144,27 +145,28 @@ if (empty($user->socid)) $fieldstosearchall["p.note_private"]="NotePrivate"; $checkedtypetiers=0; $arrayfields=array( - 'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 'p.ref_client'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1), - 'pr.ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0: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), - 'p.date'=>array('label'=>$langs->trans("Date"), 'checked'=>1), - 'p.fin_validite'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1), - 'p.date_livraison'=>array('label'=>$langs->trans("DeliveryDate"), 'checked'=>0), - 'ava.rowid'=>array('label'=>$langs->trans("AvailabilityPeriod"), 'checked'=>0), - 'p.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), - 'p.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), - 'p.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), - 'u.login'=>array('label'=>$langs->trans("Author"), 'checked'=>1, 'position'=>10), - 'sale_representative'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>1), - 'p.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), - 'p.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), + 'p.ref'=>array('label'=>"Ref", 'checked'=>1), + 'p.ref_client'=>array('label'=>"RefCustomer", 'checked'=>1), + '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.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), + 'p.date'=>array('label'=>"Date", 'checked'=>1), + 'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1), + 'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0), + 'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0), + 'p.total_ht'=>array('label'=>"AmountHT", 'checked'=>1), + 'p.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0), + 'p.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0), + 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10), + 'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>1), + 'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + 'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + 'p.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), ); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) @@ -197,6 +199,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_ref=''; $search_refcustomer=''; $search_refproject=''; + $search_project=''; $search_societe=''; $search_montant_ht=''; $search_montant_vat=''; @@ -265,7 +268,7 @@ $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, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,'; $sql.= ' p.datec as date_creation, p.tms as date_update,'; -$sql.= " pr.rowid as project_id, pr.ref as project_ref, p.title as project_label,"; +$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"; @@ -309,6 +312,7 @@ if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search 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->escape($search_availability).')'; if ($search_societe) $sql .= natural_search('s.nom', $search_societe); @@ -536,19 +540,25 @@ if ($resql) { print ''; print ''; - print ''; + print ''; } if (! empty($arrayfields['pr.ref']['checked'])) { print ''; print ''; - print ''; + print ''; + } + if (! empty($arrayfields['pr.title']['checked'])) + { + print ''; + print ''; + print ''; } if (! empty($arrayfields['s.nom']['checked'])) { print ''; print ''; - print ''; + print ''; } if (! empty($arrayfields['s.town']['checked'])) print ''; if (! empty($arrayfields['s.zip']['checked'])) print ''; @@ -686,7 +696,8 @@ if ($resql) 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.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); @@ -730,6 +741,10 @@ if ($resql) $companystatic->code_client=$obj->code_client; $companystatic->email=$obj->email; + $projectstatic->id=$obj->project_id; + $projectstatic->ref=$obj->project_ref; + $projectstatic->title=$obj->project_label; + print ''; if (! empty($arrayfields['p.ref']['checked'])) @@ -772,7 +787,7 @@ if ($resql) if (! empty($arrayfields['p.ref_client']['checked'])) { // Customer ref - print ''; + print ''; print $obj->ref_client; print ''; if (! $i) $totalarray['nbfield']++; @@ -781,17 +796,25 @@ if ($resql) if (! empty($arrayfields['pr.ref']['checked'])) { // Project ref - print ''; + print ''; 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 ''; if (! $i) $totalarray['nbfield']++; } + if (! empty($arrayfields['pr.title']['checked'])) + { + // Project ref + print ''; + if ($obj->project_id > 0) { + print $projectstatic->title; + } + print ''; + if (! $i) $totalarray['nbfield']++; + } + // Thirdparty if (! empty($arrayfields['s.nom']['checked'])) { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index d991fb1cc97..4ff7fe364bd 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -84,6 +84,7 @@ $viewstatut=GETPOST('viewstatut'); $search_btn=GETPOST('button_search', 'alpha'); $search_remove_btn=GETPOST('button_removefilter', 'alpha'); $search_project_ref=GETPOST('search_project_ref', 'alpha'); +$search_project=GETPOST('search_project', 'alpha'); // Security check $id = (GETPOST('orderid')?GETPOST('orderid', 'int'):GETPOST('id', 'int')); @@ -125,24 +126,25 @@ if (empty($user->socid)) $fieldstosearchall["c.note_private"]="NotePrivate"; $checkedtypetiers=0; $arrayfields=array( - 'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 'c.ref_client'=>array('label'=>$langs->trans("RefCustomerOrder"), 'checked'=>1), - 'p.project_ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>0, 'enabled'=>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), - 'c.date_commande'=>array('label'=>$langs->trans("OrderDateShort"), 'checked'=>1), - 'c.date_delivery'=>array('label'=>$langs->trans("DateDeliveryPlanned"), 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)), - 'c.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), - 'c.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), - 'c.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), - 'c.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 'c.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), - 'c.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), - 'c.facture'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1000, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) + 'c.ref'=>array('label'=>"Ref", 'checked'=>1), + 'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>1), + 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)), + 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0: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), + 'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1), + 'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)), + 'c.total_ht'=>array('label'=>"AmountHT", 'checked'=>1), + 'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0), + 'c.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0), + 'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + 'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + 'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), + 'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'position'=>1000, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) ); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) @@ -197,6 +199,7 @@ if (empty($reshook)) $search_deliverymonth=''; $search_deliveryyear=''; $search_project_ref=''; + $search_project=''; $viewstatut=''; $billed=''; $toselect=''; @@ -315,6 +318,7 @@ if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.elemen if ($search_total_ht != '') $sql.= natural_search('c.total_ht', $search_total_ht, 1); if ($search_total_ttc != '') $sql.= natural_search('c.total_ttc', $search_total_ttc, 1); 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"; // Add where from extra fields @@ -595,10 +599,15 @@ if ($resql) print ''; } // Project ref - if (! empty($arrayfields['p.project_ref']['checked'])) + if (! empty($arrayfields['p.ref']['checked'])) { print ''; } + // Project title + if (! empty($arrayfields['p.title']['checked'])) + { + print ''; + } // Thirpdarty if (! empty($arrayfields['s.nom']['checked'])) { @@ -721,7 +730,8 @@ if ($resql) 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.project_ref']['checked'])) print_liste_field_titre($arrayfields['p.project_ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $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); @@ -781,6 +791,10 @@ if ($resql) $generic_commande->total_tva = $obj->total_tva; $generic_commande->total_ttc = $obj->total_ttc; + $projectstatic->id=$obj->project_id; + $projectstatic->ref=$obj->project_ref; + $projectstatic->title=$obj->project_label; + print ''; // Ref @@ -932,21 +946,30 @@ if ($resql) if (! $i) $totalarray['nbfield']++; } - // Project - if (! empty($arrayfields['p.project_ref']['checked'])) + // Project ref + if (! empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; 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 ''; if (! $i) $totalarray['nbfield']++; } + // Project label + if (! empty($arrayfields['p.title']['checked'])) + { + print ''; + if ($obj->project_id > 0) + { + print $projectstatic->title; + } + print ''; + if (! $i) $totalarray['nbfield']++; + } + // Third party if (! empty($arrayfields['s.nom']['checked'])) { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 7961ca58730..fe669a73312 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -78,6 +78,7 @@ $search_product_category=GETPOST('search_product_category', 'int'); $search_ref=GETPOST('sf_ref')?GETPOST('sf_ref', 'alpha'):GETPOST('search_ref', 'alpha'); $search_refcustomer=GETPOST('search_refcustomer', 'alpha'); $search_type=GETPOST('search_type', 'int'); +$search_project_ref=GETPOST('search_project_ref', 'alpha'); $search_project=GETPOST('search_project', 'alpha'); $search_societe=GETPOST('search_societe', 'alpha'); $search_montant_ht=GETPOST('search_montant_ht', 'alpha'); @@ -160,8 +161,9 @@ $arrayfields=array( 'f.type'=>array('label'=>"Type", 'checked'=>0), 'f.date'=>array('label'=>"DateInvoice", 'checked'=>1), 'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1), - 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0:1)), - 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), + 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)), + 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0: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), @@ -212,6 +214,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', $search_ref=''; $search_refcustomer=''; $search_type=''; + $search_project_ref=''; $search_project=''; $search_societe=''; $search_montant_ht=''; @@ -426,7 +429,8 @@ if ($filtre) if ($search_ref) $sql .= natural_search('f.ref', $search_ref); if ($search_refcustomer) $sql .= natural_search('f.ref_client', $search_refcustomer); if ($search_type != '' && $search_type != '-1') $sql.=" AND f.type IN (".$db->escape($search_type).")"; -if ($search_project) $sql .= natural_search('p.ref', $search_project); +if ($search_project_ref) $sql .= natural_search('p.ref', $search_project_ref); +if ($search_project) $sql .= natural_search('p.title', $search_project); if ($search_societe) $sql .= natural_search('s.nom', $search_societe); if ($search_town) $sql.= natural_search('s.town', $search_town); if ($search_zip) $sql.= natural_search("s.zip", $search_zip); @@ -452,7 +456,7 @@ if ($search_status != '-1' && $search_status != '') } else { - $sql.= " AND f.fk_statut IN (".$search_status.")"; // When search_status is '1,2' for example + $sql.= " AND f.fk_statut IN (".$db->escape($search_status).")"; // When search_status is '1,2' for example } } if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$db->escape($search_paymentmode); @@ -460,7 +464,7 @@ if ($search_paymentterms > 0) $sql .= " AND f.fk_cond_reglement = ".$db->escape( $sql.= dolSqlDateFilter("f.datef", $search_day, $search_month, $search_year); $sql.= dolSqlDateFilter("f.date_lim_reglement", $search_day_lim, $search_month_lim, $search_year_lim); if ($option == 'late') $sql.=" AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->client->warning_delay)."'"; -if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale; +if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .(int) $search_sale; if ($search_user > 0) { $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='facture' AND tc.source='internal' AND ec.element_id = f.rowid AND ec.fk_socpeople = ".$search_user; @@ -554,6 +558,8 @@ if ($resql) if ($search_year_lim) $param.='&search_year_lim=' .urlencode($search_year_lim); if ($search_ref) $param.='&search_ref=' .urlencode($search_ref); if ($search_refcustomer) $param.='&search_refcustomer=' .urlencode($search_refcustomer); + if ($search_project_ref) $param.='&search_project_ref='.urlencode($search_project_ref); + if ($search_project) $param.='&search_project='.urlencode($search_project); if ($search_type != '') $param.='&search_type='.urlencode($search_type); if ($search_societe) $param.='&search_societe=' .urlencode($search_societe); if ($search_town) $param.='&search_town='.urlencode($search_town); @@ -741,10 +747,15 @@ if ($resql) print '
'.$langs->trans("Alert"); print ''; } - // Project + // Project ref if (! empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; + } + // Project label + if (! empty($arrayfields['p.title']['checked'])) + { + print ''; } // Thirpdarty if (! empty($arrayfields['s.nom']['checked'])) @@ -876,6 +887,7 @@ if ($resql) if (! empty($arrayfields['f.date']['checked'])) print_liste_field_titre($arrayfields['f.date']['label'], $_SERVER['PHP_SELF'], 'f.datef', '', $param, 'align="center"', $sortfield, $sortorder); 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, 'align="center"', $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); @@ -941,6 +953,10 @@ if ($resql) $thirdpartystatic->email=$obj->email; $thirdpartystatic->country_code=$obj->country_code; + $projectstatic->id=$obj->project_id; + $projectstatic->ref=$obj->project_ref; + $projectstatic->title=$obj->project_label; + $paiement = $facturestatic->getSommePaiement(); $totalcreditnotes = $facturestatic->getSumCreditNotesUsed(); $totaldeposits = $facturestatic->getSumDepositsUsed(); @@ -1026,21 +1042,30 @@ if ($resql) if (! $i) $totalarray['nbfield']++; } - // Project + // Project ref if (! empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; 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 ''; if (! $i) $totalarray['nbfield']++; } + // Project title + if (! empty($arrayfields['p.title']['checked'])) + { + print ''; + if ($obj->project_id > 0) + { + print $projectstatic->title; + } + print ''; + if (! $i) $totalarray['nbfield']++; + } + // Third party if (! empty($arrayfields['s.nom']['checked'])) {