diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md deleted file mode 100644 index 48d5f81fa42..00000000000 --- a/.github/ISSUE_TEMPLATE/custom.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Custom issue template -about: Describe this issue template's purpose here. -title: '' -labels: '' -assignees: '' - ---- - - diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index ed37c9aadc2..844b19c7a3f 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -14,11 +14,11 @@ jobs: - uses: Dolibarr/stale@staleunstale with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).' + stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).' stale-label: 'Issue Stale (automatic label)' exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,Hacktoberfest,good first issue,Bug Security (CVE),Analysis of PR in progres' days-before-stale: 365 - days-before-close: 15 + days-before-close: 10 operations-per-run: 100 dry-run: false \ No newline at end of file diff --git a/.gitignore b/.gitignore index 30151359365..344822f0e9e 100644 --- a/.gitignore +++ b/.gitignore @@ -36,8 +36,8 @@ htdocs/includes/jakub-onderka/ htdocs/includes/phpdocumentor/ htdocs/includes/phpspec/ htdocs/includes/phpunit/ +htdocs/includes/php-parallel-lint/ htdocs/includes/sebastian/ htdocs/includes/squizlabs/ -htdocs/includes/symfony/ htdocs/includes/webmozart/ htdocs/.well-known/apple-developer-merchantid-domain-association diff --git a/.travis.yml b/.travis.yml index 9958556d42d..c47e1b19598 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ # We use dist: xenial to have php 5.6+ available os: linux dist: xenial +#dist: bionic sudo: required language: php @@ -118,24 +119,18 @@ install: echo - | - echo "Installing Composer dependencies (PHP Unit, Parallel Lint & PHP CodeSniffer" - if [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then - composer -n require phpunit/phpunit ^4 \ - jakub-onderka/php-parallel-lint ^0 \ - jakub-onderka/php-console-highlighter ^0 \ - squizlabs/php_codesniffer ^3 - fi + echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer - for $TRAVIS_PHP_VERSION" if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] \ [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then composer -n require phpunit/phpunit ^5 \ - jakub-onderka/php-parallel-lint ^0 \ - jakub-onderka/php-console-highlighter ^0 \ + php-parallel-lint/php-parallel-lint ^0 \ + php-parallel-lint/php-console-highlighter ^0 \ squizlabs/php_codesniffer ^3 fi if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then composer -n require --ignore-platform-reqs phpunit/phpunit ^5 \ - jakub-onderka/php-parallel-lint ^0 \ - jakub-onderka/php-console-highlighter ^0 \ + php-parallel-lint/php-parallel-lint ^1 \ + php-parallel-lint/php-console-highlighter ^0 \ squizlabs/php_codesniffer ^3 fi echo @@ -282,7 +277,11 @@ script: # Ensure we catch errors set -e #parallel-lint --exclude htdocs/includes --blame . - parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/composer/autoload_static.php --blame . + parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \ + --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \ + --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \ + --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \ + --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --blame . set +e echo @@ -291,7 +290,7 @@ script: # Ensure we catch errors set -e # Exclusions are defined in the ruleset.xml file - #phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 . + #phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true . if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .; fi set +e echo diff --git a/.tx/config b/.tx/config index 5c52849c29c..696ff858394 100644 --- a/.tx/config +++ b/.tx/config @@ -326,6 +326,12 @@ source_file = htdocs/langs/en_US/receptions.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.recruitment] +file_filter = htdocs/langs//recruitment.lang +source_file = htdocs/langs/en_US/recruitment.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.resource] file_filter = htdocs/langs//resource.lang source_file = htdocs/langs/en_US/resource.lang diff --git a/COPYRIGHT b/COPYRIGHT index 2964c915ec1..d8cefedcd65 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -21,7 +21,7 @@ Mobiledetect 2.8.34 MIT License Yes NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package) PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency ParseDown 1.6 MIT License Yes Markdown parser -PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers +PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP @@ -39,7 +39,7 @@ TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes JS libraries: Ace 1.4.8 BSD Yes JS library to get code syntaxique coloration in a textarea. ChartJS 2.9.3 MIT License Yes JS library for graph -jQuery 3.4.1 MIT License Yes JS library +jQuery 3.5.1 MIT License Yes JS library jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups) diff --git a/ChangeLog b/ChangeLog index 20a1748af6b..d1aa820e4a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,406 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 13.0.0 compared to 12.0.0 ***** +For users: +NEW: Add module Credit transfer SEPA to manage payment of supplier using bank credit transfer SEPA files +NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable + + +WARNING: + +Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +* Properties ->contactid has been renamed into ->contact_id +* Rename property $paiementid in API api_supplier_invoices into $payment_mode_id +* The deprecated subsitution key __SIGNATURE__ has been removed. Replace with __USER_SIGNATURE__ if you still use old syntax in + your email templates. +* The hidden option HOLIDAY_MORE_PUBLIC_HOLIDAYS has been removed. Use instead the dictionary table if you need to define custom + days of holiday. +* Property num_paiement has been renamed num_payment everywhere for better code consistency. + + +***** ChangeLog for 12.0.2 compared to 12.0.1 ***** +FIX: computation of the bottom margin of returns NaN because body is not loaded yet +FIX: DebugBar hides content at page bottom +FIX: allow more harmless html tags +FIX: Bad back to link +FIX: Bad param +FIX: Can go on page even when module is disabled +FIX: Change position of line in BOM +FIX: Checkbox "drop table" was not checked when using php method to generate backup dump +FIX: ClickToDial tab of users has disappeared +FIX: CSS +FIX: date in supplier price log tooltip. +FIX: Debug module direct debit order. Solve conflict with credit transfer +FIX: Debug setup of receipt printer module +FIX: dolGetElementUrl and agenda page for external modules +FIX: DO not erase variable $key and $label during output of extrafields +FIX: duration fields size with firefox +FIX: Edit extrafield of type long text loose carriage returns +FIX: Fails to retraive accounting code of social contribution sometimes +FIX: Filter too large for extrafields with type text or html +FIX: If using a rounding step, localtax1+2 not included in total +FIX: input field of extrafields must keep data if form submit fails. +FIX: Label of opportunities in graph with special chars badly encoded +FIX: locataxes lost on lines when cloning a vendor invoice +FIX: Look and feel v12 +FIX: Missing PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE conf support in supplier order +FIX: Navigation in object fails to find the next ref in some cases +FIX: null required +FIX: order by amount ht uses wrong column +FIX: Order by amount in product propal stats must be done on d.total_ht and not p.total +FIX: page for confirmation of payments is empty +FIX: Param of fetch_name_optionals_label must be object->table_element +FIX: Picto of HRM module +FIX: product label and desc were never updated when modifying translation +FIX: redirect on contact card from main search +FIX: Reposition and nav +FIX: search warehouse list +FIX: Setup of clicktodial hang on smartphone +FIX: Setup of currency limit and accuracy +FIX: shipping creation: checks not done on weight and sizes +FIX: Should not be able to edit qty on shipment when no stock available +FIX: Size of image on the help popup of modules +FIX: Sql error on stat by referring entries of a product +FIX: Warning if no bank account defined +FIX: We need to see unit line on PDF even though it's an option +FIX: wrong element var for fetch_name_optionals_label function with expeditions +FIX: wrong link to third invoice templates +FIX: Disable svg as supported image by default (can contains javascript). Set MAIN_ALLOW_SVG_FILES_AS_IMAGES to 1 to have svg accepted +FIX: #14076 +FIX: #14146 +FIX: #14209 +FIX: #14222 +FIX: #14236 +FIX: #14241 Mysql 8 compatibility +FIX: #14253 +FIX: #14256 +FIX: #14259 +FIX: #14279 +FIX: #14291 +FIX: #14292 +FIX: #14336 + +***** ChangeLog for 12.0.1 compared to 12.0.0 ***** +FIX: reposition was broken if url end with #anchor +FIX: $_POST must be GETPOST +FIX: 10.0 - fatal with postgreSQL +FIX: #14109 +FIX: #14112 +FIX: #14142 +FIX: all extrafields cleared after update of one of them +FIX: Avoid warning when creating a module with already existing files +FIX: change selected fields on company card +FIX: Correct ModuleBuilder left menu +FIX: create a deposit with amount using comma didn't work +FIX: CSS +FIX: Entry from stripe intent were reported into SEPA payments +FIX: Filter on status, closing opening status +FIX: html lost on html extrafield +FIX: Label of popup on thirdparty +FIX: missing possibility to change entity when propal cloning +FIX: missing setup of extrafields for MO +FIX: Missing the tooltip when creating bank account +FIX: Missing token +FIX: non numeric value on comm/card.php +FIX: SQL Problem in customer invoice list +FIX: SQL Problem in social contribution list +FIX: SQL Problem in supplier invoice list +FIX: SQL syntax error when editing extrafields +FIX: Sql type +FIX: takepos 12 hook +FIX: Update form erased extrafields that were hidden +FIX: Update of extrafields date +FIX: Update of extrafiels on draft object +FIX: upload documents into manual ECM was reported a permission error +FIX: Use of office365 TLS with SMTPs method. +FIX: wrong origin +FIX: Permission error during import + +***** ChangeLog for 12.0.0 compared to 11.0.0 ***** +For users: + +NEW: Module MO (Manufacturing Order) is available as stable module. +NEW: Receipt printer module moved from 'development' to 'experimental' +NEW: Add option MAIN_VIEW_LINE_NUMBER_IN_LIST for some lists. +NEW: add numbering module for TakePOS module +NEW: 2 new options when creating an invoice from time spent on a project : by period or by task +NEW: Accountancy add column thirdparty on binding page +NEW: Accountancy - Add Export for Fiducial Winfic eWinfic WinSis Compta +NEW: Accountancy - Add Export LD compta version 10 +NEW: Accountancy - Add mode intra & export for product or service bought +NEW: Accountancy - Add possibility to manage a short alternative label for account - Use to simplify accountancy +NEW: Accountancy - General ledger - Add an option to search not reconciled lines +NEW: Add accountancy code of thirdparty in contact and supplier export +NEW: support webp image format +NEW: Add checkbox "overwrite if exists" into ECM/DMS module +NEW: add a link to notes in members list +NEW: add a parameter to group same products in TakePOS +NEW: add a parameter to sort product by label in TakePOS +NEW: Add a profil to import contact categories +NEW: Add company extrafields into order export +NEW: add const CASHDESK_FORCE_DECREASE_STOCK to force batch decrementation +NEW: add const TAKEPOS_NUMPAD_USE_PAYMENT_ICON to use icons on payment buttons +NEW: add csv separator setup in module admin +NEW: add dedicated substitutions keys for extrafields of type date and datetime +NEW: add default warehouse for dispatch +NEW: Add due date in feature "Export accounting documents" +NEW: Add duration information for fichinter +NEW: Start support of Dark theme into ELDY theme +NEW: Add field author public alias for blog post on website module +NEW: Add "finished" field on product list +NEW: Add French association chart of accounts 2018 +NEW: Add French farm chart of accounts 2014 +NEW: Add French foundation chart of accounts 2018 +NEW: add global reduction in cash desk +NEW: Add graph type 'piesemicircle' +NEW: Add hook getInputIdProf. Better solution for #13228 +NEW: Add hook on margin list page +NEW: add icon on payment buttons in cash desk +NEW: Add include various payments and loans in accounting report with simplfified accountancy +NEW: Add invoice stat graph and categ search +NEW: Addition of delivery times in substitution variables +NEW: add member to validate on dashboard +NEW: Add method to add social network sharing buttons on blog posts +NEW: add multicurrency columns to document lists +NEW: add numbering module for cash desk +NEW: add Opening Balance column to balance.php +NEW: add opportunity status in project stats +NEW: Add option PDF_USE_ALSO_LANGUAGE_CODE to generate PDF in 2 languages +NEW: Add option to hide all inactive users into combo list of users. +NEW: add PDF certificate if present on document folder +NEW: add product if only one found +NEW: Add product on key "Enter" in search bar +NEW: add professional ID 1 in sepamandate document +NEW: Add Project Ref Column on list of social/fiscal contributions +NEW: add Project Ref in events export +NEW: add public and private notes in propal list +NEW: Add social networks of the company +NEW: Add sorting for contacts of ... pages +NEW: Add subtitution variables for url of document in backoffice +NEW: Add tel and fax in warehouse card +NEW: add total of value in product stat +NEW: add total weighted amount in project list +NEW: add units in product list +NEW: add VAT ID in sepamandate document +NEW: add VAT rates in free zone for product/service in TakePOS +NEW: add weighted amount on project/opportunity +NEW: add width and height measures in product list +NEW: add WYSiWYG on member type's description +NEW: [Allow constants values to be overridden by environment variables] +NEW: Allow custom module class origine type in Mouvementstock +NEW: allow display extrafields on pdf +NEW: Allow extrafields on pdf : extend to line desc +NEW: allow time consumed to be linked to another task +NEW: Another way to navigate between pages for some lists +NEW: Add author column in the client/supplier invoice lists and into order list +NEW: bank account tags for invoice ODT template +NEW: Bar Restaurant tab and Auto order +NEW: better filter on shipment list as other list +NEW: Better php module view admin +NEW: Bookkeeping - Add link to document & pdf +NEW: Bookmarks are now in top menu bar +NEW: Can check all events in one click in setup of audited events +NEW: Can create an deposit from order using a percentage of qty. +NEW: Can edit option PDF_USE_ALSO_LANGUAGE_CODE from PDF setup page +NEW: Can enter and edit stripe credit card using the Stripe card ID +NEW: Can filter on donation status in list +NEW: Can replace a string into all pages in website module +NEW: Can select several fields to personalize list before submit. +NEW: Can select which element to export in export accounting documents. +NEW: can update contact in import model +NEW: Cash Fence in TakePOS +NEW: Categories and subcategories sorted by label in TakePOS +NEW: Categories for actioncomm +NEW: Category filter for bank and warehouse list +NEW: Chart of accounts to Ecuador +NEW: class tool for converting units +NEW: Close #13011 Add button create thirdparty when creating intervention +NEW: Colorful theme for TakePOS +NEW: columns units in product list +NEW: compatibility of translabel with more dictionaries +NEW: Confirm file delete on invoice card +NEW: "contact_civility" for ODT templates +NEW: CUPS printing compatibility for TakePOS +NEW: Customer command list - Add date start & date end +NEW: display weight in shipment list +NEW: Documentation about PHP support in Dolibarr +NEW: Donation - Update FR CERFA to 11580*04 +NEW: Easier way to setup the different types of tax. Better visibility. +NEW: Expedition list - Add date start & date end +NEW: Experiment supplier packaging with option PRODUCT_USE_SUPPLIER_PACKAGING: Using price according to the minimum quantity +NEW: Export module, add extrafields for Contract and Contract line +NEW: Extend retained warranty to be available for all invoices +NEW: French new regions +NEW: hook and data id +NEW: hook on ics generation to add more events in eventarray +NEW: hook on product load stats +NEW: If $dolibarr_main_force_https is set, the flag 'secure' on session +NEW: ignore dir for apple pay with stripe +NEW: Invoice list - Add date start & date end +NEW: invoice list: enable multicurrency columns +NEW: labels on reduction buttons in cash desk +NEW: Minimum sell prices taking into account in TakePOS +NEW: monthly view to enter time +NEW: Multiple sales in TakePOS +NEW: multiselect categorie client stats facturation +NEW: no confirm discard ticket if paid +NEW: not show linked table on add message action +NEW: only auto print paid ticket in cash desk +NEW: only show units columns in product list (not in service list) +NEW: order list: enable multicurrency columns +NEW: Overwrite tpl with module_part['tpl'] is deprecated. USe hooks +NEW: possibility to defined rounding rules by currency +NEW: possibility to show society info when print page +NEW: Povide a RSS Feed for blogposts +NEW: PRODUCT_SHOW_ORIGIN_IN_COMBO +NEW: Project task list, add column selector and extrafields +NEW: Propal list - Add date start & date end +NEW: propal list: enable multicurrency columns +NEW: RECEIPT_PRINTER_NB_CHARACT_BY_LINE and FIX: product label +NEW: Restore version of application on main screen (for screenshots) +NEW: Salaries list - Add date start & date end +NEW: search on key code "enter" if defined in TakePOS +NEW: set payment method on paid ticket in TakePOS +NEW: Show active widget state of a RSS feed +NEW: Show count of each category elements in category card +NEW: Show creator, last update user of category/tag in the information tab +NEW: Show list of users in the user category card +NEW: show messages on ticket card +NEW: show "New category" button in top of sub categories list +NEW: show project label in project index +NEW: Show units of products in stocks and hide total units if content is of diffents units +NEW: sorting elements on project overview +NEW: special option MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION to store in document line created form other documents lines the id of original lines and origin class line rather than origin object id and origin object type +NEW: stats invoice graph with 3 bars (3 years instead of 2) +NEW: supplier invoice list: enable multicurrency columns +NEW: supplier order list: enable multicurrency columns +NEW: supplier proposal list: enable multicurrency columns +NEW: Support of tag {line_pos} for line numbers for tables in ODT templates +NEW: Support some HTML contents into ODT documents +NEW: Parameters for Bar Restaurant are grouped in same tab +NEW: Takepos : Sort products by reference +NEW: Takepos supplements are supported. +NEW: The info_admin() can show text after click on other text +NEW: The module selection uses a KanBan view by default. +NEW: tooltip for Unit_type and scale in "Dictionary setup - Measuring Units" +NEW: tooltip notes with first public note and then private note +NEW: Tree view for sub-categories +NEW: Truncate columns names when too long and show full title as popup +NEW: upload odt models for invoices, order, proposal, thirdparties and shipments. +NEW: Use native --convert-to feature to convert to pdf +NEW: Add user on order list +NEW: Various payment list - Add search date start & date end & subledger account +NEW: visu FROM day TO day in permonth view +NEW: Website logs are now into a separated log file. +NEW: X-Axis on graph are shown verticaly when there is a lot of values. +NEW: Can force ref of a variant product + +For developers or integrators: + +NEW: Add a method $form->widgetForTranslation to allow any field of a form to be entered into different languages. +NEW: Add API to get types of expense reports +NEW: API filter bankaccounts by category +NEW: API filter contacts by category +NEW: API filter members by category +NEW: API filter projects by category +NEW: API filter thirdparty by category +NEW: API filter user by category +NEW: API filter warehouses by categorie +NEW: api for get user's documents +NEW: api invoice get by ref +NEW: API to update purchase price. +NEW: Move engine to build charts from jflot to chart.js +NEW: Upgrade ace to 1.4.8 - Upgrade select2 to 4.0.13 +NEW: Upgrade Stripe library to 6.43.1 +NEW: Bookkeeping by account - Add selectfields & hook +NEW: Can force position of legend of graph on right (instead of top) +NEW: Can change destination of "Back to list" using a "backtolist" parameter +NEW: add more category types from hook +NEW: enable put for agendaevents api +NEW: filter by product on supplier order API +NEW: get documents for categories with RESP API +NEW: get proposal by ref with API +NEW: Hidden option MAIN_TEMP_DIR + +WARNING: + +Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +* PHP 5.5 is no more supported. Minimum PHP is now 5.6+. +* Default mode for GETPOST function is now 'alphanohtml' instead of 'none'. So check when you make POST or GET requests with + HTML content that you make a GETPOST('myparam', 'restricthtml') or GETPOST('myparam', 'none') if you really need posted content without sanitizing + the HTML code of content (in such a case, sanitize data later) +* Removed hidden constant MAIN_EXTRAFIELDS_IN_ONE_TD that was useless. +* Reference of object including a "/" are no more allowed. It is never used by default but to support setup that introduced it, the "/" will be replaced + by a "_" automatically when a reference (with a custom numbering mask that use it) is generated. +* Library jflot (replace with chartjs) was removed. +* Library geoip (replaced with geoip2) was removed. +* Hidden constant COMMANDE_VALID_AFTER_CLOSE_PROPAL was renamed into ORDER_VALID_AFTER_CLOSE_PROPAL. +* Object field ref_int is deprecated and set to 'not used', method to fetch object by only ref_int is not supported anymore. +* UserGroup class has been refactored with new architecture. Triggers of class UserGroup are now USERGROUP_CREATE, USERGROUP_MODIFY, USERGROUP_DELETE +* A new way to navigate between pages in list is available. To use it (not mandatory), you must: + - replace line $page = GETPOST('page', 'int') with $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); + - remove input field in form '';' + - add parameter $pagenavastextinput to value 1 when calling print_barre_liste() + +WARNING FOR DOLIWAMP USERS ONLY: + +Only people that installed Dolibarr using the all-in-one auto-installer for Windows called "DoliWAMP" are concerned by the following warnings: + +* DoliWAMP auto-installer for Windows is no more available on 32 bits systems. Use standard package if you need to use such architecture. +* It is not possible to migrate from an installation done with the old DoliWAMP auto-installer for Windows by using this new one. + You must make a backup of your database, make a fresh installation using the new installer and reload your backup. + Don't forget that DoliWAMP is a good solution to make a quick test of Dolibarr on your local computer but is not recommended as a production + solution on a local desktop since a local desktop computer has often no backup and security policy, or not as good as on a server (when there is one). + DoliWAMP remains a solution for fast test or demo purposes. Prefer using standard packages for production. + + +***** ChangeLog for 11.0.5 compared to 11.0.4 ***** +FIX: $arraydefaultmessage is an object, as well as in /htdocs/core/class/html.formmail.class.php +FIX: 10.0 - pagination in prelevement/bons.php +FIX: 10.0 - undefined $langs if template file copy fails during activation of modContrat +FIX: 11.0 - fatal with postgres on contact/agenda.php +FIX: 11.0 - multicurrency amount not fetched when fetching payments from llx_paiement or llx_paiementfourn +FIX: 11.0 - when using pdftk as per hidden conf USE_PDFTK_FOR_PDF_CONCAT, check that the file exists before displaying a success message +FIX: #13841 +FIX: #13877 - Can validate invoice if there is a credit note with VAT 0% on an invoice with other lines with a VAT non 0% +FIX: #13968 +FIX: #14001 +FIX: #14002 +FIX: 9.0 - delete unused mandatory argument from migrate_clean_association: argument count mismatch causes a fatal error since php7 +FIX: 9.0 - fatal during migration from 3.1 using PHP 7 +FIX: Accountancy - Binding index - Add a filter on sql request for module Subtotal & Jalon +FIX: avoid error "Call to undefined function measuringUnitString()" +FIX: BlindBoolean SQL injection reported by Christian Weiler +FIX: Can create a credit note on situation invoice if previous is also +FIX: can install module even if (x) was appended during download. +FIX: copy value date of VariousPayment onto the new AccountLine +FIX: count of open day when date and start are not open should be 0 +FIX: Default bank account was not loaded for document generation. +FIX: Do not show stats panel if the user does not have permissions +FIX: Fix link of the button to create a credit note and fix the awareness of a error that happen when wo create a credit note +FIX: force rounding 2 on export ld compta +FIX: free text on cash desk +FIX: links into emails of notifications +FIX: missing file manifest.json.php +FIX: missing GetNomURL Hook in warehouse class +FIX: missing hook init + table class + $page not set +FIX: missing rollbacks on trigger bad return +FIX: missing translation value for key "NoMorePredefinedProductToDispatch" +FIX: percent must be displayed on one line +FIX: php error if multicompany disabled +FIX: Privilege escalation reported by wizlynx WLX-2020-011 +FIX: replace filter parameter "none" by "restricthtml" +FIX: Rounding Total TVA in "crabe" model pdf +FIX: Show ref_customer, amount on contract link object +FIX: Site ec.europa.eu has moved to https:// +FIX: Tickets mail models doesn't work +FIX: vulnerability reported by wizlynx WLX-2020-012 +FIX: We must only rename current bank receipt +FIX: when creating a VariousPayment, the value date is not copied onto the AccountLine that gets created at the same time, so the bank transaction's value date will be the payment date instead of the payment's value date +FIX: wrong url param +FIX: XSS using the renaming of .noexe files - reported by Nolan. + ***** ChangeLog for 11.0.4 compared to 11.0.3 ***** FIX: #13749 FIX: #7594 Expense report multi pagebreak @@ -80,32 +480,6 @@ FIX: Wrong Sql on getListOfTowns api method FIX: wrong user right's name to top menu "commercial" FIX: XSS Vulnerability reported by Mehmet Kelepçe / Gais Cyber Security -***** ChangeLog for 12.0.0 compared to 11.0.0 ***** -For Users: -NEW: Module MO (Manufacturing Order) is available as stable module. -NEW: Add option MAIN_VIEW_LINE_NUMBER_IN_LIST for some lists. - -For Developers or integrators: -* A new way to navigate between pages in list is available. To use it, you must - - replace $page = GETPOST('page', 'int') with $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); - - remove input field in form '';' - - add parameter $pagenavastextinput to value 1 when calling print_barre_liste -* UserGroup class has been refactored with new architecture. Triggers of class UserGroup are now USERGROUP_CREATE, USERGROUP_MODIFY, USERGROUP_DELETE - -WARNING: - -Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: -* PHP 5.5 is no more supported. Minimum PHP is now 5.6+. -* Default mode for GETPOST function is now 'alphanohtml' instead of 'none'. So check when you make POST or GET requests - with HTML content that you make a GETPOST('myparam', 'restricthtml') or GETPOST('myparam', 'none') if you really need posted content without sanitizing - the HTML into content (in such a case, sanitize data later) -* Removed hidden constant MAIN_EXTRAFIELDS_IN_ONE_TD that was useless. -* Reference of object including a "/" are no more allowed. It is never used by default but to support setup that introduced it, the "/" will be replaced - by a "_" automatically when a reference (with a custom numbering mask that use it) is generated. -* Library jflot (replace with chartjs) and geoip (replaced with geoip2) were removed. -* Hidden constant COMMANDE_VALID_AFTER_CLOSE_PROPAL were renamed into ORDER_VALID_AFTER_CLOSE_PROPAL. - - ***** ChangeLog for 11.0.3 compared to 11.0.2 ***** FIX: unit price for selected supplier products not set. NaN was used. FIX: use bad var to check if total is positive for each VAT rate when validating an invoice diff --git a/README.md b/README.md index f611f333e6a..19a767c8232 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,15 @@ ![Downloads per day](https://img.shields.io/sourceforge/dw/dolibarr.svg) ![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg) -Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…). +Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…). -It's an Open Source Software (written in PHP language) designed for small, medium or large companies, foundations and freelancers. +It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers. -You can freely use, study, modify or distribute it according to its Free Software licence. +You can freely use, study, modify or distribute it according to its licence. -You can use it as a standalone application or as a web application to be able to access it from the Internet or a LAN. +You can use it as a standalone application or as a web application to access it from the Internet or a LAN. + +Dolibarr has a large community ready to help you, free forums and [oficially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org) ![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_1920x1080.jpg) @@ -35,11 +37,15 @@ Releases can be downloaded from [official website](https://www.dolibarr.org/). ### Advanced setup -You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version. +You can use a web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version. + +On GNU/Linux, first check if your distribution has already packaged Dolibarr. + +#### Generic install steps: - Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Versions). -- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git): +- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later): `git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...) @@ -70,13 +76,13 @@ If you don't have time to install it yourself, you can try some commercial 'read ## UPGRADING +Dolibarr supports upgrading usually wihtout the need for any (commercial) support (depending on if you use any commercial extensions) and supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate! + - At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr - Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md). - Overwrite all old files from 'dolibarr' directory with files provided into the new version's package. -- At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process. -  If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*"). - -*Note: migration process can be safely done multiple times by calling the `/install/index.php` page* +- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process. +  If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*"). ## WHAT'S NEW @@ -91,14 +97,15 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Products and/or Services catalog - Commercial proposals management - Customer & Supplier Orders management +- Invoices and payment management - Shipping management - Warehouse/Stock management -- Invoices and payment management -- Standing orders management (European SEPA) +- Manufacturing Orders - Bank accounts management +- Direct debit orders management (European SEPA) - Accounting management - Shared calendar/agenda (with ical and vcal export for third party tools integration) -- Opportunities and/or project management +- Opportunities or Leads management - Projects & Tasks management - Contracts management - Interventions management @@ -138,7 +145,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) - APIs -- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture) +- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture) - Support a lot of country specific features: - Spanish Tax RE and ISPF - French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) @@ -148,7 +155,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) - Compatible with European GDPR rules - ... -- PDF or ODT generation for invoice, proposals, orders... +- Flexible PDF & ODT generation for invoices, proposals, orders... - … ### System Environment / Requirements @@ -166,12 +173,12 @@ These are features that Dolibarr does **not** yet fully support: - Tasks dependencies in projects - Payroll module -- No native embedded Webmail +- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc. - Dolibarr can't do coffee (yet) ## DOCUMENTATION -Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org). +Administrator, user, developer and translator's documentations are available along with other community resources in the [Wiki](https://wiki.dolibarr.org). ## CONTRIBUTING @@ -181,7 +188,7 @@ This project exists thanks to all the people who contribute. [[Contribute](https ## CREDITS -Dolibarr is the work of many contributors over the years and uses some fine libraries. +Dolibarr is the work of many contributors over the years and uses some fine PHP libraries. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file. diff --git a/SECURITY.md b/SECURITY.md index e5493805733..59311cf71ba 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,13 +1,109 @@ # Security Policy -## Supported Versions +This file contains some policies about the security reports on Dolibarr ERP CRM project, one of the most popular Open Source ERP and CRM in the world. + +## Supported Versions for security reports + +| Version | Supported | +| --------- | ------------------ | +| <= 9.0.* | :x: | +| >= 10.0.* | :white_check_mark: | -| Version | Supported | -| -------- | ------------------ | -| <= 8.0.* | :x: | -| >= 9.0.* | :white_check_mark: | ## Reporting a Vulnerability To report a vulnerability, please send an email to security@dolibarr.org In most cases, after fixing the security, we make an answer by email to say the issue has been fixed. + + +## Hunting vulnerabilities on Dolibarr + +We believe that future of software is online SaaS. This means software are more and more critical and no technology is perfect. Working with skilled security researchers is crucial in identifying weaknesses in our technology. + +If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery. + +Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure. + +We recommand to install Dolibarr ERP CRM on you own server (as most Open Source software, download and use is free: https://www.dolibarr.org/download) to get access on every side of application. + +### User Agent + +If you try to find bug on Dolibarr, we recommend to append to your user-agent header the following value: '-BugHunting-dolibarr'. + +### Account access + +You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from https://www.dolibarr.org/download + + +## Eligibility and Responsible Disclosure + +We are happy to thank everyone who submits valid reports which help us improve the security of Dolibarr however, only those that meet the following eligibility requirements may receive a monetary reward: + +You must be the first reporter of a vulnerability. + +The vulnerability must be a qualifying vulnerability (see below) + +Any vulnerability found must be reported no later than 24 hours after discovery + +You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary. + +You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install softwate on your own platform. + +You must not leak, manipulate, or destroy any user data. + +You must not be a former or current employee of Dolibarr or one of its contractor. + +Reports about vulnerabilities are examined by our security analysts. + +Our analysis is always based on worst case exploitation of the vulnerability, as is the reward we pay. + +No vulnerability disclosure, including partial is allowed for the moment. + + +## Scope for qualified vulnerabilities + +ONLY vulnerabilities discovered, when the following setup on tested platform is used, are accepted: + +* $dolibarr_main_prod must be set to 1 into conf.php +* $dolibarr_nocsrfcheck must be kept to the value 1 into conf.php (this is the default value) +* The module DebugBar must NOT be enabled (by default, this module is not enabled) +* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 1 into backoffice menu Home - Setup - Other (this protection should be enabled soon by default) +* ONLY security reports on "stable" modules are allowed (troubles into "experimental" and "developement" modules are not accepted). + +Scope is the web application (back office) and the APIs. + + +## Qualifying vulnerabilities for Bug bounty programs +* Remote code execution (RCE) +* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA) +* Code injections (HTML, JS, SQL, PHP, ...) +* Cross-Site Scripting (XSS) +* Cross-Site Requests Forgery (CSRF) with real security impact +* Open redirect +* Broken authentication & session management +* Insecure direct object references +* CORS with real security impact +* Horizontal and vertical privilege escalation +* "HTTP Host Header" XSS +* Software version disclosure (for non admin users only) +* Stack traces or path disclosure (for non admin users only) + + +## Non-qualifying vulnerabilities for Bug bounty programs, but qualified for reporting +* "Self" XSS +* Missing cookie flags +* SSL/TLS best practices +* Denial of Service attacks +* Clickjacking/UI redressing +* Physical or social engineering attempts +* Presence of autocomplete attribute on web forms +* Vulnerabilities affecting outdated browsers or platforms +* Issues that require physical access to a victim’s computer/device +* Logout and other instances of low-severity Cross-Site Request Forgery +* Missing security-related HTTP headers which do not lead directly to a vulnerability +* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated +* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC) +* Reports on features flagged as "experimental" or "development" +* Software version disclosure when logged user is admin +* Stack traces or path disclosure when logged user is admin + diff --git a/build/README b/build/README index 67ceb05c8d2..f7e8ebfe60b 100644 --- a/build/README +++ b/build/README @@ -19,30 +19,34 @@ Note: Prerequisites to build autoexe DoliWamp package: > Launch "wine cmd" to check a drive Z: pointing to / exists. > Install InnoSetup For example by running isetup-5.3.9.exe (http://www.jrsoftware.org) -> Install WampServer into "C:\Program Files\Wamp" - For example by running wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe (http://www.wampserver.com) -> Install WampServer addon to have versions: Mysql5.0.45 - For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com) -> To build from Windows (running from makepack-dolibarr.pl script is however - recommanded), open file build/exe/doliwamp.iss and click on button "Compile". - The .exe file will be build into directory build. +> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB + For example by running wampserver3.2.0_x64.exe (http://www.wampserver.com). See file build/exe/doliwamp.iss to know the doliwamp version currently setup. > Add path to ISCC into PATH windows var: Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH +> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded), + open file build/exe/doliwamp.iss and click on button "Compile". + The .exe file will be build into directory build. + + - To build a theme package, launch the script > perl makepack-dolibarrtheme.pl + + - To build a package for a module, launch the script > perl makepack-dolibarrmodule.pl + + - To build developper documentation, launch the script > perl dolibarr-doxygen-build.pl + Note: -The build directory and all its contents is absolutely not required to make -Dolibarr working. It is here only to build Dolibarr packages, and those -generated packages will not contains this "build" directory. +The build directory and all its contents is absolutely not required to make Dolibarr working. +It is here only to build Dolibarr packages, and those generated packages will not contains this "build" directory. You can find in "build", following sub-directories: @@ -59,6 +63,9 @@ To build Mac OS package (not ready yet). * doap: To build Doap descriptor to promote/describe Dolibarr releases. +* docker: +To deploy Dolibarr with docker. + * doxygen: Dir with config file to build doxygen documentation. @@ -66,12 +73,12 @@ Dir with config file to build doxygen documentation. To build exe package for Windows that distribute Dolibarr sources or to build the complete DoliWamp package. +* gource: +To build the video of history of git changes. + * launchpad: Doc file to explain how to use launchpad. -* live: -Doc file to explain how to create a demo live CD. - * obs: Doc file to explain how to push release onto OBS. @@ -90,5 +97,8 @@ To build Redhat, Opensuse or Mandriva package. * tgz: To build a tgz package. +* travis-ci: +Used by travis to make CI. + * zip: To build a zip package. diff --git a/build/debian/control b/build/debian/control index 970f192f094..0ef5367072f 100755 --- a/build/debian/control +++ b/build/debian/control @@ -14,7 +14,7 @@ Architecture: all Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5 | libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php, php5-cli | php-cli, # Required PHP extensions - php5-mysql | php5-mysqli | php-mysql | php-mysqli, php5-curl | php-curl, php5-gd | php-gd, php5-ldap | php-gd, + php5-mysql | php5-mysqli | php-mysql | php-mysqli, php5-curl | php-curl, php5-gd | php-gd, php5-ldap | php-gd, php5-zip | php-zip, # Required PHP libraries php-pear, php-mail-mime, # php-tcpdf, diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index 4b1df7e0876..2be287c2db9 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -1,38 +1,50 @@ -FROM php:7.2-apache +FROM php:7.3-apache -ENV HOST_USER_ID 33 ENV PHP_INI_DATE_TIMEZONE 'UTC' +ENV PHP_INI_MEMORY_LIMIT 256M -RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev libzip-dev zlib1g-dev libicu-dev g++\ - && rm -rf /var/lib/apt/lists/* \ - && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-install gd \ - && docker-php-ext-install zip \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ - && docker-php-ext-install ldap \ - && docker-php-ext-install mysqli \ - && docker-php-ext-install calendar \ - && docker-php-ext-configure intl \ - && docker-php-ext-install intl \ - && apt-get autoremove --purge -y libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++ +RUN apt-get update -y \ + && apt-get install -y --no-install-recommends \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libjpeg62-turbo \ + libpng-dev \ + libpng16-16 \ + libldap2-dev \ + libxml2-dev \ + libzip-dev \ + zlib1g-dev \ + libicu-dev \ + g++ \ + default-mysql-client \ + unzip \ + curl \ + apt-utils \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ + && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ + && docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \ + && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-install -j$(nproc) ldap && \ + mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini RUN mkdir /var/documents -RUN chown www-data /var/documents +RUN chown www-data:www-data /var/documents COPY docker-run.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/docker-run.sh RUN pecl install xdebug && docker-php-ext-enable xdebug -RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_host=docker.host' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini -RUN echo '172.17.0.1 docker.host' >> /etc/hosts +RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.remote_autostart=1' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.remote_enable=1' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.default_enable=1' >> ${PHP_INI_DIR}/php.ini +#RUN echo 'xdebug.remote_host=docker.host' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.remote_port=9000' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.remote_connect_back=1' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.profiler_enable=0' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini +#RUN echo '172.17.0.1 docker.host' >> /etc/hosts EXPOSE 80 diff --git a/build/docker/README.md b/build/docker/README.md index 616cbd8fa78..2fd278a531f 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -1,6 +1,8 @@ # How to use it ? The docker-compose.yml file is used to build and run Dolibarr in the current workspace. +This docker image intended for developpement usage. +For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr Before build/run, define the variable HOST_USER_ID as following: @@ -26,3 +28,4 @@ The URL to go to PhpMyAdmin is (login/password is root/root) : Setup the database connection during the installation process, please use mariad b (name of the database container) as database host. +Setup documents folder, during the installation process, to /var/documents diff --git a/build/docker/docker-compose.yml b/build/docker/docker-compose.yml index 3fe6125a874..efdc95d2858 100644 --- a/build/docker/docker-compose.yml +++ b/build/docker/docker-compose.yml @@ -1,25 +1,51 @@ -mariadb: - build: mariadb - environment: - MYSQL_ROOT_PASSWORD: root - MYSQL_DATABASE: dolibarr +version: '3' -phpmyadmin: - image: phpmyadmin/phpmyadmin - environment: - PMA_HOST: mariadb - links: - - mariadb - ports: - - "8080:80" +networks: + internal-pod: + internal: true + external-pod: + internal: false -web: - build: . - environment: - HOST_USER_ID: $HOST_USER_ID - volumes: - - ../../htdocs:/var/www/html - links: - - mariadb - ports: - - "80:80" +services: + mariadb: + image: mariadb:latest + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: dolibarr + networks: + - internal-pod + + phpmyadmin: + image: phpmyadmin/phpmyadmin + environment: + PMA_HOST: mariadb + depends_on: + - mariadb + ports: + - "8080:80" + networks: + - internal-pod + - external-pod + + web: + build: . + environment: + HOST_USER_ID: $HOST_USER_ID + volumes: + - ../../htdocs:/var/www/html/ + - ../../documents:/var/documents + ports: + - "80:80" + - "9000:9000" + depends_on: + - mariadb + - mail + networks: + - internal-pod + - external-pod + + mail: + image: maildev/maildev + ports: + - "8081:80" + - "25:25" diff --git a/build/docker/docker-run.sh b/build/docker/docker-run.sh index df7272c317d..e57d9adfad0 100644 --- a/build/docker/docker-run.sh +++ b/build/docker/docker-run.sh @@ -1,15 +1,21 @@ #!/bin/bash -usermod -u $HOST_USER_ID www-data -groupmod -g $HOST_USER_ID www-data +usermod -u ${HOST_USER_ID} www-data +groupmod -g ${HOST_USER_ID} www-data chgrp -hR www-data /var/www/html chmod g+rwx /var/www/html/conf +if [ ! -d /var/documents ]; then + echo "[docker-run] => create volume directory /var/documents ..." + mkdir -p /var/documents +fi +echo "[docker-run] => Set Permission to www-data for /var/documents" +chown -R www-data:www-data /var/documents + if [ ! -f /usr/local/etc/php/php.ini ]; then cat < /usr/local/etc/php/php.ini date.timezone = $PHP_INI_DATE_TIMEZONE -display_errors = On EOF fi diff --git a/build/doxygen/doxygen_footer.html b/build/doxygen/doxygen_footer.html index 1426885a565..2615af0b485 100644 --- a/build/doxygen/doxygen_footer.html +++ b/build/doxygen/doxygen_footer.html @@ -5,7 +5,7 @@ File added into doxygen generated documentation - +
@@ -22,31 +22,5 @@ File added into doxygen generated documentation gtag('config', 'UA-9049390-16'); - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/doxygen/doxygen_header.html b/build/doxygen/doxygen_header.html index 5810182050f..235797bb6c9 100644 --- a/build/doxygen/doxygen_header.html +++ b/build/doxygen/doxygen_header.html @@ -12,21 +12,6 @@ - - - - - @@ -48,15 +33,6 @@ src="https://www.facebook.com/tr?id=1998533953704960&ev=PageView&noscript=1"
- - - -
diff --git a/build/exe/doliwamp/Languages/MyEnglish.isl b/build/exe/doliwamp/Languages/MyEnglish.isl index 371e724d6d0..7ad94c4ca86 100644 --- a/build/exe/doliwamp/Languages/MyEnglish.isl +++ b/build/exe/doliwamp/Languages/MyEnglish.isl @@ -32,6 +32,7 @@ PortAlreadyInUse=Port %1 seems to be already in use. You should cancel to go bac FirefoxDetected=Firefox has been detected on your computer. Would you like to use it as the default browser for Dolibarr ? ChromeDetected=Chrome has been detected on your computer. Would you like to use it as the default browser for Dolibarr ? +MicrosoftEdgeDetected=Microsoft Edge has been detected on your computer. Would you like to use it as the default browser for Dolibarr ? ChooseDefaultBrowser=Please choose your default browser (iexplore.exe, firefox.exe, chrome.exe, MicrosoftEdge.exe...). If you are not sure, just click Open : LaunchNow=Launch Dolibarr now diff --git a/build/exe/doliwamp/README.md b/build/exe/doliwamp/README.md index 87d3371f9bb..be8cf1f3ac5 100644 --- a/build/exe/doliwamp/README.md +++ b/build/exe/doliwamp/README.md @@ -5,6 +5,7 @@ It's a dedicated Dolibarr version for Windows newbies with no technical knowledg This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready to be distributed (for Windows). +The build of .exe files need to have some windows executable files already installed (Apache, MariaDb). The package to install to get this files are defined into the file *doliwamp.iss* (searhc line starting with "; Value OK:") If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file). diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 9705cc198da..ed8e07d7468 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -41,7 +41,7 @@ Compression=lzma SolidCompression=yes WizardImageFile=build\exe\doliwamp\doliwamp.bmp WizardSmallImageFile=build\exe\doliwamp\doliwampsmall.bmp -SetupIconFile=doc\images\dolibarr.ico +SetupIconFile=doc\images\dolibarr_favicon.ico ;To say the installer must be ran as admin PrivilegesRequired=admin DisableProgramGroupPage=yes @@ -104,8 +104,8 @@ Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversi ; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 ; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45 ; Value OK: apache 2.4.9, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe) -; Value To test: apache 2.4.41, php 7.3.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe) -Source: "C:\Program Files\Wamp\apps\phpmyadmin4.1.14\*.*"; DestDir: "{app}\apps\phpmyadmin4.1.14"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange" +; Value OK: apache 2.4.41, php 7.3.12, mariadb10.4.10 (wampserver3.2.0_x64.exe) +Source: "C:\wamp64\apps\phpmyadmin4.9.2\*.*"; DestDir: "{app}\apps\phpmyadmin4.9.2"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange" ;Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log" Source: "C:\wamp64\bin\apache\apache2.4.41\*.*"; DestDir: "{app}\bin\apache\apache2.4.41"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log" ;Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log" @@ -519,7 +519,7 @@ begin // check that we don't try an upgrade (mysql upgrade no supported) //---------------------------------------------- - if FileExists (pathWithSlashes+'/bin/mysql/mysql5.0.45'+phpVersion+'/bin/mysqld-nt.exe') then + if FileExists (pathWithSlashes+'/bin/mysql/mysql5.0.45/bin/mysqld-nt.exe') then begin MsgBox('An existing installation using an old version of Mysql exists. Sorry, upgrade with this installer is not possible.', mbInformation, MB_OK); Abort(); @@ -588,15 +588,26 @@ begin end; end; + if browser = 'iexplore.exe' then + begin + if FileExists (winPath+'/SystemApps/Microsoft.MicrosoftEdge_8wekyb3d8bbwe/MicrosoftEdge.exe') then + begin + if MsgBox(CustomMessage('MicrosoftEdgeDetected'),mbConfirmation,MB_YESNO) = IDYES then + begin + browser := winPath+'/SystemApps/Microsoft.MicrosoftEdge_8wekyb3d8bbwe/MicrosoftEdge.exe'; + end; + end; + end; + if browser = 'iexplore.exe' then begin if FileExists (pfPath+'/Internet Explorer/iexplore.exe') then begin - GetOpenFileName(CustomMessage('ChooseDefaultBrowser'), browser, pfPath+'/Internet Explorer','exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe'); + GetOpenFileName(CustomMessage('ChooseDefaultBrowser'), browser, pfPath+'/Internet Explorer', 'exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe'); end else begin - GetOpenFileName(CustomMessage('ChooseDefaultBrowser'), browser, winPath,'exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe'); + GetOpenFileName(CustomMessage('ChooseDefaultBrowser'), browser, winPath, 'exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe'); end; end; diff --git a/build/exe/doliwamp/php.ini.install b/build/exe/doliwamp/php.ini.install index a2576c7652d..78903a8a53a 100644 --- a/build/exe/doliwamp/php.ini.install +++ b/build/exe/doliwamp/php.ini.install @@ -304,7 +304,7 @@ expose_php = On max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data ;max_input_nesting_level = 64 ; Maximum input variable nesting level -memory_limit = 64M ; Maximum amount of memory a script may consume (128MB) +memory_limit = 256M ; Maximum amount of memory a script may consume (128MB) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 976f2cb6ba3..581353b758b 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -110,7 +110,7 @@ print "Working on files into : ".DOL_DOCUMENT_ROOT."\n"; print "Include custom in signature : ".$includecustom."\n"; print "Include constants in signature : "; foreach ($includeconstants as $countrycode => $tmp) { - foreach($tmp as $constname => $constvalue) { + foreach ($tmp as $constname => $constvalue) { print $constname.'='.$constvalue." "; } } @@ -130,7 +130,7 @@ fputs($fp, ''."\n"); - foreach($tmp as $constname => $constvalue) { + foreach ($tmp as $constname => $constvalue) { $valueforchecksum=(empty($constvalue)?'0':$constvalue); $checksumconcat[]=$valueforchecksum; fputs($fp, ' '.$valueforchecksum.''."\n"); diff --git a/build/pdf/README.txt b/build/pdf/README.txt index 2335ff4b7f7..7a5424ca3d5 100644 --- a/build/pdf/README.txt +++ b/build/pdf/README.txt @@ -1,9 +1,10 @@ -To make htmldoc working from wiki.dolibarr.org, them must be modified to have +To make htmldoc working from wiki.dolibarr.org, the wiki must be modified to have -$_SERVER["HTTP_USER_AGENT"] is "HTMLDOC/x.y.z" -$_COOKIE["htmldoc"] may also be defined if set on command line. - -To disable part, add -class="htmldoc-ignore" with css +To disable part of content, add: +class="htmldoc-ignore" +with css .htmldoc-ignore { display: none; } +Note: +$_SERVER["HTTP_USER_AGENT"] is "HTMLDOC/x.y.z" +$_COOKIE["htmldoc"] may also be defined if set on command line. diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 110eae0a3a2..115edcef397 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -90,7 +90,7 @@ cui hai bisogno ed essere facile da usare. %{__install} -m 644 build/rpm/install.forced.php.fedora $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/install.forced.php %{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/pixmaps -%{__install} -m 644 doc/images/dolibarr_48x48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png +%{__install} -m 644 doc/images/appicon_64.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png %{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/applications #desktop-file-install --delete-original --dir=$RPM_BUILD_ROOT%{_datadir}/applications build/rpm/%{name}.desktop %{__install} -m 644 build/rpm/dolibarr.desktop $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index ba5c426ea3f..64293ff6580 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -150,7 +150,7 @@ cui hai bisogno ed essere facile da usare. %endif %{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/pixmaps -%{__install} -m 644 doc/images/dolibarr_48x48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png +%{__install} -m 644 doc/images/appicon_64.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png %{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/applications %{__install} -m 644 build/rpm/dolibarr.desktop $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} || 0%{?suse_version} diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 073ef0389ce..28b58a4da96 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -89,7 +89,7 @@ cui hai bisogno ed essere facile da usare. %{__install} -m 644 build/rpm/install.forced.php.mandriva $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/install.forced.php %{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/pixmaps -%{__install} -m 644 doc/images/dolibarr_48x48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png +%{__install} -m 644 doc/images/appicon_64.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png %{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/applications #desktop-file-install --delete-original --dir=$RPM_BUILD_ROOT%{_datadir}/applications build/rpm/%{name}.desktop %{__install} -m 644 build/rpm/dolibarr.desktop $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index be61853e165..8b4ccf37808 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -90,7 +90,7 @@ cui hai bisogno ed essere facile da usare. %{__install} -m 644 build/rpm/install.forced.php.opensuse $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/install.forced.php %{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/pixmaps -%{__install} -m 644 doc/images/dolibarr_48x48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png +%{__install} -m 644 doc/images/appicon_64.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png %{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/applications #desktop-file-install --delete-original --dir=$RPM_BUILD_ROOT%{_datadir}/applications build/rpm/%{name}.desktop %{__install} -m 644 build/rpm/dolibarr.desktop $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop diff --git a/build/sitemap/urllist-wiki.txt b/build/sitemap/urllist-wiki.txt index ae13bb96d87..2a70e61f146 100644 --- a/build/sitemap/urllist-wiki.txt +++ b/build/sitemap/urllist-wiki.txt @@ -1 +1 @@ -http://wiki.dolibarr.org/ +https://wiki.dolibarr.org/ diff --git a/composer.json b/composer.json index d26bbb05ad9..9fede994525 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "vendor-dir" : "htdocs/includes" }, "require" : { - "php" : ">=5.5.0", + "php" : ">=5.6.0", "ext-curl" : "*", "ckeditor/ckeditor" : "4.12.1", "mike42/escpos-php" : "2.2", @@ -33,11 +33,13 @@ "restler/framework" : "3.0.0-RC6", "tecnickcom/tcpdf" : "6.3.2", "nnnick/chartjs" : "^2.9", - "stripe/stripe-php" : "6.43.1" + "stripe/stripe-php" : "6.43.1", + "maximebf/debugbar" : "1.15.1", + "symfony/var-dumper": "3" }, "require-dev" : { - "jakub-onderka/php-parallel-lint" : "^0", - "jakub-onderka/php-console-highlighter" : "^0", + "php-parallel-lint/php-parallel-lint" : "^0", + "php-parallel-lint/php-console-highlighter" : "^0", "phpunit/phpunit" : "^4", "squizlabs/php_codesniffer" : "^2", "phpunit/phpunit-selenium" : "^2" diff --git a/composer.lock b/composer.lock index 09c71674512..5afe0ca34f2 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "17e906996157e8a94564f686a6096dc5", + "content-hash": "1dbd2d05cc0836acfca5988f29005cf2", "packages": [ { "name": "ckeditor/ckeditor", @@ -47,6 +47,67 @@ ], "time": "2019-06-28T10:41:23+00:00" }, + { + "name": "maximebf/debugbar", + "version": "v1.15.1", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6c4277f6117e4864966c9cb58fb835cee8c74a1e", + "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3|^4" + }, + "require-dev": { + "phpunit/phpunit": "^5" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "time": "2019-09-24T14:55:42+00:00" + }, { "name": "mike42/escpos-php", "version": "v2.2", @@ -253,6 +314,53 @@ "abandoned": "phpoffice/phpspreadsheet", "time": "2015-05-01T07:00:55+00:00" }, + { + "name": "psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2020-03-23T09:12:05+00:00" + }, { "name": "restler/framework", "version": "3.0.0-RC6", @@ -260,12 +368,12 @@ "source": { "type": "git", "url": "https://github.com/Luracast/Restler-Framework.git", - "reference": "0f6b0f26152f83e43a2a86820206c455095fb2b0" + "reference": "d52e61600d153bca60a287c35141c5c01863127b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/0f6b0f26152f83e43a2a86820206c455095fb2b0", - "reference": "0f6b0f26152f83e43a2a86820206c455095fb2b0", + "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/d52e61600d153bca60a287c35141c5c01863127b", + "reference": "d52e61600d153bca60a287c35141c5c01863127b", "shasum": "" }, "require": { @@ -312,7 +420,7 @@ "rest", "server" ], - "time": "2019-05-12T15:15:11+00:00" + "time": "2020-02-13T16:05:12+00:00" }, { "name": "stripe/stripe-php", @@ -370,6 +478,146 @@ ], "time": "2019-08-29T16:56:12+00:00" }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "737e07704cca83f9dd0af926d45ce27eedc25657" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/737e07704cca83f9dd0af926d45ce27eedc25657", + "reference": "737e07704cca83f9dd0af926d45ce27eedc25657", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2015-11-18T13:48:51+00:00" + }, { "name": "tecnickcom/tcpdf", "version": "6.3.2", @@ -489,16 +737,16 @@ "time": "2015-06-14T21:17:01+00:00" }, { - "name": "jakub-onderka/php-console-color", + "name": "php-parallel-lint/php-console-color", "version": "v0.2", "source": { "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "url": "https://github.com/php-parallel-lint/PHP-Console-Color.git", "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", "shasum": "" }, @@ -531,28 +779,31 @@ "time": "2018-09-29T17:23:10+00:00" }, { - "name": "jakub-onderka/php-console-highlighter", - "version": "v0.4", + "name": "php-parallel-lint/php-console-highlighter", + "version": "v0.5", "source": { "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" + "url": "https://github.com/php-parallel-lint/PHP-Console-Highlighter.git", + "reference": "21bf002f077b177f056d8cb455c5ed573adfdbb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Highlighter/zipball/21bf002f077b177f056d8cb455c5ed573adfdbb8", + "reference": "21bf002f077b177f056d8cb455c5ed573adfdbb8", "shasum": "" }, "require": { "ext-tokenizer": "*", - "jakub-onderka/php-console-color": "~0.2", - "php": ">=5.4.0" + "php": ">=5.4.0", + "php-parallel-lint/php-console-color": "~0.2" + }, + "replace": { + "jakub-onderka/php-console-highlighter": "*" }, "require-dev": { - "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~1.0", - "jakub-onderka/php-var-dump-check": "~0.1", + "php-parallel-lint/php-code-style": "~1.0", + "php-parallel-lint/php-parallel-lint": "~1.0", + "php-parallel-lint/php-var-dump-check": "~0.1", "phpunit/phpunit": "~4.0", "squizlabs/php_codesniffer": "~1.5" }, @@ -574,19 +825,19 @@ } ], "description": "Highlight PHP code in terminal", - "time": "2018-09-29T18:48:56+00:00" + "time": "2020-05-13T07:37:49+00:00" }, { - "name": "jakub-onderka/php-parallel-lint", + "name": "php-parallel-lint/php-parallel-lint", "version": "v0.9.2", "source": { "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git", + "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", "reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa", "reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa", "shasum": "" }, @@ -1082,6 +1333,7 @@ "keywords": [ "tokenizer" ], + "abandoned": true, "time": "2017-12-04T08:55:13+00:00" }, { @@ -1785,6 +2037,159 @@ ], "time": "2019-08-06T08:03:45+00:00" }, + { + "name": "symfony/polyfill-php72", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "639447d008615574653fb3bc60d1986d7172eaae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", + "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, { "name": "symfony/yaml", "version": "v3.4.32", @@ -1903,8 +2308,9 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.5.0", + "php": ">=5.6.0", "ext-curl": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index 79f927160ee..5f09d9536be 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -8,6 +8,7 @@ ALL: Check "@CHANGE" + PrestaShopWebservice: --------------------- Replace @@ -167,6 +168,7 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php TCPDI: ------ Add fpdf_tpl.php 1.2 + Add tcpdi.php Add tcpdi_parser.php and replace: @@ -205,8 +207,6 @@ with - - JCROP: ------ * Remove analytics tag into file index.html diff --git a/dev/examples/code/create_invoice.php b/dev/examples/code/create_invoice.php index 1b212e0a5d7..1acf181a4ba 100755 --- a/dev/examples/code/create_invoice.php +++ b/dev/examples/code/create_invoice.php @@ -87,14 +87,11 @@ if ($idobject > 0) // Change status to validated $result=$obj->validate($user); if ($result > 0) print "OK Object created with id ".$idobject."\n"; - else - { + else { $error++; dol_print_error($db, $obj->error); } -} -else -{ +} else { $error++; dol_print_error($db, $obj->error); } @@ -106,9 +103,7 @@ if (! $error) { $db->commit(); print '--- end ok'."\n"; -} -else -{ +} else { print '--- end error code='.$error."\n"; $db->rollback(); } diff --git a/dev/examples/code/create_order.php b/dev/examples/code/create_order.php index 703254ad5e9..7fe1a82251a 100755 --- a/dev/examples/code/create_order.php +++ b/dev/examples/code/create_order.php @@ -85,14 +85,11 @@ if ($idobject > 0) // Change status to validated $result=$com->valid($user); if ($result > 0) print "OK Object created with id ".$idobject."\n"; - else - { + else { $error++; dol_print_error($db, $com->error); } -} -else -{ +} else { $error++; dol_print_error($db, $com->error); } @@ -104,9 +101,7 @@ if (! $error) { $db->commit(); print '--- end ok'."\n"; -} -else -{ +} else { print '--- end error code='.$error."\n"; $db->rollback(); } diff --git a/dev/examples/code/create_product.php b/dev/examples/code/create_product.php index 234658388df..20b898a92aa 100755 --- a/dev/examples/code/create_product.php +++ b/dev/examples/code/create_product.php @@ -82,9 +82,7 @@ $idobject = $myproduct->create($user); if ($idobject > 0) { print "OK Object created with id ".$idobject."\n"; -} -else -{ +} else { $error++; dol_print_error($db, $myproduct->error); } @@ -95,9 +93,7 @@ if (! $error) { $db->commit(); print '--- end ok'."\n"; -} -else -{ +} else { print '--- end error code='.$error."\n"; $db->rollback(); } diff --git a/dev/examples/code/create_user.php b/dev/examples/code/create_user.php index 96d369085d2..d585b490a9c 100755 --- a/dev/examples/code/create_user.php +++ b/dev/examples/code/create_user.php @@ -74,18 +74,14 @@ if ($idobject > 0) // Change status to validated $result=$obj->setStatut(1); if ($result > 0) print "OK Object created with id ".$idobject."\n"; - else - { + else { $error++; dol_print_error($db, $obj->error); } -} -elseif ($obj->error == 'ErrorLoginAlreadyExists') +} elseif ($obj->error == 'ErrorLoginAlreadyExists') { print "User with login ".$obj->login." already exists\n"; -} -else -{ +} else { $error++; dol_print_error($db, $obj->error); } @@ -97,9 +93,7 @@ if (! $error) { $db->commit(); print '--- end ok'."\n"; -} -else -{ +} else { print '--- end error code='.$error."\n"; $db->rollback(); } diff --git a/dev/examples/mail/source_email_ticket_1_to_create.txt b/dev/examples/mail/source_email_ticket_1_to_create.txt new file mode 100644 index 00000000000..94d4cb620b9 --- /dev/null +++ b/dev/examples/mail/source_email_ticket_1_to_create.txt @@ -0,0 +1,89 @@ +Delivered-To: testldrdev@gmail.com +Received: by 2002:a2e:9b9a:0:0:0:0:0 with SMTP id z26csp1425223lji; + Thu, 20 Aug 2020 08:29:02 -0700 (PDT) +X-Received: by 2002:a05:620a:1292:: with SMTP id w18mr2938234qki.158.1597937342304; + Thu, 20 Aug 2020 08:29:02 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1597937342; cv=none; + d=google.com; s=arc-20160816; + b=FhT/+rJ/zNYgVQ5Nt/rLZJycGd/Ntkhm6LwI16YUfmEmxeGrP/cXXQULrqQ1LhBr9B + oRKweltTdnpyA14gm0kzbs1vUkf5HxLUuGk8IqqJWAPMUZoN8oUPkzq2BuKNQGxPiE+y + Hsg/fnYp8WzcAlZOLsEP2kcFIdA95Dyy5LkM8HgphI1jSS1d6gkx6nDGIMIpDD9D+w4X + ISxRUXp5JlDwFCUMOPoAvHIBUdJ3jpLsjesbMEnU4ssFqhxU21pBq+Fc+csSPeY5DL0M + HR1o+ChEAXIdDOrDqa0ohHfqR216juGCzH8YuEQ88LT0Qbst9IkOYWiAQv4TIh7vHtvQ + TMvA== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=to:subject:message-id:date:from:mime-version:dkim-signature; + bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=; + b=CRlrRPfoGkfmz6iXKy4HdxKQ4SeJTiIxjC2jNkgQPSnIDFJgDkJcwASJVpcjTmlVmH + Z9WnHKVUPRIHGDEoMRlx6eUx9QfelWqPYu3BBQGFry9sgth0BR/1s6tmQ+P+bAj23ryo + aL3UkF6KCSx4GhEk3MfHA5Ex81YDFHvHL3BZ2kb3XCVSlPiBq2szw1ETmRAsDdS5Gbu+ + ZlzBbl4pRtUWgi1fB5H4Wcv7e90F4Et1SBP8IKSCa23qu2nV9xefgjfMw2ndxCj1zgCL + c3l7Ul6pw32nqf6+vxfZTstwIwgu6dXZXCHDqJqesI2g8RGxeba+LfKZEDpBuSeINS9r + GMvw== +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@destailleur.fr header.s=google header.b=IPMz90Yj; + spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) + by mx.google.com with SMTPS id w14sor2138230qtb.9.2020.08.20.08.29.00 + for + (Google Transport Security); + Thu, 20 Aug 2020 08:29:01 -0700 (PDT) +Received-SPF: pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; +Authentication-Results: mx.google.com; + dkim=pass header.i=@destailleur.fr header.s=google header.b=IPMz90Yj; + spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=destailleur.fr; s=google; + h=mime-version:from:date:message-id:subject:to; + bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=; + b=IPMz90Yjw1Mf57/rYWUYGtpc+IazEWcy6/bqxf1j0h6rxDH/wjhxsCWzfARgqqlfVj + ACg4IbPpZZlKFIYDSCbfMlWF65rbKfNre56HldfQgy0Tq3LC434zHz2ZZMOVCM52w3J9 + VGBpASUlSL1o+YRmzOpRtHVu7I9aNwGxHuA070Yka8XLV76vV3P0vdL8PcoHq0jUUEoi + +dCZ9NCPuAFtGK2IavNoM2qQrLdfYIi+RwgWBtqjTwzyvDEJR+p5fIPK142ynMbHgWYO + RVtMqAgxjvL4sfyKZ5KuzKXkQNM3zyzMinWK89scBl+QLFCcWA4Qqc0dJjqLCBhh8lmq + n67g== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20161025; + h=x-gm-message-state:mime-version:from:date:message-id:subject:to; + bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=; + b=H0GsrFAi9JmRTKQ2budtDeLBqCaTisHKYCVVziyxmv+/tIcrSZBA4tdKwm+wR80r50 + zMJXmyVS2DMDWfnIlOv39wcwQjYN3WK1aRJfV0bVuEWrQuzt5MMWbskf6xbzo201nhr9 + ZlqATsEV7v1u5EHmfYwRhR8+AOmENdnm0g9RXPJVrFS58WNEJUSotS5Y5rZPjnT943y0 + 62Kf4Bd6uWvXhPFXWQoZLtWrPpkbcYPWIBmpftKhD0PD9c6rKaVduV0WhbigYsDoxb3F + iIafGPOyq91hiHR2gTLHiMmTDm+IDQ4n6gSkS7HKpZlLQhHoBMnpqJZYoxMJTxdpAbSy + mY+A== +X-Gm-Message-State: AOAM5325RcN4/ThWbYCO3vWRMFFBrfzJUHC1bd1Z9VB3/2Q3RuF9lmIJ +SjshEErhK68Of2pHDZQ3aPU4rzDfV8ozbvRsgChdfZg8aA= +X-Google-Smtp-Source: ABdhPJxUOUdurKEQfLldtiQGRkgC/h8gKQG1zhS+8k93p6N1SsOn517+GeRyT3E+/Uw536pmReO29la3EIAS6VT33SE= +X-Received: by 2002:aed:3e8e:: with SMTP id n14mr3191190qtf.67.1597937340509; Thu, 20 Aug 2020 08:29:00 -0700 (PDT) +MIME-Version: 1.0 +From: John Tester +Date: Thu, 20 Aug 2020 17:28:34 +0200 +Message-ID: +Subject: Support besoin +To: testldrdev@gmail.com +Content-Type: multipart/alternative; boundary="0000000000008e099705ad50c772" + +--0000000000008e099705ad50c772 +Content-Type: text/plain; charset="UTF-8" + +adfsdfsdfds + +-- +Laurent. +------------------------------------------------------------------------------------ +Twitter: https://www.twitter.com/eldy10 + +--0000000000008e099705ad50c772 +Content-Type: text/html; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +
adfsdfsdfds

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

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

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

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

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


--
Laurent.
------------------------------------= +------------------------------------------------
Twitter: https://www.twitter.com/eldy= +10
+ +--000000000000cd54be05ad51fe67-- \ No newline at end of file diff --git a/dev/initdata/dbf/importdb-products.php b/dev/initdata/dbf/importdb-products.php index 845064f0688..2c06c07e103 100644 --- a/dev/initdata/dbf/importdb-products.php +++ b/dev/initdata/dbf/importdb-products.php @@ -227,8 +227,7 @@ while ($fields = $db->fetch_array($resql)) { $error++; // $errorrecord will be reset } $j++; -} else - die("error : $sql"); +} else die("error : $sql"); diff --git a/dev/initdata/dbf/importdb-thirdparties.php b/dev/initdata/dbf/importdb-thirdparties.php index 8f0eb0635f0..a6b2697eed8 100644 --- a/dev/initdata/dbf/importdb-thirdparties.php +++ b/dev/initdata/dbf/importdb-thirdparties.php @@ -179,8 +179,7 @@ while ($fields = $db->fetch_array($resql)) { $object->town = trim($fields['FVILLE']); if ($fields['FPAYS']) $object->country_id = dol_getIdFromCode($db, trim(ucwords(strtolower($fields['FPAYS']))), 'c_country', 'label', 'rowid'); - else - $object->country_id = 1; + else $object->country_id = 1; $object->phone = trim($fields['FTEL']) ? trim($fields['FTEL']) : trim($fields['FCONTACT']); $object->phone = substr($object->phone, 0, 20); $object->fax = trim($fields['FFAX']) ? trim($fields['FFAX']) : trim($fields['FCONTACT']); @@ -299,8 +298,7 @@ while ($fields = $db->fetch_array($resql)) { $contact->town = trim($fields['LVILLE']); if ($fields['FPAYS']) $contact->country_id = dol_getIdFromCode($db, trim(ucwords(strtolower($fields['LPAYS']))), 'c_country', 'label', 'rowid'); - else - $contact->country_id = 1; + else $contact->country_id = 1; $contact->email = $fields['LMAIL']; $contact->phone = trim($fields['LTEL']) ? trim($fields['LTEL']) : trim($fields['LCONTACT']); $contact->fax = trim($fields['LFAX']) ? trim($fields['LFAX']) : trim($fields['LCONTACT']); @@ -340,8 +338,7 @@ while ($fields = $db->fetch_array($resql)) { $error++; // $errorrecord will be reset } $j++; -} else - die("error : $sql"); +} else die("error : $sql"); $db->commit(); diff --git a/dev/initdata/dbf/includes/dbase.class.php b/dev/initdata/dbf/includes/dbase.class.php index 0c2f6820a96..e70f18087c4 100644 --- a/dev/initdata/dbf/includes/dbase.class.php +++ b/dev/initdata/dbf/includes/dbase.class.php @@ -207,8 +207,7 @@ class DBase $value = true; elseif ($value == 'f' || $value == 'n') $value = false; - else - $value = null; + else $value = null; } $record[$i] = $value; } @@ -295,8 +294,7 @@ class DBase $i = unpack("S$n", $data); if ($n == 1) return (int) $i[1]; - else - return array_merge($i); + else return array_merge($i); } private static function putInt16($fd, $value) @@ -310,8 +308,7 @@ class DBase $i = unpack("L$n", $data); if ($n == 1) return (int) $i[1]; - else - return array_merge($i); + else return array_merge($i); } private static function putInt32($fd, $value) diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php index 3fe058e8d3e..c35fe2440ef 100755 --- a/dev/initdata/generate-invoice.php +++ b/dev/initdata/generate-invoice.php @@ -179,14 +179,10 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) if ($result) { print " OK with ref ".$object->ref."\n";; - } - else - { + } else { dol_print_error($db, $object->error); } - } - else - { + } else { dol_print_error($db, $object->error); } } diff --git a/dev/initdata/generate-order.php b/dev/initdata/generate-order.php index 1dc56aa5582..c421e39ffe3 100755 --- a/dev/initdata/generate-order.php +++ b/dev/initdata/generate-order.php @@ -124,8 +124,7 @@ if ($resql) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; } -} -else { print "err"; } +} else { print "err"; } $commandesid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; @@ -138,8 +137,7 @@ if ($resql) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; } -} -else { print "err"; } +} else { print "err"; } $prodids = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; @@ -206,16 +204,12 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++) { $db->commit(); print " OK with ref ".$object->ref."\n"; - } - else - { + } else { print " KO\n"; $db->rollback(); dol_print_error($db, $object->error); } - } - else - { + } else { print " KO\n"; $db->rollback(); dol_print_error($db, $object->error); diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php index 4c5d70aadc4..42c0c4098f2 100755 --- a/dev/initdata/generate-proposal.php +++ b/dev/initdata/generate-proposal.php @@ -210,16 +210,12 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0) { $db->commit(); print " OK with ref ".$object->ref."\n"; - } - else - { + } else { print " KO\n"; $db->rollback(); dol_print_error($db, $object->error); } - } - else - { + } else { dol_print_error($db, $object->error); } } diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index 05ac6416aa3..a13e2351e9c 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -136,9 +136,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++) } print "Company ".$s." created nom=".$soc->name."\n"; - } - else - { + } else { print "Error: ".$soc->error."\n"; } } diff --git a/dev/initdata/import-products.php b/dev/initdata/import-products.php index 4288c5bf3b1..fb07143f972 100755 --- a/dev/initdata/import-products.php +++ b/dev/initdata/import-products.php @@ -163,9 +163,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create result code = ".$ret." - ".$produit->errorsToString(); $errorrecord++; - } - else - { + } else { print " - Creation OK with ref ".$produit->ref." - id = ".$ret; } @@ -180,9 +178,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString(); $errorrecord++; - } - else - { + } else { print " - updatePrice OK"; } } @@ -200,9 +196,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString(); $errorrecord++; - } - else - { + } else { print " - setMultiLangs OK"; } } @@ -227,9 +221,7 @@ if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) { print "Rollback any changes.\n"; $db->rollback(); -} -else -{ +} else { print "Commit all changes.\n"; $db->commit(); } diff --git a/dev/initdata/import-thirdparties.php b/dev/initdata/import-thirdparties.php index ef1dfcc99ab..a0ddaac7674 100755 --- a/dev/initdata/import-thirdparties.php +++ b/dev/initdata/import-thirdparties.php @@ -181,9 +181,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create result code = ".$ret." - ".$object->errorsToString(); $errorrecord++; - } - else - { + } else { print " - Creation OK with name ".$object->name." - id = ".$ret; } } @@ -212,9 +210,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create link with sale representative result code = ".$result." - ".$object->errorsToString(); $errorrecord++; - } - else - { + } else { print " - create link sale representative OK"; } } @@ -243,9 +239,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString(); $errorrecord++; - } - else - { + } else { print " - create contact OK"; } } @@ -277,9 +271,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString(); $errorrecord++; - } - else - { + } else { print " - create contact OK"; } } @@ -305,9 +297,7 @@ if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) { print "Rollback any changes.\n"; $db->rollback(); -} -else -{ +} else { print "Commit all changes.\n"; $db->commit(); } diff --git a/dev/initdata/import-users.php b/dev/initdata/import-users.php index 4247415288c..8e4878577a1 100755 --- a/dev/initdata/import-users.php +++ b/dev/initdata/import-users.php @@ -142,9 +142,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create result code = ".$ret." - ".$object->errorsToString(); $errorrecord++; - } - else - { + } else { print " - Creation OK with login ".$object->login." - id = ".$ret; } @@ -168,9 +166,7 @@ if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) { print "Rollback any changes.\n"; $db->rollback(); -} -else -{ +} else { print "Commit all changes.\n"; $db->commit(); } diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php index b1aadd56ed8..183140af202 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -198,7 +198,7 @@ if (empty($option)) if ($option != 'all') { $listofoptions=explode(',', $option); - foreach($listofoptions as $cursoroption) + foreach ($listofoptions as $cursoroption) { if (! in_array($cursoroption, array_keys($sqls))) { print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; @@ -264,7 +264,7 @@ function processfamily($family, $date) global $db, $sqls; $error=0; - foreach($sqls[$family] as $sql) + foreach ($sqls[$family] as $sql) { if (preg_match('/^@/', $sql)) { @@ -302,10 +302,10 @@ function processfamily($family, $date) $db->begin(); $listofoptions=explode(',', $option); -foreach($listofoptions as $cursoroption) +foreach ($listofoptions as $cursoroption) { $oldfamily=''; - foreach($sqls as $family => $familysql) + foreach ($sqls as $family => $familysql) { if ($cursoroption && $cursoroption != 'all' && $cursoroption != $family) continue; @@ -325,9 +325,7 @@ if ($error || $mode != 'confirm') { print "\nRollback any changes.\n"; $db->rollback(); -} -else -{ +} else { print "Commit all changes.\n"; $db->commit(); } diff --git a/dev/initdemo/initdemo.sh b/dev/initdemo/initdemo.sh index c373a25090d..7fd9eb551d4 100755 --- a/dev/initdemo/initdemo.sh +++ b/dev/initdemo/initdemo.sh @@ -172,6 +172,11 @@ echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile" mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile export res=$? +if [ $res -ne 0 ]; then + echo "Error to load database dump with mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile" + exit +fi + $mydir/updatedemo.php confirm export res=$? diff --git a/dev/initdemo/mysqldump_dolibarr_11.0.0.sql b/dev/initdemo/mysqldump_dolibarr_12.0.0.sql similarity index 81% rename from dev/initdemo/mysqldump_dolibarr_11.0.0.sql rename to dev/initdemo/mysqldump_dolibarr_12.0.0.sql index 848e6720ef1..3cc1db1cf34 100644 --- a/dev/initdemo/mysqldump_dolibarr_11.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_12.0.0.sql @@ -1,8 +1,8 @@ --- MySQL dump 10.16 Distrib 10.1.43-MariaDB, for debian-linux-gnu (x86_64) +-- MySQL dump 10.17 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64) -- --- Host: localhost Database: dolibarr_11 +-- Host: localhost Database: dolibarr_12 -- ------------------------------------------------------ --- Server version 10.1.43-MariaDB-0ubuntu0.18.04.1 +-- Server version 10.3.22-MariaDB-1ubuntu1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -24,19 +24,20 @@ DROP TABLE IF EXISTS `llx_accounting_account`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_accounting_account` ( `rowid` bigint(20) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_pcg_version` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `pcg_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL, - `pcg_subtype` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `account_number` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, - `account_parent` int(11) DEFAULT '0', + `account_parent` int(11) DEFAULT 0, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_accounting_category` int(11) DEFAULT '0', + `labelshort` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `fk_accounting_category` int(11) DEFAULT 0, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, + `reconcilable` tinyint(4) NOT NULL DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -54,7 +55,7 @@ CREATE TABLE `llx_accounting_account` ( LOCK TABLES `llx_accounting_account` WRITE; /*!40000 ALTER TABLE `llx_accounting_account` DISABLE KEYS */; -INSERT INTO `llx_accounting_account` VALUES (1,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','CAPITAL','101',1401,'Capital',0,NULL,NULL,1,NULL,NULL),(2,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','105',1401,'Ecarts de réévaluation',0,NULL,NULL,1,NULL,NULL),(3,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1061',1401,'Réserve légale',0,NULL,NULL,1,NULL,NULL),(4,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1063',1401,'Réserves statutaires ou contractuelles',0,NULL,NULL,1,NULL,NULL),(5,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1064',1401,'Réserves réglementées',0,NULL,NULL,1,NULL,NULL),(6,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1068',1401,'Autres réserves',0,NULL,NULL,1,NULL,NULL),(7,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','108',1401,'Compte de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(8,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','12',1401,'Résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(9,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','145',1401,'Amortissements dérogatoires',0,NULL,NULL,1,NULL,NULL),(10,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','146',1401,'Provision spéciale de réévaluation',0,NULL,NULL,1,NULL,NULL),(11,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','147',1401,'Plus-values réinvesties',0,NULL,NULL,1,NULL,NULL),(12,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','148',1401,'Autres provisions réglementées',0,NULL,NULL,1,NULL,NULL),(13,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','15',1401,'Provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(14,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','16',1401,'Emprunts et dettes assimilees',0,NULL,NULL,1,NULL,NULL),(15,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','20',1402,'Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(16,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','201',15,'Frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(17,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','206',15,'Droit au bail',0,NULL,NULL,1,NULL,NULL),(18,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','207',15,'Fonds commercial',0,NULL,NULL,1,NULL,NULL),(19,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','208',15,'Autres immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(20,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','21',1402,'Immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(21,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','23',1402,'Immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(22,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','27',1402,'Autres immobilisations financieres',0,NULL,NULL,1,NULL,NULL),(23,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','280',1402,'Amortissements des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(24,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','281',1402,'Amortissements des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(25,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','290',1402,'Provisions pour dépréciation des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(26,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','291',1402,'Provisions pour dépréciation des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(27,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','297',1402,'Provisions pour dépréciation des autres immobilisations financières',0,NULL,NULL,1,NULL,NULL),(28,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','31',1403,'Matieres premières',0,NULL,NULL,1,NULL,NULL),(29,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','32',1403,'Autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(30,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','33',1403,'En-cours de production de biens',0,NULL,NULL,1,NULL,NULL),(31,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','34',1403,'En-cours de production de services',0,NULL,NULL,1,NULL,NULL),(32,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','35',1403,'Stocks de produits',0,NULL,NULL,1,NULL,NULL),(33,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','37',1403,'Stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(34,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','391',1403,'Provisions pour dépréciation des matières premières',0,NULL,NULL,1,NULL,NULL),(35,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','392',1403,'Provisions pour dépréciation des autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(36,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','393',1403,'Provisions pour dépréciation des en-cours de production de biens',0,NULL,NULL,1,NULL,NULL),(37,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','394',1403,'Provisions pour dépréciation des en-cours de production de services',0,NULL,NULL,1,NULL,NULL),(38,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','395',1403,'Provisions pour dépréciation des stocks de produits',0,NULL,NULL,1,NULL,NULL),(39,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','397',1403,'Provisions pour dépréciation des stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(40,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','SUPPLIER','400',1404,'Fournisseurs et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(41,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','409',1404,'Fournisseurs débiteurs',0,NULL,NULL,1,NULL,NULL),(42,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','CUSTOMER','410',1404,'Clients et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(43,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','419',1404,'Clients créditeurs',0,NULL,NULL,1,NULL,NULL),(44,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','421',1404,'Personnel',0,NULL,NULL,1,NULL,NULL),(45,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','428',1404,'Personnel',0,NULL,NULL,1,NULL,NULL),(46,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','43',1404,'Sécurité sociale et autres organismes sociaux',0,NULL,NULL,1,NULL,NULL),(47,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','444',1404,'Etat - impôts sur bénéfice',0,NULL,NULL,1,NULL,NULL),(48,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','445',1404,'Etat - Taxes sur chiffre affaires',0,NULL,NULL,1,NULL,NULL),(49,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','447',1404,'Autres impôts, taxes et versements assimilés',0,NULL,NULL,1,NULL,NULL),(50,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','45',1404,'Groupe et associes',0,NULL,NULL,1,NULL,NULL),(51,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','455',50,'Associés',0,NULL,NULL,1,NULL,NULL),(52,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','46',1404,'Débiteurs divers et créditeurs divers',0,NULL,NULL,1,NULL,NULL),(53,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','47',1404,'Comptes transitoires ou d\'attente',0,NULL,NULL,1,NULL,NULL),(54,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','481',1404,'Charges à répartir sur plusieurs exercices',0,NULL,NULL,1,NULL,NULL),(55,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','486',1404,'Charges constatées d\'avance',0,NULL,NULL,1,NULL,NULL),(56,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','487',1404,'Produits constatés d\'avance',0,NULL,NULL,1,NULL,NULL),(57,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','491',1404,'Provisions pour dépréciation des comptes de clients',0,NULL,NULL,1,NULL,NULL),(58,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','496',1404,'Provisions pour dépréciation des comptes de débiteurs divers',0,NULL,NULL,1,NULL,NULL),(59,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','50',1405,'Valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(60,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','BANK','51',1405,'Banques, établissements financiers et assimilés',0,NULL,NULL,1,NULL,NULL),(61,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','CASH','53',1405,'Caisse',0,NULL,NULL,1,NULL,NULL),(62,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','54',1405,'Régies d\'avance et accréditifs',0,NULL,NULL,1,NULL,NULL),(63,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','58',1405,'Virements internes',0,NULL,NULL,1,NULL,NULL),(64,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','590',1405,'Provisions pour dépréciation des valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(65,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','PRODUCT','60',1406,'Achats',0,NULL,NULL,1,NULL,NULL),(66,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','603',65,'Variations des stocks',0,NULL,NULL,1,NULL,NULL),(67,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','SERVICE','61',1406,'Services extérieurs',0,NULL,NULL,1,NULL,NULL),(68,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','62',1406,'Autres services extérieurs',0,NULL,NULL,1,NULL,NULL),(69,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','63',1406,'Impôts, taxes et versements assimiles',0,NULL,NULL,1,NULL,NULL),(70,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','641',1406,'Rémunérations du personnel',0,NULL,NULL,1,NULL,NULL),(71,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','644',1406,'Rémunération du travail de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(72,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','SOCIAL','645',1406,'Charges de sécurité sociale et de prévoyance',0,NULL,NULL,1,NULL,NULL),(73,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','646',1406,'Cotisations sociales personnelles de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(74,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','65',1406,'Autres charges de gestion courante',0,NULL,NULL,1,NULL,NULL),(75,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','66',1406,'Charges financières',0,NULL,NULL,1,NULL,NULL),(76,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','67',1406,'Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(77,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','681',1406,'Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(78,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','686',1406,'Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(79,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','687',1406,'Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(80,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','691',1406,'Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(81,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','695',1406,'Impôts sur les bénéfices',0,NULL,NULL,1,NULL,NULL),(82,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','697',1406,'Imposition forfaitaire annuelle des sociétés',0,NULL,NULL,1,NULL,NULL),(83,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','699',1406,'Produits',0,NULL,NULL,1,NULL,NULL),(84,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','PRODUCT','701',1407,'Ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(85,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','SERVICE','706',1407,'Prestations de services',0,NULL,NULL,1,NULL,NULL),(86,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','PRODUCT','707',1407,'Ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(87,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','PRODUCT','708',1407,'Produits des activités annexes',0,NULL,NULL,1,NULL,NULL),(88,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','709',1407,'Rabais, remises et ristournes accordés par l\'entreprise',0,NULL,NULL,1,NULL,NULL),(89,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','713',1407,'Variation des stocks',0,NULL,NULL,1,NULL,NULL),(90,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','72',1407,'Production immobilisée',0,NULL,NULL,1,NULL,NULL),(91,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','73',1407,'Produits nets partiels sur opérations à long terme',0,NULL,NULL,1,NULL,NULL),(92,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','74',1407,'Subventions d\'exploitation',0,NULL,NULL,1,NULL,NULL),(93,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','75',1407,'Autres produits de gestion courante',0,NULL,NULL,1,NULL,NULL),(94,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','753',93,'Jetons de présence et rémunérations d\'administrateurs, gérants,...',0,NULL,NULL,1,NULL,NULL),(95,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','754',93,'Ristournes perçues des coopératives',0,NULL,NULL,1,NULL,NULL),(96,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','755',93,'Quotes-parts de résultat sur opérations faites en commun',0,NULL,NULL,1,NULL,NULL),(97,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','76',1407,'Produits financiers',0,NULL,NULL,1,NULL,NULL),(98,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','77',1407,'Produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(99,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','781',1407,'Reprises sur amortissements et provisions',0,NULL,NULL,1,NULL,NULL),(100,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','786',1407,'Reprises sur provisions pour risques',0,NULL,NULL,1,NULL,NULL),(101,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','787',1407,'Reprises sur provisions',0,NULL,NULL,1,NULL,NULL),(102,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','79',1407,'Transferts de charges',0,NULL,NULL,1,NULL,NULL),(103,1,NULL,'2017-02-20 10:49:11','PCG99-BASE','CAPIT','XXXXXX','10',1501,'Capital et réserves',0,NULL,NULL,1,NULL,NULL),(104,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','CAPITAL','101',103,'Capital',0,NULL,NULL,1,NULL,NULL),(105,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','104',103,'Primes liées au capital social',0,NULL,NULL,1,NULL,NULL),(106,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','105',103,'Ecarts de réévaluation',0,NULL,NULL,1,NULL,NULL),(107,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','106',103,'Réserves',0,NULL,NULL,1,NULL,NULL),(108,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','107',103,'Ecart d\'equivalence',0,NULL,NULL,1,NULL,NULL),(109,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','108',103,'Compte de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(110,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','109',103,'Actionnaires : capital souscrit - non appelé',0,NULL,NULL,1,NULL,NULL),(111,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','11',1501,'Report à nouveau (solde créditeur ou débiteur)',0,NULL,NULL,1,NULL,NULL),(112,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','110',111,'Report à nouveau (solde créditeur)',0,NULL,NULL,1,NULL,NULL),(113,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','119',111,'Report à nouveau (solde débiteur)',0,NULL,NULL,1,NULL,NULL),(114,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','12',1501,'Résultat de l\'exercice (bénéfice ou perte)',0,NULL,NULL,1,NULL,NULL),(115,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','120',114,'Résultat de l\'exercice (bénéfice)',0,NULL,NULL,1,NULL,NULL),(116,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','129',114,'Résultat de l\'exercice (perte)',0,NULL,NULL,1,NULL,NULL),(117,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','13',1501,'Subventions d\'investissement',0,NULL,NULL,1,NULL,NULL),(118,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','131',117,'Subventions d\'équipement',0,NULL,NULL,1,NULL,NULL),(119,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','138',117,'Autres subventions d\'investissement',0,NULL,NULL,1,NULL,NULL),(120,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','139',117,'Subventions d\'investissement inscrites au compte de résultat',0,NULL,NULL,1,NULL,NULL),(121,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','14',1501,'Provisions réglementées',0,NULL,NULL,1,NULL,NULL),(122,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','142',121,'Provisions réglementées relatives aux immobilisations',0,NULL,NULL,1,NULL,NULL),(123,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','143',121,'Provisions réglementées relatives aux stocks',0,NULL,NULL,1,NULL,NULL),(124,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','144',121,'Provisions réglementées relatives aux autres éléments de l\'actif',0,NULL,NULL,1,NULL,NULL),(125,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','145',121,'Amortissements dérogatoires',0,NULL,NULL,1,NULL,NULL),(126,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','146',121,'Provision spéciale de réévaluation',0,NULL,NULL,1,NULL,NULL),(127,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','147',121,'Plus-values réinvesties',0,NULL,NULL,1,NULL,NULL),(128,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','148',121,'Autres provisions réglementées',0,NULL,NULL,1,NULL,NULL),(129,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','15',1501,'Provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(130,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','151',129,'Provisions pour risques',0,NULL,NULL,1,NULL,NULL),(131,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','153',129,'Provisions pour pensions et obligations similaires',0,NULL,NULL,1,NULL,NULL),(132,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','154',129,'Provisions pour restructurations',0,NULL,NULL,1,NULL,NULL),(133,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','155',129,'Provisions pour impôts',0,NULL,NULL,1,NULL,NULL),(134,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','156',129,'Provisions pour renouvellement des immobilisations (entreprises concessionnaires)',0,NULL,NULL,1,NULL,NULL),(135,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','157',129,'Provisions pour charges à répartir sur plusieurs exercices',0,NULL,NULL,1,NULL,NULL),(136,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','158',129,'Autres provisions pour charges',0,NULL,NULL,1,NULL,NULL),(137,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','16',1501,'Emprunts et dettes assimilees',0,NULL,NULL,1,NULL,NULL),(138,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','161',137,'Emprunts obligataires convertibles',0,NULL,NULL,1,NULL,NULL),(139,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','163',137,'Autres emprunts obligataires',0,NULL,NULL,1,NULL,NULL),(140,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','164',137,'Emprunts auprès des établissements de crédit',0,NULL,NULL,1,NULL,NULL),(141,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','165',137,'Dépôts et cautionnements reçus',0,NULL,NULL,1,NULL,NULL),(142,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','166',137,'Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(143,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','167',137,'Emprunts et dettes assortis de conditions particulières',0,NULL,NULL,1,NULL,NULL),(144,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','168',137,'Autres emprunts et dettes assimilées',0,NULL,NULL,1,NULL,NULL),(145,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','169',137,'Primes de remboursement des obligations',0,NULL,NULL,1,NULL,NULL),(146,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','17',1501,'Dettes rattachées à des participations',0,NULL,NULL,1,NULL,NULL),(147,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','171',146,'Dettes rattachées à des participations (groupe)',0,NULL,NULL,1,NULL,NULL),(148,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','174',146,'Dettes rattachées à des participations (hors groupe)',0,NULL,NULL,1,NULL,NULL),(149,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','178',146,'Dettes rattachées à des sociétés en participation',0,NULL,NULL,1,NULL,NULL),(150,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','18',1501,'Comptes de liaison des établissements et sociétés en participation',0,NULL,NULL,1,NULL,NULL),(151,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','181',150,'Comptes de liaison des établissements',0,NULL,NULL,1,NULL,NULL),(152,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','186',150,'Biens et prestations de services échangés entre établissements (charges)',0,NULL,NULL,1,NULL,NULL),(153,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','187',150,'Biens et prestations de services échangés entre établissements (produits)',0,NULL,NULL,1,NULL,NULL),(154,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','188',150,'Comptes de liaison des sociétés en participation',0,NULL,NULL,1,NULL,NULL),(155,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','20',1502,'Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(156,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','201',155,'Frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(157,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','203',155,'Frais de recherche et de développement',0,NULL,NULL,1,NULL,NULL),(158,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','205',155,'Concessions et droits similaires, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',0,NULL,NULL,1,NULL,NULL),(159,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','206',155,'Droit au bail',0,NULL,NULL,1,NULL,NULL),(160,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','207',155,'Fonds commercial',0,NULL,NULL,1,NULL,NULL),(161,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','208',155,'Autres immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(162,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','21',1502,'Immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(163,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','211',162,'Terrains',0,NULL,NULL,1,NULL,NULL),(164,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','212',162,'Agencements et aménagements de terrains',0,NULL,NULL,1,NULL,NULL),(165,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','213',162,'Constructions',0,NULL,NULL,1,NULL,NULL),(166,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','214',162,'Constructions sur sol d\'autrui',0,NULL,NULL,1,NULL,NULL),(167,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','215',162,'Installations techniques, matériels et outillage industriels',0,NULL,NULL,1,NULL,NULL),(168,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','218',162,'Autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(169,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','22',1502,'Immobilisations mises en concession',0,NULL,NULL,1,NULL,NULL),(170,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','23',1502,'Immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(171,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','231',170,'Immobilisations corporelles en cours',0,NULL,NULL,1,NULL,NULL),(172,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','232',170,'Immobilisations incorporelles en cours',0,NULL,NULL,1,NULL,NULL),(173,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','237',170,'Avances et acomptes versés sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(174,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','238',170,'Avances et acomptes versés sur commandes d\'immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(175,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','25',1502,'Parts dans des entreprises liées et créances sur des entreprises liées',0,NULL,NULL,1,NULL,NULL),(176,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','26',1502,'Participations et créances rattachées à des participations',0,NULL,NULL,1,NULL,NULL),(177,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','261',176,'Titres de participation',0,NULL,NULL,1,NULL,NULL),(178,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','266',176,'Autres formes de participation',0,NULL,NULL,1,NULL,NULL),(179,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','267',176,'Créances rattachées à des participations',0,NULL,NULL,1,NULL,NULL),(180,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','268',176,'Créances rattachées à des sociétés en participation',0,NULL,NULL,1,NULL,NULL),(181,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','269',176,'Versements restant à effectuer sur titres de participation non libérés',0,NULL,NULL,1,NULL,NULL),(182,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','27',1502,'Autres immobilisations financieres',0,NULL,NULL,1,NULL,NULL),(183,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','271',183,'Titres immobilisés autres que les titres immobilisés de l\'activité de portefeuille (droit de propriété)',0,NULL,NULL,1,NULL,NULL),(184,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','272',183,'Titres immobilisés (droit de créance)',0,NULL,NULL,1,NULL,NULL),(185,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','273',183,'Titres immobilisés de l\'activité de portefeuille',0,NULL,NULL,1,NULL,NULL),(186,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','274',183,'Prêts',0,NULL,NULL,1,NULL,NULL),(187,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','275',183,'Dépôts et cautionnements versés',0,NULL,NULL,1,NULL,NULL),(188,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','276',183,'Autres créances immobilisées',0,NULL,NULL,1,NULL,NULL),(189,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','277',183,'(Actions propres ou parts propres)',0,NULL,NULL,1,NULL,NULL),(190,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','279',183,'Versements restant à effectuer sur titres immobilisés non libérés',0,NULL,NULL,1,NULL,NULL),(191,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','28',1502,'Amortissements des immobilisations',0,NULL,NULL,1,NULL,NULL),(192,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','280',191,'Amortissements des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(193,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','281',191,'Amortissements des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(194,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','282',191,'Amortissements des immobilisations mises en concession',0,NULL,NULL,1,NULL,NULL),(195,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','29',1502,'Dépréciations des immobilisations',0,NULL,NULL,1,NULL,NULL),(196,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','290',195,'Dépréciations des immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(197,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','291',195,'Dépréciations des immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(198,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','292',195,'Dépréciations des immobilisations mises en concession',0,NULL,NULL,1,NULL,NULL),(199,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','293',195,'Dépréciations des immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(200,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','296',195,'Provisions pour dépréciation des participations et créances rattachées à des participations',0,NULL,NULL,1,NULL,NULL),(201,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','297',195,'Provisions pour dépréciation des autres immobilisations financières',0,NULL,NULL,1,NULL,NULL),(202,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','31',1503,'Matières premières (et fournitures)',0,NULL,NULL,1,NULL,NULL),(203,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','311',202,'Matières (ou groupe) A',0,NULL,NULL,1,NULL,NULL),(204,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','312',202,'Matières (ou groupe) B',0,NULL,NULL,1,NULL,NULL),(205,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','317',202,'Fournitures A, B, C,',0,NULL,NULL,1,NULL,NULL),(206,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','32',1503,'Autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(207,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','321',206,'Matières consommables',0,NULL,NULL,1,NULL,NULL),(208,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','322',206,'Fournitures consommables',0,NULL,NULL,1,NULL,NULL),(209,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','326',206,'Emballages',0,NULL,NULL,1,NULL,NULL),(210,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','33',1503,'En-cours de production de biens',0,NULL,NULL,1,NULL,NULL),(211,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','331',210,'Produits en cours',0,NULL,NULL,1,NULL,NULL),(212,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','335',210,'Travaux en cours',0,NULL,NULL,1,NULL,NULL),(213,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','34',1503,'En-cours de production de services',0,NULL,NULL,1,NULL,NULL),(214,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','341',213,'Etudes en cours',0,NULL,NULL,1,NULL,NULL),(215,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','345',213,'Prestations de services en cours',0,NULL,NULL,1,NULL,NULL),(216,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','35',1503,'Stocks de produits',0,NULL,NULL,1,NULL,NULL),(217,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','351',216,'Produits intermédiaires',0,NULL,NULL,1,NULL,NULL),(218,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','355',216,'Produits finis',0,NULL,NULL,1,NULL,NULL),(219,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','358',216,'Produits résiduels (ou matières de récupération)',0,NULL,NULL,1,NULL,NULL),(220,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','37',1503,'Stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(221,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','371',220,'Marchandises (ou groupe) A',0,NULL,NULL,1,NULL,NULL),(222,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','372',220,'Marchandises (ou groupe) B',0,NULL,NULL,1,NULL,NULL),(223,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','39',1503,'Provisions pour dépréciation des stocks et en-cours',0,NULL,NULL,1,NULL,NULL),(224,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','391',223,'Provisions pour dépréciation des matières premières',0,NULL,NULL,1,NULL,NULL),(225,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','392',223,'Provisions pour dépréciation des autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(226,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','393',223,'Provisions pour dépréciation des en-cours de production de biens',0,NULL,NULL,1,NULL,NULL),(227,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','394',223,'Provisions pour dépréciation des en-cours de production de services',0,NULL,NULL,1,NULL,NULL),(228,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','395',223,'Provisions pour dépréciation des stocks de produits',0,NULL,NULL,1,NULL,NULL),(229,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','397',223,'Provisions pour dépréciation des stocks de marchandises',0,NULL,NULL,1,NULL,NULL),(230,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','40',1504,'Fournisseurs et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(231,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','400',230,'Fournisseurs et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(232,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','SUPPLIER','401',230,'Fournisseurs',0,NULL,NULL,1,NULL,NULL),(233,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','403',230,'Fournisseurs - Effets à payer',0,NULL,NULL,1,NULL,NULL),(234,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','404',230,'Fournisseurs d\'immobilisations',0,NULL,NULL,1,NULL,NULL),(235,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','405',230,'Fournisseurs d\'immobilisations - Effets à payer',0,NULL,NULL,1,NULL,NULL),(236,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','408',230,'Fournisseurs - Factures non parvenues',0,NULL,NULL,1,NULL,NULL),(237,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','409',230,'Fournisseurs débiteurs',0,NULL,NULL,1,NULL,NULL),(238,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','41',1504,'Clients et comptes rattachés',0,NULL,NULL,1,NULL,NULL),(239,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','410',238,'Clients et Comptes rattachés',0,NULL,NULL,1,NULL,NULL),(240,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','CUSTOMER','411',238,'Clients',0,NULL,NULL,1,NULL,NULL),(241,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','413',238,'Clients - Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(242,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','416',238,'Clients douteux ou litigieux',0,NULL,NULL,1,NULL,NULL),(243,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','418',238,'Clients - Produits non encore facturés',0,NULL,NULL,1,NULL,NULL),(244,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','419',238,'Clients créditeurs',0,NULL,NULL,1,NULL,NULL),(245,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','42',1504,'Personnel et comptes rattachés',0,NULL,NULL,1,NULL,NULL),(246,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','421',245,'Personnel - Rémunérations dues',0,NULL,NULL,1,NULL,NULL),(247,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','422',245,'Comités d\'entreprises, d\'établissement, ...',0,NULL,NULL,1,NULL,NULL),(248,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','424',245,'Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(249,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','425',245,'Personnel - Avances et acomptes',0,NULL,NULL,1,NULL,NULL),(250,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','426',245,'Personnel - Dépôts',0,NULL,NULL,1,NULL,NULL),(251,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','427',245,'Personnel - Oppositions',0,NULL,NULL,1,NULL,NULL),(252,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','428',245,'Personnel - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(253,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','43',1504,'Sécurité sociale et autres organismes sociaux',0,NULL,NULL,1,NULL,NULL),(254,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','431',253,'Sécurité sociale',0,NULL,NULL,1,NULL,NULL),(255,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','437',253,'Autres organismes sociaux',0,NULL,NULL,1,NULL,NULL),(256,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','438',253,'Organismes sociaux - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(257,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','44',1504,'État et autres collectivités publiques',0,NULL,NULL,1,NULL,NULL),(258,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','441',257,'État - Subventions à recevoir',0,NULL,NULL,1,NULL,NULL),(259,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','442',257,'Etat - Impôts et taxes recouvrables sur des tiers',0,NULL,NULL,1,NULL,NULL),(260,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','443',257,'Opérations particulières avec l\'Etat, les collectivités publiques, les organismes internationaux',0,NULL,NULL,1,NULL,NULL),(261,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','444',257,'Etat - Impôts sur les bénéfices',0,NULL,NULL,1,NULL,NULL),(262,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','445',257,'Etat - Taxes sur le chiffre d\'affaires',0,NULL,NULL,1,NULL,NULL),(263,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','446',257,'Obligations cautionnées',0,NULL,NULL,1,NULL,NULL),(264,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','447',257,'Autres impôts, taxes et versements assimilés',0,NULL,NULL,1,NULL,NULL),(265,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','448',257,'Etat - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(266,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','449',257,'Quotas d\'émission à restituer à l\'Etat',0,NULL,NULL,1,NULL,NULL),(267,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','45',1504,'Groupe et associes',0,NULL,NULL,1,NULL,NULL),(268,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','451',267,'Groupe',0,NULL,NULL,1,NULL,NULL),(269,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','455',267,'Associés - Comptes courants',0,NULL,NULL,1,NULL,NULL),(270,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','456',267,'Associés - Opérations sur le capital',0,NULL,NULL,1,NULL,NULL),(271,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','457',267,'Associés - Dividendes à payer',0,NULL,NULL,1,NULL,NULL),(272,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','458',267,'Associés - Opérations faites en commun et en G.I.E.',0,NULL,NULL,1,NULL,NULL),(273,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','46',1504,'Débiteurs divers et créditeurs divers',0,NULL,NULL,1,NULL,NULL),(274,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','462',273,'Créances sur cessions d\'immobilisations',0,NULL,NULL,1,NULL,NULL),(275,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','464',273,'Dettes sur acquisitions de valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(276,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','465',273,'Créances sur cessions de valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(277,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','467',273,'Autres comptes débiteurs ou créditeurs',0,NULL,NULL,1,NULL,NULL),(278,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','468',273,'Divers - Charges à payer et produits à recevoir',0,NULL,NULL,1,NULL,NULL),(279,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','47',1504,'Comptes transitoires ou d\'attente',0,NULL,NULL,1,NULL,NULL),(280,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','471',279,'Comptes d\'attente',0,NULL,NULL,1,NULL,NULL),(281,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','476',279,'Différence de conversion - Actif',0,NULL,NULL,1,NULL,NULL),(282,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','477',279,'Différences de conversion - Passif',0,NULL,NULL,1,NULL,NULL),(283,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','478',279,'Autres comptes transitoires',0,NULL,NULL,1,NULL,NULL),(284,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','48',1504,'Comptes de régularisation',0,NULL,NULL,1,NULL,NULL),(285,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','481',284,'Charges à répartir sur plusieurs exercices',0,NULL,NULL,1,NULL,NULL),(286,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','486',284,'Charges constatées d\'avance',0,NULL,NULL,1,NULL,NULL),(287,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','487',284,'Produits constatés d\'avance',0,NULL,NULL,1,NULL,NULL),(288,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','488',284,'Comptes de répartition périodique des charges et des produits',0,NULL,NULL,1,NULL,NULL),(289,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','489',284,'Quotas d\'émission alloués par l\'Etat',0,NULL,NULL,1,NULL,NULL),(290,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','49',1504,'Provisions pour dépréciation des comptes de tiers',0,NULL,NULL,1,NULL,NULL),(291,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','491',290,'Provisions pour dépréciation des comptes de clients',0,NULL,NULL,1,NULL,NULL),(292,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','495',290,'Provisions pour dépréciation des comptes du groupe et des associés',0,NULL,NULL,1,NULL,NULL),(293,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','496',290,'Provisions pour dépréciation des comptes de débiteurs divers',0,NULL,NULL,1,NULL,NULL),(294,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','50',1505,'Valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(295,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','501',294,'Parts dans des entreprises liées',0,NULL,NULL,1,NULL,NULL),(296,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','502',294,'Actions propres',0,NULL,NULL,1,NULL,NULL),(297,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','503',294,'Actions',0,NULL,NULL,1,NULL,NULL),(298,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','504',294,'Autres titres conférant un droit de propriété',0,NULL,NULL,1,NULL,NULL),(299,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','505',294,'Obligations et bons émis par la société et rachetés par elle',0,NULL,NULL,1,NULL,NULL),(300,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','506',294,'Obligations',0,NULL,NULL,1,NULL,NULL),(301,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','507',294,'Bons du Trésor et bons de caisse à court terme',0,NULL,NULL,1,NULL,NULL),(302,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','508',294,'Autres valeurs mobilières de placement et autres créances assimilées',0,NULL,NULL,1,NULL,NULL),(303,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','509',294,'Versements restant à effectuer sur valeurs mobilières de placement non libérées',0,NULL,NULL,1,NULL,NULL),(304,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','51',1505,'Banques, établissements financiers et assimilés',0,NULL,NULL,1,NULL,NULL),(305,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','511',304,'Valeurs à l\'encaissement',0,NULL,NULL,1,NULL,NULL),(306,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','BANK','512',304,'Banques',0,NULL,NULL,1,NULL,NULL),(307,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','514',304,'Chèques postaux',0,NULL,NULL,1,NULL,NULL),(308,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','515',304,'\"Caisses\" du Trésor et des établissements publics',0,NULL,NULL,1,NULL,NULL),(309,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','516',304,'Sociétés de bourse',0,NULL,NULL,1,NULL,NULL),(310,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','517',304,'Autres organismes financiers',0,NULL,NULL,1,NULL,NULL),(311,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','518',304,'Intérêts courus',0,NULL,NULL,1,NULL,NULL),(312,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','519',304,'Concours bancaires courants',0,NULL,NULL,1,NULL,NULL),(313,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','52',1505,'Instruments de trésorerie',0,NULL,NULL,1,NULL,NULL),(314,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','CASH','53',1505,'Caisse',0,NULL,NULL,1,NULL,NULL),(315,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','531',314,'Caisse siège social',0,NULL,NULL,1,NULL,NULL),(316,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','532',314,'Caisse succursale (ou usine) A',0,NULL,NULL,1,NULL,NULL),(317,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','533',314,'Caisse succursale (ou usine) B',0,NULL,NULL,1,NULL,NULL),(318,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','54',1505,'Régies d\'avance et accréditifs',0,NULL,NULL,1,NULL,NULL),(319,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','58',1505,'Virements internes',0,NULL,NULL,1,NULL,NULL),(320,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','59',1505,'Provisions pour dépréciation des comptes financiers',0,NULL,NULL,1,NULL,NULL),(321,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','590',320,'Provisions pour dépréciation des valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(322,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','PRODUCT','60',1506,'Achats',0,NULL,NULL,1,NULL,NULL),(323,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','601',322,'Achats stockés - Matières premières (et fournitures)',0,NULL,NULL,1,NULL,NULL),(324,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','602',322,'Achats stockés - Autres approvisionnements',0,NULL,NULL,1,NULL,NULL),(325,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','603',322,'Variations des stocks (approvisionnements et marchandises)',0,NULL,NULL,1,NULL,NULL),(326,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','604',322,'Achats stockés - Matières premières (et fournitures)',0,NULL,NULL,1,NULL,NULL),(327,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','605',322,'Achats de matériel, équipements et travaux',0,NULL,NULL,1,NULL,NULL),(328,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','606',322,'Achats non stockés de matière et fournitures',0,NULL,NULL,1,NULL,NULL),(329,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','607',322,'Achats de marchandises',0,NULL,NULL,1,NULL,NULL),(330,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','608',322,'(Compte réservé, le cas échéant, à la récapitulation des frais accessoires incorporés aux achats)',0,NULL,NULL,1,NULL,NULL),(331,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','609',322,'Rabais, remises et ristournes obtenus sur achats',0,NULL,NULL,1,NULL,NULL),(332,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','SERVICE','61',1506,'Services extérieurs',0,NULL,NULL,1,NULL,NULL),(333,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','611',332,'Sous-traitance générale',0,NULL,NULL,1,NULL,NULL),(334,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','612',332,'Redevances de crédit-bail',0,NULL,NULL,1,NULL,NULL),(335,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','613',332,'Locations',0,NULL,NULL,1,NULL,NULL),(336,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','614',332,'Charges locatives et de copropriété',0,NULL,NULL,1,NULL,NULL),(337,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','615',332,'Entretien et réparations',0,NULL,NULL,1,NULL,NULL),(338,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','616',332,'Primes d\'assurances',0,NULL,NULL,1,NULL,NULL),(339,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','617',332,'Etudes et recherches',0,NULL,NULL,1,NULL,NULL),(340,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','618',332,'Divers',0,NULL,NULL,1,NULL,NULL),(341,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','619',332,'Rabais, remises et ristournes obtenus sur services extérieurs',0,NULL,NULL,1,NULL,NULL),(342,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','62',1506,'Autres services extérieurs',0,NULL,NULL,1,NULL,NULL),(343,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','621',342,'Personnel extérieur à l\'entreprise',0,NULL,NULL,1,NULL,NULL),(344,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','622',342,'Rémunérations d\'intermédiaires et honoraires',0,NULL,NULL,1,NULL,NULL),(345,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','623',342,'Publicité, publications, relations publiques',0,NULL,NULL,1,NULL,NULL),(346,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','624',342,'Transports de biens et transports collectifs du personnel',0,NULL,NULL,1,NULL,NULL),(347,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','625',342,'Déplacements, missions et réceptions',0,NULL,NULL,1,NULL,NULL),(348,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','626',342,'Frais postaux et de télécommunications',0,NULL,NULL,1,NULL,NULL),(349,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','627',342,'Services bancaires et assimilés',0,NULL,NULL,1,NULL,NULL),(350,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','628',342,'Divers',0,NULL,NULL,1,NULL,NULL),(351,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','629',342,'Rabais, remises et ristournes obtenus sur autres services extérieurs',0,NULL,NULL,1,NULL,NULL),(352,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','63',1506,'Impôts, taxes et versements assimilés',0,NULL,NULL,1,NULL,NULL),(353,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','631',352,'Impôts, taxes et versements assimilés sur rémunérations (administrations des impôts)',0,NULL,NULL,1,NULL,NULL),(354,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','633',352,'Impôts, taxes et versements assimilés sur rémunérations (autres organismes)',0,NULL,NULL,1,NULL,NULL),(355,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','635',352,'Autres impôts, taxes et versements assimilés (administrations des impôts)',0,NULL,NULL,1,NULL,NULL),(356,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','637',352,'Autres impôts, taxes et versements assimilés (autres organismes)',0,NULL,NULL,1,NULL,NULL),(357,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','64',1506,'Charges de personnel',0,NULL,NULL,1,NULL,NULL),(358,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','641',357,'Rémunérations du personnel',0,NULL,NULL,1,NULL,NULL),(359,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','644',357,'Rémunération du travail de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(360,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','SOCIAL','645',357,'Charges de sécurité sociale et de prévoyance',0,NULL,NULL,1,NULL,NULL),(361,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','646',357,'Cotisations sociales personnelles de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(362,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','647',357,'Autres charges sociales',0,NULL,NULL,1,NULL,NULL),(363,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','648',357,'Autres charges de personnel',0,NULL,NULL,1,NULL,NULL),(364,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','65',1506,'Autres charges de gestion courante',0,NULL,NULL,1,NULL,NULL),(365,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','651',364,'Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',0,NULL,NULL,1,NULL,NULL),(366,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','653',364,'Jetons de présence',0,NULL,NULL,1,NULL,NULL),(367,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','654',364,'Pertes sur créances irrécouvrables',0,NULL,NULL,1,NULL,NULL),(368,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','655',364,'Quote-part de résultat sur opérations faites en commun',0,NULL,NULL,1,NULL,NULL),(369,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','658',364,'Charges diverses de gestion courante',0,NULL,NULL,1,NULL,NULL),(370,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','66',1506,'Charges financières',0,NULL,NULL,1,NULL,NULL),(371,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','661',370,'Charges d\'intérêts',0,NULL,NULL,1,NULL,NULL),(372,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','664',370,'Pertes sur créances liées à des participations',0,NULL,NULL,1,NULL,NULL),(373,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','665',370,'Escomptes accordés',0,NULL,NULL,1,NULL,NULL),(374,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','666',370,'Pertes de change',0,NULL,NULL,1,NULL,NULL),(375,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','667',370,'Charges nettes sur cessions de valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(376,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','668',370,'Autres charges financières',0,NULL,NULL,1,NULL,NULL),(377,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','67',1506,'Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(378,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','671',377,'Charges exceptionnelles sur opérations de gestion',0,NULL,NULL,1,NULL,NULL),(379,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','672',377,'(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les charges sur exercices antérieurs)',0,NULL,NULL,1,NULL,NULL),(380,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','675',377,'Valeurs comptables des éléments d\'actif cédés',0,NULL,NULL,1,NULL,NULL),(381,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','678',377,'Autres charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(382,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','68',1506,'Dotations aux amortissements et aux provisions',0,NULL,NULL,1,NULL,NULL),(383,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','681',382,'Dotations aux amortissements et aux provisions - Charges d\'exploitation',0,NULL,NULL,1,NULL,NULL),(384,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','686',382,'Dotations aux amortissements et aux provisions - Charges financières',0,NULL,NULL,1,NULL,NULL),(385,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','687',382,'Dotations aux amortissements et aux provisions - Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(386,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','69',1506,'Participation des salariés - impôts sur les bénéfices et assimiles',0,NULL,NULL,1,NULL,NULL),(387,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','691',386,'Participation des salariés aux résultats',0,NULL,NULL,1,NULL,NULL),(388,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','695',386,'Impôts sur les bénéfices',0,NULL,NULL,1,NULL,NULL),(389,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','696',386,'Suppléments d\'impôt sur les sociétés liés aux distributions',0,NULL,NULL,1,NULL,NULL),(390,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','697',386,'Imposition forfaitaire annuelle des sociétés',0,NULL,NULL,1,NULL,NULL),(391,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','698',386,'Intégration fiscale',0,NULL,NULL,1,NULL,NULL),(392,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','699',386,'Produits - Reports en arrière des déficits',0,NULL,NULL,1,NULL,NULL),(393,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','70',1507,'Ventes de produits fabriqués, prestations de services, marchandises',0,NULL,NULL,1,NULL,NULL),(394,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','PRODUCT','701',393,'Ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(395,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','702',393,'Ventes de produits intermédiaires',0,NULL,NULL,1,NULL,NULL),(396,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','703',393,'Ventes de produits résiduels',0,NULL,NULL,1,NULL,NULL),(397,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','704',393,'Travaux',0,NULL,NULL,1,NULL,NULL),(398,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','705',393,'Etudes',0,NULL,NULL,1,NULL,NULL),(399,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','SERVICE','706',393,'Prestations de services',0,NULL,NULL,1,NULL,NULL),(400,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','PRODUCT','707',393,'Ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(401,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','PRODUCT','708',393,'Produits des activités annexes',0,NULL,NULL,1,NULL,NULL),(402,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','709',393,'Rabais, remises et ristournes accordés par l\'entreprise',0,NULL,NULL,1,NULL,NULL),(403,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','71',1507,'Production stockée (ou déstockage)',0,NULL,NULL,1,NULL,NULL),(404,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','713',403,'Variation des stocks (en-cours de production, produits)',0,NULL,NULL,1,NULL,NULL),(405,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','72',1507,'Production immobilisée',0,NULL,NULL,1,NULL,NULL),(406,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','721',405,'Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(407,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','722',405,'Immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(408,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','74',1507,'Subventions d\'exploitation',0,NULL,NULL,1,NULL,NULL),(409,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','75',1507,'Autres produits de gestion courante',0,NULL,NULL,1,NULL,NULL),(410,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','751',409,'Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',0,NULL,NULL,1,NULL,NULL),(411,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','752',409,'Revenus des immeubles non affectés à des activités professionnelles',0,NULL,NULL,1,NULL,NULL),(412,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','753',409,'Jetons de présence et rémunérations d\'administrateurs, gérants,...',0,NULL,NULL,1,NULL,NULL),(413,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','754',409,'Ristournes perçues des coopératives (provenant des excédents)',0,NULL,NULL,1,NULL,NULL),(414,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','755',409,'Quotes-parts de résultat sur opérations faites en commun',0,NULL,NULL,1,NULL,NULL),(415,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','758',409,'Produits divers de gestion courante',0,NULL,NULL,1,NULL,NULL),(416,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','76',1507,'Produits financiers',0,NULL,NULL,1,NULL,NULL),(417,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','761',416,'Produits de participations',0,NULL,NULL,1,NULL,NULL),(418,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','762',416,'Produits des autres immobilisations financières',0,NULL,NULL,1,NULL,NULL),(419,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','763',416,'Revenus des autres créances',0,NULL,NULL,1,NULL,NULL),(420,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','764',416,'Revenus des valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(421,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','765',416,'Escomptes obtenus',0,NULL,NULL,1,NULL,NULL),(422,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','766',416,'Gains de change',0,NULL,NULL,1,NULL,NULL),(423,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','767',416,'Produits nets sur cessions de valeurs mobilières de placement',0,NULL,NULL,1,NULL,NULL),(424,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','768',416,'Autres produits financiers',0,NULL,NULL,1,NULL,NULL),(425,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','77',1507,'Produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(426,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','771',425,'Produits exceptionnels sur opérations de gestion',0,NULL,NULL,1,NULL,NULL),(427,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','772',425,'(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les produits sur exercices antérieurs)',0,NULL,NULL,1,NULL,NULL),(428,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','775',425,'Produits des cessions d\'éléments d\'actif',0,NULL,NULL,1,NULL,NULL),(429,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','777',425,'Quote-part des subventions d\'investissement virée au résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(430,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','778',425,'Autres produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(431,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','78',1507,'Reprises sur amortissements et provisions',0,NULL,NULL,1,NULL,NULL),(432,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','781',431,'Reprises sur amortissements et provisions (à inscrire dans les produits d\'exploitation)',0,NULL,NULL,1,NULL,NULL),(433,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','786',431,'Reprises sur provisions pour risques (à inscrire dans les produits financiers)',0,NULL,NULL,1,NULL,NULL),(434,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','787',431,'Reprises sur provisions (à inscrire dans les produits exceptionnels)',0,NULL,NULL,1,NULL,NULL),(435,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','79',1507,'Transferts de charges',0,NULL,NULL,1,NULL,NULL),(436,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','791',435,'Transferts de charges d\'exploitation ',0,NULL,NULL,1,NULL,NULL),(437,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','796',435,'Transferts de charges financières',0,NULL,NULL,1,NULL,NULL),(438,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','797',435,'Transferts de charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(439,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','10',1351,'Capital',0,NULL,NULL,1,NULL,NULL),(440,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','100',439,'Capital souscrit ou capital personnel',0,NULL,NULL,1,NULL,NULL),(441,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1000',440,'Capital non amorti',0,NULL,NULL,1,NULL,NULL),(442,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1001',440,'Capital amorti',0,NULL,NULL,1,NULL,NULL),(443,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','101',439,'Capital non appelé',0,NULL,NULL,1,NULL,NULL),(444,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','109',439,'Compte de l\'exploitant',0,NULL,NULL,1,NULL,NULL),(445,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1090',444,'Opérations courantes',0,NULL,NULL,1,NULL,NULL),(446,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1091',444,'Impôts personnels',0,NULL,NULL,1,NULL,NULL),(447,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1092',444,'Rémunérations et autres avantages',0,NULL,NULL,1,NULL,NULL),(448,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','11',1351,'Primes d\'émission',0,NULL,NULL,1,NULL,NULL),(449,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','12',1351,'Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(450,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','120',449,'Plus-values de réévaluation sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(451,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1200',450,'Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(452,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1201',450,'Reprises de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(453,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','121',449,'Plus-values de réévaluation sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(454,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1210',453,'Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(455,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1211',453,'Reprises de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(456,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','122',449,'Plus-values de réévaluation sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(457,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1220',456,'Plus-values de réévaluation',0,NULL,NULL,1,NULL,NULL),(458,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1221',456,'Reprises de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(459,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','123',449,'Plus-values de réévaluation sur stocks',0,NULL,NULL,1,NULL,NULL),(460,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','124',449,'Reprises de réductions de valeur sur placements de trésorerie',0,NULL,NULL,1,NULL,NULL),(461,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','13',1351,'Réserve',0,NULL,NULL,1,NULL,NULL),(462,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','130',461,'Réserve légale',0,NULL,NULL,1,NULL,NULL),(463,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','131',461,'Réserves indisponibles',0,NULL,NULL,1,NULL,NULL),(464,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1310',463,'Réserve pour actions propres',0,NULL,NULL,1,NULL,NULL),(465,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1311',463,'Autres réserves indisponibles',0,NULL,NULL,1,NULL,NULL),(466,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','132',461,'Réserves immunisées',0,NULL,NULL,1,NULL,NULL),(467,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','133',461,'Réserves disponibles',0,NULL,NULL,1,NULL,NULL),(468,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1330',467,'Réserve pour régularisation de dividendes',0,NULL,NULL,1,NULL,NULL),(469,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1331',467,'Réserve pour renouvellement des immobilisations',0,NULL,NULL,1,NULL,NULL),(470,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1332',467,'Réserve pour installations en faveur du personnel 1333 Réserves libres',0,NULL,NULL,1,NULL,NULL),(471,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','14',1351,'Bénéfice reporté (ou perte reportée)',0,NULL,NULL,1,NULL,NULL),(472,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','15',1351,'Subsides en capital',0,NULL,NULL,1,NULL,NULL),(473,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','150',472,'Montants obtenus',0,NULL,NULL,1,NULL,NULL),(474,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','151',472,'Montants transférés aux résultats',0,NULL,NULL,1,NULL,NULL),(475,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','16',1351,'Provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(476,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','160',475,'Provisions pour pensions et obligations similaires',0,NULL,NULL,1,NULL,NULL),(477,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','161',475,'Provisions pour charges fiscales',0,NULL,NULL,1,NULL,NULL),(478,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','162',475,'Provisions pour grosses réparations et gros entretiens',0,NULL,NULL,1,NULL,NULL),(479,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','163',475,'à 169 Provisions pour autres risques et charges',0,NULL,NULL,1,NULL,NULL),(480,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','164',475,'Provisions pour sûretés personnelles ou réelles constituées à l\'appui de dettes et d\'engagements de tiers',0,NULL,NULL,1,NULL,NULL),(481,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','165',475,'Provisions pour engagements relatifs à l\'acquisition ou à la cession d\'immobilisations',0,NULL,NULL,1,NULL,NULL),(482,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','166',475,'Provisions pour exécution de commandes passées ou reçues',0,NULL,NULL,1,NULL,NULL),(483,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','167',475,'Provisions pour positions et marchés à terme en devises ou positions et marchés à terme en marchandises',0,NULL,NULL,1,NULL,NULL),(484,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','168',475,'Provisions pour garanties techniques attachées aux ventes et prestations déjà effectuées par l\'entreprise',0,NULL,NULL,1,NULL,NULL),(485,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','169',475,'Provisions pour autres risques et charges',0,NULL,NULL,1,NULL,NULL),(486,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1690',485,'Pour litiges en cours',0,NULL,NULL,1,NULL,NULL),(487,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1691',485,'Pour amendes, doubles droits et pénalités',0,NULL,NULL,1,NULL,NULL),(488,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1692',485,'Pour propre assureur',0,NULL,NULL,1,NULL,NULL),(489,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1693',485,'Pour risques inhérents aux opérations de crédits à moyen ou long terme',0,NULL,NULL,1,NULL,NULL),(490,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1695',485,'Provision pour charge de liquidation',0,NULL,NULL,1,NULL,NULL),(491,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1696',485,'Provision pour départ de personnel',0,NULL,NULL,1,NULL,NULL),(492,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1699',485,'Pour risques divers',0,NULL,NULL,1,NULL,NULL),(493,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17',1351,'Dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(494,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','170',493,'Emprunts subordonnés',0,NULL,NULL,1,NULL,NULL),(495,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1700',494,'Convertibles',0,NULL,NULL,1,NULL,NULL),(496,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1701',494,'Non convertibles',0,NULL,NULL,1,NULL,NULL),(497,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','171',493,'Emprunts obligataires non subordonnés',0,NULL,NULL,1,NULL,NULL),(498,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1710',498,'Convertibles',0,NULL,NULL,1,NULL,NULL),(499,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1711',498,'Non convertibles',0,NULL,NULL,1,NULL,NULL),(500,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','172',493,'Dettes de location-financement et assimilés',0,NULL,NULL,1,NULL,NULL),(501,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1720',500,'Dettes de location-financement de biens immobiliers',0,NULL,NULL,1,NULL,NULL),(502,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1721',500,'Dettes de location-financement de biens mobiliers',0,NULL,NULL,1,NULL,NULL),(503,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1722',500,'Dettes sur droits réels sur immeubles',0,NULL,NULL,1,NULL,NULL),(504,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','173',493,'Etablissements de crédit',0,NULL,NULL,1,NULL,NULL),(505,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1730',504,'Dettes en compte',0,NULL,NULL,1,NULL,NULL),(506,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17300',505,'Banque A',0,NULL,NULL,1,NULL,NULL),(507,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17301',505,'Banque B',0,NULL,NULL,1,NULL,NULL),(508,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17302',505,'Banque C',0,NULL,NULL,1,NULL,NULL),(509,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17303',505,'Banque D',0,NULL,NULL,1,NULL,NULL),(510,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1731',504,'Promesses',0,NULL,NULL,1,NULL,NULL),(511,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17310',510,'Banque A',0,NULL,NULL,1,NULL,NULL),(512,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17311',510,'Banque B',0,NULL,NULL,1,NULL,NULL),(513,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17312',510,'Banque C',0,NULL,NULL,1,NULL,NULL),(514,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17313',510,'Banque D',0,NULL,NULL,1,NULL,NULL),(515,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1732',504,'Crédits d\'acceptation',0,NULL,NULL,1,NULL,NULL),(516,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17320',515,'Banque A',0,NULL,NULL,1,NULL,NULL),(517,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17321',515,'Banque B',0,NULL,NULL,1,NULL,NULL),(518,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17322',515,'Banque C',0,NULL,NULL,1,NULL,NULL),(519,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17323',515,'Banque D',0,NULL,NULL,1,NULL,NULL),(520,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','174',493,'Autres emprunts',0,NULL,NULL,1,NULL,NULL),(521,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175',493,'Dettes commerciales',0,NULL,NULL,1,NULL,NULL),(522,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1750',521,'Fournisseurs : dettes en compte',0,NULL,NULL,1,NULL,NULL),(523,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17500',522,'Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(524,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175000',523,'Entreprises liées',0,NULL,NULL,1,NULL,NULL),(525,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175001',523,'Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(526,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17501',522,'Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(527,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175010',526,'Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(528,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175011',526,'Fournisseurs C.E.E.',0,NULL,NULL,1,NULL,NULL),(529,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175012',526,'Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(530,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1751',521,'Effets à payer',0,NULL,NULL,1,NULL,NULL),(531,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17510',530,'Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(532,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175100',531,'Entreprises liées',0,NULL,NULL,1,NULL,NULL),(533,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175101',531,'Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(534,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17511',530,'Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(535,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175110',534,'Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(536,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175111',534,'Fournisseurs C.E.E.',0,NULL,NULL,1,NULL,NULL),(537,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175112',534,'Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(538,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','176',493,'Acomptes reçus sur commandes',0,NULL,NULL,1,NULL,NULL),(539,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','178',493,'Cautionnements reçus en numéraires',0,NULL,NULL,1,NULL,NULL),(540,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','179',493,'Dettes diverses',0,NULL,NULL,1,NULL,NULL),(541,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1790',540,'Entreprises liées',0,NULL,NULL,1,NULL,NULL),(542,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1791',540,'Autres entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(543,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1792',540,'Administrateurs, gérants et associés',0,NULL,NULL,1,NULL,NULL),(544,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1794',540,'Rentes viagères capitalisées',0,NULL,NULL,1,NULL,NULL),(545,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1798',540,'Dettes envers les coparticipants des associations momentanées et en participation',0,NULL,NULL,1,NULL,NULL),(546,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1799',540,'Autres dettes diverses',0,NULL,NULL,1,NULL,NULL),(547,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','18',1351,'Comptes de liaison des établissements et succursales',0,NULL,NULL,1,NULL,NULL),(548,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','20',1352,'Frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(549,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','200',548,'Frais de constitution et d\'augmentation de capital',0,NULL,NULL,1,NULL,NULL),(550,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2000',549,'Frais de constitution et d\'augmentation de capital',0,NULL,NULL,1,NULL,NULL),(551,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2009',549,'Amortissements sur frais de constitution et d\'augmentation de capital',0,NULL,NULL,1,NULL,NULL),(552,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','201',548,'Frais d\'émission d\'emprunts et primes de remboursement',0,NULL,NULL,1,NULL,NULL),(553,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2010',552,'Agios sur emprunts et frais d\'émission d\'emprunts',0,NULL,NULL,1,NULL,NULL),(554,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2019',552,'Amortissements sur agios sur emprunts et frais d\'émission d\'emprunts',0,NULL,NULL,1,NULL,NULL),(555,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','202',548,'Autres frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(556,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2020',555,'Autres frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(557,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2029',555,'Amortissements sur autres frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(558,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','203',548,'Intérêts intercalaires',0,NULL,NULL,1,NULL,NULL),(559,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2030',558,'Intérêts intercalaires',0,NULL,NULL,1,NULL,NULL),(560,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2039',558,'Amortissements sur intérêts intercalaires',0,NULL,NULL,1,NULL,NULL),(561,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','204',548,'Frais de restructuration',0,NULL,NULL,1,NULL,NULL),(562,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2040',561,'Coût des frais de restructuration',0,NULL,NULL,1,NULL,NULL),(563,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2049',561,'Amortissements sur frais de restructuration',0,NULL,NULL,1,NULL,NULL),(564,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','21',1352,'Immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(565,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','210',564,'Frais de recherche et de développement',0,NULL,NULL,1,NULL,NULL),(566,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2100',565,'Frais de recherche et de mise au point',0,NULL,NULL,1,NULL,NULL),(567,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2108',565,'Plus-values actées sur frais de recherche et de mise au point',0,NULL,NULL,1,NULL,NULL),(568,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2109',565,'Amortissements sur frais de recherche et de mise au point',0,NULL,NULL,1,NULL,NULL),(569,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','211',564,'Concessions, brevets, licences, savoir-faire, marque et droits similaires',0,NULL,NULL,1,NULL,NULL),(570,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2110',569,'Concessions, brevets, licences, marques, etc',0,NULL,NULL,1,NULL,NULL),(571,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2118',569,'Plus-values actées sur concessions, etc',0,NULL,NULL,1,NULL,NULL),(572,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2119',569,'Amortissements sur concessions, etc',0,NULL,NULL,1,NULL,NULL),(573,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','212',564,'Goodwill',0,NULL,NULL,1,NULL,NULL),(574,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2120',573,'Coût d\'acquisition',0,NULL,NULL,1,NULL,NULL),(575,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2128',573,'Plus-values actées',0,NULL,NULL,1,NULL,NULL),(576,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2129',573,'Amortissements sur goodwill',0,NULL,NULL,1,NULL,NULL),(577,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','213',564,'Acomptes versés',0,NULL,NULL,1,NULL,NULL),(578,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22',1352,'Terrains et constructions',0,NULL,NULL,1,NULL,NULL),(579,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','220',578,'Terrains',0,NULL,NULL,1,NULL,NULL),(580,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2200',579,'Terrains',0,NULL,NULL,1,NULL,NULL),(581,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2201',579,'Frais d\'acquisition sur terrains',0,NULL,NULL,1,NULL,NULL),(582,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2208',579,'Plus-values actées sur terrains',0,NULL,NULL,1,NULL,NULL),(583,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2209',579,'Amortissements et réductions de valeur',0,NULL,NULL,1,NULL,NULL),(584,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22090',583,'Amortissements sur frais d\'acquisition',0,NULL,NULL,1,NULL,NULL),(585,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22091',583,'Réductions de valeur sur terrains',0,NULL,NULL,1,NULL,NULL),(586,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','221',578,'Constructions',0,NULL,NULL,1,NULL,NULL),(587,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2210',586,'Bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(588,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2211',586,'Bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(589,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2212',586,'Autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(590,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2213',586,'Voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(591,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2215',586,'Constructions sur sol d\'autrui',0,NULL,NULL,1,NULL,NULL),(592,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2216',586,'Frais d\'acquisition sur constructions',0,NULL,NULL,1,NULL,NULL),(593,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2218',586,'Plus-values actées',0,NULL,NULL,1,NULL,NULL),(594,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22180',593,'Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(595,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22181',593,'Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(596,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22182',593,'Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(597,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22184',593,'Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(598,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2219',586,'Amortissements sur constructions',0,NULL,NULL,1,NULL,NULL),(599,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22190',598,'Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(600,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22191',598,'Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(601,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22192',598,'Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(602,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22194',598,'Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(603,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22195',598,'Sur constructions sur sol d\'autrui',0,NULL,NULL,1,NULL,NULL),(604,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22196',598,'Sur frais d\'acquisition sur constructions',0,NULL,NULL,1,NULL,NULL),(605,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','222',578,'Terrains bâtis',0,NULL,NULL,1,NULL,NULL),(606,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2220',605,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(607,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22200',606,'Bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(608,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22201',606,'Bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(609,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22202',606,'Autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(610,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22203',606,'Voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(611,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22204',606,'Frais d\'acquisition des terrains à bâtir',0,NULL,NULL,1,NULL,NULL),(612,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2228',605,'Plus-values actées',0,NULL,NULL,1,NULL,NULL),(613,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22280',612,'Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(614,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22281',612,'Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(615,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22282',612,'Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(616,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22283',612,'Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(617,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2229',605,'Amortissements sur terrains bâtis',0,NULL,NULL,1,NULL,NULL),(618,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22290',617,'Sur bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(619,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22291',617,'Sur bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(620,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22292',617,'Sur autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(621,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22293',617,'Sur voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(622,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22294',617,'Sur frais d\'acquisition des terrains bâtis',0,NULL,NULL,1,NULL,NULL),(623,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','223',578,'Autres droits réels sur des immeubles',0,NULL,NULL,1,NULL,NULL),(624,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2230',623,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(625,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2238',623,'Plus-values actées',0,NULL,NULL,1,NULL,NULL),(626,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2239',623,'Amortissements',0,NULL,NULL,1,NULL,NULL),(627,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','23',1352,'Installations, machines et outillages',0,NULL,NULL,1,NULL,NULL),(628,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','230',627,'Installations',0,NULL,NULL,1,NULL,NULL),(629,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2300',628,'Installations bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(630,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2301',628,'Installations bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(631,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2302',628,'Installations bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(632,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2303',628,'Installations voies de transport et ouvrages d\'art',0,NULL,NULL,1,NULL,NULL),(637,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2304',628,'Installation de chauffage',0,NULL,NULL,1,NULL,NULL),(638,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2305',628,'Installation de conditionnement d\'air',0,NULL,NULL,1,NULL,NULL),(639,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2306',628,'Installation de chargement',0,NULL,NULL,1,NULL,NULL),(640,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','231',627,'Machines',0,NULL,NULL,1,NULL,NULL),(641,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2310',640,'Division A',0,NULL,NULL,1,NULL,NULL),(642,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2311',640,'Division B',0,NULL,NULL,1,NULL,NULL),(643,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2312',640,'Division C',0,NULL,NULL,1,NULL,NULL),(644,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','237',627,'Outillage',0,NULL,NULL,1,NULL,NULL),(645,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2370',644,'Division A',0,NULL,NULL,1,NULL,NULL),(646,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2371',644,'Division B',0,NULL,NULL,1,NULL,NULL),(647,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2372',644,'Division C',0,NULL,NULL,1,NULL,NULL),(648,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','238',627,'Plus-values actées',0,NULL,NULL,1,NULL,NULL),(649,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2380',648,'Sur installations',0,NULL,NULL,1,NULL,NULL),(650,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2381',648,'Sur machines',0,NULL,NULL,1,NULL,NULL),(651,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2382',648,'Sur outillage',0,NULL,NULL,1,NULL,NULL),(652,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','239',627,'Amortissements',0,NULL,NULL,1,NULL,NULL),(653,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2390',652,'Sur installations',0,NULL,NULL,1,NULL,NULL),(654,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2391',652,'Sur machines',0,NULL,NULL,1,NULL,NULL),(655,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2392',652,'Sur outillage',0,NULL,NULL,1,NULL,NULL),(656,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24',1352,'Mobilier et matériel roulant',0,NULL,NULL,1,NULL,NULL),(657,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','240',656,'Mobilier',0,NULL,NULL,1,NULL,NULL),(658,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2400',656,'Mobilier',0,NULL,NULL,1,NULL,NULL),(659,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24000',658,'Mobilier des bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(660,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24001',658,'Mobilier des bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(661,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24002',658,'Mobilier des autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(662,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24003',658,'Mobilier oeuvres sociales',0,NULL,NULL,1,NULL,NULL),(663,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2401',657,'Matériel de bureau et de service social',0,NULL,NULL,1,NULL,NULL),(664,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24010',663,'Des bâtiments industriels',0,NULL,NULL,1,NULL,NULL),(665,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24011',663,'Des bâtiments administratifs et commerciaux',0,NULL,NULL,1,NULL,NULL),(666,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24012',663,'Des autres bâtiments d\'exploitation',0,NULL,NULL,1,NULL,NULL),(667,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24013',663,'Des oeuvres sociales',0,NULL,NULL,1,NULL,NULL),(668,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2408',657,'Plus-values actées',0,NULL,NULL,1,NULL,NULL),(669,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24080',668,'Plus-values actées sur mobilier',0,NULL,NULL,1,NULL,NULL),(670,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24081',668,'Plus-values actées sur matériel de bureau et service social',0,NULL,NULL,1,NULL,NULL),(671,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2409',657,'Amortissements',0,NULL,NULL,1,NULL,NULL),(672,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24090',671,'Amortissements sur mobilier',0,NULL,NULL,1,NULL,NULL),(673,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24091',671,'Amortissements sur matériel de bureau et service social',0,NULL,NULL,1,NULL,NULL),(674,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','241',656,'Matériel roulant',0,NULL,NULL,1,NULL,NULL),(675,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2410',674,'Matériel automobile',0,NULL,NULL,1,NULL,NULL),(676,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24100',675,'Voitures',0,NULL,NULL,1,NULL,NULL),(677,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24105',675,'Camions',0,NULL,NULL,1,NULL,NULL),(678,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2411',674,'Matériel ferroviaire',0,NULL,NULL,1,NULL,NULL),(679,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2412',674,'Matériel fluvial',0,NULL,NULL,1,NULL,NULL),(680,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2413',674,'Matériel naval',0,NULL,NULL,1,NULL,NULL),(681,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2414',674,'Matériel aérien',0,NULL,NULL,1,NULL,NULL),(682,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2418',674,'Plus-values sur matériel roulant',0,NULL,NULL,1,NULL,NULL),(683,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24180',682,'Plus-values sur matériel automobile',0,NULL,NULL,1,NULL,NULL),(684,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24181',682,'Idem sur matériel ferroviaire',0,NULL,NULL,1,NULL,NULL),(685,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24182',682,'Idem sur matériel fluvial',0,NULL,NULL,1,NULL,NULL),(686,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24183',682,'Idem sur matériel naval',0,NULL,NULL,1,NULL,NULL),(687,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24184',682,'Idem sur matériel aérien',0,NULL,NULL,1,NULL,NULL),(688,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2419',674,'Amortissements sur matériel roulant',0,NULL,NULL,1,NULL,NULL),(689,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24190',688,'Amortissements sur matériel automobile',0,NULL,NULL,1,NULL,NULL),(690,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24191',688,'Idem sur matériel ferroviaire',0,NULL,NULL,1,NULL,NULL),(691,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24192',688,'Idem sur matériel fluvial',0,NULL,NULL,1,NULL,NULL),(692,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24193',688,'Idem sur matériel naval',0,NULL,NULL,1,NULL,NULL),(693,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24194',688,'Idem sur matériel aérien',0,NULL,NULL,1,NULL,NULL),(694,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','25',1352,'Immobilisation détenues en location-financement et droits similaires',0,NULL,NULL,1,NULL,NULL),(695,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','250',694,'Terrains et constructions',0,NULL,NULL,1,NULL,NULL),(696,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2500',695,'Terrains',0,NULL,NULL,1,NULL,NULL),(697,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2501',695,'Constructions',0,NULL,NULL,1,NULL,NULL),(698,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2508',695,'Plus-values sur emphytéose, leasing et droits similaires : terrains et constructions',0,NULL,NULL,1,NULL,NULL),(699,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2509',695,'Amortissements et réductions de valeur sur terrains et constructions en leasing',0,NULL,NULL,1,NULL,NULL),(700,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','251',694,'Installations, machines et outillage',0,NULL,NULL,1,NULL,NULL),(701,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2510',700,'Installations',0,NULL,NULL,1,NULL,NULL),(702,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2511',700,'Machines',0,NULL,NULL,1,NULL,NULL),(703,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2512',700,'Outillage',0,NULL,NULL,1,NULL,NULL),(704,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2518',700,'Plus-values actées sur installations machines et outillage pris en leasing',0,NULL,NULL,1,NULL,NULL),(705,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2519',700,'Amortissements sur installations machines et outillage pris en leasing',0,NULL,NULL,1,NULL,NULL),(706,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','252',694,'Mobilier et matériel roulant',0,NULL,NULL,1,NULL,NULL),(707,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2520',706,'Mobilier',0,NULL,NULL,1,NULL,NULL),(708,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2521',706,'Matériel roulant',0,NULL,NULL,1,NULL,NULL),(709,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2528',706,'Plus-values actées sur mobilier et matériel roulant en leasing',0,NULL,NULL,1,NULL,NULL),(710,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2529',706,'Amortissements sur mobilier et matériel roulant en leasing',0,NULL,NULL,1,NULL,NULL),(711,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','26',1352,'Autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(712,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','260',711,'Frais d\'aménagements de locaux pris en location',0,NULL,NULL,1,NULL,NULL),(713,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','261',711,'Maison d\'habitation',0,NULL,NULL,1,NULL,NULL),(714,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','262',711,'Réserve immobilière',0,NULL,NULL,1,NULL,NULL),(715,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','263',711,'Matériel d\'emballage',0,NULL,NULL,1,NULL,NULL),(716,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','264',711,'Emballages récupérables',0,NULL,NULL,1,NULL,NULL),(717,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','268',711,'Plus-values actées sur autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(718,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','269',711,'Amortissements sur autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(719,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2690',718,'Amortissements sur frais d\'aménagement des locaux pris en location',0,NULL,NULL,1,NULL,NULL),(720,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2691',718,'Amortissements sur maison d\'habitation',0,NULL,NULL,1,NULL,NULL),(721,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2692',718,'Amortissements sur réserve immobilière',0,NULL,NULL,1,NULL,NULL),(722,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2693',718,'Amortissements sur matériel d\'emballage',0,NULL,NULL,1,NULL,NULL),(723,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2694',718,'Amortissements sur emballages récupérables',0,NULL,NULL,1,NULL,NULL),(724,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','27',1352,'Immobilisations corporelles en cours et acomptes versés',0,NULL,NULL,1,NULL,NULL),(725,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','270',724,'Immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(726,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2700',725,'Constructions',0,NULL,NULL,1,NULL,NULL),(727,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2701',725,'Installations machines et outillage',0,NULL,NULL,1,NULL,NULL),(728,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2702',725,'Mobilier et matériel roulant',0,NULL,NULL,1,NULL,NULL),(729,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2703',725,'Autres immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(730,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','271',724,'Avances et acomptes versés sur immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(731,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','28',1352,'Immobilisations financières',0,NULL,NULL,1,NULL,NULL),(732,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','280',731,'Participations dans des entreprises liées',0,NULL,NULL,1,NULL,NULL),(733,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2800',732,'Valeur d\'acquisition (peut être subdivisé par participation)',0,NULL,NULL,1,NULL,NULL),(734,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2801',732,'Montants non appelés (idem)',0,NULL,NULL,1,NULL,NULL),(735,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2808',732,'Plus-values actées (idem)',0,NULL,NULL,1,NULL,NULL),(736,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2809',732,'Réductions de valeurs actées (idem)',0,NULL,NULL,1,NULL,NULL),(737,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','281',731,'Créances sur des entreprises liées',0,NULL,NULL,1,NULL,NULL),(738,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2810',737,'Créances en compte',0,NULL,NULL,1,NULL,NULL),(739,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2811',737,'Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(740,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2812',737,'Titres à revenu fixes',0,NULL,NULL,1,NULL,NULL),(741,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2817',737,'Créances douteuses',0,NULL,NULL,1,NULL,NULL),(742,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2819',737,'Réductions de valeurs actées',0,NULL,NULL,1,NULL,NULL),(743,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','282',731,'Participations dans des entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(744,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2820',743,'Valeur d\'acquisition (peut être subdivisé par participation)',0,NULL,NULL,1,NULL,NULL),(745,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2821',743,'Montants non appelés (idem)',0,NULL,NULL,1,NULL,NULL),(746,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2828',743,'Plus-values actées (idem)',0,NULL,NULL,1,NULL,NULL),(747,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2829',743,'Réductions de valeurs actées (idem)',0,NULL,NULL,1,NULL,NULL),(748,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','283',731,'Créances sur des entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(749,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2830',748,'Créances en compte',0,NULL,NULL,1,NULL,NULL),(750,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2831',748,'Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(751,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2832',748,'Titres à revenu fixe',0,NULL,NULL,1,NULL,NULL),(752,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2837',748,'Créances douteuses',0,NULL,NULL,1,NULL,NULL),(753,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2839',748,'Réductions de valeurs actées',0,NULL,NULL,1,NULL,NULL),(754,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','284',731,'Autres actions et parts',0,NULL,NULL,1,NULL,NULL),(755,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2840',754,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(756,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2841',754,'Montants non appelés',0,NULL,NULL,1,NULL,NULL),(757,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2848',754,'Plus-values actées',0,NULL,NULL,1,NULL,NULL),(758,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2849',754,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(759,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','285',731,'Autres créances',0,NULL,NULL,1,NULL,NULL),(760,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2850',759,'Créances en compte',0,NULL,NULL,1,NULL,NULL),(761,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2851',759,'Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(762,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2852',759,'Titres à revenu fixe',0,NULL,NULL,1,NULL,NULL),(763,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2857',759,'Créances douteuses',0,NULL,NULL,1,NULL,NULL),(764,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2859',759,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(765,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','288',731,'Cautionnements versés en numéraires',0,NULL,NULL,1,NULL,NULL),(766,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2880',765,'Téléphone, téléfax, télex',0,NULL,NULL,1,NULL,NULL),(767,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2881',765,'Gaz',0,NULL,NULL,1,NULL,NULL),(768,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2882',765,'Eau',0,NULL,NULL,1,NULL,NULL),(769,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2883',765,'Electricité',0,NULL,NULL,1,NULL,NULL),(770,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2887',765,'Autres cautionnements versés en numéraires',0,NULL,NULL,1,NULL,NULL),(771,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29',1352,'Créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(772,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','290',771,'Créances commerciales',0,NULL,NULL,1,NULL,NULL),(773,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2900',772,'Clients',0,NULL,NULL,1,NULL,NULL),(774,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29000',773,'Créances en compte sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(775,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29001',773,'Sur entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(776,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29002',773,'Sur clients Belgique',0,NULL,NULL,1,NULL,NULL),(777,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29003',773,'Sur clients C.E.E.',0,NULL,NULL,1,NULL,NULL),(778,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29004',773,'Sur clients exportation hors C.E.E.',0,NULL,NULL,1,NULL,NULL),(779,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29005',773,'Créances sur les coparticipants (associations momentanées)',0,NULL,NULL,1,NULL,NULL),(780,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2901',772,'Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(781,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29010',780,'Sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(782,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29011',780,'Sur entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(783,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29012',780,'Sur clients Belgique',0,NULL,NULL,1,NULL,NULL),(784,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29013',780,'Sur clients C.E.E.',0,NULL,NULL,1,NULL,NULL),(785,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29014',780,'Sur clients exportation hors C.E.E.',0,NULL,NULL,1,NULL,NULL),(786,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2905',772,'Retenues sur garanties',0,NULL,NULL,1,NULL,NULL),(787,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2906',772,'Acomptes versés',0,NULL,NULL,1,NULL,NULL),(788,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2907',772,'Créances douteuses (à ventiler comme clients 2900)',0,NULL,NULL,1,NULL,NULL),(789,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2909',772,'Réductions de valeur actées (à ventiler comme clients 2900)',0,NULL,NULL,1,NULL,NULL),(790,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','291',771,'Autres créances',0,NULL,NULL,1,NULL,NULL),(791,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2910',790,'Créances en compte',0,NULL,NULL,1,NULL,NULL),(792,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29100',791,'Sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(793,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29101',791,'Sur entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(794,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29102',791,'Sur autres débiteurs',0,NULL,NULL,1,NULL,NULL),(795,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2911',790,'Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(796,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29110',795,'Sur entreprises liées',0,NULL,NULL,1,NULL,NULL),(797,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29111',795,'Sur entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(798,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29112',795,'Sur autres débiteurs',0,NULL,NULL,1,NULL,NULL),(799,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2912',790,'Créances résultant de la cession d\'immobilisations données en leasing',0,NULL,NULL,1,NULL,NULL),(800,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2917',790,'Créances douteuses',0,NULL,NULL,1,NULL,NULL),(801,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2919',790,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(802,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','30',1353,'Approvisionnements - matières premières',0,NULL,NULL,1,NULL,NULL),(803,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','300',802,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(804,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','309',802,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(805,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31',1353,'Approvsionnements et fournitures',0,NULL,NULL,1,NULL,NULL),(806,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','310',805,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(807,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3100',806,'Matières d\'approvisionnement',0,NULL,NULL,1,NULL,NULL),(808,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3101',806,'Energie, charbon, coke, mazout, essence, propane',0,NULL,NULL,1,NULL,NULL),(809,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3102',806,'Produits d\'entretien',0,NULL,NULL,1,NULL,NULL),(810,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3103',806,'Fournitures diverses et petit outillage',0,NULL,NULL,1,NULL,NULL),(811,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3104',806,'Imprimés et fournitures de bureau',0,NULL,NULL,1,NULL,NULL),(812,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3105',806,'Fournitures de services sociaux',0,NULL,NULL,1,NULL,NULL),(813,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3106',806,'Emballages commerciaux',0,NULL,NULL,1,NULL,NULL),(814,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31060',813,'Emballages perdus',0,NULL,NULL,1,NULL,NULL),(815,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31061',813,'Emballages récupérables',0,NULL,NULL,1,NULL,NULL),(816,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','319',805,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(817,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','32',1353,'En cours de fabrication',0,NULL,NULL,1,NULL,NULL),(818,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','320',817,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(819,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3200',818,'Produits semi-ouvrés',0,NULL,NULL,1,NULL,NULL),(820,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3201',818,'Produits en cours de fabrication',0,NULL,NULL,1,NULL,NULL),(821,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3202',818,'Travaux en cours',0,NULL,NULL,1,NULL,NULL),(822,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3205',818,'Déchets',0,NULL,NULL,1,NULL,NULL),(823,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3206',818,'Rebuts',0,NULL,NULL,1,NULL,NULL),(824,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3209',818,'Travaux en association momentanée',0,NULL,NULL,1,NULL,NULL),(825,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','329',817,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(826,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','33',1353,'Produits finis',0,NULL,NULL,1,NULL,NULL),(827,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','330',826,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(828,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3300',827,'Produits finis',0,NULL,NULL,1,NULL,NULL),(829,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','339',826,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(830,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','34',1353,'Marchandises',0,NULL,NULL,1,NULL,NULL),(831,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','340',830,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(832,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3400',831,'Groupe A',0,NULL,NULL,1,NULL,NULL),(833,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3401',831,'Groupe B',0,NULL,NULL,1,NULL,NULL),(834,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3402',831,'Groupe C',0,NULL,NULL,1,NULL,NULL),(835,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','349',830,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(836,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','35',1353,'Immeubles destinés à la vente',0,NULL,NULL,1,NULL,NULL),(837,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','350',836,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(838,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3500',837,'Immeuble A',0,NULL,NULL,1,NULL,NULL),(839,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3501',837,'Immeuble B',0,NULL,NULL,1,NULL,NULL),(840,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3502',837,'Immeuble C',0,NULL,NULL,1,NULL,NULL),(841,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','351',836,'Immeubles construits en vue de leur revente',0,NULL,NULL,1,NULL,NULL),(842,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3510',841,'Immeuble A',0,NULL,NULL,1,NULL,NULL),(843,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3511',841,'Immeuble B',0,NULL,NULL,1,NULL,NULL),(844,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3512',841,'Immeuble C',0,NULL,NULL,1,NULL,NULL),(845,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','359',836,'Réductions de valeurs actées',0,NULL,NULL,1,NULL,NULL),(846,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','36',1353,'Acomptes versés sur achats pour stocks',0,NULL,NULL,1,NULL,NULL),(847,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','360',846,'Acomptes versés (à ventiler éventuellement par catégorie)',0,NULL,NULL,1,NULL,NULL),(848,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','369',846,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(849,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','37',1353,'Commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(850,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','370',849,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(851,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','371',849,'Bénéfice pris en compte',0,NULL,NULL,1,NULL,NULL),(852,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','379',849,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(853,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','40',1354,'Créances commerciales',0,NULL,NULL,1,NULL,NULL),(854,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','400',853,'Clients',0,NULL,NULL,1,NULL,NULL),(855,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4007',854,'Rabais, remises et ristournes à accorder et autres notes de crédit à établir',0,NULL,NULL,1,NULL,NULL),(856,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4008',854,'Créances résultant de livraisons de biens (associations momentanées)',0,NULL,NULL,1,NULL,NULL),(857,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','401',853,'Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(858,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4010',857,'Effets à recevoir',0,NULL,NULL,1,NULL,NULL),(859,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4013',857,'Effets à l\'encaissement',0,NULL,NULL,1,NULL,NULL),(860,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4015',857,'Effets à l\'escompte',0,NULL,NULL,1,NULL,NULL),(861,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','402',853,'Clients, créances courantes, entreprises apparentées, administrateurs et gérants',0,NULL,NULL,1,NULL,NULL),(862,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4020',861,'Entreprises liées',0,NULL,NULL,1,NULL,NULL),(863,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4021',861,'Autres entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(864,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4022',861,'Administrateurs et gérants d\'entreprise',0,NULL,NULL,1,NULL,NULL),(865,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','403',853,'Effets à recevoir sur entreprises apparentées et administrateurs et gérants',0,NULL,NULL,1,NULL,NULL),(866,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4030',865,'Entreprises liées',0,NULL,NULL,1,NULL,NULL),(867,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4031',865,'Autres entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(868,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4032',865,'Administrateurs et gérants de l\'entreprise',0,NULL,NULL,1,NULL,NULL),(869,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','404',853,'Produits à recevoir (factures à établir)',0,NULL,NULL,1,NULL,NULL),(870,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','405',853,'Clients : retenues sur garanties',0,NULL,NULL,1,NULL,NULL),(871,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','406',853,'Acomptes versés',0,NULL,NULL,1,NULL,NULL),(872,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','407',853,'Créances douteuses',0,NULL,NULL,1,NULL,NULL),(873,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','408',853,'Compensation clients',0,NULL,NULL,1,NULL,NULL),(874,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','409',853,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(875,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41',1354,'Autres créances',0,NULL,NULL,1,NULL,NULL),(876,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','410',875,'Capital appelé, non versé',0,NULL,NULL,1,NULL,NULL),(877,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4100',876,'Appels de fonds',0,NULL,NULL,1,NULL,NULL),(878,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4101',876,'Actionnaires défaillants',0,NULL,NULL,1,NULL,NULL),(879,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','411',875,'T.V.A. à récupérer',0,NULL,NULL,1,NULL,NULL),(880,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4110',879,'T.V.A. due',0,NULL,NULL,1,NULL,NULL),(881,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4111',879,'T.V.A. déductible',0,NULL,NULL,1,NULL,NULL),(882,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4112',879,'Compte courant administration T.V.A.',0,NULL,NULL,1,NULL,NULL),(883,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4118',879,'Taxe d\'égalisation due',0,NULL,NULL,1,NULL,NULL),(884,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','412',875,'Impôts et versements fiscaux à récupérer',0,NULL,NULL,1,NULL,NULL),(885,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4120',884,'Impôts belges sur le résultat',0,NULL,NULL,1,NULL,NULL),(886,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4125',884,'Autres impôts belges',0,NULL,NULL,1,NULL,NULL),(887,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4128',884,'Impôts étrangers',0,NULL,NULL,1,NULL,NULL),(888,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','414',875,'Produits à recevoir',0,NULL,NULL,1,NULL,NULL),(889,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','416',875,'Créances diverses',0,NULL,NULL,1,NULL,NULL),(890,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4160',889,'Associés (compte d\'apport en société)',0,NULL,NULL,1,NULL,NULL),(891,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4161',889,'Avances et prêts au personnel',0,NULL,NULL,1,NULL,NULL),(892,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4162',889,'Compte courant des associés en S.P.R.L.',0,NULL,NULL,1,NULL,NULL),(893,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4163',889,'Compte courant des administrateurs et gérants',0,NULL,NULL,1,NULL,NULL),(894,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4164',889,'Créances sur sociétés apparentées',0,NULL,NULL,1,NULL,NULL),(895,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4166',889,'Emballages et matériel à rendre',0,NULL,NULL,1,NULL,NULL),(896,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4167',889,'Etat et établissements publics',0,NULL,NULL,1,NULL,NULL),(897,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41670',896,'Subsides à recevoir',0,NULL,NULL,1,NULL,NULL),(898,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41671',896,'Autres créances',0,NULL,NULL,1,NULL,NULL),(899,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4168',889,'Rabais, ristournes et remises à obtenir et autres avoirs non encore reçus',0,NULL,NULL,1,NULL,NULL),(900,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','417',875,'Créances douteuses',0,NULL,NULL,1,NULL,NULL),(901,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','418',875,'Cautionnements versés en numéraires',0,NULL,NULL,1,NULL,NULL),(902,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','419',875,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(903,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','42',1354,'Dettes à plus d\'un an échéant dans l\'année',0,NULL,NULL,1,NULL,NULL),(904,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','420',903,'Emprunts subordonnés',0,NULL,NULL,1,NULL,NULL),(905,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4200',904,'Convertibles',0,NULL,NULL,1,NULL,NULL),(906,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4201',904,'Non convertibles',0,NULL,NULL,1,NULL,NULL),(907,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','421',903,'Emprunts obligataires non subordonnés',0,NULL,NULL,1,NULL,NULL),(908,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4210',907,'Convertibles',0,NULL,NULL,1,NULL,NULL),(909,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4211',907,'Non convertibles',0,NULL,NULL,1,NULL,NULL),(910,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','422',903,'Dettes de location-financement et assimilées',0,NULL,NULL,1,NULL,NULL),(911,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4220',910,'Financement de biens immobiliers',0,NULL,NULL,1,NULL,NULL),(912,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4221',910,'Financement de biens mobiliers',0,NULL,NULL,1,NULL,NULL),(913,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','423',903,'Etablissements de crédit',0,NULL,NULL,1,NULL,NULL),(914,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4230',913,'Dettes en compte',0,NULL,NULL,1,NULL,NULL),(915,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4231',913,'Promesses',0,NULL,NULL,1,NULL,NULL),(916,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4232',913,'Crédits d\'acceptation',0,NULL,NULL,1,NULL,NULL),(917,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','424',903,'Autres emprunts',0,NULL,NULL,1,NULL,NULL),(918,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','425',903,'Dettes commerciales',0,NULL,NULL,1,NULL,NULL),(919,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4250',918,'Fournisseurs',0,NULL,NULL,1,NULL,NULL),(920,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4251',918,'Effets à payer',0,NULL,NULL,1,NULL,NULL),(921,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','426',903,'Cautionnements reçus en numéraires',0,NULL,NULL,1,NULL,NULL),(922,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','429',903,'Dettes diverses',0,NULL,NULL,1,NULL,NULL),(923,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4290',922,'Entreprises liées',0,NULL,NULL,1,NULL,NULL),(924,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4291',922,'Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(925,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4292',922,'Administrateurs, gérants, associés',0,NULL,NULL,1,NULL,NULL),(926,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4299',922,'Autres dettes',0,NULL,NULL,1,NULL,NULL),(927,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','43',1354,'Dettes financières',0,NULL,NULL,1,NULL,NULL),(928,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','430',927,'Etablissements de crédit. Emprunts en compte à terme fixe',0,NULL,NULL,1,NULL,NULL),(929,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','431',927,'Etablissements de crédit. Promesses',0,NULL,NULL,1,NULL,NULL),(930,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','432',927,'Etablissements de crédit. Crédits d\'acceptation',0,NULL,NULL,1,NULL,NULL),(931,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','433',927,'Etablissements de crédit. Dettes en compte courant',0,NULL,NULL,1,NULL,NULL),(932,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','439',927,'Autres emprunts',0,NULL,NULL,1,NULL,NULL),(933,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44',1354,'Dettes commerciales',0,NULL,NULL,1,NULL,NULL),(934,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','440',933,'Fournisseurs',0,NULL,NULL,1,NULL,NULL),(935,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4400',934,'Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(936,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44000',935,'Entreprises liées',0,NULL,NULL,1,NULL,NULL),(937,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44001',935,'Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(938,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4401',934,'Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(939,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44010',938,'Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(940,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44011',938,'Fournisseurs CEE',0,NULL,NULL,1,NULL,NULL),(941,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44012',938,'Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(942,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4402',934,'Dettes envers les coparticipants (associations momentanées)',0,NULL,NULL,1,NULL,NULL),(943,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4403',934,'Fournisseurs - retenues de garanties',0,NULL,NULL,1,NULL,NULL),(944,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','441',933,'Effets à payer',0,NULL,NULL,1,NULL,NULL),(945,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4410',944,'Entreprises apparentées',0,NULL,NULL,1,NULL,NULL),(946,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44100',945,'Entreprises liées',0,NULL,NULL,1,NULL,NULL),(947,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44101',945,'Entreprises avec lesquelles il existe un lien de participation',0,NULL,NULL,1,NULL,NULL),(948,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4411',944,'Fournisseurs ordinaires',0,NULL,NULL,1,NULL,NULL),(949,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44110',948,'Fournisseurs belges',0,NULL,NULL,1,NULL,NULL),(950,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44111',948,'Fournisseurs CEE',0,NULL,NULL,1,NULL,NULL),(951,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44112',948,'Fournisseurs importation',0,NULL,NULL,1,NULL,NULL),(952,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','444',933,'Factures à recevoir',0,NULL,NULL,1,NULL,NULL),(953,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','446',933,'Acomptes reçus',0,NULL,NULL,1,NULL,NULL),(954,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','448',933,'Compensations fournisseurs',0,NULL,NULL,1,NULL,NULL),(955,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45',1354,'Dettes fiscales, salariales et sociales',0,NULL,NULL,1,NULL,NULL),(956,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','450',955,'Dettes fiscales estimées',0,NULL,NULL,1,NULL,NULL),(957,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4501',956,'Impôts sur le résultat',0,NULL,NULL,1,NULL,NULL),(958,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4505',956,'Autres impôts en Belgique',0,NULL,NULL,1,NULL,NULL),(959,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4508',956,'Impôts à l\'étranger',0,NULL,NULL,1,NULL,NULL),(960,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','451',955,'T.V.A. à payer',0,NULL,NULL,1,NULL,NULL),(961,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4510',960,'T.V.A. due',0,NULL,NULL,1,NULL,NULL),(962,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4511',960,'T.V.A. déductible',0,NULL,NULL,1,NULL,NULL),(963,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4512',960,'Compte courant administration T.V.A.',0,NULL,NULL,1,NULL,NULL),(964,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4518',960,'Taxe d\'égalisation due',0,NULL,NULL,1,NULL,NULL),(965,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','452',955,'Impôts et taxes à payer',0,NULL,NULL,1,NULL,NULL),(966,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4520',965,'Autres impôts sur le résultat',0,NULL,NULL,1,NULL,NULL),(967,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4525',965,'Autres impôts et taxes en Belgique',0,NULL,NULL,1,NULL,NULL),(968,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45250',967,'Précompte immobilier',0,NULL,NULL,1,NULL,NULL),(969,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45251',967,'Impôts communaux à payer',0,NULL,NULL,1,NULL,NULL),(970,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45252',967,'Impôts provinciaux à payer',0,NULL,NULL,1,NULL,NULL),(971,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45253',967,'Autres impôts et taxes à payer',0,NULL,NULL,1,NULL,NULL),(972,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4528',965,'Impôts et taxes à l\'étranger',0,NULL,NULL,1,NULL,NULL),(973,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','453',955,'Précomptes retenus',0,NULL,NULL,1,NULL,NULL),(974,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4530',973,'Précompte professionnel retenu sur rémunérations',0,NULL,NULL,1,NULL,NULL),(975,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4531',973,'Précompte professionnel retenu sur tantièmes',0,NULL,NULL,1,NULL,NULL),(976,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4532',973,'Précompte mobilier retenu sur dividendes attribués',0,NULL,NULL,1,NULL,NULL),(977,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4533',973,'Précompte mobilier retenu sur intérêts payés',0,NULL,NULL,1,NULL,NULL),(978,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4538',973,'Autres précomptes retenus',0,NULL,NULL,1,NULL,NULL),(979,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','454',955,'Office National de la Sécurité Sociale',0,NULL,NULL,1,NULL,NULL),(980,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4540',979,'Arriérés',0,NULL,NULL,1,NULL,NULL),(981,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4541',979,'1er trimestre',0,NULL,NULL,1,NULL,NULL),(982,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4542',979,'2ème trimestre',0,NULL,NULL,1,NULL,NULL),(983,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4543',979,'3ème trimestre',0,NULL,NULL,1,NULL,NULL),(984,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4544',979,'4ème trimestre',0,NULL,NULL,1,NULL,NULL),(985,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','455',955,'Rémunérations',0,NULL,NULL,1,NULL,NULL),(986,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4550',985,'Administrateurs, gérants et commissaires (non réviseurs)',0,NULL,NULL,1,NULL,NULL),(987,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4551',985,'Direction',0,NULL,NULL,1,NULL,NULL),(988,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4552',985,'Employés',0,NULL,NULL,1,NULL,NULL),(989,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4553',985,'Ouvriers',0,NULL,NULL,1,NULL,NULL),(990,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','456',955,'Pécules de vacances',0,NULL,NULL,1,NULL,NULL),(991,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4560',990,'Direction',0,NULL,NULL,1,NULL,NULL),(992,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4561',990,'Employés',0,NULL,NULL,1,NULL,NULL),(993,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4562',990,'Ouvriers',0,NULL,NULL,1,NULL,NULL),(994,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','459',955,'Autres dettes sociales',0,NULL,NULL,1,NULL,NULL),(995,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4590',994,'Provision pour gratifications de fin d\'année',0,NULL,NULL,1,NULL,NULL),(996,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4591',994,'Départs de personnel',0,NULL,NULL,1,NULL,NULL),(997,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4592',994,'Oppositions sur rémunérations',0,NULL,NULL,1,NULL,NULL),(998,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4593',994,'Assurances relatives au personnel',0,NULL,NULL,1,NULL,NULL),(999,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45930',998,'Assurance loi',0,NULL,NULL,1,NULL,NULL),(1000,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45931',998,'Assurance salaire garanti',0,NULL,NULL,1,NULL,NULL),(1001,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45932',998,'Assurance groupe',0,NULL,NULL,1,NULL,NULL),(1002,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45933',998,'Assurances individuelles',0,NULL,NULL,1,NULL,NULL),(1003,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4594',994,'Caisse d\'assurances sociales pour travailleurs indépendants',0,NULL,NULL,1,NULL,NULL),(1004,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4597',994,'Dettes et provisions sociales diverses',0,NULL,NULL,1,NULL,NULL),(1005,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','46',1354,'Acomptes reçus sur commande',0,NULL,NULL,1,NULL,NULL),(1006,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','47',1354,'Dettes découlant de l\'affectation des résultats',0,NULL,NULL,1,NULL,NULL),(1007,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','470',1006,'Dividendes et tantièmes d\'exercices antérieurs',0,NULL,NULL,1,NULL,NULL),(1008,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','471',1006,'Dividendes de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1009,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','472',1006,'Tantièmes de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1010,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','473',1006,'Autres allocataires',0,NULL,NULL,1,NULL,NULL),(1011,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','48',4,'Dettes diverses',0,NULL,NULL,1,NULL,NULL),(1012,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','480',1011,'Obligations et coupons échus',0,NULL,NULL,1,NULL,NULL),(1013,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','481',1011,'Actionnaires - capital à rembourser',0,NULL,NULL,1,NULL,NULL),(1014,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','482',1011,'Participation du personnel à payer',0,NULL,NULL,1,NULL,NULL),(1015,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','483',1011,'Acomptes reçus d\'autres tiers à moins d\'un an',0,NULL,NULL,1,NULL,NULL),(1016,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','486',1011,'Emballages et matériel consignés',0,NULL,NULL,1,NULL,NULL),(1017,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','488',1011,'Cautionnements reçus en numéraires',0,NULL,NULL,1,NULL,NULL),(1018,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','489',1011,'Autres dettes diverses',0,NULL,NULL,1,NULL,NULL),(1019,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49',1354,'Comptes de régularisation et compte d\'attente',0,NULL,NULL,1,NULL,NULL),(1020,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','490',1019,'Charges à reporter (à subdiviser par catégorie de charges)',0,NULL,NULL,1,NULL,NULL),(1021,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','491',1019,'Produits acquis',0,NULL,NULL,1,NULL,NULL),(1022,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4910',1021,'Produits d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1023,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49100',1022,'Ristournes et rabais à obtenir',0,NULL,NULL,1,NULL,NULL),(1024,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49101',1022,'Commissions à obtenir',0,NULL,NULL,1,NULL,NULL),(1025,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49102',1022,'Autres produits d\'exploitation (redevances par exemple)',0,NULL,NULL,1,NULL,NULL),(1026,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4911',1021,'Produits financiers',0,NULL,NULL,1,NULL,NULL),(1027,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49110',1026,'Intérêts courus et non échus sur prêts et débits',0,NULL,NULL,1,NULL,NULL),(1028,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49111',1026,'Autres produits financiers',0,NULL,NULL,1,NULL,NULL),(1029,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','492',1019,'Charges à imputer (à subdiviser par catégorie de charges)',0,NULL,NULL,1,NULL,NULL),(1030,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','493',1019,'Produits à reporter',0,NULL,NULL,1,NULL,NULL),(1031,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4930',1030,'Produits d\'exploitation à reporter',0,NULL,NULL,1,NULL,NULL),(1032,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4931',1030,'Produits financiers à reporter',0,NULL,NULL,1,NULL,NULL),(1033,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','499',1019,'Comptes d\'attente',0,NULL,NULL,1,NULL,NULL),(1034,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4990',1033,'Compte d\'attente',0,NULL,NULL,1,NULL,NULL),(1035,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4991',1033,'Compte de répartition périodique des charges',0,NULL,NULL,1,NULL,NULL),(1036,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4999',1033,'Transferts d\'exercice',0,NULL,NULL,1,NULL,NULL),(1037,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','50',1355,'Actions propres',0,NULL,NULL,1,NULL,NULL),(1038,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','51',1355,'Actions et parts',0,NULL,NULL,1,NULL,NULL),(1039,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','510',1038,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(1040,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','511',1038,'Montants non appelés',0,NULL,NULL,1,NULL,NULL),(1041,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','519',1038,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1042,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','52',1355,'Titres à revenus fixes',0,NULL,NULL,1,NULL,NULL),(1043,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','520',1042,'Valeur d\'acquisition',0,NULL,NULL,1,NULL,NULL),(1044,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','529',1042,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1045,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','53',1355,'Dépots à terme',0,NULL,NULL,1,NULL,NULL),(1046,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','530',1045,'De plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1047,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','531',1045,'De plus d\'un mois et à un an au plus',0,NULL,NULL,1,NULL,NULL),(1048,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','532',1045,'d\'un mois au plus',0,NULL,NULL,1,NULL,NULL),(1049,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','539',1045,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1050,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','54',1355,'Valeurs échues à l\'encaissement',0,NULL,NULL,1,NULL,NULL),(1051,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','540',1050,'Chèques à encaisser',0,NULL,NULL,1,NULL,NULL),(1052,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','541',1050,'Coupons à encaisser',0,NULL,NULL,1,NULL,NULL),(1053,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','55',1355,'Etablissements de crédit - Comptes ouverts auprès des divers établissements.',0,NULL,NULL,1,NULL,NULL),(1054,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','550',1053,'Comptes courants',0,NULL,NULL,1,NULL,NULL),(1055,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','551',1053,'Chèques émis',0,NULL,NULL,1,NULL,NULL),(1056,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','559',1053,'Réductions de valeur actées',0,NULL,NULL,1,NULL,NULL),(1057,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','56',1355,'Office des chèques postaux',0,NULL,NULL,1,NULL,NULL),(1058,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','560',1057,'Compte courant',0,NULL,NULL,1,NULL,NULL),(1059,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','561',1057,'Chèques émis',0,NULL,NULL,1,NULL,NULL),(1060,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','57',1355,'Caisses',0,NULL,NULL,1,NULL,NULL),(1061,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','570',1060,'à 577 Caisses - espèces ( 0 - centrale ; 7 - succursales et agences)',0,NULL,NULL,1,NULL,NULL),(1062,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','578',1060,'Caisses - timbres ( 0 - fiscaux ; 1 - postaux)',0,NULL,NULL,1,NULL,NULL),(1063,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','58',1355,'Virements internes',0,NULL,NULL,1,NULL,NULL),(1064,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','60',1356,'Approvisionnements et marchandises',0,NULL,NULL,1,NULL,NULL),(1065,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','600',1064,'Achats de matières premières',0,NULL,NULL,1,NULL,NULL),(1066,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','601',1064,'Achats de fournitures',0,NULL,NULL,1,NULL,NULL),(1067,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','602',1064,'Achats de services, travaux et études',0,NULL,NULL,1,NULL,NULL),(1068,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','603',1064,'Sous-traitances générales',0,NULL,NULL,1,NULL,NULL),(1069,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','604',1064,'Achats de marchandises',0,NULL,NULL,1,NULL,NULL),(1070,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','605',1064,'Achats d\'immeubles destinés à la revente',0,NULL,NULL,1,NULL,NULL),(1071,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','608',1064,'Remises , ristournes et rabais obtenus sur achats',0,NULL,NULL,1,NULL,NULL),(1072,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','609',1064,'Variations de stocks',0,NULL,NULL,1,NULL,NULL),(1073,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6090',1072,'De matières premières',0,NULL,NULL,1,NULL,NULL),(1074,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6091',1072,'De fournitures',0,NULL,NULL,1,NULL,NULL),(1075,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6094',1072,'De marchandises',0,NULL,NULL,1,NULL,NULL),(1076,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6095',1072,'d\'immeubles destinés à la vente',0,NULL,NULL,1,NULL,NULL),(1077,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61',1356,'Services et biens divers',0,NULL,NULL,1,NULL,NULL),(1078,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','610',1077,'Loyers et charges locatives',0,NULL,NULL,1,NULL,NULL),(1079,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6100',1078,'Loyers divers',0,NULL,NULL,1,NULL,NULL),(1080,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6101',1078,'Charges locatives (assurances, frais de confort,etc)',0,NULL,NULL,1,NULL,NULL),(1081,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','611',1077,'Entretien et réparation (fournitures et prestations)',0,NULL,NULL,1,NULL,NULL),(1082,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','612',1077,'Fournitures faites à l\'entreprise',0,NULL,NULL,1,NULL,NULL),(1083,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6120',1082,'Eau, gaz, électricité, vapeur',0,NULL,NULL,1,NULL,NULL),(1084,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61200',1083,'Eau',0,NULL,NULL,1,NULL,NULL),(1085,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61201',1083,'Gaz',0,NULL,NULL,1,NULL,NULL),(1086,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61202',1083,'Electricité',0,NULL,NULL,1,NULL,NULL),(1087,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61203',1083,'Vapeur',0,NULL,NULL,1,NULL,NULL),(1088,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6121',1082,'Téléphone, télégrammes, télex, téléfax, frais postaux',0,NULL,NULL,1,NULL,NULL),(1089,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61210',1088,'Téléphone',0,NULL,NULL,1,NULL,NULL),(1090,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61211',1088,'Télégrammes',0,NULL,NULL,1,NULL,NULL),(1091,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61212',1088,'Télex et téléfax',0,NULL,NULL,1,NULL,NULL),(1092,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61213',1088,'Frais postaux',0,NULL,NULL,1,NULL,NULL),(1093,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6122',1082,'Livres, bibliothèque',0,NULL,NULL,1,NULL,NULL),(1094,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6123',1082,'Imprimés et fournitures de bureau (si non comptabilisé au 601)',0,NULL,NULL,1,NULL,NULL),(1095,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','613',1077,'Rétributions de tiers',0,NULL,NULL,1,NULL,NULL),(1096,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6130',1095,'Redevances et royalties',0,NULL,NULL,1,NULL,NULL),(1097,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61300',1096,'Redevances pour brevets, licences, marques et accessoires',0,NULL,NULL,1,NULL,NULL),(1098,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61301',1096,'Autres redevances (procédés de fabrication)',0,NULL,NULL,1,NULL,NULL),(1099,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6131',1095,'Assurances non relatives au personnel',0,NULL,NULL,1,NULL,NULL),(1100,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61310',1099,'Assurance incendie',0,NULL,NULL,1,NULL,NULL),(1101,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61311',1099,'Assurance vol',0,NULL,NULL,1,NULL,NULL),(1102,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61312',1099,'Assurance autos',0,NULL,NULL,1,NULL,NULL),(1103,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61313',1099,'Assurance crédit',0,NULL,NULL,1,NULL,NULL),(1104,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61314',1099,'Assurances frais généraux',0,NULL,NULL,1,NULL,NULL),(1105,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6132',1095,'Divers',0,NULL,NULL,1,NULL,NULL),(1106,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61320',1105,'Commissions aux tiers',0,NULL,NULL,1,NULL,NULL),(1107,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61321',1105,'Honoraires d\'avocats, d\'experts, etc',0,NULL,NULL,1,NULL,NULL),(1108,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61322',1105,'Cotisations aux groupements professionnels',0,NULL,NULL,1,NULL,NULL),(1109,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61323',1105,'Dons, libéralités, etc',0,NULL,NULL,1,NULL,NULL),(1110,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61324',1105,'Frais de contentieux',0,NULL,NULL,1,NULL,NULL),(1111,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61325',1105,'Publications légales',0,NULL,NULL,1,NULL,NULL),(1112,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6133',1095,'Transports et déplacements',0,NULL,NULL,1,NULL,NULL),(1113,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61330',1112,'Transports de personnel',0,NULL,NULL,1,NULL,NULL),(1114,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','61331',1112,'Voyages, déplacements et représentations',0,NULL,NULL,1,NULL,NULL),(1115,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6134',1095,'Personnel intérimaire',0,NULL,NULL,1,NULL,NULL),(1116,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','614',1077,'Annonces, publicité, propagande et documentation',0,NULL,NULL,1,NULL,NULL),(1117,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6140',1116,'Annonces et insertions',0,NULL,NULL,1,NULL,NULL),(1118,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6141',1116,'Catalogues et imprimés',0,NULL,NULL,1,NULL,NULL),(1119,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6142',1116,'Echantillons',0,NULL,NULL,1,NULL,NULL),(1120,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6143',1116,'Foires et expositions',0,NULL,NULL,1,NULL,NULL),(1121,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6144',1116,'Primes',0,NULL,NULL,1,NULL,NULL),(1122,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6145',1116,'Cadeaux à la clientèle',0,NULL,NULL,1,NULL,NULL),(1123,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6146',1116,'Missions et réceptions',0,NULL,NULL,1,NULL,NULL),(1124,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6147',1116,'Documentation',0,NULL,NULL,1,NULL,NULL),(1125,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','615',1077,'Sous-traitants',0,NULL,NULL,1,NULL,NULL),(1126,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6150',1125,'Sous-traitants pour activités propres',0,NULL,NULL,1,NULL,NULL),(1127,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6151',1125,'Sous-traitants d\'associations momentanées (coparticipants)',0,NULL,NULL,1,NULL,NULL),(1128,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6152',1125,'Quote-part bénéficiaire des coparticipants',0,NULL,NULL,1,NULL,NULL),(1129,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','617',1077,'Personnel intérimaire et personnes mises à la disposition de l\'entreprise',0,NULL,NULL,1,NULL,NULL),(1130,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','618',1077,'Rémunérations, primes pour assurances extralégales, pensions de retraite et de survie des administrateurs, gérants et associés actifs qui ne sont pas attribuées en vertu d\'un contrat de travail',0,NULL,NULL,1,NULL,NULL),(1131,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62',1356,'Rémunérations, charges sociales et pensions',0,NULL,NULL,1,NULL,NULL),(1132,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','620',1131,'Rémunérations et avantages sociaux directs',0,NULL,NULL,1,NULL,NULL),(1133,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6200',1132,'Administrateurs ou gérants',0,NULL,NULL,1,NULL,NULL),(1134,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6201',1132,'Personnel de direction',0,NULL,NULL,1,NULL,NULL),(1135,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6202',1132,'Employés',0,NULL,NULL,1,NULL,NULL),(1136,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6203',1132,'Ouvriers',0,NULL,NULL,1,NULL,NULL),(1137,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6204',1132,'Autres membres du personnel',0,NULL,NULL,1,NULL,NULL),(1138,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','621',1131,'Cotisations patronales d\'assurances sociales',0,NULL,NULL,1,NULL,NULL),(1139,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6210',1138,'Sur salaires',0,NULL,NULL,1,NULL,NULL),(1140,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6211',1138,'Sur appointements et commissions',0,NULL,NULL,1,NULL,NULL),(1141,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','622',1131,'Primes patronales pour assurances extralégales',0,NULL,NULL,1,NULL,NULL),(1142,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','623',1131,'Autres frais de personnel',0,NULL,NULL,1,NULL,NULL),(1143,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6230',1142,'Assurances du personnel',0,NULL,NULL,1,NULL,NULL),(1144,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62300',1143,'Assurances loi, responsabilité civile, chemin du travail',0,NULL,NULL,1,NULL,NULL),(1145,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62301',1143,'Assurance salaire garanti',0,NULL,NULL,1,NULL,NULL),(1146,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62302',1143,'Assurances individuelles',0,NULL,NULL,1,NULL,NULL),(1147,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6231',1142,'Charges sociales diverses',0,NULL,NULL,1,NULL,NULL),(1148,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62310',1147,'Jours fériés payés',0,NULL,NULL,1,NULL,NULL),(1149,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62311',1147,'Salaire hebdomadaire garanti',0,NULL,NULL,1,NULL,NULL),(1150,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62312',1147,'Allocations familiales complémentaires',0,NULL,NULL,1,NULL,NULL),(1151,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6232',1142,'Charges sociales des administrateurs, gérants et commissaires',0,NULL,NULL,1,NULL,NULL),(1152,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62320',1151,'Allocations familiales complémentaires pour non salariés',0,NULL,NULL,1,NULL,NULL),(1153,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62321',1151,'Lois sociales pour indépendants',0,NULL,NULL,1,NULL,NULL),(1154,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','62322',1151,'Divers',0,NULL,NULL,1,NULL,NULL),(1155,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','624',1131,'Pensions de retraite et de survie',0,NULL,NULL,1,NULL,NULL),(1156,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6240',1155,'Administrateurs et gérants',0,NULL,NULL,1,NULL,NULL),(1157,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6241',1155,'Personnel',0,NULL,NULL,1,NULL,NULL),(1158,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','625',1131,'Provision pour pécule de vacances',0,NULL,NULL,1,NULL,NULL),(1159,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6250',1158,'Dotations',0,NULL,NULL,1,NULL,NULL),(1160,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6251',1158,'Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1161,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','63',1356,'Amortissements, réductions de valeur et provisions pour risques et charges',0,NULL,NULL,1,NULL,NULL),(1162,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','630',1161,'Dotations aux amortissements et aux réductions de valeur sur immobilisations',0,NULL,NULL,1,NULL,NULL),(1163,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6300',1162,'Dotations aux amortissements sur frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(1164,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6301',1162,'Dotations aux amortissements sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1165,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6302',1162,'Dotations aux amortissements sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1166,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6308',1162,'Dotations aux réductions de valeur sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1167,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6309',1162,'Dotations aux réductions de valeur sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1168,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','631',1161,'Réductions de valeur sur stocks',0,NULL,NULL,1,NULL,NULL),(1169,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6310',1168,'Dotations',0,NULL,NULL,1,NULL,NULL),(1170,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6311',1168,'Reprises',0,NULL,NULL,1,NULL,NULL),(1171,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','632',1161,'Réductions de valeur sur commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1172,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6320',1171,'Dotations',0,NULL,NULL,1,NULL,NULL),(1173,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6321',1171,'Reprises',0,NULL,NULL,1,NULL,NULL),(1174,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','633',1161,'Réductions de valeur sur créances commerciales à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1175,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6330',1174,'Dotations',0,NULL,NULL,1,NULL,NULL),(1176,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6331',1174,'Reprises',0,NULL,NULL,1,NULL,NULL),(1177,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','634',1161,'Réductions de valeur sur créances commerciales à un an au plus',0,NULL,NULL,1,NULL,NULL),(1178,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6340',1177,'Dotations',0,NULL,NULL,1,NULL,NULL),(1179,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6341',1177,'Reprises',0,NULL,NULL,1,NULL,NULL),(1180,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','635',1161,'Provisions pour pensions et obligations similaires',0,NULL,NULL,1,NULL,NULL),(1181,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6350',1180,'Dotations',0,NULL,NULL,1,NULL,NULL),(1182,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6351',1180,'Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1183,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','636',11613,'Provisions pour grosses réparations et gros entretiens',0,NULL,NULL,1,NULL,NULL),(1184,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6360',1183,'Dotations',0,NULL,NULL,1,NULL,NULL),(1185,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6361',1183,'Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1186,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','637',1161,'Provisions pour autres risques et charges',0,NULL,NULL,1,NULL,NULL),(1187,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6370',1186,'Dotations',0,NULL,NULL,1,NULL,NULL),(1188,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6371',1186,'Utilisations et reprises',0,NULL,NULL,1,NULL,NULL),(1189,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64',1356,'Autres charges d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1190,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','640',1189,'Charges fiscales d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1191,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6400',1190,'Taxes et impôts directs',0,NULL,NULL,1,NULL,NULL),(1192,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64000',1191,'Taxes sur autos et camions',0,NULL,NULL,1,NULL,NULL),(1193,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6401',1190,'Taxes et impôts indirects',0,NULL,NULL,1,NULL,NULL),(1194,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64010',1193,'Timbres fiscaux pris en charge par la firme',0,NULL,NULL,1,NULL,NULL),(1195,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64011',1193,'Droits d\'enregistrement',0,NULL,NULL,1,NULL,NULL),(1196,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64012',1193,'T.V.A. non déductible',0,NULL,NULL,1,NULL,NULL),(1197,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6402',1190,'Impôts provinciaux et communaux',0,NULL,NULL,1,NULL,NULL),(1198,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64020',1197,'Taxe sur la force motrice',0,NULL,NULL,1,NULL,NULL),(1199,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','64021',1197,'Taxe sur le personnel occupé',0,NULL,NULL,1,NULL,NULL),(1200,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6403',1190,'Taxes diverses',0,NULL,NULL,1,NULL,NULL),(1201,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','641',1189,'Moins-values sur réalisations courantes d\'immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1202,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','642',1189,'Moins-values sur réalisations de créances commerciales',0,NULL,NULL,1,NULL,NULL),(1203,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','643',1189,'à 648 Charges d\'exploitations diverses',0,NULL,NULL,1,NULL,NULL),(1204,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','649',1189,'Charges d\'exploitation portées à l\'actif au titre de restructuration',0,NULL,NULL,1,NULL,NULL),(1205,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','65',1356,'Charges financières',0,NULL,NULL,1,NULL,NULL),(1206,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','650',1205,'Charges des dettes',0,NULL,NULL,1,NULL,NULL),(1207,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6500',1206,'Intérêts, commissions et frais afférents aux dettes',0,NULL,NULL,1,NULL,NULL),(1208,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6501',1206,'Amortissements des agios et frais d\'émission d\'emprunts',0,NULL,NULL,1,NULL,NULL),(1209,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6502',1206,'Autres charges de dettes',0,NULL,NULL,1,NULL,NULL),(1210,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6503',1206,'Intérêts intercalaires portés à l\'actif',0,NULL,NULL,1,NULL,NULL),(1211,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','651',1205,'Réductions de valeur sur actifs circulants',0,NULL,NULL,1,NULL,NULL),(1212,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6510',1211,'Dotations',0,NULL,NULL,1,NULL,NULL),(1213,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6511',1211,'Reprises',0,NULL,NULL,1,NULL,NULL),(1214,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','652',1205,'Moins-values sur réalisation d\'actifs circulants',0,NULL,NULL,1,NULL,NULL),(1215,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','653',1205,'Charges d\'escompte de créances',0,NULL,NULL,1,NULL,NULL),(1216,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','654',1205,'Différences de change',0,NULL,NULL,1,NULL,NULL),(1217,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','655',1205,'Ecarts de conversion des devises',0,NULL,NULL,1,NULL,NULL),(1218,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','656',1205,'Frais de banques, de chèques postaux',0,NULL,NULL,1,NULL,NULL),(1219,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','657',1205,'Commissions sur ouvertures de crédit, cautions et avals',0,NULL,NULL,1,NULL,NULL),(1220,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','658',1205,'Frais de vente des titres',0,NULL,NULL,1,NULL,NULL),(1221,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','66',1356,'Charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(1222,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','660',1221,'Amortissements et réductions de valeur exceptionnels',0,NULL,NULL,1,NULL,NULL),(1223,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6600',1222,'Sur frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(1224,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6601',1222,'Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1225,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6602',1222,'Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1226,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','661',1221,'Réductions de valeur sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1227,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','662',1221,'Provisions pour risques et charges exceptionnels',0,NULL,NULL,1,NULL,NULL),(1228,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','663',1221,'Moins-values sur réalisation d\'actifs immobilisés',0,NULL,NULL,1,NULL,NULL),(1229,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6630',1228,'Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1230,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6631',1228,'Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1231,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6632',1228,'Sur immobilisations détenues en location-financement et droits similaires',0,NULL,NULL,1,NULL,NULL),(1232,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6633',1228,'Sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1233,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6634',1228,'Sur immeubles acquis ou construits en vue de la revente',0,NULL,NULL,1,NULL,NULL),(1234,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','664',1221,'à 668 Autres charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(1236,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','665',1221,'Différence de charge',0,NULL,NULL,1,NULL,NULL),(1237,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','669',1221,'Charges exceptionnelles transférées à l\'actif en frais de restructuration',0,NULL,NULL,1,NULL,NULL),(1238,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','67',1356,'Impôts sur le résultat',0,NULL,NULL,1,NULL,NULL),(1239,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','670',1238,'Impôts belges sur le résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1240,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6700',1239,'Impôts et précomptes dus ou versés',0,NULL,NULL,1,NULL,NULL),(1241,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6701',1239,'Excédent de versements d\'impôts et précomptes porté à l\'actif',0,NULL,NULL,1,NULL,NULL),(1242,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6702',1239,'Charges fiscales estimées',0,NULL,NULL,1,NULL,NULL),(1243,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','671',1238,'Impôts belges sur le résultat d\'exercices antérieurs',0,NULL,NULL,1,NULL,NULL),(1244,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6710',1243,'Suppléments d\'impôts dus ou versés',0,NULL,NULL,1,NULL,NULL),(1245,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6711',1243,'Suppléments d\'impôts estimés',0,NULL,NULL,1,NULL,NULL),(1246,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6712',1243,'Provisions fiscales constituées',0,NULL,NULL,1,NULL,NULL),(1247,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','672',1238,'Impôts étrangers sur le résultat de l\'exercice',0,NULL,NULL,1,NULL,NULL),(1248,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','673',1238,'Impôts étrangers sur le résultat d\'exercices antérieurs',0,NULL,NULL,1,NULL,NULL),(1249,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','68',1356,'Transferts aux réserves immunisées',0,NULL,NULL,1,NULL,NULL),(1250,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','69',1356,'Affectation des résultats',0,NULL,NULL,1,NULL,NULL),(1251,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','690',1250,'Perte reportée de l\'exercice précédent',0,NULL,NULL,1,NULL,NULL),(1252,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','691',1250,'Dotation à la réserve légale',0,NULL,NULL,1,NULL,NULL),(1253,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','692',1250,'Dotation aux autres réserves',0,NULL,NULL,1,NULL,NULL),(1254,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','693',1250,'Bénéfice à reporter',0,NULL,NULL,1,NULL,NULL),(1255,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','694',1250,'Rémunération du capital',0,NULL,NULL,1,NULL,NULL),(1256,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','695',1250,'Administrateurs ou gérants',0,NULL,NULL,1,NULL,NULL),(1257,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','696',1250,'Autres allocataires',0,NULL,NULL,1,NULL,NULL),(1258,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','70',1357,'Chiffre d\'affaires',0,NULL,NULL,1,NULL,NULL),(1260,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','700',1258,'Ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(1261,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7000',1260,'Ventes en Belgique',0,NULL,NULL,1,NULL,NULL),(1262,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7001',1260,'Ventes dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1263,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7002',1260,'Ventes à l\'exportation',0,NULL,NULL,1,NULL,NULL),(1264,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','701',1258,'Ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(1265,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7010',1264,'Ventes en Belgique',0,NULL,NULL,1,NULL,NULL),(1266,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7011',1264,'Ventes dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1267,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7012',1264,'Ventes à l\'exportation',0,NULL,NULL,1,NULL,NULL),(1268,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','702',1258,'Ventes de déchets et rebuts',0,NULL,NULL,1,NULL,NULL),(1269,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7020',1268,'Ventes en Belgique',0,NULL,NULL,1,NULL,NULL),(1270,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7021',1268,'Ventes dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1271,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7022',1268,'Ventes à l\'exportation',0,NULL,NULL,1,NULL,NULL),(1272,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','703',1258,'Ventes d\'emballages récupérables',0,NULL,NULL,1,NULL,NULL),(1273,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','704',1258,'Facturations des travaux en cours (associations momentanées)',0,NULL,NULL,1,NULL,NULL),(1274,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','705',1258,'Prestations de services',0,NULL,NULL,1,NULL,NULL),(1275,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7050',1274,'Prestations de services en Belgique',0,NULL,NULL,1,NULL,NULL),(1276,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7051',1274,'Prestations de services dans les pays membres de la C.E.E.',0,NULL,NULL,1,NULL,NULL),(1277,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7052',1274,'Prestations de services en vue de l\'exportation',0,NULL,NULL,1,NULL,NULL),(1278,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','706',1258,'Pénalités et dédits obtenus par l\'entreprise',0,NULL,NULL,1,NULL,NULL),(1279,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','708',1258,'Remises, ristournes et rabais accordés',0,NULL,NULL,1,NULL,NULL),(1280,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7080',1279,'Sur ventes de marchandises',0,NULL,NULL,1,NULL,NULL),(1281,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7081',1279,'Sur ventes de produits finis',0,NULL,NULL,1,NULL,NULL),(1282,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7082',1279,'Sur ventes de déchets et rebuts',0,NULL,NULL,1,NULL,NULL),(1283,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7083',1279,'Sur prestations de services',0,NULL,NULL,1,NULL,NULL),(1284,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7084',1279,'Mali sur travaux facturés aux associations momentanées',0,NULL,NULL,1,NULL,NULL),(1285,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71',1357,'Variation des stocks et des commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1286,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','712',1285,'Des en cours de fabrication',0,NULL,NULL,1,NULL,NULL),(1287,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','713',1285,'Des produits finis',0,NULL,NULL,1,NULL,NULL),(1288,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','715',1285,'Des immeubles construits destinés à la vente',0,NULL,NULL,1,NULL,NULL),(1289,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','717',1285,'Des commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1290,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7170',1289,'Commandes en cours - Coût de revient',0,NULL,NULL,1,NULL,NULL),(1291,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71700',1290,'Coût des commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1292,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71701',1290,'Coût des travaux en cours des associations momentanées',0,NULL,NULL,1,NULL,NULL),(1293,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7171',1289,'Bénéfices portés en compte sur commandes en cours',0,NULL,NULL,1,NULL,NULL),(1294,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71710',1293,'Sur commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1295,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','71711',1293,'Sur travaux en cours des associations momentanées',0,NULL,NULL,1,NULL,NULL),(1296,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','72',1357,'Production immobilisée',0,NULL,NULL,1,NULL,NULL),(1297,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','720',1296,'En frais d\'établissement',0,NULL,NULL,1,NULL,NULL),(1298,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','721',1296,'En immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1299,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','722',1296,'En immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1300,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','723',1296,'En immobilisations en cours',0,NULL,NULL,1,NULL,NULL),(1301,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','74',1357,'Autres produits d\'exploitation',0,NULL,NULL,1,NULL,NULL),(1302,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','740',1301,'Subsides d\'exploitation et montants compensatoires',0,NULL,NULL,1,NULL,NULL),(1303,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','741',1301,'Plus-values sur réalisations courantes d\'immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1304,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','742',1301,'Plus-values sur réalisations de créances commerciales',0,NULL,NULL,1,NULL,NULL),(1305,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','743',1301,'à 749 Produits d\'exploitation divers',0,NULL,NULL,1,NULL,NULL),(1307,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','744',1301,'Commissions et courtages',0,NULL,NULL,1,NULL,NULL),(1308,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','745',1301,'Redevances pour brevets et licences',0,NULL,NULL,1,NULL,NULL),(1309,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','746',1301,'Prestations de services (transports, études, etc)',0,NULL,NULL,1,NULL,NULL),(1310,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','747',1301,'Revenus des immeubles affectés aux activités non professionnelles',0,NULL,NULL,1,NULL,NULL),(1311,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','748',1301,'Locations diverses à caractère professionnel',0,NULL,NULL,1,NULL,NULL),(1312,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','749',1301,'Produits divers',0,NULL,NULL,1,NULL,NULL),(1313,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7490',1312,'Bonis sur reprises d\'emballages consignés',0,NULL,NULL,1,NULL,NULL),(1314,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7491',1312,'Bonis sur travaux en associations momentanées',0,NULL,NULL,1,NULL,NULL),(1315,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','75',1357,'Produits financiers',0,NULL,NULL,1,NULL,NULL),(1316,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','750',1315,'Produits des immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1317,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7500',1316,'Revenus des actions',0,NULL,NULL,1,NULL,NULL),(1318,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7501',1316,'Revenus des obligations',0,NULL,NULL,1,NULL,NULL),(1319,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7502',1316,'Revenus des créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1320,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','751',1315,'Produits des actifs circulants',0,NULL,NULL,1,NULL,NULL),(1321,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','752',1315,'Plus-values sur réalisations d\'actifs circulants',0,NULL,NULL,1,NULL,NULL),(1322,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','753',1315,'Subsides en capital et en intérêts',0,NULL,NULL,1,NULL,NULL),(1323,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','754',1315,'Différences de change',0,NULL,NULL,1,NULL,NULL),(1324,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','755',1315,'Ecarts de conversion des devises',0,NULL,NULL,1,NULL,NULL),(1325,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','756',1315,'à 759 Produits financiers divers',0,NULL,NULL,1,NULL,NULL),(1327,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','757',1315,'Escomptes obtenus',0,NULL,NULL,1,NULL,NULL),(1328,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','76',1357,'Produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(1329,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','760',1328,'Reprises d\'amortissements et de réductions de valeur',0,NULL,NULL,1,NULL,NULL),(1330,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7600',1329,'Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1331,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7601',1329,'Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1332,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','761',1328,'Reprises de réductions de valeur sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1333,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','762',1328,'Reprises de provisions pour risques et charges exceptionnelles',0,NULL,NULL,1,NULL,NULL),(1334,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','763',1328,'Plus-values sur réalisation d\'actifs immobilisés',0,NULL,NULL,1,NULL,NULL),(1335,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7630',1334,'Sur immobilisations incorporelles',0,NULL,NULL,1,NULL,NULL),(1336,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7631',1334,'Sur immobilisations corporelles',0,NULL,NULL,1,NULL,NULL),(1337,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7632',1334,'Sur immobilisations financières',0,NULL,NULL,1,NULL,NULL),(1338,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','764',1328,'Autres produits exceptionnels',0,NULL,NULL,1,NULL,NULL),(1339,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','77',1357,'Régularisations d\'impôts et reprises de provisions fiscales',0,NULL,NULL,1,NULL,NULL),(1340,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','771',1339,'Impôts belges sur le résultat',0,NULL,NULL,1,NULL,NULL),(1341,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7710',1340,'Régularisations d\'impôts dus ou versés',0,NULL,NULL,1,NULL,NULL),(1342,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7711',1340,'Régularisations d\'impôts estimés',0,NULL,NULL,1,NULL,NULL),(1343,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7712',1340,'Reprises de provisions fiscales',0,NULL,NULL,1,NULL,NULL),(1344,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','773',1339,'Impôts étrangers sur le résultat',0,NULL,NULL,1,NULL,NULL),(1345,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','79',1357,'Affectation aux résultats',0,NULL,NULL,1,NULL,NULL),(1346,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','790',1345,'Bénéfice reporté de l\'exercice précédent',0,NULL,NULL,1,NULL,NULL),(1347,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','791',1345,'Prélèvement sur le capital et les primes d\'émission',0,NULL,NULL,1,NULL,NULL),(1348,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','792',1345,'Prélèvement sur les réserves',0,NULL,NULL,1,NULL,NULL),(1349,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','793',1345,'Perte à reporter',0,NULL,NULL,1,NULL,NULL),(1350,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','794',1345,'Intervention d\'associés (ou du propriétaire) dans la perte',0,NULL,NULL,1,NULL,NULL),(1351,1,NULL,'2018-07-30 11:12:54','PCMN-BASE','CAPIT','XXXXXX','1',0,'Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1352,1,NULL,'2018-07-30 11:12:54','PCMN-BASE','IMMO','XXXXXX','2',0,'Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1353,1,NULL,'2018-07-30 11:12:54','PCMN-BASE','STOCK','XXXXXX','3',0,'Stock et commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1354,1,NULL,'2018-07-30 11:12:54','PCMN-BASE','TIERS','XXXXXX','4',0,'Créances et dettes à un an au plus',0,NULL,NULL,1,NULL,NULL),(1355,1,NULL,'2018-07-30 11:12:54','PCMN-BASE','FINAN','XXXXXX','5',0,'Placement de trésorerie et de valeurs disponibles',0,NULL,NULL,1,NULL,NULL),(1356,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','XXXXXX','6',0,'Charges',0,NULL,NULL,1,NULL,NULL),(1357,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','XXXXXX','7',0,'Produits',0,NULL,NULL,1,NULL,NULL),(1401,1,NULL,'2018-07-30 11:12:54','PCG99-ABREGE','CAPIT','XXXXXX','1',0,'Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1402,1,NULL,'2018-07-30 11:12:54','PCG99-ABREGE','IMMO','XXXXXX','2',0,'Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1403,1,NULL,'2018-07-30 11:12:54','PCG99-ABREGE','STOCK','XXXXXX','3',0,'Stock et commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1404,1,NULL,'2018-07-30 11:12:54','PCG99-ABREGE','TIERS','XXXXXX','4',0,'Créances et dettes à un an au plus',0,NULL,NULL,1,NULL,NULL),(1405,1,NULL,'2018-07-30 11:12:54','PCG99-ABREGE','FINAN','XXXXXX','5',0,'Placement de trésorerie et de valeurs disponibles',0,NULL,NULL,1,NULL,NULL),(1406,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','XXXXXX','6',0,'Charges',0,NULL,NULL,1,NULL,NULL),(1407,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','XXXXXX','7',0,'Produits',0,NULL,NULL,1,NULL,NULL),(1501,1,NULL,'2017-02-20 10:46:43','PCG99-BASE','CAPIT','XXXXXX','1',0,'Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1502,1,NULL,'2018-07-30 11:12:54','PCG99-BASE','IMMO','XXXXXX','2',0,'Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',0,NULL,NULL,1,NULL,NULL),(1503,1,NULL,'2018-07-30 11:12:54','PCG99-BASE','STOCK','XXXXXX','3',0,'Stock et commandes en cours d\'exécution',0,NULL,NULL,1,NULL,NULL),(1504,1,NULL,'2018-07-30 11:12:54','PCG99-BASE','TIERS','XXXXXX','4',0,'Créances et dettes à un an au plus',0,NULL,NULL,1,NULL,NULL),(1505,1,NULL,'2018-07-30 11:12:54','PCG99-BASE','FINAN','XXXXXX','5',0,'Placement de trésorerie et de valeurs disponibles',0,NULL,NULL,1,NULL,NULL),(1506,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','XXXXXX','6',0,'Charges',0,NULL,NULL,1,NULL,NULL),(1507,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','XXXXXX','7',0,'Produits',0,NULL,NULL,1,NULL,NULL),(4001,1,NULL,'2018-07-30 11:12:54','PCG08-PYME','FINANCIACION','XXXXXX','1',0,'Financiación básica',0,NULL,NULL,1,NULL,NULL),(4002,1,NULL,'2018-07-30 11:12:54','PCG08-PYME','ACTIVO','XXXXXX','2',0,'Activo no corriente',0,NULL,NULL,1,NULL,NULL),(4003,1,NULL,'2018-07-30 11:12:54','PCG08-PYME','EXISTENCIAS','XXXXXX','3',0,'Existencias',0,NULL,NULL,1,NULL,NULL),(4004,1,NULL,'2018-07-30 11:12:54','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4',0,'Acreedores y deudores por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4005,1,NULL,'2018-07-30 11:12:54','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5',0,'Cuentas financieras',0,NULL,NULL,1,NULL,NULL),(4006,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6',0,'Compras y gastos',0,NULL,NULL,1,NULL,NULL),(4007,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7',0,'Ventas e ingresos',0,NULL,NULL,1,NULL,NULL),(4008,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','10',4001,'CAPITAL',0,NULL,NULL,1,NULL,NULL),(4009,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','100',4008,'Capital social',0,NULL,NULL,1,NULL,NULL),(4010,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','101',4008,'Fondo social',0,NULL,NULL,1,NULL,NULL),(4011,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','CAPITAL','102',4008,'Capital',0,NULL,NULL,1,NULL,NULL),(4012,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','103',4008,'Socios por desembolsos no exigidos',0,NULL,NULL,1,NULL,NULL),(4013,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1030',4012,'Socios por desembolsos no exigidos capital social',0,NULL,NULL,1,NULL,NULL),(4014,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1034',4012,'Socios por desembolsos no exigidos capital pendiente de inscripción',0,NULL,NULL,1,NULL,NULL),(4015,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','104',4008,'Socios por aportaciones no dineradas pendientes',0,NULL,NULL,1,NULL,NULL),(4016,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1040',4015,'Socios por aportaciones no dineradas pendientes capital social',0,NULL,NULL,1,NULL,NULL),(4017,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1044',4015,'Socios por aportaciones no dineradas pendientes capital pendiente de inscripción',0,NULL,NULL,1,NULL,NULL),(4018,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','108',4008,'Acciones o participaciones propias en situaciones especiales',0,NULL,NULL,1,NULL,NULL),(4019,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','109',4008,'Acciones o participaciones propias para reducción de capital',0,NULL,NULL,1,NULL,NULL),(4020,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','11',4001,'Reservas y otros instrumentos de patrimonio',0,NULL,NULL,1,NULL,NULL),(4021,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','110',4020,'Prima de emisión o asunción',0,NULL,NULL,1,NULL,NULL),(4022,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','111',4020,'Otros instrumentos de patrimonio neto',0,NULL,NULL,1,NULL,NULL),(4023,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1110',4022,'Patrimonio neto por emisión de instrumentos financieros compuestos',0,NULL,NULL,1,NULL,NULL),(4024,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1111',4022,'Resto de instrumentos de patrimoio neto',0,NULL,NULL,1,NULL,NULL),(4025,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','112',4020,'Reserva legal',0,NULL,NULL,1,NULL,NULL),(4026,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','113',4020,'Reservas voluntarias',0,NULL,NULL,1,NULL,NULL),(4027,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','114',4020,'Reservas especiales',0,NULL,NULL,1,NULL,NULL),(4028,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1140',4027,'Reservas para acciones o participaciones de la sociedad dominante',0,NULL,NULL,1,NULL,NULL),(4029,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1141',4027,'Reservas estatutarias',0,NULL,NULL,1,NULL,NULL),(4030,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1142',4027,'Reservas por capital amortizado',0,NULL,NULL,1,NULL,NULL),(4031,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1143',4027,'Reservas por fondo de comercio',0,NULL,NULL,1,NULL,NULL),(4032,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1144',4028,'Reservas por acciones propias aceptadas en garantía',0,NULL,NULL,1,NULL,NULL),(4033,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','115',4020,'Reservas por pérdidas y ganancias actuariales y otros ajustes',0,NULL,NULL,1,NULL,NULL),(4034,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','118',4020,'Aportaciones de socios o propietarios',0,NULL,NULL,1,NULL,NULL),(4035,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','119',4020,'Diferencias por ajuste del capital a euros',0,NULL,NULL,1,NULL,NULL),(4036,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','12',4001,'Resultados pendientes de aplicación',0,NULL,NULL,1,NULL,NULL),(4037,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','120',4036,'Remanente',0,NULL,NULL,1,NULL,NULL),(4038,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','121',4036,'Resultados negativos de ejercicios anteriores',0,NULL,NULL,1,NULL,NULL),(4039,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','129',4036,'Resultado del ejercicio',0,NULL,NULL,1,NULL,NULL),(4040,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','13',4001,'Subvenciones, donaciones y ajustes por cambio de valor',0,NULL,NULL,1,NULL,NULL),(4041,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','130',4040,'Subvenciones oficiales de capital',0,NULL,NULL,1,NULL,NULL),(4042,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','131',4040,'Donaciones y legados de capital',0,NULL,NULL,1,NULL,NULL),(4043,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','132',4040,'Otras subvenciones, donaciones y legados',0,NULL,NULL,1,NULL,NULL),(4044,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','133',4040,'Ajustes por valoración en activos financieros disponibles para la venta',0,NULL,NULL,1,NULL,NULL),(4045,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','134',4040,'Operaciones de cobertura',0,NULL,NULL,1,NULL,NULL),(4046,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1340',4045,'Cobertura de flujos de efectivo',0,NULL,NULL,1,NULL,NULL),(4047,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1341',4045,'Cobertura de una inversión neta en un negocio extranjero',0,NULL,NULL,1,NULL,NULL),(4048,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','135',4040,'Diferencias de conversión',0,NULL,NULL,1,NULL,NULL),(4049,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','136',4040,'Ajustes por valoración en activos no corrientes y grupos enajenables de elementos mantenidos para la venta',0,NULL,NULL,1,NULL,NULL),(4050,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','137',4040,'Ingresos fiscales a distribuir en varios ejercicios',0,NULL,NULL,1,NULL,NULL),(4051,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1370',4050,'Ingresos fiscales por diferencias permanentes a distribuir en varios ejercicios',0,NULL,NULL,1,NULL,NULL),(4052,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1371',4050,'Ingresos fiscales por deducciones y bonificaciones a distribuir en varios ejercicios',0,NULL,NULL,1,NULL,NULL),(4053,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','14',4001,'Provisiones',0,NULL,NULL,1,NULL,NULL),(4054,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','141',4053,'Provisión para impuestos',0,NULL,NULL,1,NULL,NULL),(4055,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','142',4053,'Provisión para otras responsabilidades',0,NULL,NULL,1,NULL,NULL),(4056,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','143',4053,'Provisión por desmantelamiento, retiro o rehabilitación del inmovilizado',0,NULL,NULL,1,NULL,NULL),(4057,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','145',4053,'Provisión para actuaciones medioambientales',0,NULL,NULL,1,NULL,NULL),(4058,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','15',4001,'Deudas a largo plazo con características especiales',0,NULL,NULL,1,NULL,NULL),(4059,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','150',4058,'Acciones o participaciones a largo plazo consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4060,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','153',4058,'Desembolsos no exigidos por acciones o participaciones consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4061,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1533',4060,'Desembolsos no exigidos empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4062,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1534',4060,'Desembolsos no exigidos empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4063,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1535',4060,'Desembolsos no exigidos otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4064,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1536',4060,'Otros desembolsos no exigidos',0,NULL,NULL,1,NULL,NULL),(4065,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','154',4058,'Aportaciones no dinerarias pendientes por acciones o participaciones consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4066,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1543',4065,'Aportaciones no dinerarias pendientes empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4067,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1544',4065,'Aportaciones no dinerarias pendientes empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4068,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1545',4065,'Aportaciones no dinerarias pendientes otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4069,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1546',4065,'Otras aportaciones no dinerarias pendientes',0,NULL,NULL,1,NULL,NULL),(4070,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','16',4001,'Deudas a largo plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4071,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','160',4070,'Deudas a largo plazo con entidades de crédito vinculadas',0,NULL,NULL,1,NULL,NULL),(4072,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1603',4071,'Deudas a largo plazo con entidades de crédito empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4073,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1604',4071,'Deudas a largo plazo con entidades de crédito empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4074,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1605',4071,'Deudas a largo plazo con otras entidades de crédito vinculadas',0,NULL,NULL,1,NULL,NULL),(4075,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','161',4070,'Proveedores de inmovilizado a largo plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4076,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1613',4075,'Proveedores de inmovilizado a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4077,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1614',4075,'Proveedores de inmovilizado a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4078,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1615',4075,'Proveedores de inmovilizado a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4079,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','162',4070,'Acreedores por arrendamiento financiero a largo plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4080,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1623',4079,'Acreedores por arrendamiento financiero a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4081,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1624',4080,'Acreedores por arrendamiento financiero a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4082,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1625',4080,'Acreedores por arrendamiento financiero a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4083,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','163',4070,'Otras deudas a largo plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4084,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1633',4083,'Otras deudas a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4085,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1634',4083,'Otras deudas a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4086,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1635',4083,'Otras deudas a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4087,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','17',4001,'Deudas a largo plazo por préstamos recibidos empresitos y otros conceptos',0,NULL,NULL,1,NULL,NULL),(4088,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','170',4087,'Deudas a largo plazo con entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4089,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','171',4087,'Deudas a largo plazo',0,NULL,NULL,1,NULL,NULL),(4090,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','172',4087,'Deudas a largo plazo transformables en suvbenciones donaciones y legados',0,NULL,NULL,1,NULL,NULL),(4091,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','173',4087,'Proveedores de inmovilizado a largo plazo',0,NULL,NULL,1,NULL,NULL),(4092,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','174',4087,'Acreedores por arrendamiento financiero a largo plazo',0,NULL,NULL,1,NULL,NULL),(4093,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','175',4087,'Efectos a pagar a largo plazo',0,NULL,NULL,1,NULL,NULL),(4094,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','176',4087,'Pasivos por derivados financieros a largo plazo',0,NULL,NULL,1,NULL,NULL),(4095,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','177',4087,'Obligaciones y bonos',0,NULL,NULL,1,NULL,NULL),(4096,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','179',4087,'Deudas representadas en otros valores negociables',0,NULL,NULL,1,NULL,NULL),(4097,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','18',4001,'Pasivos por fianzas garantias y otros conceptos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4098,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','180',4097,'Fianzas recibidas a largo plazo',0,NULL,NULL,1,NULL,NULL),(4099,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','181',4097,'Anticipos recibidos por ventas o prestaciones de servicios a largo plazo',0,NULL,NULL,1,NULL,NULL),(4100,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','185',4097,'Depositos recibidos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4101,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','19',4001,'Situaciones transitorias de financiación',0,NULL,NULL,1,NULL,NULL),(4102,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','190',4101,'Acciones o participaciones emitidas',0,NULL,NULL,1,NULL,NULL),(4103,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','192',4101,'Suscriptores de acciones',0,NULL,NULL,1,NULL,NULL),(4104,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','194',4101,'Capital emitido pendiente de inscripción',0,NULL,NULL,1,NULL,NULL),(4105,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','195',4101,'Acciones o participaciones emitidas consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4106,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','197',4101,'Suscriptores de acciones consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4107,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','199',4101,'Acciones o participaciones emitidas consideradas como pasivos financieros pendientes de inscripción',0,NULL,NULL,1,NULL,NULL),(4108,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','20',4002,'Inmovilizaciones intangibles',0,NULL,NULL,1,NULL,NULL),(4109,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','200',4108,'Investigación',0,NULL,NULL,1,NULL,NULL),(4110,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','201',4108,'Desarrollo',0,NULL,NULL,1,NULL,NULL),(4111,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','202',4108,'Concesiones administrativas',0,NULL,NULL,1,NULL,NULL),(4112,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','203',4108,'Propiedad industrial',0,NULL,NULL,1,NULL,NULL),(4113,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','205',4108,'Derechos de transpaso',0,NULL,NULL,1,NULL,NULL),(4114,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','206',4108,'Aplicaciones informáticas',0,NULL,NULL,1,NULL,NULL),(4115,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','209',4108,'Anticipos para inmovilizaciones intangibles',0,NULL,NULL,1,NULL,NULL),(4116,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','21',4002,'Inmovilizaciones materiales',0,NULL,NULL,1,NULL,NULL),(4117,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','210',4116,'Terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4118,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','211',4116,'Construcciones',0,NULL,NULL,1,NULL,NULL),(4119,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','212',4116,'Instalaciones técnicas',0,NULL,NULL,1,NULL,NULL),(4120,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','213',4116,'Maquinaria',0,NULL,NULL,1,NULL,NULL),(4121,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','214',4116,'Utillaje',0,NULL,NULL,1,NULL,NULL),(4122,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','215',4116,'Otras instalaciones',0,NULL,NULL,1,NULL,NULL),(4123,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','216',4116,'Mobiliario',0,NULL,NULL,1,NULL,NULL),(4124,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','217',4116,'Equipos para procesos de información',0,NULL,NULL,1,NULL,NULL),(4125,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','218',4116,'Elementos de transporte',0,NULL,NULL,1,NULL,NULL),(4126,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','219',4116,'Otro inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4127,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','22',4002,'Inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4128,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','220',4127,'Inversiones en terreons y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4129,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','221',4127,'Inversiones en construcciones',0,NULL,NULL,1,NULL,NULL),(4130,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','23',4002,'Inmovilizaciones materiales en curso',0,NULL,NULL,1,NULL,NULL),(4131,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','230',4130,'Adaptación de terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4132,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','231',4130,'Construcciones en curso',0,NULL,NULL,1,NULL,NULL),(4133,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','232',4130,'Instalaciones técnicas en montaje',0,NULL,NULL,1,NULL,NULL),(4134,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','233',4130,'Maquinaria en montaje',0,NULL,NULL,1,NULL,NULL),(4135,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','237',4130,'Equipos para procesos de información en montaje',0,NULL,NULL,1,NULL,NULL),(4136,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','239',4130,'Anticipos para inmovilizaciones materiales',0,NULL,NULL,1,NULL,NULL),(4137,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','24',4002,'Inversiones financieras a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4138,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','240',4137,'Participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4139,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2403',4138,'Participaciones a largo plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4140,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2404',4138,'Participaciones a largo plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4141,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2405',4138,'Participaciones a largo plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4142,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','241',4137,'Valores representativos de deuda a largo plazo de partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4143,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2413',4142,'Valores representativos de deuda a largo plazo de empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4144,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2414',4142,'Valores representativos de deuda a largo plazo de empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4145,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2415',4142,'Valores representativos de deuda a largo plazo de otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4146,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','242',4137,'Créditos a largo plazo a partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4147,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2423',4146,'Créditos a largo plazo a empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4148,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2424',4146,'Créditos a largo plazo a empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4149,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2425',4146,'Créditos a largo plazo a otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4150,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','249',4137,'Desembolsos pendientes sobre participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4151,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2493',4150,'Desembolsos pendientes sobre participaciones a largo plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4152,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2494',4150,'Desembolsos pendientes sobre participaciones a largo plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4153,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2495',4150,'Desembolsos pendientes sobre participaciones a largo plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4154,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','25',4002,'Otras inversiones financieras a largo plazo',0,NULL,NULL,1,NULL,NULL),(4155,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','250',4154,'Inversiones financieras a largo plazo en instrumentos de patrimonio',0,NULL,NULL,1,NULL,NULL),(4156,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','251',4154,'Valores representativos de deuda a largo plazo',0,NULL,NULL,1,NULL,NULL),(4157,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','252',4154,'Créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4158,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','253',4154,'Créditos a largo plazo por enajenación de inmovilizado',0,NULL,NULL,1,NULL,NULL),(4159,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','254',4154,'Créditos a largo plazo al personal',0,NULL,NULL,1,NULL,NULL),(4160,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','255',4154,'Activos por derivados financieros a largo plazo',0,NULL,NULL,1,NULL,NULL),(4161,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','258',4154,'Imposiciones a largo plazo',0,NULL,NULL,1,NULL,NULL),(4162,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','259',4154,'Desembolsos pendientes sobre participaciones en el patrimonio neto a largo plazo',0,NULL,NULL,1,NULL,NULL),(4163,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','26',4002,'Fianzas y depósitos constituidos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4164,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','260',4163,'Fianzas constituidas a largo plazo',0,NULL,NULL,1,NULL,NULL),(4165,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','261',4163,'Depósitos constituidos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4166,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','28',4002,'Amortización acumulada del inmovilizado',0,NULL,NULL,1,NULL,NULL),(4167,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','280',4166,'Amortización acumulado del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4168,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2800',4167,'Amortización acumulada de investigación',0,NULL,NULL,1,NULL,NULL),(4169,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2801',4167,'Amortización acumulada de desarrollo',0,NULL,NULL,1,NULL,NULL),(4170,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2802',4167,'Amortización acumulada de concesiones administrativas',0,NULL,NULL,1,NULL,NULL),(4171,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2803',4167,'Amortización acumulada de propiedad industrial',0,NULL,NULL,1,NULL,NULL),(4172,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2805',4167,'Amortización acumulada de derechos de transpaso',0,NULL,NULL,1,NULL,NULL),(4173,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2806',4167,'Amortización acumulada de aplicaciones informáticas',0,NULL,NULL,1,NULL,NULL),(4174,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','281',4166,'Amortización acumulado del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4175,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2811',4174,'Amortización acumulada de construcciones',0,NULL,NULL,1,NULL,NULL),(4176,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2812',4174,'Amortización acumulada de instalaciones técnicas',0,NULL,NULL,1,NULL,NULL),(4177,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2813',4174,'Amortización acumulada de maquinaria',0,NULL,NULL,1,NULL,NULL),(4178,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2814',4174,'Amortización acumulada de utillaje',0,NULL,NULL,1,NULL,NULL),(4179,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2815',4174,'Amortización acumulada de otras instalaciones',0,NULL,NULL,1,NULL,NULL),(4180,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2816',4174,'Amortización acumulada de mobiliario',0,NULL,NULL,1,NULL,NULL),(4181,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2817',4174,'Amortización acumulada de equipos para proceso de información',0,NULL,NULL,1,NULL,NULL),(4182,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2818',4174,'Amortización acumulada de elementos de transporte',0,NULL,NULL,1,NULL,NULL),(4183,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2819',4175,'Amortización acumulada de otro inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4184,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','282',4166,'Amortización acumulada de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4185,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','29',4002,'Deterioro de valor de activos no corrientes',0,NULL,NULL,1,NULL,NULL),(4186,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','290',4185,'Deterioro de valor del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4187,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2900',4186,'Deterioro de valor de investigación',0,NULL,NULL,1,NULL,NULL),(4188,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2901',4186,'Deterioro de valor de desarrollo',0,NULL,NULL,1,NULL,NULL),(4189,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2902',4186,'Deterioro de valor de concesiones administrativas',0,NULL,NULL,1,NULL,NULL),(4190,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2903',4186,'Deterioro de valor de propiedad industrial',0,NULL,NULL,1,NULL,NULL),(4191,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2905',4186,'Deterioro de valor de derechos de transpaso',0,NULL,NULL,1,NULL,NULL),(4192,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2906',4186,'Deterioro de valor de aplicaciones informáticas',0,NULL,NULL,1,NULL,NULL),(4193,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','291',4185,'Deterioro de valor del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4194,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2910',4193,'Deterioro de valor de terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4195,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2911',4193,'Deterioro de valor de construcciones',0,NULL,NULL,1,NULL,NULL),(4196,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2912',4193,'Deterioro de valor de instalaciones técnicas',0,NULL,NULL,1,NULL,NULL),(4197,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2913',4193,'Deterioro de valor de maquinaria',0,NULL,NULL,1,NULL,NULL),(4198,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2914',4193,'Deterioro de valor de utillajes',0,NULL,NULL,1,NULL,NULL),(4199,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2915',4194,'Deterioro de valor de otras instalaciones',0,NULL,NULL,1,NULL,NULL),(4200,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2916',4194,'Deterioro de valor de mobiliario',0,NULL,NULL,1,NULL,NULL),(4201,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2917',4194,'Deterioro de valor de equipos para proceso de información',0,NULL,NULL,1,NULL,NULL),(4202,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2918',4194,'Deterioro de valor de elementos de transporte',0,NULL,NULL,1,NULL,NULL),(4203,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2919',4194,'Deterioro de valor de otro inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4204,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','292',4185,'Deterioro de valor de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4205,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2920',4204,'Deterioro de valor de terrenos y bienes naturales',0,NULL,NULL,1,NULL,NULL),(4206,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2921',4204,'Deterioro de valor de construcciones',0,NULL,NULL,1,NULL,NULL),(4207,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','293',4185,'Deterioro de valor de participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4208,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2933',4207,'Deterioro de valor de participaciones a largo plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4209,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2934',4207,'Deterioro de valor de sobre participaciones a largo plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4210,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2935',4207,'Deterioro de valor de sobre participaciones a largo plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4211,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','294',4185,'Deterioro de valor de valores representativos de deuda a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4212,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2943',4211,'Deterioro de valor de valores representativos de deuda a largo plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4213,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2944',4211,'Deterioro de valor de valores representativos de deuda a largo plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4214,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2945',4211,'Deterioro de valor de valores representativos de deuda a largo plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4215,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','295',4185,'Deterioro de valor de créditos a largo plazo a partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4216,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2953',4215,'Deterioro de valor de créditos a largo plazo a empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4217,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2954',4215,'Deterioro de valor de créditos a largo plazo a empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4218,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2955',4215,'Deterioro de valor de créditos a largo plazo a otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4219,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','296',4185,'Deterioro de valor de participaciones en el patrimonio netoa largo plazo',0,NULL,NULL,1,NULL,NULL),(4220,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','297',4185,'Deterioro de valor de valores representativos de deuda a largo plazo',0,NULL,NULL,1,NULL,NULL),(4221,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','298',4185,'Deterioro de valor de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4222,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','30',4003,'Comerciales',0,NULL,NULL,1,NULL,NULL),(4223,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','300',4222,'Mercaderías A',0,NULL,NULL,1,NULL,NULL),(4224,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','301',4222,'Mercaderías B',0,NULL,NULL,1,NULL,NULL),(4225,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','31',4003,'Materias primas',0,NULL,NULL,1,NULL,NULL),(4226,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','310',4225,'Materias primas A',0,NULL,NULL,1,NULL,NULL),(4227,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','311',4225,'Materias primas B',0,NULL,NULL,1,NULL,NULL),(4228,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','32',4003,'Otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4229,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','320',4228,'Elementos y conjuntos incorporables',0,NULL,NULL,1,NULL,NULL),(4230,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','321',4228,'Combustibles',0,NULL,NULL,1,NULL,NULL),(4231,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','322',4228,'Repuestos',0,NULL,NULL,1,NULL,NULL),(4232,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','325',4228,'Materiales diversos',0,NULL,NULL,1,NULL,NULL),(4233,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','326',4228,'Embalajes',0,NULL,NULL,1,NULL,NULL),(4234,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','327',4228,'Envases',0,NULL,NULL,1,NULL,NULL),(4235,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','328',4229,'Material de oficina',0,NULL,NULL,1,NULL,NULL),(4236,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','33',4003,'Productos en curso',0,NULL,NULL,1,NULL,NULL),(4237,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','330',4236,'Productos en curos A',0,NULL,NULL,1,NULL,NULL),(4238,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','331',4236,'Productos en curso B',0,NULL,NULL,1,NULL,NULL),(4239,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','34',4003,'Productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4240,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','340',4239,'Productos semiterminados A',0,NULL,NULL,1,NULL,NULL),(4241,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','341',4239,'Productos semiterminados B',0,NULL,NULL,1,NULL,NULL),(4242,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','35',4003,'Productos terminados',0,NULL,NULL,1,NULL,NULL),(4243,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','350',4242,'Productos terminados A',0,NULL,NULL,1,NULL,NULL),(4244,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','351',4242,'Productos terminados B',0,NULL,NULL,1,NULL,NULL),(4245,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','36',4003,'Subproductos, residuos y materiales recuperados',0,NULL,NULL,1,NULL,NULL),(4246,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','360',4245,'Subproductos A',0,NULL,NULL,1,NULL,NULL),(4247,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','361',4245,'Subproductos B',0,NULL,NULL,1,NULL,NULL),(4248,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','365',4245,'Residuos A',0,NULL,NULL,1,NULL,NULL),(4249,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','366',4245,'Residuos B',0,NULL,NULL,1,NULL,NULL),(4250,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','368',4245,'Materiales recuperados A',0,NULL,NULL,1,NULL,NULL),(4251,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','369',4245,'Materiales recuperados B',0,NULL,NULL,1,NULL,NULL),(4252,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','39',4003,'Deterioro de valor de las existencias',0,NULL,NULL,1,NULL,NULL),(4253,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','390',4252,'Deterioro de valor de las mercaderías',0,NULL,NULL,1,NULL,NULL),(4254,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','391',4252,'Deterioro de valor de las materias primas',0,NULL,NULL,1,NULL,NULL),(4255,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','392',4252,'Deterioro de valor de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4256,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','393',4252,'Deterioro de valor de los productos en curso',0,NULL,NULL,1,NULL,NULL),(4257,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','394',4252,'Deterioro de valor de los productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4258,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','395',4252,'Deterioro de valor de los productos terminados',0,NULL,NULL,1,NULL,NULL),(4259,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','396',4252,'Deterioro de valor de los subproductos, residuos y materiales recuperados',0,NULL,NULL,1,NULL,NULL),(4260,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','PROVEEDORES','40',4004,'Proveedores',0,NULL,NULL,1,NULL,NULL),(4261,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','PROVEEDORES','400',4260,'Proveedores',0,NULL,NULL,1,NULL,NULL),(4262,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4000',4261,'Proveedores euros',0,NULL,NULL,1,NULL,NULL),(4263,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4004',4261,'Proveedores moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4264,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4009',4261,'Proveedores facturas pendientes de recibir o formalizar',0,NULL,NULL,1,NULL,NULL),(4265,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','401',4260,'Proveedores efectos comerciales a pagar',0,NULL,NULL,1,NULL,NULL),(4266,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','403',4260,'Proveedores empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4267,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4030',4266,'Proveedores empresas del grupo euros',0,NULL,NULL,1,NULL,NULL),(4268,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4031',4266,'Efectos comerciales a pagar empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4269,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4034',4266,'Proveedores empresas del grupo moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4270,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4036',4266,'Envases y embalajes a devolver a proveedores empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4271,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4039',4266,'Proveedores empresas del grupo facturas pendientes de recibir o de formalizar',0,NULL,NULL,1,NULL,NULL),(4272,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','404',4260,'Proveedores empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4273,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','405',4260,'Proveedores otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4274,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','406',4260,'Envases y embalajes a devolver a proveedores',0,NULL,NULL,1,NULL,NULL),(4275,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','407',4260,'Anticipos a proveedores',0,NULL,NULL,1,NULL,NULL),(4276,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','41',4004,'Acreedores varios',0,NULL,NULL,1,NULL,NULL),(4277,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','410',4276,'Acreedores por prestaciones de servicios',0,NULL,NULL,1,NULL,NULL),(4278,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4100',4277,'Acreedores por prestaciones de servicios euros',0,NULL,NULL,1,NULL,NULL),(4279,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4104',4277,'Acreedores por prestaciones de servicios moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4280,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4109',4277,'Acreedores por prestaciones de servicios facturas pendientes de recibir o formalizar',0,NULL,NULL,1,NULL,NULL),(4281,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','411',4276,'Acreedores efectos comerciales a pagar',0,NULL,NULL,1,NULL,NULL),(4282,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','419',4276,'Acreedores por operaciones en común',0,NULL,NULL,1,NULL,NULL),(4283,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','CLIENTES','43',4004,'Clientes',0,NULL,NULL,1,NULL,NULL),(4284,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','CLIENTES','430',4283,'Clientes',0,NULL,NULL,1,NULL,NULL),(4285,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4300',4284,'Clientes euros',0,NULL,NULL,1,NULL,NULL),(4286,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4304',4284,'Clientes moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4287,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4309',4284,'Clientes facturas pendientes de formalizar',0,NULL,NULL,1,NULL,NULL),(4288,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','431',4283,'Clientes efectos comerciales a cobrar',0,NULL,NULL,1,NULL,NULL),(4289,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4310',4288,'Efectos comerciales en cartera',0,NULL,NULL,1,NULL,NULL),(4290,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4311',4288,'Efectos comerciales descontados',0,NULL,NULL,1,NULL,NULL),(4291,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4312',4288,'Efectos comerciales en gestión de cobro',0,NULL,NULL,1,NULL,NULL),(4292,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4315',4288,'Efectos comerciales impagados',0,NULL,NULL,1,NULL,NULL),(4293,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','432',4283,'Clientes operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4294,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','433',4283,'Clientes empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4295,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4330',4294,'Clientes empresas del grupo euros',0,NULL,NULL,1,NULL,NULL),(4296,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4331',4294,'Efectos comerciales a cobrar empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4297,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4332',4294,'Clientes empresas del grupo operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4298,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4334',4294,'Clientes empresas del grupo moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4299,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4336',4294,'Clientes empresas del grupo dudoso cobro',0,NULL,NULL,1,NULL,NULL),(4300,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4337',4294,'Envases y embalajes a devolver a clientes empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4301,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4339',4294,'Clientes empresas del grupo facturas pendientes de formalizar',0,NULL,NULL,1,NULL,NULL),(4302,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','434',4283,'Clientes empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4303,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','435',4283,'Clientes otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4304,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','436',4283,'Clientes de dudoso cobro',0,NULL,NULL,1,NULL,NULL),(4305,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','437',4283,'Envases y embalajes a devolver por clientes',0,NULL,NULL,1,NULL,NULL),(4306,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','438',4283,'Anticipos de clientes',0,NULL,NULL,1,NULL,NULL),(4307,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','44',4004,'Deudores varios',0,NULL,NULL,1,NULL,NULL),(4308,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','440',4307,'Deudores',0,NULL,NULL,1,NULL,NULL),(4309,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4400',4308,'Deudores euros',0,NULL,NULL,1,NULL,NULL),(4310,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4404',4308,'Deudores moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4311,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4409',4308,'Deudores facturas pendientes de formalizar',0,NULL,NULL,1,NULL,NULL),(4312,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','441',4307,'Deudores efectos comerciales a cobrar',0,NULL,NULL,1,NULL,NULL),(4313,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4410',4312,'Deudores efectos comerciales en cartera',0,NULL,NULL,1,NULL,NULL),(4314,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4411',4312,'Deudores efectos comerciales descontados',0,NULL,NULL,1,NULL,NULL),(4315,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4412',4312,'Deudores efectos comerciales en gestión de cobro',0,NULL,NULL,1,NULL,NULL),(4316,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4415',4312,'Deudores efectos comerciales impagados',0,NULL,NULL,1,NULL,NULL),(4317,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','446',4307,'Deudores de dusoso cobro',0,NULL,NULL,1,NULL,NULL),(4318,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','449',4307,'Deudores por operaciones en común',0,NULL,NULL,1,NULL,NULL),(4319,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','46',4004,'Personal',0,NULL,NULL,1,NULL,NULL),(4320,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','460',4319,'Anticipos de renumeraciones',0,NULL,NULL,1,NULL,NULL),(4321,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','465',4319,'Renumeraciones pendientes de pago',0,NULL,NULL,1,NULL,NULL),(4322,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','47',4004,'Administraciones Públicas',0,NULL,NULL,1,NULL,NULL),(4323,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','470',4322,'Hacienda Pública deudora por diversos conceptos',0,NULL,NULL,1,NULL,NULL),(4324,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4700',4323,'Hacienda Pública deudora por IVA',0,NULL,NULL,1,NULL,NULL),(4325,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4708',4323,'Hacienda Pública deudora por subvenciones concedidas',0,NULL,NULL,1,NULL,NULL),(4326,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4709',4323,'Hacienda Pública deudora por devolución de impuestos',0,NULL,NULL,1,NULL,NULL),(4327,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','471',4322,'Organismos de la Seguridad Social deudores',0,NULL,NULL,1,NULL,NULL),(4328,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','472',4322,'Hacienda Pública IVA soportado',0,NULL,NULL,1,NULL,NULL),(4329,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','473',4322,'Hacienda Pública retenciones y pagos a cuenta',0,NULL,NULL,1,NULL,NULL),(4330,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','474',4322,'Activos por impuesto diferido',0,NULL,NULL,1,NULL,NULL),(4331,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4740',4330,'Activos por diferencias temporarias deducibles',0,NULL,NULL,1,NULL,NULL),(4332,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4742',4330,'Derechos por deducciones y bonificaciones pendientes de aplicar',0,NULL,NULL,1,NULL,NULL),(4333,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4745',4330,'Crédito por pérdidasa compensar del ejercicio',0,NULL,NULL,1,NULL,NULL),(4334,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','475',4322,'Hacienda Pública acreedora por conceptos fiscales',0,NULL,NULL,1,NULL,NULL),(4335,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4750',4334,'Hacienda Pública acreedora por IVA',0,NULL,NULL,1,NULL,NULL),(4336,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4751',4334,'Hacienda Pública acreedora por retenciones practicadas',0,NULL,NULL,1,NULL,NULL),(4337,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4752',4334,'Hacienda Pública acreedora por impuesto sobre sociedades',0,NULL,NULL,1,NULL,NULL),(4338,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4758',4334,'Hacienda Pública acreedora por subvenciones a integrar',0,NULL,NULL,1,NULL,NULL),(4339,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','476',4322,'Organismos de la Seguridad Social acreedores',0,NULL,NULL,1,NULL,NULL),(4340,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','477',4322,'Hacienda Pública IVA repercutido',0,NULL,NULL,1,NULL,NULL),(4341,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','479',4322,'Pasivos por diferencias temporarias imponibles',0,NULL,NULL,1,NULL,NULL),(4342,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','48',4004,'Ajustes por periodificación',0,NULL,NULL,1,NULL,NULL),(4343,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','480',4342,'Gastos anticipados',0,NULL,NULL,1,NULL,NULL),(4344,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','485',4342,'Ingresos anticipados',0,NULL,NULL,1,NULL,NULL),(4345,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','49',4004,'Deterioro de valor de créditos comerciales y provisiones a corto plazo',0,NULL,NULL,1,NULL,NULL),(4346,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','490',4345,'Deterioro de valor de créditos por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4347,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','493',4345,'Deterioro de valor de créditos por operaciones comerciales con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4348,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4933',4347,'Deterioro de valor de créditos por operaciones comerciales con empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4349,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4934',4347,'Deterioro de valor de créditos por operaciones comerciales con empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4350,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4935',4347,'Deterioro de valor de créditos por operaciones comerciales con otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4351,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','499',4345,'Provisiones por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4352,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4994',4351,'Provisión para contratos anerosos',0,NULL,NULL,1,NULL,NULL),(4353,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4999',4351,'Provisión para otras operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4354,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','50',4005,'Emprésitos deudas con características especiales y otras emisiones análogas a corto plazo',0,NULL,NULL,1,NULL,NULL),(4355,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','500',4354,'Obligaciones y bonos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4356,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','502',4354,'Acciones o participaciones a corto plazo consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4357,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','505',4354,'Deudas representadas en otros valores negociables a corto plazo',0,NULL,NULL,1,NULL,NULL),(4358,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','506',4354,'Intereses a corto plazo de emprésitos y otras emisiones analógicas',0,NULL,NULL,1,NULL,NULL),(4359,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','507',4354,'Dividendos de acciones o participaciones consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4360,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','509',4354,'Valores negociables amortizados',0,NULL,NULL,1,NULL,NULL),(4361,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5090',4360,'Obligaciones y bonos amortizados',0,NULL,NULL,1,NULL,NULL),(4362,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5095',4360,'Otros valores negociables amortizados',0,NULL,NULL,1,NULL,NULL),(4363,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','51',4005,'Deudas a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4364,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','510',4363,'Deudas a corto plazo con entidades de crédito vinculadas',0,NULL,NULL,1,NULL,NULL),(4365,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5103',4364,'Deudas a corto plazo con entidades de crédito empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4366,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5104',4364,'Deudas a corto plazo con entidades de crédito empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4367,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5105',4364,'Deudas a corto plazo con otras entidades de crédito vinculadas',0,NULL,NULL,1,NULL,NULL),(4368,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','511',4363,'Proveedores de inmovilizado a corto plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4369,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5113',4368,'Proveedores de inmovilizado a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4370,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5114',4368,'Proveedores de inmovilizado a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4371,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5115',4368,'Proveedores de inmovilizado a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4372,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','512',4363,'Acreedores por arrendamiento financiero a corto plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4373,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5123',4372,'Acreedores por arrendamiento financiero a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4374,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5124',4372,'Acreedores por arrendamiento financiero a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4375,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5125',4372,'Acreedores por arrendamiento financiero a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4376,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','513',4363,'Otras deudas a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4377,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5133',4376,'Otras deudas a corto plazo con empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4378,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5134',4376,'Otras deudas a corto plazo con empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4379,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5135',4376,'Otras deudas a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4380,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','514',4363,'Intereses a corto plazo con partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4381,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5143',4380,'Intereses a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4382,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5144',4380,'Intereses a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4383,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5145',4380,'Intereses deudas a corto plazo partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4384,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','52',4005,'Deudas a corto plazo por préstamos recibidos y otros conceptos',0,NULL,NULL,1,NULL,NULL),(4385,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','520',4384,'Deudas a corto plazo con entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4386,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5200',4385,'Préstamos a corto plazo de entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4387,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5201',4385,'Deudas a corto plazo por crédito dispuesto',0,NULL,NULL,1,NULL,NULL),(4388,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5208',4385,'Deudas por efectos descontados',0,NULL,NULL,1,NULL,NULL),(4389,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5209',4385,'Deudas por operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4390,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','521',4384,'Deudas a corto plazo',0,NULL,NULL,1,NULL,NULL),(4391,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','522',4384,'Deudas a corto plazo transformables en subvenciones donaciones y legados',0,NULL,NULL,1,NULL,NULL),(4392,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','523',4384,'Proveedores de inmovilizado a corto plazo',0,NULL,NULL,1,NULL,NULL),(4393,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','526',4384,'Dividendo activo a pagar',0,NULL,NULL,1,NULL,NULL),(4394,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','527',4384,'Intereses a corto plazo de deudas con entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4395,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','528',4384,'Intereses a corto plazo de deudas',0,NULL,NULL,1,NULL,NULL),(4396,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','529',4384,'Provisiones a corto plazo',0,NULL,NULL,1,NULL,NULL),(4397,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5291',4396,'Provisión a corto plazo para impuestos',0,NULL,NULL,1,NULL,NULL),(4398,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5292',4396,'Provisión a corto plazo para otras responsabilidades',0,NULL,NULL,1,NULL,NULL),(4399,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5293',4396,'Provisión a corto plazo por desmantelamiento retiro o rehabilitación del inmovilizado',0,NULL,NULL,1,NULL,NULL),(4400,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5295',4396,'Provisión a corto plazo para actuaciones medioambientales',0,NULL,NULL,1,NULL,NULL),(4401,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','53',4005,'Inversiones financieras a corto plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4402,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','530',4401,'Participaciones a corto plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4403,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5303',4402,'Participaciones a corto plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4404,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5304',4402,'Participaciones a corto plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4405,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5305',4402,'Participaciones a corto plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4406,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','531',4401,'Valores representativos de deuda a corto plazo de partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4407,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5313',4406,'Valores representativos de deuda a corto plazo de empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4408,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5314',4406,'Valores representativos de deuda a corto plazo de empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4409,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5315',4406,'Valores representativos de deuda a corto plazo de otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4410,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','532',4401,'Créditos a corto plazo a partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4411,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5323',4410,'Créditos a corto plazo a empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4412,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5324',4410,'Créditos a corto plazo a empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4413,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5325',4410,'Créditos a corto plazo a otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4414,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','533',4401,'Intereses a corto plazo de valores representativos de deuda de partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4415,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5333',4414,'Intereses a corto plazo de valores representativos de deuda en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4416,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5334',4414,'Intereses a corto plazo de valores representativos de deuda en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4417,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5335',4414,'Intereses a corto plazo de valores representativos de deuda en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4418,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','534',4401,'Intereses a corto plazo de créditos a partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4419,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5343',4418,'Intereses a corto plazo de créditos a empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4420,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5344',4418,'Intereses a corto plazo de créditos a empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4421,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5345',4418,'Intereses a corto plazo de créditos a otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4422,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','535',4401,'Dividendo a cobrar de inversiones financieras en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4423,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5353',4422,'Dividendo a cobrar de empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4424,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5354',4422,'Dividendo a cobrar de empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4425,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5355',4422,'Dividendo a cobrar de otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4426,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','539',4401,'Desembolsos pendientes sobre participaciones a corto plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4427,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5393',4426,'Desembolsos pendientes sobre participaciones a corto plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4428,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5394',4426,'Desembolsos pendientes sobre participaciones a corto plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4429,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5395',4426,'Desembolsos pendientes sobre participaciones a corto plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4430,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','54',4005,'Otras inversiones financieras a corto plazo',0,NULL,NULL,1,NULL,NULL),(4431,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','540',4430,'Inversiones financieras a corto plazo en instrumentos de patrimonio',0,NULL,NULL,1,NULL,NULL),(4432,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','541',4430,'Valores representativos de deuda a corto plazo',0,NULL,NULL,1,NULL,NULL),(4433,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','542',4430,'Créditos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4434,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','543',4430,'Créditos a corto plazo por enejenación de inmovilizado',0,NULL,NULL,1,NULL,NULL),(4435,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','544',4430,'Créditos a corto plazo al personal',0,NULL,NULL,1,NULL,NULL),(4436,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','545',4430,'Dividendo a cobrar',0,NULL,NULL,1,NULL,NULL),(4437,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','546',4430,'Intereses a corto plazo de valores reprsentativos de deuda',0,NULL,NULL,1,NULL,NULL),(4438,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','547',4430,'Intereses a corto plazo de créditos',0,NULL,NULL,1,NULL,NULL),(4439,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','548',4430,'Imposiciones a corto plazo',0,NULL,NULL,1,NULL,NULL),(4440,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','549',4430,'Desembolsos pendientes sobre participaciones en el patrimonio neto a corto plazo',0,NULL,NULL,1,NULL,NULL),(4441,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','55',4005,'Otras cuentas no bancarias',0,NULL,NULL,1,NULL,NULL),(4442,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','550',4441,'Titular de la explotación',0,NULL,NULL,1,NULL,NULL),(4443,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','551',4441,'Cuenta corriente con socios y administradores',0,NULL,NULL,1,NULL,NULL),(4444,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','552',4441,'Cuenta corriente otras personas y entidades vinculadas',0,NULL,NULL,1,NULL,NULL),(4445,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5523',4444,'Cuenta corriente con empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4446,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5524',4444,'Cuenta corriente con empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4447,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5525',4444,'Cuenta corriente con otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4448,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','554',4441,'Cuenta corriente con uniones temporales de empresas y comunidades de bienes',0,NULL,NULL,1,NULL,NULL),(4449,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','555',4441,'Partidas pendientes de aplicación',0,NULL,NULL,1,NULL,NULL),(4450,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','556',4441,'Desembolsos exigidos sobre participaciones en el patrimonio neto',0,NULL,NULL,1,NULL,NULL),(4451,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5563',4450,'Desembolsos exigidos sobre participaciones empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4452,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5564',4450,'Desembolsos exigidos sobre participaciones empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4453,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5565',4450,'Desembolsos exigidos sobre participaciones otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4454,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5566',4450,'Desembolsos exigidos sobre participaciones otras empresas',0,NULL,NULL,1,NULL,NULL),(4455,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','557',4441,'Dividendo activo a cuenta',0,NULL,NULL,1,NULL,NULL),(4456,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','558',4441,'Socios por desembolsos exigidos',0,NULL,NULL,1,NULL,NULL),(4457,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5580',4456,'Socios por desembolsos exigidos sobre acciones o participaciones ordinarias',0,NULL,NULL,1,NULL,NULL),(4458,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5585',4456,'Socios por desembolsos exigidos sobre acciones o participaciones consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4459,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','559',4441,'Derivados financieros a corto plazo',0,NULL,NULL,1,NULL,NULL),(4460,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5590',4459,'Activos por derivados financieros a corto plazo',0,NULL,NULL,1,NULL,NULL),(4461,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5595',4459,'Pasivos por derivados financieros a corto plazo',0,NULL,NULL,1,NULL,NULL),(4462,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','56',4005,'Finanzas y depósitos recibidos y constituidos a corto plazo y ajustes por periodificación',0,NULL,NULL,1,NULL,NULL),(4463,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','560',4462,'Finanzas recibidas a corto plazo',0,NULL,NULL,1,NULL,NULL),(4464,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','561',4462,'Depósitos recibidos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4465,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','565',4462,'Finanzas constituidas a corto plazo',0,NULL,NULL,1,NULL,NULL),(4466,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','566',4462,'Depósitos constituidos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4467,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','567',4462,'Intereses pagados por anticipado',0,NULL,NULL,1,NULL,NULL),(4468,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','568',4462,'Intereses cobrados a corto plazo',0,NULL,NULL,1,NULL,NULL),(4469,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','57',4005,'Tesorería',0,NULL,NULL,1,NULL,NULL),(4470,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','CAJA','570',4469,'Caja euros',0,NULL,NULL,1,NULL,NULL),(4471,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','571',4469,'Caja moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4472,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','BANCOS','572',4469,'Bancos e instituciones de crédito cc vista euros',0,NULL,NULL,1,NULL,NULL),(4473,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','573',4469,'Bancos e instituciones de crédito cc vista moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4474,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','574',4469,'Bancos e instituciones de crédito cuentas de ahorro euros',0,NULL,NULL,1,NULL,NULL),(4475,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','575',4469,'Bancos e instituciones de crédito cuentas de ahorro moneda extranjera',0,NULL,NULL,1,NULL,NULL),(4476,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','576',4469,'Inversiones a corto plazo de gran liquidez',0,NULL,NULL,1,NULL,NULL),(4477,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','59',4005,'Deterioro del valor de las inversiones financieras a corto plazo',0,NULL,NULL,1,NULL,NULL),(4478,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','593',4477,'Deterioro del valor de participaciones a corto plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4479,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5933',4478,'Deterioro del valor de participaciones a corto plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4480,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5934',4478,'Deterioro del valor de participaciones a corto plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4481,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5935',4478,'Deterioro del valor de participaciones a corto plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4482,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','594',4477,'Deterioro del valor de valores representativos de deuda a corto plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4483,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5943',4482,'Deterioro del valor de valores representativos de deuda a corto plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4484,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5944',4482,'Deterioro del valor de valores representativos de deuda a corto plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4485,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5945',4482,'Deterioro del valor de valores representativos de deuda a corto plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4486,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','595',4477,'Deterioro del valor de créditos a corto plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4487,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5953',4486,'Deterioro del valor de créditos a corto plazo en empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4488,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5954',4486,'Deterioro del valor de créditos a corto plazo en empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4489,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5955',4486,'Deterioro del valor de créditos a corto plazo en otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4490,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','596',4477,'Deterioro del valor de participaciones a corto plazo',0,NULL,NULL,1,NULL,NULL),(4491,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','597',4477,'Deterioro del valor de valores representativos de deuda a corto plazo',0,NULL,NULL,1,NULL,NULL),(4492,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','598',4477,'Deterioro de valor de créditos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4493,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','60',4006,'Compras',0,NULL,NULL,1,NULL,NULL),(4494,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','COMPRAS','600',4493,'Compras de mercaderías',0,NULL,NULL,1,NULL,NULL),(4495,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','COMPRAS','601',4493,'Compras de materias primas',0,NULL,NULL,1,NULL,NULL),(4496,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','602',4493,'Compras de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4497,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','606',4493,'Descuentos sobre compras por pronto pago',0,NULL,NULL,1,NULL,NULL),(4498,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6060',4497,'Descuentos sobre compras por pronto pago de mercaderías',0,NULL,NULL,1,NULL,NULL),(4499,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6061',4497,'Descuentos sobre compras por pronto pago de materias primas',0,NULL,NULL,1,NULL,NULL),(4500,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6062',4497,'Descuentos sobre compras por pronto pago de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4501,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','COMPRAS','607',4493,'Trabajos realizados por otras empresas',0,NULL,NULL,1,NULL,NULL),(4502,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','608',4493,'Devoluciones de compras y operaciones similares',0,NULL,NULL,1,NULL,NULL),(4503,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6080',4502,'Devoluciones de compras de mercaderías',0,NULL,NULL,1,NULL,NULL),(4504,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6081',4502,'Devoluciones de compras de materias primas',0,NULL,NULL,1,NULL,NULL),(4505,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6082',4502,'Devoluciones de compras de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4506,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','609',4493,'Rappels por compras',0,NULL,NULL,1,NULL,NULL),(4507,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6090',4506,'Rappels por compras de mercaderías',0,NULL,NULL,1,NULL,NULL),(4508,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6091',4506,'Rappels por compras de materias primas',0,NULL,NULL,1,NULL,NULL),(4509,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6092',4506,'Rappels por compras de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4510,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','61',4006,'Variación de existencias',0,NULL,NULL,1,NULL,NULL),(4511,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','610',4510,'Variación de existencias de mercaderías',0,NULL,NULL,1,NULL,NULL),(4512,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','611',4510,'Variación de existencias de materias primas',0,NULL,NULL,1,NULL,NULL),(4513,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','612',4510,'Variación de existencias de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4514,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','62',4006,'Servicios exteriores',0,NULL,NULL,1,NULL,NULL),(4515,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','620',4514,'Gastos en investigación y desarrollo del ejercicio',0,NULL,NULL,1,NULL,NULL),(4516,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','621',4514,'Arrendamientos y cánones',0,NULL,NULL,1,NULL,NULL),(4517,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','622',4514,'Reparaciones y conservación',0,NULL,NULL,1,NULL,NULL),(4518,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','623',4514,'Servicios profesionales independientes',0,NULL,NULL,1,NULL,NULL),(4519,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','624',4514,'Transportes',0,NULL,NULL,1,NULL,NULL),(4520,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','625',4514,'Primas de seguros',0,NULL,NULL,1,NULL,NULL),(4521,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','626',4514,'Servicios bancarios y similares',0,NULL,NULL,1,NULL,NULL),(4522,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','627',4514,'Publicidad, propaganda y relaciones públicas',0,NULL,NULL,1,NULL,NULL),(4523,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','628',4514,'Suministros',0,NULL,NULL,1,NULL,NULL),(4524,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','629',4514,'Otros servicios',0,NULL,NULL,1,NULL,NULL),(4525,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','63',4006,'Tributos',0,NULL,NULL,1,NULL,NULL),(4526,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','630',4525,'Impuesto sobre benecifios',0,NULL,NULL,1,NULL,NULL),(4527,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6300',4526,'Impuesto corriente',0,NULL,NULL,1,NULL,NULL),(4528,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6301',4526,'Impuesto diferido',0,NULL,NULL,1,NULL,NULL),(4529,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','631',4525,'Otros tributos',0,NULL,NULL,1,NULL,NULL),(4530,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','633',4525,'Ajustes negativos en la imposición sobre beneficios',0,NULL,NULL,1,NULL,NULL),(4531,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','634',4525,'Ajustes negativos en la imposición indirecta',0,NULL,NULL,1,NULL,NULL),(4532,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6341',4531,'Ajustes negativos en IVA de activo corriente',0,NULL,NULL,1,NULL,NULL),(4533,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6342',4531,'Ajustes negativos en IVA de inversiones',0,NULL,NULL,1,NULL,NULL),(4534,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','636',4525,'Devolución de impuestos',0,NULL,NULL,1,NULL,NULL),(4535,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','638',4525,'Ajustes positivos en la imposición sobre beneficios',0,NULL,NULL,1,NULL,NULL),(4536,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','639',4525,'Ajustes positivos en la imposición directa',0,NULL,NULL,1,NULL,NULL),(4537,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6391',4536,'Ajustes positivos en IVA de activo corriente',0,NULL,NULL,1,NULL,NULL),(4538,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6392',4536,'Ajustes positivos en IVA de inversiones',0,NULL,NULL,1,NULL,NULL),(4539,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','64',4006,'Gastos de personal',0,NULL,NULL,1,NULL,NULL),(4540,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','640',4539,'Sueldos y salarios',0,NULL,NULL,1,NULL,NULL),(4541,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','641',4539,'Indemnizaciones',0,NULL,NULL,1,NULL,NULL),(4542,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','642',4539,'Seguridad social a cargo de la empresa',0,NULL,NULL,1,NULL,NULL),(4543,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','649',4539,'Otros gastos sociales',0,NULL,NULL,1,NULL,NULL),(4544,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','65',4006,'Otros gastos de gestión',0,NULL,NULL,1,NULL,NULL),(4545,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','650',4544,'Pérdidas de créditos comerciales incobrables',0,NULL,NULL,1,NULL,NULL),(4546,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','651',4544,'Resultados de operaciones en común',0,NULL,NULL,1,NULL,NULL),(4547,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6510',4546,'Beneficio transferido gestor',0,NULL,NULL,1,NULL,NULL),(4548,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6511',4546,'Pérdida soportada participe o asociado no gestor',0,NULL,NULL,1,NULL,NULL),(4549,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','659',4544,'Otras pérdidas en gestión corriente',0,NULL,NULL,1,NULL,NULL),(4550,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','66',4006,'Gastos financieros',0,NULL,NULL,1,NULL,NULL),(4551,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','660',4550,'Gastos financieros por actualización de provisiones',0,NULL,NULL,1,NULL,NULL),(4552,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','661',4550,'Intereses de obligaciones y bonos',0,NULL,NULL,1,NULL,NULL),(4553,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6610',4452,'Intereses de obligaciones y bonos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4554,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6611',4452,'Intereses de obligaciones y bonos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4555,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6612',4452,'Intereses de obligaciones y bonos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4556,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6613',4452,'Intereses de obligaciones y bonos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4557,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6615',4452,'Intereses de obligaciones y bonos a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4558,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6616',4452,'Intereses de obligaciones y bonos a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4559,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6617',4452,'Intereses de obligaciones y bonos a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4560,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6618',4452,'Intereses de obligaciones y bonos a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4561,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','662',4550,'Intereses de deudas',0,NULL,NULL,1,NULL,NULL),(4562,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6620',4561,'Intereses de deudas empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4563,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6621',4561,'Intereses de deudas empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4564,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6622',4561,'Intereses de deudas otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4565,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6623',4561,'Intereses de deudas con entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4566,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6624',4561,'Intereses de deudas otras empresas',0,NULL,NULL,1,NULL,NULL),(4567,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','663',4550,'Pérdidas por valorización de activos y pasivos financieros por su valor razonable',0,NULL,NULL,1,NULL,NULL),(4568,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','664',4550,'Gastos por dividendos de acciones o participaciones consideradas como pasivos financieros',0,NULL,NULL,1,NULL,NULL),(4569,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6640',4568,'Dividendos de pasivos empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4570,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6641',4568,'Dividendos de pasivos empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4571,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6642',4568,'Dividendos de pasivos otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4572,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6643',4568,'Dividendos de pasivos otras empresas',0,NULL,NULL,1,NULL,NULL),(4573,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','665',4550,'Intereses por descuento de efectos y operaciones de factoring',0,NULL,NULL,1,NULL,NULL),(4574,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6650',4573,'Intereses por descuento de efectos en entidades de crédito del grupo',0,NULL,NULL,1,NULL,NULL),(4575,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6651',4573,'Intereses por descuento de efectos en entidades de crédito asociadas',0,NULL,NULL,1,NULL,NULL),(4576,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6652',4573,'Intereses por descuento de efectos en entidades de crédito vinculadas',0,NULL,NULL,1,NULL,NULL),(4577,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6653',4573,'Intereses por descuento de efectos en otras entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4578,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6654',4573,'Intereses por operaciones de factoring con entidades de crédito del grupo',0,NULL,NULL,1,NULL,NULL),(4579,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6655',4573,'Intereses por operaciones de factoring con entidades de crédito asociadas',0,NULL,NULL,1,NULL,NULL),(4580,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6656',4573,'Intereses por operaciones de factoring con otras entidades de crédito vinculadas',0,NULL,NULL,1,NULL,NULL),(4581,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6657',4573,'Intereses por operaciones de factoring con otras entidades de crédito',0,NULL,NULL,1,NULL,NULL),(4582,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','666',4550,'Pérdidas en participaciones y valores representativos de deuda',0,NULL,NULL,1,NULL,NULL),(4583,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6660',4582,'Pérdidas en valores representativos de deuda a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4584,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6661',4582,'Pérdidas en valores representativos de deuda a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4585,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6662',4582,'Pérdidas en valores representativos de deuda a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4586,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6663',4582,'Pérdidas en participaciones y valores representativos de deuda a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4587,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6665',4582,'Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4588,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6666',4582,'Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4589,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6667',4582,'Pérdidas en valores representativos de deuda a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4590,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6668',4582,'Pérdidas en valores representativos de deuda a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4591,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','667',4550,'Pérdidas de créditos no comerciales',0,NULL,NULL,1,NULL,NULL),(4592,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6670',4591,'Pérdidas de créditos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4593,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6671',4591,'Pérdidas de créditos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4594,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6672',4591,'Pérdidas de créditos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4595,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6673',4591,'Pérdidas de créditos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4596,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6675',4591,'Pérdidas de créditos a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4597,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6676',4591,'Pérdidas de créditos a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4598,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6677',4591,'Pérdidas de créditos a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4599,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6678',4591,'Pérdidas de créditos a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4600,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','668',4550,'Diferencias negativas de cambio',0,NULL,NULL,1,NULL,NULL),(4601,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','669',4550,'Otros gastos financieros',0,NULL,NULL,1,NULL,NULL),(4602,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','67',4006,'Pérdidas procedentes de activos no corrientes y gastos excepcionales',0,NULL,NULL,1,NULL,NULL),(4603,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','670',4602,'Pérdidas procedentes del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4604,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','671',4602,'Pérdidas procedentes del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4605,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','672',4602,'Pérdidas procedentes de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4607,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','673',4602,'Pérdidas procedentes de participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4608,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6733',4607,'Pérdidas procedentes de participaciones a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4609,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6734',4607,'Pérdidas procedentes de participaciones a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4610,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6735',4607,'Pérdidas procedentes de participaciones a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4611,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','675',4602,'Pérdidas por operaciones con obligaciones propias',0,NULL,NULL,1,NULL,NULL),(4612,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','678',4602,'Gastos excepcionales',0,NULL,NULL,1,NULL,NULL),(4613,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','68',4006,'Dotaciones para amortizaciones',0,NULL,NULL,1,NULL,NULL),(4614,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','680',4613,'Amortización del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4615,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','681',4613,'Amortización del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4616,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','682',4613,'Amortización de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4617,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','69',4006,'Pérdidas por deterioro y otras dotaciones',0,NULL,NULL,1,NULL,NULL),(4618,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','690',4617,'Pérdidas por deterioro del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4619,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','691',4617,'Pérdidas por deterioro del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4620,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','692',4617,'Pérdidas por deterioro de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4621,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','693',4617,'Pérdidas por deterioro de existencias',0,NULL,NULL,1,NULL,NULL),(4622,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6930',4621,'Pérdidas por deterioro de productos terminados y en curso de fabricación',0,NULL,NULL,1,NULL,NULL),(4623,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6931',4621,'Pérdidas por deterioro de mercaderías',0,NULL,NULL,1,NULL,NULL),(4624,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6932',4621,'Pérdidas por deterioro de materias primas',0,NULL,NULL,1,NULL,NULL),(4625,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6933',4621,'Pérdidas por deterioro de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4626,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','694',4617,'Pérdidas por deterioro de créditos por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4627,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','695',4617,'Dotación a la provisión por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4628,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6954',4627,'Dotación a la provisión por contratos onerosos',0,NULL,NULL,1,NULL,NULL),(4629,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6959',4628,'Dotación a la provisión para otras operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4630,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','696',4617,'Pérdidas por deterioro de participaciones y valores representativos de deuda a largo plazo',0,NULL,NULL,1,NULL,NULL),(4631,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6960',4630,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4632,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6961',4630,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4633,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6962',4630,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4634,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6963',4630,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4635,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6965',4630,'Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4636,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6966',4630,'Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4637,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6967',4630,'Pérdidas por deterioro en valores representativos de deuda a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4638,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6968',4630,'Pérdidas por deterioro en valores representativos de deuda a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4639,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','697',4617,'Pérdidas por deterioro de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4640,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6970',4639,'Pérdidas por deterioro de créditos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4641,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6971',4639,'Pérdidas por deterioro de créditos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4642,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6972',4639,'Pérdidas por deterioro de créditos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4643,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6973',4639,'Pérdidas por deterioro de créditos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4644,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','698',4617,'Pérdidas por deterioro de participaciones y valores representativos de deuda a corto plazo',0,NULL,NULL,1,NULL,NULL),(4645,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6980',4644,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4646,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6981',4644,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4647,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6985',4644,'Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4648,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6986',4644,'Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4649,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6988',4644,'Pérdidas por deterioro en valores representativos de deuda a corto plazo de otras empresas',0,NULL,NULL,1,NULL,NULL),(4650,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','699',4617,'Pérdidas por deterioro de crédito a corto plazo',0,NULL,NULL,1,NULL,NULL),(4651,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6990',4650,'Pérdidas por deterioro de crédito a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4652,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6991',4650,'Pérdidas por deterioro de crédito a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4653,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6992',4650,'Pérdidas por deterioro de crédito a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4654,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','XXXXXX','6993',4650,'Pérdidas por deterioro de crédito a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4655,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','70',4007,'Ventas',0,NULL,NULL,1,NULL,NULL),(4656,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','VENTAS','700',4655,'Ventas de mercaderías',0,NULL,NULL,1,NULL,NULL),(4657,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','VENTAS','701',4655,'Ventas de productos terminados',0,NULL,NULL,1,NULL,NULL),(4658,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','702',4655,'Ventas de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4659,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','703',4655,'Ventas de subproductos y residuos',0,NULL,NULL,1,NULL,NULL),(4660,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','704',4655,'Ventas de envases y embalajes',0,NULL,NULL,1,NULL,NULL),(4661,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','VENTAS','705',4655,'Prestaciones de servicios',0,NULL,NULL,1,NULL,NULL),(4662,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','706',4655,'Descuentos sobre ventas por pronto pago',0,NULL,NULL,1,NULL,NULL),(4663,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7060',4662,'Descuentos sobre ventas por pronto pago de mercaderías',0,NULL,NULL,1,NULL,NULL),(4664,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7061',4662,'Descuentos sobre ventas por pronto pago de productos terminados',0,NULL,NULL,1,NULL,NULL),(4665,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7062',4662,'Descuentos sobre ventas por pronto pago de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4666,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7063',4662,'Descuentos sobre ventas por pronto pago de subproductos y residuos',0,NULL,NULL,1,NULL,NULL),(4667,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','708',4655,'Devoluciones de ventas y operacioes similares',0,NULL,NULL,1,NULL,NULL),(4668,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7080',4667,'Devoluciones de ventas de mercaderías',0,NULL,NULL,1,NULL,NULL),(4669,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7081',4667,'Devoluciones de ventas de productos terminados',0,NULL,NULL,1,NULL,NULL),(4670,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7082',4667,'Devoluciones de ventas de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4671,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7083',4667,'Devoluciones de ventas de subproductos y residuos',0,NULL,NULL,1,NULL,NULL),(4672,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7084',4667,'Devoluciones de ventas de envases y embalajes',0,NULL,NULL,1,NULL,NULL),(4673,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','71',4007,'Variación de existencias',0,NULL,NULL,1,NULL,NULL),(4674,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','710',4673,'Variación de existencias de productos en curso',0,NULL,NULL,1,NULL,NULL),(4675,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','711',4673,'Variación de existencias de productos semiterminados',0,NULL,NULL,1,NULL,NULL),(4676,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','712',4673,'Variación de existencias de productos terminados',0,NULL,NULL,1,NULL,NULL),(4677,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','713',4673,'Variación de existencias de subproductos, residuos y materiales recuperados',0,NULL,NULL,1,NULL,NULL),(4678,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','73',4007,'Trabajos realizados para la empresa',0,NULL,NULL,1,NULL,NULL),(4679,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','730',4678,'Trabajos realizados para el inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4680,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','731',4678,'Trabajos realizados para el inmovilizado tangible',0,NULL,NULL,1,NULL,NULL),(4681,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','732',4678,'Trabajos realizados en inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4682,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','733',4678,'Trabajos realizados para el inmovilizado material en curso',0,NULL,NULL,1,NULL,NULL),(4683,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','74',4007,'Subvenciones, donaciones y legados',0,NULL,NULL,1,NULL,NULL),(4684,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','740',4683,'Subvenciones, donaciones y legados a la explotación',0,NULL,NULL,1,NULL,NULL),(4685,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','746',4683,'Subvenciones, donaciones y legados de capital transferidos al resultado del ejercicio',0,NULL,NULL,1,NULL,NULL),(4686,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','747',4683,'Otras subvenciones, donaciones y legados transferidos al resultado del ejercicio',0,NULL,NULL,1,NULL,NULL),(4687,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','75',4007,'Otros ingresos de gestión',0,NULL,NULL,1,NULL,NULL),(4688,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','751',4687,'Resultados de operaciones en común',0,NULL,NULL,1,NULL,NULL),(4689,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7510',4688,'Pérdida transferida gestor',0,NULL,NULL,1,NULL,NULL),(4690,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7511',4688,'Beneficio atribuido participe o asociado no gestor',0,NULL,NULL,1,NULL,NULL),(4691,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','752',4687,'Ingreso por arrendamiento',0,NULL,NULL,1,NULL,NULL),(4692,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','753',4687,'Ingresos de propiedad industrial cedida en explotación',0,NULL,NULL,1,NULL,NULL),(4693,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','754',4687,'Ingresos por comisiones',0,NULL,NULL,1,NULL,NULL),(4694,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','755',4687,'Ingresos por servicios al personal',0,NULL,NULL,1,NULL,NULL),(4695,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','759',4687,'Ingresos por servicios diversos',0,NULL,NULL,1,NULL,NULL),(4696,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76',4007,'Ingresos financieros',0,NULL,NULL,1,NULL,NULL),(4697,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','760',4696,'Ingresos de participaciones en instrumentos de patrimonio',0,NULL,NULL,1,NULL,NULL),(4698,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7600',4697,'Ingresos de participaciones en instrumentos de patrimonio empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4699,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7601',4697,'Ingresos de participaciones en instrumentos de patrimonio empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4700,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7602',4697,'Ingresos de participaciones en instrumentos de patrimonio otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4701,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7603',4697,'Ingresos de participaciones en instrumentos de patrimonio otras empresas',0,NULL,NULL,1,NULL,NULL),(4702,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','761',4696,'Ingresos de valores representativos de deuda',0,NULL,NULL,1,NULL,NULL),(4703,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7610',4702,'Ingresos de valores representativos de deuda empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4704,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7611',4702,'Ingresos de valores representativos de deuda empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4705,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7612',4702,'Ingresos de valores representativos de deuda otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4706,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7613',4702,'Ingresos de valores representativos de deuda otras empresas',0,NULL,NULL,1,NULL,NULL),(4707,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','762',4696,'Ingresos de créditos',0,NULL,NULL,1,NULL,NULL),(4708,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7620',4707,'Ingresos de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4709,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76200',4708,'Ingresos de crédito a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4710,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76201',4708,'Ingresos de crédito a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4711,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76202',4708,'Ingresos de crédito a largo plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4712,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76203',4708,'Ingresos de crédito a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4713,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7621',4707,'Ingresos de créditos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4714,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76210',4713,'Ingresos de crédito a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4715,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76211',4713,'Ingresos de crédito a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4716,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76212',4713,'Ingresos de crédito a corto plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4717,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','76213',4713,'Ingresos de crédito a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4718,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','763',4696,'Beneficios por valorización de activos y pasivos financieros por su valor razonable',0,NULL,NULL,1,NULL,NULL),(4719,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','766',4696,'Beneficios en participaciones y valores representativos de deuda',0,NULL,NULL,1,NULL,NULL),(4720,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7660',4719,'Beneficios en participaciones y valores representativos de deuda a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4721,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7661',4719,'Beneficios en participaciones y valores representativos de deuda a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4722,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7662',4719,'Beneficios en participaciones y valores representativos de deuda a largo plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4723,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7663',4719,'Beneficios en participaciones y valores representativos de deuda a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4724,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7665',4719,'Beneficios en participaciones y valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4725,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7666',4719,'Beneficios en participaciones y valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4726,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7667',4719,'Beneficios en participaciones y valores representativos de deuda a corto plazo otras partes asociadas',0,NULL,NULL,1,NULL,NULL),(4727,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7668',4719,'Beneficios en participaciones y valores representativos de deuda a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4728,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','768',4696,'Diferencias positivas de cambio',0,NULL,NULL,1,NULL,NULL),(4729,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','769',4696,'Otros ingresos financieros',0,NULL,NULL,1,NULL,NULL),(4730,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','77',4007,'Beneficios procedentes de activos no corrientes e ingresos excepcionales',0,NULL,NULL,1,NULL,NULL),(4731,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','770',4730,'Beneficios procedentes del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4732,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','771',4730,'Beneficios procedentes del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4733,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','772',4730,'Beneficios procedentes de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4734,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','773',4730,'Beneficios procedentes de participaciones a largo plazo en partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4735,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7733',4734,'Beneficios procedentes de participaciones a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4736,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7734',4734,'Beneficios procedentes de participaciones a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4737,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7735',4734,'Beneficios procedentes de participaciones a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4738,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','775',4730,'Beneficios por operaciones con obligaciones propias',0,NULL,NULL,1,NULL,NULL),(4739,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','778',4730,'Ingresos excepcionales',0,NULL,NULL,1,NULL,NULL),(4741,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','79',4007,'Excesos y aplicaciones de provisiones y pérdidas por deterioro',0,NULL,NULL,1,NULL,NULL),(4742,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','790',4741,'Revisión del deterioro del inmovilizado intangible',0,NULL,NULL,1,NULL,NULL),(4743,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','791',4741,'Revisión del deterioro del inmovilizado material',0,NULL,NULL,1,NULL,NULL),(4744,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','792',4741,'Revisión del deterioro de las inversiones inmobiliarias',0,NULL,NULL,1,NULL,NULL),(4745,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','793',4741,'Revisión del deterioro de las existencias',0,NULL,NULL,1,NULL,NULL),(4746,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7930',4745,'Revisión del deterioro de productos terminados y en curso de fabricación',0,NULL,NULL,1,NULL,NULL),(4747,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7931',4745,'Revisión del deterioro de mercaderías',0,NULL,NULL,1,NULL,NULL),(4748,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7932',4745,'Revisión del deterioro de materias primas',0,NULL,NULL,1,NULL,NULL),(4749,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7933',4745,'Revisión del deterioro de otros aprovisionamientos',0,NULL,NULL,1,NULL,NULL),(4750,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','794',4741,'Revisión del deterioro de créditos por operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4751,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','795',4741,'Exceso de provisiones',0,NULL,NULL,1,NULL,NULL),(4752,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7951',4751,'Exceso de provisión para impuestos',0,NULL,NULL,1,NULL,NULL),(4753,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7952',4751,'Exceso de provisión para otras responsabilidades',0,NULL,NULL,1,NULL,NULL),(4755,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7954',4751,'Exceso de provisión para operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4756,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','79544',4755,'Exceso de provisión por contratos onerosos',0,NULL,NULL,1,NULL,NULL),(4757,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','79549',4755,'Exceso de provisión para otras operaciones comerciales',0,NULL,NULL,1,NULL,NULL),(4758,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7955',4751,'Exceso de provisión para actuaciones medioambienteales',0,NULL,NULL,1,NULL,NULL),(4759,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','796',4741,'Revisión del deterioro de participaciones y valores representativos de deuda a largo plazo',0,NULL,NULL,1,NULL,NULL),(4760,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7960',4759,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4761,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7961',4759,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4762,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7962',4759,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4763,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7963',4759,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4764,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7965',4759,'Revisión del deterioro de valores representativos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4765,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7966',4759,'Revisión del deterioro de valores representativos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4766,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7967',4759,'Revisión del deterioro de valores representativos a largo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4767,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7968',4759,'Revisión del deterioro de valores representativos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4768,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','797',4741,'Revisión del deterioro de créditos a largo plazo',0,NULL,NULL,1,NULL,NULL),(4769,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7970',4768,'Revisión del deterioro de créditos a largo plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4770,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7971',4768,'Revisión del deterioro de créditos a largo plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4771,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7972',4768,'Revisión del deterioro de créditos a largo plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4772,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7973',4768,'Revisión del deterioro de créditos a largo plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4773,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','798',4741,'Revisión del deterioro de participaciones y valores representativos de deuda a corto plazo',0,NULL,NULL,1,NULL,NULL),(4774,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7980',4773,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4775,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7981',4773,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4776,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7985',4773,'Revisión del deterioro de valores representativos de deuda a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4777,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7986',4773,'Revisión del deterioro de valores representativos de deuda a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4778,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7987',4773,'Revisión del deterioro de valores representativos de deuda a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4779,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7988',4773,'Revisión del deterioro de valores representativos de deuda a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL),(4780,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','799',4741,'Revisión del deterioro de créditos a corto plazo',0,NULL,NULL,1,NULL,NULL),(4781,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7990',4780,'Revisión del deterioro de créditos a corto plazo empresas del grupo',0,NULL,NULL,1,NULL,NULL),(4782,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7991',4780,'Revisión del deterioro de créditos a corto plazo empresas asociadas',0,NULL,NULL,1,NULL,NULL),(4783,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7992',4780,'Revisión del deterioro de créditos a corto plazo otras partes vinculadas',0,NULL,NULL,1,NULL,NULL),(4784,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','XXXXXX','7993',4780,'Revisión del deterioro de créditos a corto plazo otras empresas',0,NULL,NULL,1,NULL,NULL); +INSERT INTO `llx_accounting_account` VALUES (1,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','101',1401,'Capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(2,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','105',1401,'Ecarts de réévaluation',NULL,0,NULL,NULL,1,0,NULL,NULL),(3,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','1061',1401,'Réserve légale',NULL,0,NULL,NULL,1,0,NULL,NULL),(4,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','1063',1401,'Réserves statutaires ou contractuelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(5,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','1064',1401,'Réserves réglementées',NULL,0,NULL,NULL,1,0,NULL,NULL),(6,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','1068',1401,'Autres réserves',NULL,0,NULL,NULL,1,0,NULL,NULL),(7,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','108',1401,'Compte de l\'exploitant',NULL,0,NULL,NULL,1,0,NULL,NULL),(8,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','12',1401,'Résultat de l\'exercice',NULL,0,NULL,NULL,1,0,NULL,NULL),(9,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','145',1401,'Amortissements dérogatoires',NULL,0,NULL,NULL,1,0,NULL,NULL),(10,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','146',1401,'Provision spéciale de réévaluation',NULL,0,NULL,NULL,1,0,NULL,NULL),(11,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','147',1401,'Plus-values réinvesties',NULL,0,NULL,NULL,1,0,NULL,NULL),(12,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','148',1401,'Autres provisions réglementées',NULL,0,NULL,NULL,1,0,NULL,NULL),(13,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','15',1401,'Provisions pour risques et charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(14,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','CAPIT','16',1401,'Emprunts et dettes assimilees',NULL,0,NULL,NULL,1,0,NULL,NULL),(15,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','20',1402,'Immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(16,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','201',15,'Frais d\'établissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(17,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','206',15,'Droit au bail',NULL,0,NULL,NULL,1,0,NULL,NULL),(18,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','207',15,'Fonds commercial',NULL,0,NULL,NULL,1,0,NULL,NULL),(19,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','208',15,'Autres immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(20,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','21',1402,'Immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(21,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','23',1402,'Immobilisations en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(22,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','27',1402,'Autres immobilisations financieres',NULL,0,NULL,NULL,1,0,NULL,NULL),(23,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','280',1402,'Amortissements des immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(24,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','281',1402,'Amortissements des immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(25,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','290',1402,'Provisions pour dépréciation des immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(26,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','291',1402,'Provisions pour dépréciation des immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(27,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','IMMO','297',1402,'Provisions pour dépréciation des autres immobilisations financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(28,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','31',1403,'Matieres premières',NULL,0,NULL,NULL,1,0,NULL,NULL),(29,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','32',1403,'Autres approvisionnements',NULL,0,NULL,NULL,1,0,NULL,NULL),(30,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','33',1403,'En-cours de production de biens',NULL,0,NULL,NULL,1,0,NULL,NULL),(31,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','34',1403,'En-cours de production de services',NULL,0,NULL,NULL,1,0,NULL,NULL),(32,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','35',1403,'Stocks de produits',NULL,0,NULL,NULL,1,0,NULL,NULL),(33,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','37',1403,'Stocks de marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(34,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','391',1403,'Provisions pour dépréciation des matières premières',NULL,0,NULL,NULL,1,0,NULL,NULL),(35,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','392',1403,'Provisions pour dépréciation des autres approvisionnements',NULL,0,NULL,NULL,1,0,NULL,NULL),(36,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','393',1403,'Provisions pour dépréciation des en-cours de production de biens',NULL,0,NULL,NULL,1,0,NULL,NULL),(37,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','394',1403,'Provisions pour dépréciation des en-cours de production de services',NULL,0,NULL,NULL,1,0,NULL,NULL),(38,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','395',1403,'Provisions pour dépréciation des stocks de produits',NULL,0,NULL,NULL,1,0,NULL,NULL),(39,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','STOCK','397',1403,'Provisions pour dépréciation des stocks de marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(40,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','400',1404,'Fournisseurs et Comptes rattachés',NULL,0,NULL,NULL,1,0,NULL,NULL),(41,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','409',1404,'Fournisseurs débiteurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(42,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','410',1404,'Clients et Comptes rattachés',NULL,0,NULL,NULL,1,0,NULL,NULL),(43,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','419',1404,'Clients créditeurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(44,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','421',1404,'Personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(45,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','428',1404,'Personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(46,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','43',1404,'Sécurité sociale et autres organismes sociaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(47,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','444',1404,'Etat - impôts sur bénéfice',NULL,0,NULL,NULL,1,0,NULL,NULL),(48,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','445',1404,'Etat - Taxes sur chiffre affaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(49,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','447',1404,'Autres impôts, taxes et versements assimilés',NULL,0,NULL,NULL,1,0,NULL,NULL),(50,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','45',1404,'Groupe et associes',NULL,0,NULL,NULL,1,0,NULL,NULL),(51,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','455',50,'Associés',NULL,0,NULL,NULL,1,0,NULL,NULL),(52,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','46',1404,'Débiteurs divers et créditeurs divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(53,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','47',1404,'Comptes transitoires ou d\'attente',NULL,0,NULL,NULL,1,0,NULL,NULL),(54,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','481',1404,'Charges à répartir sur plusieurs exercices',NULL,0,NULL,NULL,1,0,NULL,NULL),(55,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','486',1404,'Charges constatées d\'avance',NULL,0,NULL,NULL,1,0,NULL,NULL),(56,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','487',1404,'Produits constatés d\'avance',NULL,0,NULL,NULL,1,0,NULL,NULL),(57,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','491',1404,'Provisions pour dépréciation des comptes de clients',NULL,0,NULL,NULL,1,0,NULL,NULL),(58,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','TIERS','496',1404,'Provisions pour dépréciation des comptes de débiteurs divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(59,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','50',1405,'Valeurs mobilières de placement',NULL,0,NULL,NULL,1,0,NULL,NULL),(60,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','51',1405,'Banques, établissements financiers et assimilés',NULL,0,NULL,NULL,1,0,NULL,NULL),(61,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','53',1405,'Caisse',NULL,0,NULL,NULL,1,0,NULL,NULL),(62,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','54',1405,'Régies d\'avance et accréditifs',NULL,0,NULL,NULL,1,0,NULL,NULL),(63,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','58',1405,'Virements internes',NULL,0,NULL,NULL,1,0,NULL,NULL),(64,1,NULL,'2018-01-22 17:28:15','PCG99-ABREGE','FINAN','590',1405,'Provisions pour dépréciation des valeurs mobilières de placement',NULL,0,NULL,NULL,1,0,NULL,NULL),(65,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','60',1406,'Achats',NULL,0,NULL,NULL,1,0,NULL,NULL),(66,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','603',65,'Variations des stocks',NULL,0,NULL,NULL,1,0,NULL,NULL),(67,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','61',1406,'Services extérieurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(68,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','62',1406,'Autres services extérieurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(69,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','63',1406,'Impôts, taxes et versements assimiles',NULL,0,NULL,NULL,1,0,NULL,NULL),(70,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','641',1406,'Rémunérations du personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(71,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','644',1406,'Rémunération du travail de l\'exploitant',NULL,0,NULL,NULL,1,0,NULL,NULL),(72,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','645',1406,'Charges de sécurité sociale et de prévoyance',NULL,0,NULL,NULL,1,0,NULL,NULL),(73,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','646',1406,'Cotisations sociales personnelles de l\'exploitant',NULL,0,NULL,NULL,1,0,NULL,NULL),(74,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','65',1406,'Autres charges de gestion courante',NULL,0,NULL,NULL,1,0,NULL,NULL),(75,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','66',1406,'Charges financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(76,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','67',1406,'Charges exceptionnelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(77,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','681',1406,'Dotations aux amortissements et aux provisions',NULL,0,NULL,NULL,1,0,NULL,NULL),(78,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','686',1406,'Dotations aux amortissements et aux provisions',NULL,0,NULL,NULL,1,0,NULL,NULL),(79,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','687',1406,'Dotations aux amortissements et aux provisions',NULL,0,NULL,NULL,1,0,NULL,NULL),(80,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','691',1406,'Participation des salariés aux résultats',NULL,0,NULL,NULL,1,0,NULL,NULL),(81,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','695',1406,'Impôts sur les bénéfices',NULL,0,NULL,NULL,1,0,NULL,NULL),(82,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','697',1406,'Imposition forfaitaire annuelle des sociétés',NULL,0,NULL,NULL,1,0,NULL,NULL),(83,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','699',1406,'Produits',NULL,0,NULL,NULL,1,0,NULL,NULL),(84,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','701',1407,'Ventes de produits finis',NULL,0,NULL,NULL,1,0,NULL,NULL),(85,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','706',1407,'Prestations de services',NULL,0,NULL,NULL,1,0,NULL,NULL),(86,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','707',1407,'Ventes de marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(87,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','708',1407,'Produits des activités annexes',NULL,0,NULL,NULL,1,0,NULL,NULL),(88,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','709',1407,'Rabais, remises et ristournes accordés par l\'entreprise',NULL,0,NULL,NULL,1,0,NULL,NULL),(89,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','713',1407,'Variation des stocks',NULL,0,NULL,NULL,1,0,NULL,NULL),(90,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','72',1407,'Production immobilisée',NULL,0,NULL,NULL,1,0,NULL,NULL),(91,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','73',1407,'Produits nets partiels sur opérations à long terme',NULL,0,NULL,NULL,1,0,NULL,NULL),(92,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','74',1407,'Subventions d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(93,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','75',1407,'Autres produits de gestion courante',NULL,0,NULL,NULL,1,0,NULL,NULL),(94,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','753',93,'Jetons de présence et rémunérations d\'administrateurs, gérants,...',NULL,0,NULL,NULL,1,0,NULL,NULL),(95,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','754',93,'Ristournes perçues des coopératives',NULL,0,NULL,NULL,1,0,NULL,NULL),(96,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','755',93,'Quotes-parts de résultat sur opérations faites en commun',NULL,0,NULL,NULL,1,0,NULL,NULL),(97,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','76',1407,'Produits financiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(98,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','77',1407,'Produits exceptionnels',NULL,0,NULL,NULL,1,0,NULL,NULL),(99,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','781',1407,'Reprises sur amortissements et provisions',NULL,0,NULL,NULL,1,0,NULL,NULL),(100,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','786',1407,'Reprises sur provisions pour risques',NULL,0,NULL,NULL,1,0,NULL,NULL),(101,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','787',1407,'Reprises sur provisions',NULL,0,NULL,NULL,1,0,NULL,NULL),(102,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','79',1407,'Transferts de charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(103,1,NULL,'2017-02-20 10:49:11','PCG99-BASE','CAPIT','10',1501,'Capital et réserves',NULL,0,NULL,NULL,1,0,NULL,NULL),(104,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','101',103,'Capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(105,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','104',103,'Primes liées au capital social',NULL,0,NULL,NULL,1,0,NULL,NULL),(106,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','105',103,'Ecarts de réévaluation',NULL,0,NULL,NULL,1,0,NULL,NULL),(107,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','106',103,'Réserves',NULL,0,NULL,NULL,1,0,NULL,NULL),(108,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','107',103,'Ecart d\'equivalence',NULL,0,NULL,NULL,1,0,NULL,NULL),(109,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','108',103,'Compte de l\'exploitant',NULL,0,NULL,NULL,1,0,NULL,NULL),(110,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','109',103,'Actionnaires : capital souscrit - non appelé',NULL,0,NULL,NULL,1,0,NULL,NULL),(111,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','11',1501,'Report à nouveau (solde créditeur ou débiteur)',NULL,0,NULL,NULL,1,0,NULL,NULL),(112,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','110',111,'Report à nouveau (solde créditeur)',NULL,0,NULL,NULL,1,0,NULL,NULL),(113,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','119',111,'Report à nouveau (solde débiteur)',NULL,0,NULL,NULL,1,0,NULL,NULL),(114,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','12',1501,'Résultat de l\'exercice (bénéfice ou perte)',NULL,0,NULL,NULL,1,0,NULL,NULL),(115,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','120',114,'Résultat de l\'exercice (bénéfice)',NULL,0,NULL,NULL,1,0,NULL,NULL),(116,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','129',114,'Résultat de l\'exercice (perte)',NULL,0,NULL,NULL,1,0,NULL,NULL),(117,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','13',1501,'Subventions d\'investissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(118,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','131',117,'Subventions d\'équipement',NULL,0,NULL,NULL,1,0,NULL,NULL),(119,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','138',117,'Autres subventions d\'investissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(120,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','139',117,'Subventions d\'investissement inscrites au compte de résultat',NULL,0,NULL,NULL,1,0,NULL,NULL),(121,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','14',1501,'Provisions réglementées',NULL,0,NULL,NULL,1,0,NULL,NULL),(122,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','142',121,'Provisions réglementées relatives aux immobilisations',NULL,0,NULL,NULL,1,0,NULL,NULL),(123,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','143',121,'Provisions réglementées relatives aux stocks',NULL,0,NULL,NULL,1,0,NULL,NULL),(124,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','144',121,'Provisions réglementées relatives aux autres éléments de l\'actif',NULL,0,NULL,NULL,1,0,NULL,NULL),(125,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','145',121,'Amortissements dérogatoires',NULL,0,NULL,NULL,1,0,NULL,NULL),(126,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','146',121,'Provision spéciale de réévaluation',NULL,0,NULL,NULL,1,0,NULL,NULL),(127,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','147',121,'Plus-values réinvesties',NULL,0,NULL,NULL,1,0,NULL,NULL),(128,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','148',121,'Autres provisions réglementées',NULL,0,NULL,NULL,1,0,NULL,NULL),(129,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','15',1501,'Provisions pour risques et charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(130,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','151',129,'Provisions pour risques',NULL,0,NULL,NULL,1,0,NULL,NULL),(131,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','153',129,'Provisions pour pensions et obligations similaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(132,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','154',129,'Provisions pour restructurations',NULL,0,NULL,NULL,1,0,NULL,NULL),(133,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','155',129,'Provisions pour impôts',NULL,0,NULL,NULL,1,0,NULL,NULL),(134,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','156',129,'Provisions pour renouvellement des immobilisations (entreprises concessionnaires)',NULL,0,NULL,NULL,1,0,NULL,NULL),(135,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','157',129,'Provisions pour charges à répartir sur plusieurs exercices',NULL,0,NULL,NULL,1,0,NULL,NULL),(136,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','158',129,'Autres provisions pour charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(137,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','16',1501,'Emprunts et dettes assimilees',NULL,0,NULL,NULL,1,0,NULL,NULL),(138,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','161',137,'Emprunts obligataires convertibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(139,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','163',137,'Autres emprunts obligataires',NULL,0,NULL,NULL,1,0,NULL,NULL),(140,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','164',137,'Emprunts auprès des établissements de crédit',NULL,0,NULL,NULL,1,0,NULL,NULL),(141,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','165',137,'Dépôts et cautionnements reçus',NULL,0,NULL,NULL,1,0,NULL,NULL),(142,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','166',137,'Participation des salariés aux résultats',NULL,0,NULL,NULL,1,0,NULL,NULL),(143,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','167',137,'Emprunts et dettes assortis de conditions particulières',NULL,0,NULL,NULL,1,0,NULL,NULL),(144,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','168',137,'Autres emprunts et dettes assimilées',NULL,0,NULL,NULL,1,0,NULL,NULL),(145,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','169',137,'Primes de remboursement des obligations',NULL,0,NULL,NULL,1,0,NULL,NULL),(146,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','17',1501,'Dettes rattachées à des participations',NULL,0,NULL,NULL,1,0,NULL,NULL),(147,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','171',146,'Dettes rattachées à des participations (groupe)',NULL,0,NULL,NULL,1,0,NULL,NULL),(148,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','174',146,'Dettes rattachées à des participations (hors groupe)',NULL,0,NULL,NULL,1,0,NULL,NULL),(149,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','178',146,'Dettes rattachées à des sociétés en participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(150,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','18',1501,'Comptes de liaison des établissements et sociétés en participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(151,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','181',150,'Comptes de liaison des établissements',NULL,0,NULL,NULL,1,0,NULL,NULL),(152,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','186',150,'Biens et prestations de services échangés entre établissements (charges)',NULL,0,NULL,NULL,1,0,NULL,NULL),(153,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','187',150,'Biens et prestations de services échangés entre établissements (produits)',NULL,0,NULL,NULL,1,0,NULL,NULL),(154,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','CAPIT','188',150,'Comptes de liaison des sociétés en participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(155,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','20',1502,'Immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(156,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','201',155,'Frais d\'établissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(157,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','203',155,'Frais de recherche et de développement',NULL,0,NULL,NULL,1,0,NULL,NULL),(158,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','205',155,'Concessions et droits similaires, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(159,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','206',155,'Droit au bail',NULL,0,NULL,NULL,1,0,NULL,NULL),(160,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','207',155,'Fonds commercial',NULL,0,NULL,NULL,1,0,NULL,NULL),(161,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','208',155,'Autres immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(162,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','21',1502,'Immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(163,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','211',162,'Terrains',NULL,0,NULL,NULL,1,0,NULL,NULL),(164,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','212',162,'Agencements et aménagements de terrains',NULL,0,NULL,NULL,1,0,NULL,NULL),(165,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','213',162,'Constructions',NULL,0,NULL,NULL,1,0,NULL,NULL),(166,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','214',162,'Constructions sur sol d\'autrui',NULL,0,NULL,NULL,1,0,NULL,NULL),(167,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','215',162,'Installations techniques, matériels et outillage industriels',NULL,0,NULL,NULL,1,0,NULL,NULL),(168,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','218',162,'Autres immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(169,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','22',1502,'Immobilisations mises en concession',NULL,0,NULL,NULL,1,0,NULL,NULL),(170,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','23',1502,'Immobilisations en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(171,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','231',170,'Immobilisations corporelles en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(172,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','232',170,'Immobilisations incorporelles en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(173,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','237',170,'Avances et acomptes versés sur immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(174,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','238',170,'Avances et acomptes versés sur commandes d\'immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(175,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','25',1502,'Parts dans des entreprises liées et créances sur des entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(176,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','26',1502,'Participations et créances rattachées à des participations',NULL,0,NULL,NULL,1,0,NULL,NULL),(177,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','261',176,'Titres de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(178,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','266',176,'Autres formes de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(179,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','267',176,'Créances rattachées à des participations',NULL,0,NULL,NULL,1,0,NULL,NULL),(180,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','268',176,'Créances rattachées à des sociétés en participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(181,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','269',176,'Versements restant à effectuer sur titres de participation non libérés',NULL,0,NULL,NULL,1,0,NULL,NULL),(182,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','27',1502,'Autres immobilisations financieres',NULL,0,NULL,NULL,1,0,NULL,NULL),(183,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','271',183,'Titres immobilisés autres que les titres immobilisés de l\'activité de portefeuille (droit de propriété)',NULL,0,NULL,NULL,1,0,NULL,NULL),(184,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','272',183,'Titres immobilisés (droit de créance)',NULL,0,NULL,NULL,1,0,NULL,NULL),(185,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','273',183,'Titres immobilisés de l\'activité de portefeuille',NULL,0,NULL,NULL,1,0,NULL,NULL),(186,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','274',183,'Prêts',NULL,0,NULL,NULL,1,0,NULL,NULL),(187,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','275',183,'Dépôts et cautionnements versés',NULL,0,NULL,NULL,1,0,NULL,NULL),(188,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','276',183,'Autres créances immobilisées',NULL,0,NULL,NULL,1,0,NULL,NULL),(189,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','277',183,'(Actions propres ou parts propres)',NULL,0,NULL,NULL,1,0,NULL,NULL),(190,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','279',183,'Versements restant à effectuer sur titres immobilisés non libérés',NULL,0,NULL,NULL,1,0,NULL,NULL),(191,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','28',1502,'Amortissements des immobilisations',NULL,0,NULL,NULL,1,0,NULL,NULL),(192,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','280',191,'Amortissements des immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(193,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','281',191,'Amortissements des immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(194,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','282',191,'Amortissements des immobilisations mises en concession',NULL,0,NULL,NULL,1,0,NULL,NULL),(195,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','29',1502,'Dépréciations des immobilisations',NULL,0,NULL,NULL,1,0,NULL,NULL),(196,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','290',195,'Dépréciations des immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(197,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','291',195,'Dépréciations des immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(198,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','292',195,'Dépréciations des immobilisations mises en concession',NULL,0,NULL,NULL,1,0,NULL,NULL),(199,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','293',195,'Dépréciations des immobilisations en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(200,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','296',195,'Provisions pour dépréciation des participations et créances rattachées à des participations',NULL,0,NULL,NULL,1,0,NULL,NULL),(201,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','IMMO','297',195,'Provisions pour dépréciation des autres immobilisations financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(202,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','31',1503,'Matières premières (et fournitures)',NULL,0,NULL,NULL,1,0,NULL,NULL),(203,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','311',202,'Matières (ou groupe) A',NULL,0,NULL,NULL,1,0,NULL,NULL),(204,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','312',202,'Matières (ou groupe) B',NULL,0,NULL,NULL,1,0,NULL,NULL),(205,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','317',202,'Fournitures A, B, C,',NULL,0,NULL,NULL,1,0,NULL,NULL),(206,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','32',1503,'Autres approvisionnements',NULL,0,NULL,NULL,1,0,NULL,NULL),(207,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','321',206,'Matières consommables',NULL,0,NULL,NULL,1,0,NULL,NULL),(208,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','322',206,'Fournitures consommables',NULL,0,NULL,NULL,1,0,NULL,NULL),(209,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','326',206,'Emballages',NULL,0,NULL,NULL,1,0,NULL,NULL),(210,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','33',1503,'En-cours de production de biens',NULL,0,NULL,NULL,1,0,NULL,NULL),(211,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','331',210,'Produits en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(212,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','335',210,'Travaux en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(213,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','34',1503,'En-cours de production de services',NULL,0,NULL,NULL,1,0,NULL,NULL),(214,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','341',213,'Etudes en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(215,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','345',213,'Prestations de services en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(216,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','35',1503,'Stocks de produits',NULL,0,NULL,NULL,1,0,NULL,NULL),(217,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','351',216,'Produits intermédiaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(218,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','355',216,'Produits finis',NULL,0,NULL,NULL,1,0,NULL,NULL),(219,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','358',216,'Produits résiduels (ou matières de récupération)',NULL,0,NULL,NULL,1,0,NULL,NULL),(220,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','37',1503,'Stocks de marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(221,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','371',220,'Marchandises (ou groupe) A',NULL,0,NULL,NULL,1,0,NULL,NULL),(222,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','372',220,'Marchandises (ou groupe) B',NULL,0,NULL,NULL,1,0,NULL,NULL),(223,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','39',1503,'Provisions pour dépréciation des stocks et en-cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(224,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','391',223,'Provisions pour dépréciation des matières premières',NULL,0,NULL,NULL,1,0,NULL,NULL),(225,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','392',223,'Provisions pour dépréciation des autres approvisionnements',NULL,0,NULL,NULL,1,0,NULL,NULL),(226,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','393',223,'Provisions pour dépréciation des en-cours de production de biens',NULL,0,NULL,NULL,1,0,NULL,NULL),(227,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','394',223,'Provisions pour dépréciation des en-cours de production de services',NULL,0,NULL,NULL,1,0,NULL,NULL),(228,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','395',223,'Provisions pour dépréciation des stocks de produits',NULL,0,NULL,NULL,1,0,NULL,NULL),(229,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','STOCK','397',223,'Provisions pour dépréciation des stocks de marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(230,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','40',1504,'Fournisseurs et Comptes rattachés',NULL,0,NULL,NULL,1,0,NULL,NULL),(231,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','400',230,'Fournisseurs et Comptes rattachés',NULL,0,NULL,NULL,1,0,NULL,NULL),(232,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','401',230,'Fournisseurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(233,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','403',230,'Fournisseurs - Effets à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(234,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','404',230,'Fournisseurs d\'immobilisations',NULL,0,NULL,NULL,1,0,NULL,NULL),(235,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','405',230,'Fournisseurs d\'immobilisations - Effets à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(236,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','408',230,'Fournisseurs - Factures non parvenues',NULL,0,NULL,NULL,1,0,NULL,NULL),(237,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','409',230,'Fournisseurs débiteurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(238,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','41',1504,'Clients et comptes rattachés',NULL,0,NULL,NULL,1,0,NULL,NULL),(239,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','410',238,'Clients et Comptes rattachés',NULL,0,NULL,NULL,1,0,NULL,NULL),(240,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','411',238,'Clients',NULL,0,NULL,NULL,1,0,NULL,NULL),(241,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','413',238,'Clients - Effets à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(242,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','416',238,'Clients douteux ou litigieux',NULL,0,NULL,NULL,1,0,NULL,NULL),(243,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','418',238,'Clients - Produits non encore facturés',NULL,0,NULL,NULL,1,0,NULL,NULL),(244,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','419',238,'Clients créditeurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(245,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','42',1504,'Personnel et comptes rattachés',NULL,0,NULL,NULL,1,0,NULL,NULL),(246,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','421',245,'Personnel - Rémunérations dues',NULL,0,NULL,NULL,1,0,NULL,NULL),(247,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','422',245,'Comités d\'entreprises, d\'établissement, ...',NULL,0,NULL,NULL,1,0,NULL,NULL),(248,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','424',245,'Participation des salariés aux résultats',NULL,0,NULL,NULL,1,0,NULL,NULL),(249,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','425',245,'Personnel - Avances et acomptes',NULL,0,NULL,NULL,1,0,NULL,NULL),(250,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','426',245,'Personnel - Dépôts',NULL,0,NULL,NULL,1,0,NULL,NULL),(251,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','427',245,'Personnel - Oppositions',NULL,0,NULL,NULL,1,0,NULL,NULL),(252,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','428',245,'Personnel - Charges à payer et produits à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(253,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','43',1504,'Sécurité sociale et autres organismes sociaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(254,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','431',253,'Sécurité sociale',NULL,0,NULL,NULL,1,0,NULL,NULL),(255,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','437',253,'Autres organismes sociaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(256,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','438',253,'Organismes sociaux - Charges à payer et produits à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(257,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','44',1504,'État et autres collectivités publiques',NULL,0,NULL,NULL,1,0,NULL,NULL),(258,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','441',257,'État - Subventions à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(259,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','442',257,'Etat - Impôts et taxes recouvrables sur des tiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(260,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','443',257,'Opérations particulières avec l\'Etat, les collectivités publiques, les organismes internationaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(261,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','444',257,'Etat - Impôts sur les bénéfices',NULL,0,NULL,NULL,1,0,NULL,NULL),(262,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','445',257,'Etat - Taxes sur le chiffre d\'affaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(263,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','446',257,'Obligations cautionnées',NULL,0,NULL,NULL,1,0,NULL,NULL),(264,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','447',257,'Autres impôts, taxes et versements assimilés',NULL,0,NULL,NULL,1,0,NULL,NULL),(265,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','448',257,'Etat - Charges à payer et produits à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(266,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','449',257,'Quotas d\'émission à restituer à l\'Etat',NULL,0,NULL,NULL,1,0,NULL,NULL),(267,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','45',1504,'Groupe et associes',NULL,0,NULL,NULL,1,0,NULL,NULL),(268,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','451',267,'Groupe',NULL,0,NULL,NULL,1,0,NULL,NULL),(269,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','455',267,'Associés - Comptes courants',NULL,0,NULL,NULL,1,0,NULL,NULL),(270,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','456',267,'Associés - Opérations sur le capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(271,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','457',267,'Associés - Dividendes à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(272,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','458',267,'Associés - Opérations faites en commun et en G.I.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(273,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','46',1504,'Débiteurs divers et créditeurs divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(274,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','462',273,'Créances sur cessions d\'immobilisations',NULL,0,NULL,NULL,1,0,NULL,NULL),(275,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','464',273,'Dettes sur acquisitions de valeurs mobilières de placement',NULL,0,NULL,NULL,1,0,NULL,NULL),(276,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','465',273,'Créances sur cessions de valeurs mobilières de placement',NULL,0,NULL,NULL,1,0,NULL,NULL),(277,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','467',273,'Autres comptes débiteurs ou créditeurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(278,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','468',273,'Divers - Charges à payer et produits à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(279,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','47',1504,'Comptes transitoires ou d\'attente',NULL,0,NULL,NULL,1,0,NULL,NULL),(280,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','471',279,'Comptes d\'attente',NULL,0,NULL,NULL,1,0,NULL,NULL),(281,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','476',279,'Différence de conversion - Actif',NULL,0,NULL,NULL,1,0,NULL,NULL),(282,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','477',279,'Différences de conversion - Passif',NULL,0,NULL,NULL,1,0,NULL,NULL),(283,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','478',279,'Autres comptes transitoires',NULL,0,NULL,NULL,1,0,NULL,NULL),(284,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','48',1504,'Comptes de régularisation',NULL,0,NULL,NULL,1,0,NULL,NULL),(285,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','481',284,'Charges à répartir sur plusieurs exercices',NULL,0,NULL,NULL,1,0,NULL,NULL),(286,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','486',284,'Charges constatées d\'avance',NULL,0,NULL,NULL,1,0,NULL,NULL),(287,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','487',284,'Produits constatés d\'avance',NULL,0,NULL,NULL,1,0,NULL,NULL),(288,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','488',284,'Comptes de répartition périodique des charges et des produits',NULL,0,NULL,NULL,1,0,NULL,NULL),(289,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','489',284,'Quotas d\'émission alloués par l\'Etat',NULL,0,NULL,NULL,1,0,NULL,NULL),(290,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','49',1504,'Provisions pour dépréciation des comptes de tiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(291,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','491',290,'Provisions pour dépréciation des comptes de clients',NULL,0,NULL,NULL,1,0,NULL,NULL),(292,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','495',290,'Provisions pour dépréciation des comptes du groupe et des associés',NULL,0,NULL,NULL,1,0,NULL,NULL),(293,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','TIERS','496',290,'Provisions pour dépréciation des comptes de débiteurs divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(294,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','50',1505,'Valeurs mobilières de placement',NULL,0,NULL,NULL,1,0,NULL,NULL),(295,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','501',294,'Parts dans des entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(296,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','502',294,'Actions propres',NULL,0,NULL,NULL,1,0,NULL,NULL),(297,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','503',294,'Actions',NULL,0,NULL,NULL,1,0,NULL,NULL),(298,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','504',294,'Autres titres conférant un droit de propriété',NULL,0,NULL,NULL,1,0,NULL,NULL),(299,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','505',294,'Obligations et bons émis par la société et rachetés par elle',NULL,0,NULL,NULL,1,0,NULL,NULL),(300,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','506',294,'Obligations',NULL,0,NULL,NULL,1,0,NULL,NULL),(301,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','507',294,'Bons du Trésor et bons de caisse à court terme',NULL,0,NULL,NULL,1,0,NULL,NULL),(302,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','508',294,'Autres valeurs mobilières de placement et autres créances assimilées',NULL,0,NULL,NULL,1,0,NULL,NULL),(303,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','509',294,'Versements restant à effectuer sur valeurs mobilières de placement non libérées',NULL,0,NULL,NULL,1,0,NULL,NULL),(304,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','51',1505,'Banques, établissements financiers et assimilés',NULL,0,NULL,NULL,1,0,NULL,NULL),(305,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','511',304,'Valeurs à l\'encaissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(306,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','512',304,'Banques',NULL,0,NULL,NULL,1,0,NULL,NULL),(307,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','514',304,'Chèques postaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(308,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','515',304,'\"Caisses\" du Trésor et des établissements publics',NULL,0,NULL,NULL,1,0,NULL,NULL),(309,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','516',304,'Sociétés de bourse',NULL,0,NULL,NULL,1,0,NULL,NULL),(310,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','517',304,'Autres organismes financiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(311,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','518',304,'Intérêts courus',NULL,0,NULL,NULL,1,0,NULL,NULL),(312,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','519',304,'Concours bancaires courants',NULL,0,NULL,NULL,1,0,NULL,NULL),(313,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','52',1505,'Instruments de trésorerie',NULL,0,NULL,NULL,1,0,NULL,NULL),(314,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','53',1505,'Caisse',NULL,0,NULL,NULL,1,0,NULL,NULL),(315,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','531',314,'Caisse siège social',NULL,0,NULL,NULL,1,0,NULL,NULL),(316,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','532',314,'Caisse succursale (ou usine) A',NULL,0,NULL,NULL,1,0,NULL,NULL),(317,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','533',314,'Caisse succursale (ou usine) B',NULL,0,NULL,NULL,1,0,NULL,NULL),(318,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','54',1505,'Régies d\'avance et accréditifs',NULL,0,NULL,NULL,1,0,NULL,NULL),(319,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','58',1505,'Virements internes',NULL,0,NULL,NULL,1,0,NULL,NULL),(320,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','59',1505,'Provisions pour dépréciation des comptes financiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(321,1,NULL,'2018-01-22 17:28:15','PCG99-BASE','FINAN','590',320,'Provisions pour dépréciation des valeurs mobilières de placement',NULL,0,NULL,NULL,1,0,NULL,NULL),(322,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','60',1506,'Achats',NULL,0,NULL,NULL,1,0,NULL,NULL),(323,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','601',322,'Achats stockés - Matières premières (et fournitures)',NULL,0,NULL,NULL,1,0,NULL,NULL),(324,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','602',322,'Achats stockés - Autres approvisionnements',NULL,0,NULL,NULL,1,0,NULL,NULL),(325,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','603',322,'Variations des stocks (approvisionnements et marchandises)',NULL,0,NULL,NULL,1,0,NULL,NULL),(326,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','604',322,'Achats stockés - Matières premières (et fournitures)',NULL,0,NULL,NULL,1,0,NULL,NULL),(327,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','605',322,'Achats de matériel, équipements et travaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(328,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','606',322,'Achats non stockés de matière et fournitures',NULL,0,NULL,NULL,1,0,NULL,NULL),(329,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','607',322,'Achats de marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(330,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','608',322,'(Compte réservé, le cas échéant, à la récapitulation des frais accessoires incorporés aux achats)',NULL,0,NULL,NULL,1,0,NULL,NULL),(331,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','609',322,'Rabais, remises et ristournes obtenus sur achats',NULL,0,NULL,NULL,1,0,NULL,NULL),(332,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','61',1506,'Services extérieurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(333,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','611',332,'Sous-traitance générale',NULL,0,NULL,NULL,1,0,NULL,NULL),(334,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','612',332,'Redevances de crédit-bail',NULL,0,NULL,NULL,1,0,NULL,NULL),(335,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','613',332,'Locations',NULL,0,NULL,NULL,1,0,NULL,NULL),(336,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','614',332,'Charges locatives et de copropriété',NULL,0,NULL,NULL,1,0,NULL,NULL),(337,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','615',332,'Entretien et réparations',NULL,0,NULL,NULL,1,0,NULL,NULL),(338,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','616',332,'Primes d\'assurances',NULL,0,NULL,NULL,1,0,NULL,NULL),(339,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','617',332,'Etudes et recherches',NULL,0,NULL,NULL,1,0,NULL,NULL),(340,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','618',332,'Divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(341,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','619',332,'Rabais, remises et ristournes obtenus sur services extérieurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(342,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','62',1506,'Autres services extérieurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(343,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','621',342,'Personnel extérieur à l\'entreprise',NULL,0,NULL,NULL,1,0,NULL,NULL),(344,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','622',342,'Rémunérations d\'intermédiaires et honoraires',NULL,0,NULL,NULL,1,0,NULL,NULL),(345,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','623',342,'Publicité, publications, relations publiques',NULL,0,NULL,NULL,1,0,NULL,NULL),(346,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','624',342,'Transports de biens et transports collectifs du personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(347,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','625',342,'Déplacements, missions et réceptions',NULL,0,NULL,NULL,1,0,NULL,NULL),(348,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','626',342,'Frais postaux et de télécommunications',NULL,0,NULL,NULL,1,0,NULL,NULL),(349,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','627',342,'Services bancaires et assimilés',NULL,0,NULL,NULL,1,0,NULL,NULL),(350,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','628',342,'Divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(351,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','629',342,'Rabais, remises et ristournes obtenus sur autres services extérieurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(352,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','63',1506,'Impôts, taxes et versements assimilés',NULL,0,NULL,NULL,1,0,NULL,NULL),(353,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','631',352,'Impôts, taxes et versements assimilés sur rémunérations (administrations des impôts)',NULL,0,NULL,NULL,1,0,NULL,NULL),(354,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','633',352,'Impôts, taxes et versements assimilés sur rémunérations (autres organismes)',NULL,0,NULL,NULL,1,0,NULL,NULL),(355,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','635',352,'Autres impôts, taxes et versements assimilés (administrations des impôts)',NULL,0,NULL,NULL,1,0,NULL,NULL),(356,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','637',352,'Autres impôts, taxes et versements assimilés (autres organismes)',NULL,0,NULL,NULL,1,0,NULL,NULL),(357,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','64',1506,'Charges de personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(358,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','641',357,'Rémunérations du personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(359,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','644',357,'Rémunération du travail de l\'exploitant',NULL,0,NULL,NULL,1,0,NULL,NULL),(360,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','645',357,'Charges de sécurité sociale et de prévoyance',NULL,0,NULL,NULL,1,0,NULL,NULL),(361,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','646',357,'Cotisations sociales personnelles de l\'exploitant',NULL,0,NULL,NULL,1,0,NULL,NULL),(362,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','647',357,'Autres charges sociales',NULL,0,NULL,NULL,1,0,NULL,NULL),(363,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','648',357,'Autres charges de personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(364,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','65',1506,'Autres charges de gestion courante',NULL,0,NULL,NULL,1,0,NULL,NULL),(365,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','651',364,'Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(366,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','653',364,'Jetons de présence',NULL,0,NULL,NULL,1,0,NULL,NULL),(367,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','654',364,'Pertes sur créances irrécouvrables',NULL,0,NULL,NULL,1,0,NULL,NULL),(368,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','655',364,'Quote-part de résultat sur opérations faites en commun',NULL,0,NULL,NULL,1,0,NULL,NULL),(369,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','658',364,'Charges diverses de gestion courante',NULL,0,NULL,NULL,1,0,NULL,NULL),(370,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','66',1506,'Charges financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(371,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','661',370,'Charges d\'intérêts',NULL,0,NULL,NULL,1,0,NULL,NULL),(372,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','664',370,'Pertes sur créances liées à des participations',NULL,0,NULL,NULL,1,0,NULL,NULL),(373,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','665',370,'Escomptes accordés',NULL,0,NULL,NULL,1,0,NULL,NULL),(374,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','666',370,'Pertes de change',NULL,0,NULL,NULL,1,0,NULL,NULL),(375,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','667',370,'Charges nettes sur cessions de valeurs mobilières de placement',NULL,0,NULL,NULL,1,0,NULL,NULL),(376,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','668',370,'Autres charges financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(377,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','67',1506,'Charges exceptionnelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(378,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','671',377,'Charges exceptionnelles sur opérations de gestion',NULL,0,NULL,NULL,1,0,NULL,NULL),(379,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','672',377,'(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les charges sur exercices antérieurs)',NULL,0,NULL,NULL,1,0,NULL,NULL),(380,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','675',377,'Valeurs comptables des éléments d\'actif cédés',NULL,0,NULL,NULL,1,0,NULL,NULL),(381,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','678',377,'Autres charges exceptionnelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(382,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','68',1506,'Dotations aux amortissements et aux provisions',NULL,0,NULL,NULL,1,0,NULL,NULL),(383,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','681',382,'Dotations aux amortissements et aux provisions - Charges d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(384,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','686',382,'Dotations aux amortissements et aux provisions - Charges financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(385,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','687',382,'Dotations aux amortissements et aux provisions - Charges exceptionnelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(386,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','69',1506,'Participation des salariés - impôts sur les bénéfices et assimiles',NULL,0,NULL,NULL,1,0,NULL,NULL),(387,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','691',386,'Participation des salariés aux résultats',NULL,0,NULL,NULL,1,0,NULL,NULL),(388,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','695',386,'Impôts sur les bénéfices',NULL,0,NULL,NULL,1,0,NULL,NULL),(389,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','696',386,'Suppléments d\'impôt sur les sociétés liés aux distributions',NULL,0,NULL,NULL,1,0,NULL,NULL),(390,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','697',386,'Imposition forfaitaire annuelle des sociétés',NULL,0,NULL,NULL,1,0,NULL,NULL),(391,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','698',386,'Intégration fiscale',NULL,0,NULL,NULL,1,0,NULL,NULL),(392,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','699',386,'Produits - Reports en arrière des déficits',NULL,0,NULL,NULL,1,0,NULL,NULL),(393,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','70',1507,'Ventes de produits fabriqués, prestations de services, marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(394,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','701',393,'Ventes de produits finis',NULL,0,NULL,NULL,1,0,NULL,NULL),(395,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','702',393,'Ventes de produits intermédiaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(396,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','703',393,'Ventes de produits résiduels',NULL,0,NULL,NULL,1,0,NULL,NULL),(397,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','704',393,'Travaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(398,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','705',393,'Etudes',NULL,0,NULL,NULL,1,0,NULL,NULL),(399,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','706',393,'Prestations de services',NULL,0,NULL,NULL,1,0,NULL,NULL),(400,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','707',393,'Ventes de marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(401,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','708',393,'Produits des activités annexes',NULL,0,NULL,NULL,1,0,NULL,NULL),(402,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','709',393,'Rabais, remises et ristournes accordés par l\'entreprise',NULL,0,NULL,NULL,1,0,NULL,NULL),(403,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','71',1507,'Production stockée (ou déstockage)',NULL,0,NULL,NULL,1,0,NULL,NULL),(404,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','713',403,'Variation des stocks (en-cours de production, produits)',NULL,0,NULL,NULL,1,0,NULL,NULL),(405,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','72',1507,'Production immobilisée',NULL,0,NULL,NULL,1,0,NULL,NULL),(406,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','721',405,'Immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(407,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','722',405,'Immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(408,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','74',1507,'Subventions d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(409,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','75',1507,'Autres produits de gestion courante',NULL,0,NULL,NULL,1,0,NULL,NULL),(410,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','751',409,'Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(411,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','752',409,'Revenus des immeubles non affectés à des activités professionnelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(412,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','753',409,'Jetons de présence et rémunérations d\'administrateurs, gérants,...',NULL,0,NULL,NULL,1,0,NULL,NULL),(413,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','754',409,'Ristournes perçues des coopératives (provenant des excédents)',NULL,0,NULL,NULL,1,0,NULL,NULL),(414,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','755',409,'Quotes-parts de résultat sur opérations faites en commun',NULL,0,NULL,NULL,1,0,NULL,NULL),(415,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','758',409,'Produits divers de gestion courante',NULL,0,NULL,NULL,1,0,NULL,NULL),(416,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','76',1507,'Produits financiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(417,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','761',416,'Produits de participations',NULL,0,NULL,NULL,1,0,NULL,NULL),(418,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','762',416,'Produits des autres immobilisations financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(419,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','763',416,'Revenus des autres créances',NULL,0,NULL,NULL,1,0,NULL,NULL),(420,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','764',416,'Revenus des valeurs mobilières de placement',NULL,0,NULL,NULL,1,0,NULL,NULL),(421,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','765',416,'Escomptes obtenus',NULL,0,NULL,NULL,1,0,NULL,NULL),(422,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','766',416,'Gains de change',NULL,0,NULL,NULL,1,0,NULL,NULL),(423,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','767',416,'Produits nets sur cessions de valeurs mobilières de placement',NULL,0,NULL,NULL,1,0,NULL,NULL),(424,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','768',416,'Autres produits financiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(425,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','77',1507,'Produits exceptionnels',NULL,0,NULL,NULL,1,0,NULL,NULL),(426,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','771',425,'Produits exceptionnels sur opérations de gestion',NULL,0,NULL,NULL,1,0,NULL,NULL),(427,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','772',425,'(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les produits sur exercices antérieurs)',NULL,0,NULL,NULL,1,0,NULL,NULL),(428,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','775',425,'Produits des cessions d\'éléments d\'actif',NULL,0,NULL,NULL,1,0,NULL,NULL),(429,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','777',425,'Quote-part des subventions d\'investissement virée au résultat de l\'exercice',NULL,0,NULL,NULL,1,0,NULL,NULL),(430,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','778',425,'Autres produits exceptionnels',NULL,0,NULL,NULL,1,0,NULL,NULL),(431,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','78',1507,'Reprises sur amortissements et provisions',NULL,0,NULL,NULL,1,0,NULL,NULL),(432,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','781',431,'Reprises sur amortissements et provisions (à inscrire dans les produits d\'exploitation)',NULL,0,NULL,NULL,1,0,NULL,NULL),(433,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','786',431,'Reprises sur provisions pour risques (à inscrire dans les produits financiers)',NULL,0,NULL,NULL,1,0,NULL,NULL),(434,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','787',431,'Reprises sur provisions (à inscrire dans les produits exceptionnels)',NULL,0,NULL,NULL,1,0,NULL,NULL),(435,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','79',1507,'Transferts de charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(436,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','791',435,'Transferts de charges d\'exploitation ',NULL,0,NULL,NULL,1,0,NULL,NULL),(437,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','796',435,'Transferts de charges financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(438,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','797',435,'Transferts de charges exceptionnelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(439,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','10',1351,'Capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(440,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','100',439,'Capital souscrit ou capital personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(441,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1000',440,'Capital non amorti',NULL,0,NULL,NULL,1,0,NULL,NULL),(442,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1001',440,'Capital amorti',NULL,0,NULL,NULL,1,0,NULL,NULL),(443,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','101',439,'Capital non appelé',NULL,0,NULL,NULL,1,0,NULL,NULL),(444,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','109',439,'Compte de l\'exploitant',NULL,0,NULL,NULL,1,0,NULL,NULL),(445,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1090',444,'Opérations courantes',NULL,0,NULL,NULL,1,0,NULL,NULL),(446,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1091',444,'Impôts personnels',NULL,0,NULL,NULL,1,0,NULL,NULL),(447,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1092',444,'Rémunérations et autres avantages',NULL,0,NULL,NULL,1,0,NULL,NULL),(448,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','11',1351,'Primes d\'émission',NULL,0,NULL,NULL,1,0,NULL,NULL),(449,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','12',1351,'Plus-values de réévaluation',NULL,0,NULL,NULL,1,0,NULL,NULL),(450,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','120',449,'Plus-values de réévaluation sur immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(451,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1200',450,'Plus-values de réévaluation',NULL,0,NULL,NULL,1,0,NULL,NULL),(452,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1201',450,'Reprises de réductions de valeur',NULL,0,NULL,NULL,1,0,NULL,NULL),(453,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','121',449,'Plus-values de réévaluation sur immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(454,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1210',453,'Plus-values de réévaluation',NULL,0,NULL,NULL,1,0,NULL,NULL),(455,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1211',453,'Reprises de réductions de valeur',NULL,0,NULL,NULL,1,0,NULL,NULL),(456,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','122',449,'Plus-values de réévaluation sur immobilisations financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(457,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1220',456,'Plus-values de réévaluation',NULL,0,NULL,NULL,1,0,NULL,NULL),(458,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1221',456,'Reprises de réductions de valeur',NULL,0,NULL,NULL,1,0,NULL,NULL),(459,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','123',449,'Plus-values de réévaluation sur stocks',NULL,0,NULL,NULL,1,0,NULL,NULL),(460,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','124',449,'Reprises de réductions de valeur sur placements de trésorerie',NULL,0,NULL,NULL,1,0,NULL,NULL),(461,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','13',1351,'Réserve',NULL,0,NULL,NULL,1,0,NULL,NULL),(462,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','130',461,'Réserve légale',NULL,0,NULL,NULL,1,0,NULL,NULL),(463,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','131',461,'Réserves indisponibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(464,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1310',463,'Réserve pour actions propres',NULL,0,NULL,NULL,1,0,NULL,NULL),(465,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1311',463,'Autres réserves indisponibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(466,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','132',461,'Réserves immunisées',NULL,0,NULL,NULL,1,0,NULL,NULL),(467,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','133',461,'Réserves disponibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(468,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1330',467,'Réserve pour régularisation de dividendes',NULL,0,NULL,NULL,1,0,NULL,NULL),(469,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1331',467,'Réserve pour renouvellement des immobilisations',NULL,0,NULL,NULL,1,0,NULL,NULL),(470,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1332',467,'Réserve pour installations en faveur du personnel 1333 Réserves libres',NULL,0,NULL,NULL,1,0,NULL,NULL),(471,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','14',1351,'Bénéfice reporté (ou perte reportée)',NULL,0,NULL,NULL,1,0,NULL,NULL),(472,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','15',1351,'Subsides en capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(473,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','150',472,'Montants obtenus',NULL,0,NULL,NULL,1,0,NULL,NULL),(474,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','151',472,'Montants transférés aux résultats',NULL,0,NULL,NULL,1,0,NULL,NULL),(475,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','16',1351,'Provisions pour risques et charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(476,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','160',475,'Provisions pour pensions et obligations similaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(477,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','161',475,'Provisions pour charges fiscales',NULL,0,NULL,NULL,1,0,NULL,NULL),(478,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','162',475,'Provisions pour grosses réparations et gros entretiens',NULL,0,NULL,NULL,1,0,NULL,NULL),(479,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','163',475,'à 169 Provisions pour autres risques et charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(480,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','164',475,'Provisions pour sûretés personnelles ou réelles constituées à l\'appui de dettes et d\'engagements de tiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(481,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','165',475,'Provisions pour engagements relatifs à l\'acquisition ou à la cession d\'immobilisations',NULL,0,NULL,NULL,1,0,NULL,NULL),(482,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','166',475,'Provisions pour exécution de commandes passées ou reçues',NULL,0,NULL,NULL,1,0,NULL,NULL),(483,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','167',475,'Provisions pour positions et marchés à terme en devises ou positions et marchés à terme en marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(484,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','168',475,'Provisions pour garanties techniques attachées aux ventes et prestations déjà effectuées par l\'entreprise',NULL,0,NULL,NULL,1,0,NULL,NULL),(485,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','169',475,'Provisions pour autres risques et charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(486,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1690',485,'Pour litiges en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(487,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1691',485,'Pour amendes, doubles droits et pénalités',NULL,0,NULL,NULL,1,0,NULL,NULL),(488,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1692',485,'Pour propre assureur',NULL,0,NULL,NULL,1,0,NULL,NULL),(489,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1693',485,'Pour risques inhérents aux opérations de crédits à moyen ou long terme',NULL,0,NULL,NULL,1,0,NULL,NULL),(490,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1695',485,'Provision pour charge de liquidation',NULL,0,NULL,NULL,1,0,NULL,NULL),(491,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1696',485,'Provision pour départ de personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(492,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1699',485,'Pour risques divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(493,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17',1351,'Dettes à plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(494,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','170',493,'Emprunts subordonnés',NULL,0,NULL,NULL,1,0,NULL,NULL),(495,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1700',494,'Convertibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(496,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1701',494,'Non convertibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(497,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','171',493,'Emprunts obligataires non subordonnés',NULL,0,NULL,NULL,1,0,NULL,NULL),(498,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1710',498,'Convertibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(499,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1711',498,'Non convertibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(500,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','172',493,'Dettes de location-financement et assimilés',NULL,0,NULL,NULL,1,0,NULL,NULL),(501,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1720',500,'Dettes de location-financement de biens immobiliers',NULL,0,NULL,NULL,1,0,NULL,NULL),(502,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1721',500,'Dettes de location-financement de biens mobiliers',NULL,0,NULL,NULL,1,0,NULL,NULL),(503,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1722',500,'Dettes sur droits réels sur immeubles',NULL,0,NULL,NULL,1,0,NULL,NULL),(504,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','173',493,'Etablissements de crédit',NULL,0,NULL,NULL,1,0,NULL,NULL),(505,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1730',504,'Dettes en compte',NULL,0,NULL,NULL,1,0,NULL,NULL),(506,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17300',505,'Banque A',NULL,0,NULL,NULL,1,0,NULL,NULL),(507,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17301',505,'Banque B',NULL,0,NULL,NULL,1,0,NULL,NULL),(508,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17302',505,'Banque C',NULL,0,NULL,NULL,1,0,NULL,NULL),(509,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17303',505,'Banque D',NULL,0,NULL,NULL,1,0,NULL,NULL),(510,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1731',504,'Promesses',NULL,0,NULL,NULL,1,0,NULL,NULL),(511,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17310',510,'Banque A',NULL,0,NULL,NULL,1,0,NULL,NULL),(512,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17311',510,'Banque B',NULL,0,NULL,NULL,1,0,NULL,NULL),(513,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17312',510,'Banque C',NULL,0,NULL,NULL,1,0,NULL,NULL),(514,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17313',510,'Banque D',NULL,0,NULL,NULL,1,0,NULL,NULL),(515,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1732',504,'Crédits d\'acceptation',NULL,0,NULL,NULL,1,0,NULL,NULL),(516,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17320',515,'Banque A',NULL,0,NULL,NULL,1,0,NULL,NULL),(517,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17321',515,'Banque B',NULL,0,NULL,NULL,1,0,NULL,NULL),(518,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17322',515,'Banque C',NULL,0,NULL,NULL,1,0,NULL,NULL),(519,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17323',515,'Banque D',NULL,0,NULL,NULL,1,0,NULL,NULL),(520,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','174',493,'Autres emprunts',NULL,0,NULL,NULL,1,0,NULL,NULL),(521,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175',493,'Dettes commerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(522,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1750',521,'Fournisseurs : dettes en compte',NULL,0,NULL,NULL,1,0,NULL,NULL),(523,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17500',522,'Entreprises apparentées',NULL,0,NULL,NULL,1,0,NULL,NULL),(524,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175000',523,'Entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(525,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175001',523,'Entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(526,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17501',522,'Fournisseurs ordinaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(527,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175010',526,'Fournisseurs belges',NULL,0,NULL,NULL,1,0,NULL,NULL),(528,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175011',526,'Fournisseurs C.E.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(529,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175012',526,'Fournisseurs importation',NULL,0,NULL,NULL,1,0,NULL,NULL),(530,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1751',521,'Effets à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(531,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17510',530,'Entreprises apparentées',NULL,0,NULL,NULL,1,0,NULL,NULL),(532,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175100',531,'Entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(533,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175101',531,'Entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(534,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','17511',530,'Fournisseurs ordinaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(535,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175110',534,'Fournisseurs belges',NULL,0,NULL,NULL,1,0,NULL,NULL),(536,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175111',534,'Fournisseurs C.E.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(537,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','175112',534,'Fournisseurs importation',NULL,0,NULL,NULL,1,0,NULL,NULL),(538,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','176',493,'Acomptes reçus sur commandes',NULL,0,NULL,NULL,1,0,NULL,NULL),(539,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','178',493,'Cautionnements reçus en numéraires',NULL,0,NULL,NULL,1,0,NULL,NULL),(540,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','179',493,'Dettes diverses',NULL,0,NULL,NULL,1,0,NULL,NULL),(541,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1790',540,'Entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(542,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1791',540,'Autres entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(543,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1792',540,'Administrateurs, gérants et associés',NULL,0,NULL,NULL,1,0,NULL,NULL),(544,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1794',540,'Rentes viagères capitalisées',NULL,0,NULL,NULL,1,0,NULL,NULL),(545,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1798',540,'Dettes envers les coparticipants des associations momentanées et en participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(546,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','1799',540,'Autres dettes diverses',NULL,0,NULL,NULL,1,0,NULL,NULL),(547,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','CAPIT','18',1351,'Comptes de liaison des établissements et succursales',NULL,0,NULL,NULL,1,0,NULL,NULL),(548,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','20',1352,'Frais d\'établissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(549,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','200',548,'Frais de constitution et d\'augmentation de capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(550,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2000',549,'Frais de constitution et d\'augmentation de capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(551,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2009',549,'Amortissements sur frais de constitution et d\'augmentation de capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(552,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','201',548,'Frais d\'émission d\'emprunts et primes de remboursement',NULL,0,NULL,NULL,1,0,NULL,NULL),(553,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2010',552,'Agios sur emprunts et frais d\'émission d\'emprunts',NULL,0,NULL,NULL,1,0,NULL,NULL),(554,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2019',552,'Amortissements sur agios sur emprunts et frais d\'émission d\'emprunts',NULL,0,NULL,NULL,1,0,NULL,NULL),(555,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','202',548,'Autres frais d\'établissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(556,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2020',555,'Autres frais d\'établissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(557,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2029',555,'Amortissements sur autres frais d\'établissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(558,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','203',548,'Intérêts intercalaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(559,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2030',558,'Intérêts intercalaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(560,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2039',558,'Amortissements sur intérêts intercalaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(561,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','204',548,'Frais de restructuration',NULL,0,NULL,NULL,1,0,NULL,NULL),(562,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2040',561,'Coût des frais de restructuration',NULL,0,NULL,NULL,1,0,NULL,NULL),(563,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2049',561,'Amortissements sur frais de restructuration',NULL,0,NULL,NULL,1,0,NULL,NULL),(564,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','21',1352,'Immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(565,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','210',564,'Frais de recherche et de développement',NULL,0,NULL,NULL,1,0,NULL,NULL),(566,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2100',565,'Frais de recherche et de mise au point',NULL,0,NULL,NULL,1,0,NULL,NULL),(567,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2108',565,'Plus-values actées sur frais de recherche et de mise au point',NULL,0,NULL,NULL,1,0,NULL,NULL),(568,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2109',565,'Amortissements sur frais de recherche et de mise au point',NULL,0,NULL,NULL,1,0,NULL,NULL),(569,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','211',564,'Concessions, brevets, licences, savoir-faire, marque et droits similaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(570,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2110',569,'Concessions, brevets, licences, marques, etc',NULL,0,NULL,NULL,1,0,NULL,NULL),(571,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2118',569,'Plus-values actées sur concessions, etc',NULL,0,NULL,NULL,1,0,NULL,NULL),(572,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2119',569,'Amortissements sur concessions, etc',NULL,0,NULL,NULL,1,0,NULL,NULL),(573,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','212',564,'Goodwill',NULL,0,NULL,NULL,1,0,NULL,NULL),(574,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2120',573,'Coût d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(575,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2128',573,'Plus-values actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(576,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2129',573,'Amortissements sur goodwill',NULL,0,NULL,NULL,1,0,NULL,NULL),(577,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','213',564,'Acomptes versés',NULL,0,NULL,NULL,1,0,NULL,NULL),(578,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22',1352,'Terrains et constructions',NULL,0,NULL,NULL,1,0,NULL,NULL),(579,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','220',578,'Terrains',NULL,0,NULL,NULL,1,0,NULL,NULL),(580,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2200',579,'Terrains',NULL,0,NULL,NULL,1,0,NULL,NULL),(581,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2201',579,'Frais d\'acquisition sur terrains',NULL,0,NULL,NULL,1,0,NULL,NULL),(582,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2208',579,'Plus-values actées sur terrains',NULL,0,NULL,NULL,1,0,NULL,NULL),(583,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2209',579,'Amortissements et réductions de valeur',NULL,0,NULL,NULL,1,0,NULL,NULL),(584,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22090',583,'Amortissements sur frais d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(585,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22091',583,'Réductions de valeur sur terrains',NULL,0,NULL,NULL,1,0,NULL,NULL),(586,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','221',578,'Constructions',NULL,0,NULL,NULL,1,0,NULL,NULL),(587,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2210',586,'Bâtiments industriels',NULL,0,NULL,NULL,1,0,NULL,NULL),(588,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2211',586,'Bâtiments administratifs et commerciaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(589,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2212',586,'Autres bâtiments d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(590,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2213',586,'Voies de transport et ouvrages d\'art',NULL,0,NULL,NULL,1,0,NULL,NULL),(591,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2215',586,'Constructions sur sol d\'autrui',NULL,0,NULL,NULL,1,0,NULL,NULL),(592,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2216',586,'Frais d\'acquisition sur constructions',NULL,0,NULL,NULL,1,0,NULL,NULL),(593,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2218',586,'Plus-values actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(594,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22180',593,'Sur bâtiments industriels',NULL,0,NULL,NULL,1,0,NULL,NULL),(595,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22181',593,'Sur bâtiments administratifs et commerciaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(596,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22182',593,'Sur autres bâtiments d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(597,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22184',593,'Sur voies de transport et ouvrages d\'art',NULL,0,NULL,NULL,1,0,NULL,NULL),(598,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2219',586,'Amortissements sur constructions',NULL,0,NULL,NULL,1,0,NULL,NULL),(599,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22190',598,'Sur bâtiments industriels',NULL,0,NULL,NULL,1,0,NULL,NULL),(600,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22191',598,'Sur bâtiments administratifs et commerciaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(601,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22192',598,'Sur autres bâtiments d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(602,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22194',598,'Sur voies de transport et ouvrages d\'art',NULL,0,NULL,NULL,1,0,NULL,NULL),(603,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22195',598,'Sur constructions sur sol d\'autrui',NULL,0,NULL,NULL,1,0,NULL,NULL),(604,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22196',598,'Sur frais d\'acquisition sur constructions',NULL,0,NULL,NULL,1,0,NULL,NULL),(605,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','222',578,'Terrains bâtis',NULL,0,NULL,NULL,1,0,NULL,NULL),(606,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2220',605,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(607,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22200',606,'Bâtiments industriels',NULL,0,NULL,NULL,1,0,NULL,NULL),(608,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22201',606,'Bâtiments administratifs et commerciaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(609,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22202',606,'Autres bâtiments d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(610,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22203',606,'Voies de transport et ouvrages d\'art',NULL,0,NULL,NULL,1,0,NULL,NULL),(611,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22204',606,'Frais d\'acquisition des terrains à bâtir',NULL,0,NULL,NULL,1,0,NULL,NULL),(612,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2228',605,'Plus-values actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(613,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22280',612,'Sur bâtiments industriels',NULL,0,NULL,NULL,1,0,NULL,NULL),(614,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22281',612,'Sur bâtiments administratifs et commerciaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(615,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22282',612,'Sur autres bâtiments d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(616,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22283',612,'Sur voies de transport et ouvrages d\'art',NULL,0,NULL,NULL,1,0,NULL,NULL),(617,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2229',605,'Amortissements sur terrains bâtis',NULL,0,NULL,NULL,1,0,NULL,NULL),(618,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22290',617,'Sur bâtiments industriels',NULL,0,NULL,NULL,1,0,NULL,NULL),(619,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22291',617,'Sur bâtiments administratifs et commerciaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(620,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22292',617,'Sur autres bâtiments d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(621,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22293',617,'Sur voies de transport et ouvrages d\'art',NULL,0,NULL,NULL,1,0,NULL,NULL),(622,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','22294',617,'Sur frais d\'acquisition des terrains bâtis',NULL,0,NULL,NULL,1,0,NULL,NULL),(623,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','223',578,'Autres droits réels sur des immeubles',NULL,0,NULL,NULL,1,0,NULL,NULL),(624,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2230',623,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(625,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2238',623,'Plus-values actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(626,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2239',623,'Amortissements',NULL,0,NULL,NULL,1,0,NULL,NULL),(627,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','23',1352,'Installations, machines et outillages',NULL,0,NULL,NULL,1,0,NULL,NULL),(628,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','230',627,'Installations',NULL,0,NULL,NULL,1,0,NULL,NULL),(629,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2300',628,'Installations bâtiments industriels',NULL,0,NULL,NULL,1,0,NULL,NULL),(630,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2301',628,'Installations bâtiments administratifs et commerciaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(631,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2302',628,'Installations bâtiments d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(632,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2303',628,'Installations voies de transport et ouvrages d\'art',NULL,0,NULL,NULL,1,0,NULL,NULL),(637,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2304',628,'Installation de chauffage',NULL,0,NULL,NULL,1,0,NULL,NULL),(638,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2305',628,'Installation de conditionnement d\'air',NULL,0,NULL,NULL,1,0,NULL,NULL),(639,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2306',628,'Installation de chargement',NULL,0,NULL,NULL,1,0,NULL,NULL),(640,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','231',627,'Machines',NULL,0,NULL,NULL,1,0,NULL,NULL),(641,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2310',640,'Division A',NULL,0,NULL,NULL,1,0,NULL,NULL),(642,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2311',640,'Division B',NULL,0,NULL,NULL,1,0,NULL,NULL),(643,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2312',640,'Division C',NULL,0,NULL,NULL,1,0,NULL,NULL),(644,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','237',627,'Outillage',NULL,0,NULL,NULL,1,0,NULL,NULL),(645,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2370',644,'Division A',NULL,0,NULL,NULL,1,0,NULL,NULL),(646,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2371',644,'Division B',NULL,0,NULL,NULL,1,0,NULL,NULL),(647,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2372',644,'Division C',NULL,0,NULL,NULL,1,0,NULL,NULL),(648,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','238',627,'Plus-values actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(649,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2380',648,'Sur installations',NULL,0,NULL,NULL,1,0,NULL,NULL),(650,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2381',648,'Sur machines',NULL,0,NULL,NULL,1,0,NULL,NULL),(651,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2382',648,'Sur outillage',NULL,0,NULL,NULL,1,0,NULL,NULL),(652,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','239',627,'Amortissements',NULL,0,NULL,NULL,1,0,NULL,NULL),(653,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2390',652,'Sur installations',NULL,0,NULL,NULL,1,0,NULL,NULL),(654,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2391',652,'Sur machines',NULL,0,NULL,NULL,1,0,NULL,NULL),(655,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2392',652,'Sur outillage',NULL,0,NULL,NULL,1,0,NULL,NULL),(656,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24',1352,'Mobilier et matériel roulant',NULL,0,NULL,NULL,1,0,NULL,NULL),(657,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','240',656,'Mobilier',NULL,0,NULL,NULL,1,0,NULL,NULL),(658,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2400',656,'Mobilier',NULL,0,NULL,NULL,1,0,NULL,NULL),(659,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24000',658,'Mobilier des bâtiments industriels',NULL,0,NULL,NULL,1,0,NULL,NULL),(660,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24001',658,'Mobilier des bâtiments administratifs et commerciaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(661,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24002',658,'Mobilier des autres bâtiments d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(662,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24003',658,'Mobilier oeuvres sociales',NULL,0,NULL,NULL,1,0,NULL,NULL),(663,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2401',657,'Matériel de bureau et de service social',NULL,0,NULL,NULL,1,0,NULL,NULL),(664,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24010',663,'Des bâtiments industriels',NULL,0,NULL,NULL,1,0,NULL,NULL),(665,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24011',663,'Des bâtiments administratifs et commerciaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(666,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24012',663,'Des autres bâtiments d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(667,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24013',663,'Des oeuvres sociales',NULL,0,NULL,NULL,1,0,NULL,NULL),(668,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2408',657,'Plus-values actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(669,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24080',668,'Plus-values actées sur mobilier',NULL,0,NULL,NULL,1,0,NULL,NULL),(670,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24081',668,'Plus-values actées sur matériel de bureau et service social',NULL,0,NULL,NULL,1,0,NULL,NULL),(671,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2409',657,'Amortissements',NULL,0,NULL,NULL,1,0,NULL,NULL),(672,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24090',671,'Amortissements sur mobilier',NULL,0,NULL,NULL,1,0,NULL,NULL),(673,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24091',671,'Amortissements sur matériel de bureau et service social',NULL,0,NULL,NULL,1,0,NULL,NULL),(674,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','241',656,'Matériel roulant',NULL,0,NULL,NULL,1,0,NULL,NULL),(675,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2410',674,'Matériel automobile',NULL,0,NULL,NULL,1,0,NULL,NULL),(676,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24100',675,'Voitures',NULL,0,NULL,NULL,1,0,NULL,NULL),(677,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24105',675,'Camions',NULL,0,NULL,NULL,1,0,NULL,NULL),(678,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2411',674,'Matériel ferroviaire',NULL,0,NULL,NULL,1,0,NULL,NULL),(679,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2412',674,'Matériel fluvial',NULL,0,NULL,NULL,1,0,NULL,NULL),(680,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2413',674,'Matériel naval',NULL,0,NULL,NULL,1,0,NULL,NULL),(681,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2414',674,'Matériel aérien',NULL,0,NULL,NULL,1,0,NULL,NULL),(682,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2418',674,'Plus-values sur matériel roulant',NULL,0,NULL,NULL,1,0,NULL,NULL),(683,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24180',682,'Plus-values sur matériel automobile',NULL,0,NULL,NULL,1,0,NULL,NULL),(684,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24181',682,'Idem sur matériel ferroviaire',NULL,0,NULL,NULL,1,0,NULL,NULL),(685,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24182',682,'Idem sur matériel fluvial',NULL,0,NULL,NULL,1,0,NULL,NULL),(686,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24183',682,'Idem sur matériel naval',NULL,0,NULL,NULL,1,0,NULL,NULL),(687,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24184',682,'Idem sur matériel aérien',NULL,0,NULL,NULL,1,0,NULL,NULL),(688,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2419',674,'Amortissements sur matériel roulant',NULL,0,NULL,NULL,1,0,NULL,NULL),(689,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24190',688,'Amortissements sur matériel automobile',NULL,0,NULL,NULL,1,0,NULL,NULL),(690,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24191',688,'Idem sur matériel ferroviaire',NULL,0,NULL,NULL,1,0,NULL,NULL),(691,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24192',688,'Idem sur matériel fluvial',NULL,0,NULL,NULL,1,0,NULL,NULL),(692,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24193',688,'Idem sur matériel naval',NULL,0,NULL,NULL,1,0,NULL,NULL),(693,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','24194',688,'Idem sur matériel aérien',NULL,0,NULL,NULL,1,0,NULL,NULL),(694,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','25',1352,'Immobilisation détenues en location-financement et droits similaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(695,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','250',694,'Terrains et constructions',NULL,0,NULL,NULL,1,0,NULL,NULL),(696,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2500',695,'Terrains',NULL,0,NULL,NULL,1,0,NULL,NULL),(697,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2501',695,'Constructions',NULL,0,NULL,NULL,1,0,NULL,NULL),(698,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2508',695,'Plus-values sur emphytéose, leasing et droits similaires : terrains et constructions',NULL,0,NULL,NULL,1,0,NULL,NULL),(699,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2509',695,'Amortissements et réductions de valeur sur terrains et constructions en leasing',NULL,0,NULL,NULL,1,0,NULL,NULL),(700,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','251',694,'Installations, machines et outillage',NULL,0,NULL,NULL,1,0,NULL,NULL),(701,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2510',700,'Installations',NULL,0,NULL,NULL,1,0,NULL,NULL),(702,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2511',700,'Machines',NULL,0,NULL,NULL,1,0,NULL,NULL),(703,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2512',700,'Outillage',NULL,0,NULL,NULL,1,0,NULL,NULL),(704,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2518',700,'Plus-values actées sur installations machines et outillage pris en leasing',NULL,0,NULL,NULL,1,0,NULL,NULL),(705,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2519',700,'Amortissements sur installations machines et outillage pris en leasing',NULL,0,NULL,NULL,1,0,NULL,NULL),(706,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','252',694,'Mobilier et matériel roulant',NULL,0,NULL,NULL,1,0,NULL,NULL),(707,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2520',706,'Mobilier',NULL,0,NULL,NULL,1,0,NULL,NULL),(708,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2521',706,'Matériel roulant',NULL,0,NULL,NULL,1,0,NULL,NULL),(709,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2528',706,'Plus-values actées sur mobilier et matériel roulant en leasing',NULL,0,NULL,NULL,1,0,NULL,NULL),(710,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2529',706,'Amortissements sur mobilier et matériel roulant en leasing',NULL,0,NULL,NULL,1,0,NULL,NULL),(711,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','26',1352,'Autres immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(712,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','260',711,'Frais d\'aménagements de locaux pris en location',NULL,0,NULL,NULL,1,0,NULL,NULL),(713,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','261',711,'Maison d\'habitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(714,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','262',711,'Réserve immobilière',NULL,0,NULL,NULL,1,0,NULL,NULL),(715,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','263',711,'Matériel d\'emballage',NULL,0,NULL,NULL,1,0,NULL,NULL),(716,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','264',711,'Emballages récupérables',NULL,0,NULL,NULL,1,0,NULL,NULL),(717,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','268',711,'Plus-values actées sur autres immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(718,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','269',711,'Amortissements sur autres immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(719,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2690',718,'Amortissements sur frais d\'aménagement des locaux pris en location',NULL,0,NULL,NULL,1,0,NULL,NULL),(720,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2691',718,'Amortissements sur maison d\'habitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(721,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2692',718,'Amortissements sur réserve immobilière',NULL,0,NULL,NULL,1,0,NULL,NULL),(722,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2693',718,'Amortissements sur matériel d\'emballage',NULL,0,NULL,NULL,1,0,NULL,NULL),(723,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2694',718,'Amortissements sur emballages récupérables',NULL,0,NULL,NULL,1,0,NULL,NULL),(724,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','27',1352,'Immobilisations corporelles en cours et acomptes versés',NULL,0,NULL,NULL,1,0,NULL,NULL),(725,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','270',724,'Immobilisations en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(726,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2700',725,'Constructions',NULL,0,NULL,NULL,1,0,NULL,NULL),(727,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2701',725,'Installations machines et outillage',NULL,0,NULL,NULL,1,0,NULL,NULL),(728,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2702',725,'Mobilier et matériel roulant',NULL,0,NULL,NULL,1,0,NULL,NULL),(729,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2703',725,'Autres immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(730,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','271',724,'Avances et acomptes versés sur immobilisations en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(731,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','28',1352,'Immobilisations financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(732,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','280',731,'Participations dans des entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(733,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2800',732,'Valeur d\'acquisition (peut être subdivisé par participation)',NULL,0,NULL,NULL,1,0,NULL,NULL),(734,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2801',732,'Montants non appelés (idem)',NULL,0,NULL,NULL,1,0,NULL,NULL),(735,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2808',732,'Plus-values actées (idem)',NULL,0,NULL,NULL,1,0,NULL,NULL),(736,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2809',732,'Réductions de valeurs actées (idem)',NULL,0,NULL,NULL,1,0,NULL,NULL),(737,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','281',731,'Créances sur des entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(738,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2810',737,'Créances en compte',NULL,0,NULL,NULL,1,0,NULL,NULL),(739,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2811',737,'Effets à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(740,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2812',737,'Titres à revenu fixes',NULL,0,NULL,NULL,1,0,NULL,NULL),(741,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2817',737,'Créances douteuses',NULL,0,NULL,NULL,1,0,NULL,NULL),(742,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2819',737,'Réductions de valeurs actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(743,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','282',731,'Participations dans des entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(744,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2820',743,'Valeur d\'acquisition (peut être subdivisé par participation)',NULL,0,NULL,NULL,1,0,NULL,NULL),(745,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2821',743,'Montants non appelés (idem)',NULL,0,NULL,NULL,1,0,NULL,NULL),(746,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2828',743,'Plus-values actées (idem)',NULL,0,NULL,NULL,1,0,NULL,NULL),(747,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2829',743,'Réductions de valeurs actées (idem)',NULL,0,NULL,NULL,1,0,NULL,NULL),(748,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','283',731,'Créances sur des entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(749,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2830',748,'Créances en compte',NULL,0,NULL,NULL,1,0,NULL,NULL),(750,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2831',748,'Effets à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(751,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2832',748,'Titres à revenu fixe',NULL,0,NULL,NULL,1,0,NULL,NULL),(752,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2837',748,'Créances douteuses',NULL,0,NULL,NULL,1,0,NULL,NULL),(753,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','2839',748,'Réductions de valeurs actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(754,1,NULL,'2018-01-22 17:28:15','PCMN-BASE','IMMO','284',731,'Autres actions et parts',NULL,0,NULL,NULL,1,0,NULL,NULL),(755,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2840',754,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(756,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2841',754,'Montants non appelés',NULL,0,NULL,NULL,1,0,NULL,NULL),(757,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2848',754,'Plus-values actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(758,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2849',754,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(759,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','285',731,'Autres créances',NULL,0,NULL,NULL,1,0,NULL,NULL),(760,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2850',759,'Créances en compte',NULL,0,NULL,NULL,1,0,NULL,NULL),(761,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2851',759,'Effets à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(762,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2852',759,'Titres à revenu fixe',NULL,0,NULL,NULL,1,0,NULL,NULL),(763,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2857',759,'Créances douteuses',NULL,0,NULL,NULL,1,0,NULL,NULL),(764,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2859',759,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(765,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','288',731,'Cautionnements versés en numéraires',NULL,0,NULL,NULL,1,0,NULL,NULL),(766,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2880',765,'Téléphone, téléfax, télex',NULL,0,NULL,NULL,1,0,NULL,NULL),(767,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2881',765,'Gaz',NULL,0,NULL,NULL,1,0,NULL,NULL),(768,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2882',765,'Eau',NULL,0,NULL,NULL,1,0,NULL,NULL),(769,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2883',765,'Electricité',NULL,0,NULL,NULL,1,0,NULL,NULL),(770,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2887',765,'Autres cautionnements versés en numéraires',NULL,0,NULL,NULL,1,0,NULL,NULL),(771,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29',1352,'Créances à plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(772,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','290',771,'Créances commerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(773,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2900',772,'Clients',NULL,0,NULL,NULL,1,0,NULL,NULL),(774,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29000',773,'Créances en compte sur entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(775,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29001',773,'Sur entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(776,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29002',773,'Sur clients Belgique',NULL,0,NULL,NULL,1,0,NULL,NULL),(777,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29003',773,'Sur clients C.E.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(778,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29004',773,'Sur clients exportation hors C.E.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(779,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29005',773,'Créances sur les coparticipants (associations momentanées)',NULL,0,NULL,NULL,1,0,NULL,NULL),(780,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2901',772,'Effets à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(781,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29010',780,'Sur entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(782,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29011',780,'Sur entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(783,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29012',780,'Sur clients Belgique',NULL,0,NULL,NULL,1,0,NULL,NULL),(784,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29013',780,'Sur clients C.E.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(785,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29014',780,'Sur clients exportation hors C.E.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(786,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2905',772,'Retenues sur garanties',NULL,0,NULL,NULL,1,0,NULL,NULL),(787,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2906',772,'Acomptes versés',NULL,0,NULL,NULL,1,0,NULL,NULL),(788,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2907',772,'Créances douteuses (à ventiler comme clients 2900)',NULL,0,NULL,NULL,1,0,NULL,NULL),(789,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2909',772,'Réductions de valeur actées (à ventiler comme clients 2900)',NULL,0,NULL,NULL,1,0,NULL,NULL),(790,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','291',771,'Autres créances',NULL,0,NULL,NULL,1,0,NULL,NULL),(791,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2910',790,'Créances en compte',NULL,0,NULL,NULL,1,0,NULL,NULL),(792,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29100',791,'Sur entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(793,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29101',791,'Sur entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(794,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29102',791,'Sur autres débiteurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(795,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2911',790,'Effets à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(796,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29110',795,'Sur entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(797,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29111',795,'Sur entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(798,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','29112',795,'Sur autres débiteurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(799,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2912',790,'Créances résultant de la cession d\'immobilisations données en leasing',NULL,0,NULL,NULL,1,0,NULL,NULL),(800,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2917',790,'Créances douteuses',NULL,0,NULL,NULL,1,0,NULL,NULL),(801,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','IMMO','2919',790,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(802,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','30',1353,'Approvisionnements - matières premières',NULL,0,NULL,NULL,1,0,NULL,NULL),(803,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','300',802,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(804,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','309',802,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(805,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','31',1353,'Approvsionnements et fournitures',NULL,0,NULL,NULL,1,0,NULL,NULL),(806,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','310',805,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(807,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3100',806,'Matières d\'approvisionnement',NULL,0,NULL,NULL,1,0,NULL,NULL),(808,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3101',806,'Energie, charbon, coke, mazout, essence, propane',NULL,0,NULL,NULL,1,0,NULL,NULL),(809,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3102',806,'Produits d\'entretien',NULL,0,NULL,NULL,1,0,NULL,NULL),(810,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3103',806,'Fournitures diverses et petit outillage',NULL,0,NULL,NULL,1,0,NULL,NULL),(811,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3104',806,'Imprimés et fournitures de bureau',NULL,0,NULL,NULL,1,0,NULL,NULL),(812,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3105',806,'Fournitures de services sociaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(813,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3106',806,'Emballages commerciaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(814,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','31060',813,'Emballages perdus',NULL,0,NULL,NULL,1,0,NULL,NULL),(815,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','31061',813,'Emballages récupérables',NULL,0,NULL,NULL,1,0,NULL,NULL),(816,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','319',805,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(817,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','32',1353,'En cours de fabrication',NULL,0,NULL,NULL,1,0,NULL,NULL),(818,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','320',817,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(819,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3200',818,'Produits semi-ouvrés',NULL,0,NULL,NULL,1,0,NULL,NULL),(820,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3201',818,'Produits en cours de fabrication',NULL,0,NULL,NULL,1,0,NULL,NULL),(821,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3202',818,'Travaux en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(822,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3205',818,'Déchets',NULL,0,NULL,NULL,1,0,NULL,NULL),(823,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3206',818,'Rebuts',NULL,0,NULL,NULL,1,0,NULL,NULL),(824,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3209',818,'Travaux en association momentanée',NULL,0,NULL,NULL,1,0,NULL,NULL),(825,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','329',817,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(826,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','33',1353,'Produits finis',NULL,0,NULL,NULL,1,0,NULL,NULL),(827,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','330',826,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(828,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3300',827,'Produits finis',NULL,0,NULL,NULL,1,0,NULL,NULL),(829,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','339',826,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(830,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','34',1353,'Marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(831,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','340',830,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(832,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3400',831,'Groupe A',NULL,0,NULL,NULL,1,0,NULL,NULL),(833,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3401',831,'Groupe B',NULL,0,NULL,NULL,1,0,NULL,NULL),(834,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3402',831,'Groupe C',NULL,0,NULL,NULL,1,0,NULL,NULL),(835,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','349',830,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(836,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','35',1353,'Immeubles destinés à la vente',NULL,0,NULL,NULL,1,0,NULL,NULL),(837,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','350',836,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(838,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3500',837,'Immeuble A',NULL,0,NULL,NULL,1,0,NULL,NULL),(839,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3501',837,'Immeuble B',NULL,0,NULL,NULL,1,0,NULL,NULL),(840,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3502',837,'Immeuble C',NULL,0,NULL,NULL,1,0,NULL,NULL),(841,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','351',836,'Immeubles construits en vue de leur revente',NULL,0,NULL,NULL,1,0,NULL,NULL),(842,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3510',841,'Immeuble A',NULL,0,NULL,NULL,1,0,NULL,NULL),(843,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3511',841,'Immeuble B',NULL,0,NULL,NULL,1,0,NULL,NULL),(844,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','3512',841,'Immeuble C',NULL,0,NULL,NULL,1,0,NULL,NULL),(845,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','359',836,'Réductions de valeurs actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(846,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','36',1353,'Acomptes versés sur achats pour stocks',NULL,0,NULL,NULL,1,0,NULL,NULL),(847,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','360',846,'Acomptes versés (à ventiler éventuellement par catégorie)',NULL,0,NULL,NULL,1,0,NULL,NULL),(848,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','369',846,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(849,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','37',1353,'Commandes en cours d\'exécution',NULL,0,NULL,NULL,1,0,NULL,NULL),(850,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','370',849,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(851,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','371',849,'Bénéfice pris en compte',NULL,0,NULL,NULL,1,0,NULL,NULL),(852,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','STOCK','379',849,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(853,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','40',1354,'Créances commerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(854,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','400',853,'Clients',NULL,0,NULL,NULL,1,0,NULL,NULL),(855,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4007',854,'Rabais, remises et ristournes à accorder et autres notes de crédit à établir',NULL,0,NULL,NULL,1,0,NULL,NULL),(856,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4008',854,'Créances résultant de livraisons de biens (associations momentanées)',NULL,0,NULL,NULL,1,0,NULL,NULL),(857,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','401',853,'Effets à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(858,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4010',857,'Effets à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(859,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4013',857,'Effets à l\'encaissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(860,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4015',857,'Effets à l\'escompte',NULL,0,NULL,NULL,1,0,NULL,NULL),(861,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','402',853,'Clients, créances courantes, entreprises apparentées, administrateurs et gérants',NULL,0,NULL,NULL,1,0,NULL,NULL),(862,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4020',861,'Entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(863,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4021',861,'Autres entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(864,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4022',861,'Administrateurs et gérants d\'entreprise',NULL,0,NULL,NULL,1,0,NULL,NULL),(865,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','403',853,'Effets à recevoir sur entreprises apparentées et administrateurs et gérants',NULL,0,NULL,NULL,1,0,NULL,NULL),(866,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4030',865,'Entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(867,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4031',865,'Autres entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(868,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4032',865,'Administrateurs et gérants de l\'entreprise',NULL,0,NULL,NULL,1,0,NULL,NULL),(869,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','404',853,'Produits à recevoir (factures à établir)',NULL,0,NULL,NULL,1,0,NULL,NULL),(870,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','405',853,'Clients : retenues sur garanties',NULL,0,NULL,NULL,1,0,NULL,NULL),(871,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','406',853,'Acomptes versés',NULL,0,NULL,NULL,1,0,NULL,NULL),(872,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','407',853,'Créances douteuses',NULL,0,NULL,NULL,1,0,NULL,NULL),(873,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','408',853,'Compensation clients',NULL,0,NULL,NULL,1,0,NULL,NULL),(874,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','409',853,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(875,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','41',1354,'Autres créances',NULL,0,NULL,NULL,1,0,NULL,NULL),(876,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','410',875,'Capital appelé, non versé',NULL,0,NULL,NULL,1,0,NULL,NULL),(877,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4100',876,'Appels de fonds',NULL,0,NULL,NULL,1,0,NULL,NULL),(878,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4101',876,'Actionnaires défaillants',NULL,0,NULL,NULL,1,0,NULL,NULL),(879,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','411',875,'T.V.A. à récupérer',NULL,0,NULL,NULL,1,0,NULL,NULL),(880,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4110',879,'T.V.A. due',NULL,0,NULL,NULL,1,0,NULL,NULL),(881,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4111',879,'T.V.A. déductible',NULL,0,NULL,NULL,1,0,NULL,NULL),(882,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4112',879,'Compte courant administration T.V.A.',NULL,0,NULL,NULL,1,0,NULL,NULL),(883,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4118',879,'Taxe d\'égalisation due',NULL,0,NULL,NULL,1,0,NULL,NULL),(884,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','412',875,'Impôts et versements fiscaux à récupérer',NULL,0,NULL,NULL,1,0,NULL,NULL),(885,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4120',884,'Impôts belges sur le résultat',NULL,0,NULL,NULL,1,0,NULL,NULL),(886,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4125',884,'Autres impôts belges',NULL,0,NULL,NULL,1,0,NULL,NULL),(887,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4128',884,'Impôts étrangers',NULL,0,NULL,NULL,1,0,NULL,NULL),(888,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','414',875,'Produits à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(889,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','416',875,'Créances diverses',NULL,0,NULL,NULL,1,0,NULL,NULL),(890,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4160',889,'Associés (compte d\'apport en société)',NULL,0,NULL,NULL,1,0,NULL,NULL),(891,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4161',889,'Avances et prêts au personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(892,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4162',889,'Compte courant des associés en S.P.R.L.',NULL,0,NULL,NULL,1,0,NULL,NULL),(893,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4163',889,'Compte courant des administrateurs et gérants',NULL,0,NULL,NULL,1,0,NULL,NULL),(894,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4164',889,'Créances sur sociétés apparentées',NULL,0,NULL,NULL,1,0,NULL,NULL),(895,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4166',889,'Emballages et matériel à rendre',NULL,0,NULL,NULL,1,0,NULL,NULL),(896,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4167',889,'Etat et établissements publics',NULL,0,NULL,NULL,1,0,NULL,NULL),(897,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','41670',896,'Subsides à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(898,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','41671',896,'Autres créances',NULL,0,NULL,NULL,1,0,NULL,NULL),(899,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4168',889,'Rabais, ristournes et remises à obtenir et autres avoirs non encore reçus',NULL,0,NULL,NULL,1,0,NULL,NULL),(900,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','417',875,'Créances douteuses',NULL,0,NULL,NULL,1,0,NULL,NULL),(901,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','418',875,'Cautionnements versés en numéraires',NULL,0,NULL,NULL,1,0,NULL,NULL),(902,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','419',875,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(903,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','42',1354,'Dettes à plus d\'un an échéant dans l\'année',NULL,0,NULL,NULL,1,0,NULL,NULL),(904,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','420',903,'Emprunts subordonnés',NULL,0,NULL,NULL,1,0,NULL,NULL),(905,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4200',904,'Convertibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(906,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4201',904,'Non convertibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(907,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','421',903,'Emprunts obligataires non subordonnés',NULL,0,NULL,NULL,1,0,NULL,NULL),(908,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4210',907,'Convertibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(909,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4211',907,'Non convertibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(910,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','422',903,'Dettes de location-financement et assimilées',NULL,0,NULL,NULL,1,0,NULL,NULL),(911,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4220',910,'Financement de biens immobiliers',NULL,0,NULL,NULL,1,0,NULL,NULL),(912,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4221',910,'Financement de biens mobiliers',NULL,0,NULL,NULL,1,0,NULL,NULL),(913,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','423',903,'Etablissements de crédit',NULL,0,NULL,NULL,1,0,NULL,NULL),(914,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4230',913,'Dettes en compte',NULL,0,NULL,NULL,1,0,NULL,NULL),(915,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4231',913,'Promesses',NULL,0,NULL,NULL,1,0,NULL,NULL),(916,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4232',913,'Crédits d\'acceptation',NULL,0,NULL,NULL,1,0,NULL,NULL),(917,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','424',903,'Autres emprunts',NULL,0,NULL,NULL,1,0,NULL,NULL),(918,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','425',903,'Dettes commerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(919,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4250',918,'Fournisseurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(920,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4251',918,'Effets à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(921,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','426',903,'Cautionnements reçus en numéraires',NULL,0,NULL,NULL,1,0,NULL,NULL),(922,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','429',903,'Dettes diverses',NULL,0,NULL,NULL,1,0,NULL,NULL),(923,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4290',922,'Entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(924,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4291',922,'Entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(925,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4292',922,'Administrateurs, gérants, associés',NULL,0,NULL,NULL,1,0,NULL,NULL),(926,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4299',922,'Autres dettes',NULL,0,NULL,NULL,1,0,NULL,NULL),(927,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','43',1354,'Dettes financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(928,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','430',927,'Etablissements de crédit. Emprunts en compte à terme fixe',NULL,0,NULL,NULL,1,0,NULL,NULL),(929,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','431',927,'Etablissements de crédit. Promesses',NULL,0,NULL,NULL,1,0,NULL,NULL),(930,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','432',927,'Etablissements de crédit. Crédits d\'acceptation',NULL,0,NULL,NULL,1,0,NULL,NULL),(931,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','433',927,'Etablissements de crédit. Dettes en compte courant',NULL,0,NULL,NULL,1,0,NULL,NULL),(932,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','439',927,'Autres emprunts',NULL,0,NULL,NULL,1,0,NULL,NULL),(933,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44',1354,'Dettes commerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(934,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','440',933,'Fournisseurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(935,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4400',934,'Entreprises apparentées',NULL,0,NULL,NULL,1,0,NULL,NULL),(936,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44000',935,'Entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(937,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44001',935,'Entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(938,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4401',934,'Fournisseurs ordinaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(939,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44010',938,'Fournisseurs belges',NULL,0,NULL,NULL,1,0,NULL,NULL),(940,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44011',938,'Fournisseurs CEE',NULL,0,NULL,NULL,1,0,NULL,NULL),(941,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44012',938,'Fournisseurs importation',NULL,0,NULL,NULL,1,0,NULL,NULL),(942,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4402',934,'Dettes envers les coparticipants (associations momentanées)',NULL,0,NULL,NULL,1,0,NULL,NULL),(943,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4403',934,'Fournisseurs - retenues de garanties',NULL,0,NULL,NULL,1,0,NULL,NULL),(944,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','441',933,'Effets à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(945,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4410',944,'Entreprises apparentées',NULL,0,NULL,NULL,1,0,NULL,NULL),(946,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44100',945,'Entreprises liées',NULL,0,NULL,NULL,1,0,NULL,NULL),(947,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44101',945,'Entreprises avec lesquelles il existe un lien de participation',NULL,0,NULL,NULL,1,0,NULL,NULL),(948,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4411',944,'Fournisseurs ordinaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(949,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44110',948,'Fournisseurs belges',NULL,0,NULL,NULL,1,0,NULL,NULL),(950,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44111',948,'Fournisseurs CEE',NULL,0,NULL,NULL,1,0,NULL,NULL),(951,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','44112',948,'Fournisseurs importation',NULL,0,NULL,NULL,1,0,NULL,NULL),(952,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','444',933,'Factures à recevoir',NULL,0,NULL,NULL,1,0,NULL,NULL),(953,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','446',933,'Acomptes reçus',NULL,0,NULL,NULL,1,0,NULL,NULL),(954,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','448',933,'Compensations fournisseurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(955,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','45',1354,'Dettes fiscales, salariales et sociales',NULL,0,NULL,NULL,1,0,NULL,NULL),(956,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','450',955,'Dettes fiscales estimées',NULL,0,NULL,NULL,1,0,NULL,NULL),(957,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4501',956,'Impôts sur le résultat',NULL,0,NULL,NULL,1,0,NULL,NULL),(958,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4505',956,'Autres impôts en Belgique',NULL,0,NULL,NULL,1,0,NULL,NULL),(959,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4508',956,'Impôts à l\'étranger',NULL,0,NULL,NULL,1,0,NULL,NULL),(960,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','451',955,'T.V.A. à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(961,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4510',960,'T.V.A. due',NULL,0,NULL,NULL,1,0,NULL,NULL),(962,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4511',960,'T.V.A. déductible',NULL,0,NULL,NULL,1,0,NULL,NULL),(963,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4512',960,'Compte courant administration T.V.A.',NULL,0,NULL,NULL,1,0,NULL,NULL),(964,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4518',960,'Taxe d\'égalisation due',NULL,0,NULL,NULL,1,0,NULL,NULL),(965,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','452',955,'Impôts et taxes à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(966,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4520',965,'Autres impôts sur le résultat',NULL,0,NULL,NULL,1,0,NULL,NULL),(967,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4525',965,'Autres impôts et taxes en Belgique',NULL,0,NULL,NULL,1,0,NULL,NULL),(968,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','45250',967,'Précompte immobilier',NULL,0,NULL,NULL,1,0,NULL,NULL),(969,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','45251',967,'Impôts communaux à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(970,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','45252',967,'Impôts provinciaux à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(971,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','45253',967,'Autres impôts et taxes à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(972,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4528',965,'Impôts et taxes à l\'étranger',NULL,0,NULL,NULL,1,0,NULL,NULL),(973,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','453',955,'Précomptes retenus',NULL,0,NULL,NULL,1,0,NULL,NULL),(974,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4530',973,'Précompte professionnel retenu sur rémunérations',NULL,0,NULL,NULL,1,0,NULL,NULL),(975,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4531',973,'Précompte professionnel retenu sur tantièmes',NULL,0,NULL,NULL,1,0,NULL,NULL),(976,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4532',973,'Précompte mobilier retenu sur dividendes attribués',NULL,0,NULL,NULL,1,0,NULL,NULL),(977,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4533',973,'Précompte mobilier retenu sur intérêts payés',NULL,0,NULL,NULL,1,0,NULL,NULL),(978,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4538',973,'Autres précomptes retenus',NULL,0,NULL,NULL,1,0,NULL,NULL),(979,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','454',955,'Office National de la Sécurité Sociale',NULL,0,NULL,NULL,1,0,NULL,NULL),(980,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4540',979,'Arriérés',NULL,0,NULL,NULL,1,0,NULL,NULL),(981,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4541',979,'1er trimestre',NULL,0,NULL,NULL,1,0,NULL,NULL),(982,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4542',979,'2ème trimestre',NULL,0,NULL,NULL,1,0,NULL,NULL),(983,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4543',979,'3ème trimestre',NULL,0,NULL,NULL,1,0,NULL,NULL),(984,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4544',979,'4ème trimestre',NULL,0,NULL,NULL,1,0,NULL,NULL),(985,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','455',955,'Rémunérations',NULL,0,NULL,NULL,1,0,NULL,NULL),(986,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4550',985,'Administrateurs, gérants et commissaires (non réviseurs)',NULL,0,NULL,NULL,1,0,NULL,NULL),(987,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4551',985,'Direction',NULL,0,NULL,NULL,1,0,NULL,NULL),(988,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4552',985,'Employés',NULL,0,NULL,NULL,1,0,NULL,NULL),(989,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4553',985,'Ouvriers',NULL,0,NULL,NULL,1,0,NULL,NULL),(990,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','456',955,'Pécules de vacances',NULL,0,NULL,NULL,1,0,NULL,NULL),(991,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4560',990,'Direction',NULL,0,NULL,NULL,1,0,NULL,NULL),(992,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4561',990,'Employés',NULL,0,NULL,NULL,1,0,NULL,NULL),(993,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4562',990,'Ouvriers',NULL,0,NULL,NULL,1,0,NULL,NULL),(994,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','459',955,'Autres dettes sociales',NULL,0,NULL,NULL,1,0,NULL,NULL),(995,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4590',994,'Provision pour gratifications de fin d\'année',NULL,0,NULL,NULL,1,0,NULL,NULL),(996,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4591',994,'Départs de personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(997,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4592',994,'Oppositions sur rémunérations',NULL,0,NULL,NULL,1,0,NULL,NULL),(998,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4593',994,'Assurances relatives au personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(999,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','45930',998,'Assurance loi',NULL,0,NULL,NULL,1,0,NULL,NULL),(1000,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','45931',998,'Assurance salaire garanti',NULL,0,NULL,NULL,1,0,NULL,NULL),(1001,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','45932',998,'Assurance groupe',NULL,0,NULL,NULL,1,0,NULL,NULL),(1002,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','45933',998,'Assurances individuelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1003,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4594',994,'Caisse d\'assurances sociales pour travailleurs indépendants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1004,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4597',994,'Dettes et provisions sociales diverses',NULL,0,NULL,NULL,1,0,NULL,NULL),(1005,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','46',1354,'Acomptes reçus sur commande',NULL,0,NULL,NULL,1,0,NULL,NULL),(1006,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','47',1354,'Dettes découlant de l\'affectation des résultats',NULL,0,NULL,NULL,1,0,NULL,NULL),(1007,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','470',1006,'Dividendes et tantièmes d\'exercices antérieurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(1008,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','471',1006,'Dividendes de l\'exercice',NULL,0,NULL,NULL,1,0,NULL,NULL),(1009,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','472',1006,'Tantièmes de l\'exercice',NULL,0,NULL,NULL,1,0,NULL,NULL),(1010,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','473',1006,'Autres allocataires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1011,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','48',4,'Dettes diverses',NULL,0,NULL,NULL,1,0,NULL,NULL),(1012,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','480',1011,'Obligations et coupons échus',NULL,0,NULL,NULL,1,0,NULL,NULL),(1013,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','481',1011,'Actionnaires - capital à rembourser',NULL,0,NULL,NULL,1,0,NULL,NULL),(1014,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','482',1011,'Participation du personnel à payer',NULL,0,NULL,NULL,1,0,NULL,NULL),(1015,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','483',1011,'Acomptes reçus d\'autres tiers à moins d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(1016,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','486',1011,'Emballages et matériel consignés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1017,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','488',1011,'Cautionnements reçus en numéraires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1018,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','489',1011,'Autres dettes diverses',NULL,0,NULL,NULL,1,0,NULL,NULL),(1019,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','49',1354,'Comptes de régularisation et compte d\'attente',NULL,0,NULL,NULL,1,0,NULL,NULL),(1020,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','490',1019,'Charges à reporter (à subdiviser par catégorie de charges)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1021,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','491',1019,'Produits acquis',NULL,0,NULL,NULL,1,0,NULL,NULL),(1022,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4910',1021,'Produits d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(1023,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','49100',1022,'Ristournes et rabais à obtenir',NULL,0,NULL,NULL,1,0,NULL,NULL),(1024,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','49101',1022,'Commissions à obtenir',NULL,0,NULL,NULL,1,0,NULL,NULL),(1025,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','49102',1022,'Autres produits d\'exploitation (redevances par exemple)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1026,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4911',1021,'Produits financiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1027,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','49110',1026,'Intérêts courus et non échus sur prêts et débits',NULL,0,NULL,NULL,1,0,NULL,NULL),(1028,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','49111',1026,'Autres produits financiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1029,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','492',1019,'Charges à imputer (à subdiviser par catégorie de charges)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1030,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','493',1019,'Produits à reporter',NULL,0,NULL,NULL,1,0,NULL,NULL),(1031,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4930',1030,'Produits d\'exploitation à reporter',NULL,0,NULL,NULL,1,0,NULL,NULL),(1032,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4931',1030,'Produits financiers à reporter',NULL,0,NULL,NULL,1,0,NULL,NULL),(1033,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','499',1019,'Comptes d\'attente',NULL,0,NULL,NULL,1,0,NULL,NULL),(1034,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4990',1033,'Compte d\'attente',NULL,0,NULL,NULL,1,0,NULL,NULL),(1035,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4991',1033,'Compte de répartition périodique des charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(1036,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','TIERS','4999',1033,'Transferts d\'exercice',NULL,0,NULL,NULL,1,0,NULL,NULL),(1037,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','50',1355,'Actions propres',NULL,0,NULL,NULL,1,0,NULL,NULL),(1038,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','51',1355,'Actions et parts',NULL,0,NULL,NULL,1,0,NULL,NULL),(1039,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','510',1038,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(1040,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','511',1038,'Montants non appelés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1041,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','519',1038,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1042,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','52',1355,'Titres à revenus fixes',NULL,0,NULL,NULL,1,0,NULL,NULL),(1043,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','520',1042,'Valeur d\'acquisition',NULL,0,NULL,NULL,1,0,NULL,NULL),(1044,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','529',1042,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1045,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','53',1355,'Dépots à terme',NULL,0,NULL,NULL,1,0,NULL,NULL),(1046,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','530',1045,'De plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(1047,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','531',1045,'De plus d\'un mois et à un an au plus',NULL,0,NULL,NULL,1,0,NULL,NULL),(1048,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','532',1045,'d\'un mois au plus',NULL,0,NULL,NULL,1,0,NULL,NULL),(1049,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','539',1045,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1050,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','54',1355,'Valeurs échues à l\'encaissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(1051,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','540',1050,'Chèques à encaisser',NULL,0,NULL,NULL,1,0,NULL,NULL),(1052,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','541',1050,'Coupons à encaisser',NULL,0,NULL,NULL,1,0,NULL,NULL),(1053,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','55',1355,'Etablissements de crédit - Comptes ouverts auprès des divers établissements.',NULL,0,NULL,NULL,1,0,NULL,NULL),(1054,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','550',1053,'Comptes courants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1055,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','551',1053,'Chèques émis',NULL,0,NULL,NULL,1,0,NULL,NULL),(1056,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','559',1053,'Réductions de valeur actées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1057,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','56',1355,'Office des chèques postaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(1058,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','560',1057,'Compte courant',NULL,0,NULL,NULL,1,0,NULL,NULL),(1059,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','561',1057,'Chèques émis',NULL,0,NULL,NULL,1,0,NULL,NULL),(1060,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','57',1355,'Caisses',NULL,0,NULL,NULL,1,0,NULL,NULL),(1061,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','570',1060,'à 577 Caisses - espèces ( 0 - centrale ; 7 - succursales et agences)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1062,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','578',1060,'Caisses - timbres ( 0 - fiscaux ; 1 - postaux)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1063,1,NULL,'2018-01-22 17:28:16','PCMN-BASE','FINAN','58',1355,'Virements internes',NULL,0,NULL,NULL,1,0,NULL,NULL),(1064,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','60',1356,'Approvisionnements et marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1065,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','600',1064,'Achats de matières premières',NULL,0,NULL,NULL,1,0,NULL,NULL),(1066,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','601',1064,'Achats de fournitures',NULL,0,NULL,NULL,1,0,NULL,NULL),(1067,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','602',1064,'Achats de services, travaux et études',NULL,0,NULL,NULL,1,0,NULL,NULL),(1068,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','603',1064,'Sous-traitances générales',NULL,0,NULL,NULL,1,0,NULL,NULL),(1069,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','604',1064,'Achats de marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1070,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','605',1064,'Achats d\'immeubles destinés à la revente',NULL,0,NULL,NULL,1,0,NULL,NULL),(1071,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','608',1064,'Remises , ristournes et rabais obtenus sur achats',NULL,0,NULL,NULL,1,0,NULL,NULL),(1072,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','609',1064,'Variations de stocks',NULL,0,NULL,NULL,1,0,NULL,NULL),(1073,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6090',1072,'De matières premières',NULL,0,NULL,NULL,1,0,NULL,NULL),(1074,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6091',1072,'De fournitures',NULL,0,NULL,NULL,1,0,NULL,NULL),(1075,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6094',1072,'De marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1076,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6095',1072,'d\'immeubles destinés à la vente',NULL,0,NULL,NULL,1,0,NULL,NULL),(1077,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61',1356,'Services et biens divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1078,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','610',1077,'Loyers et charges locatives',NULL,0,NULL,NULL,1,0,NULL,NULL),(1079,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6100',1078,'Loyers divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1080,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6101',1078,'Charges locatives (assurances, frais de confort,etc)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1081,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','611',1077,'Entretien et réparation (fournitures et prestations)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1082,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','612',1077,'Fournitures faites à l\'entreprise',NULL,0,NULL,NULL,1,0,NULL,NULL),(1083,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6120',1082,'Eau, gaz, électricité, vapeur',NULL,0,NULL,NULL,1,0,NULL,NULL),(1084,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61200',1083,'Eau',NULL,0,NULL,NULL,1,0,NULL,NULL),(1085,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61201',1083,'Gaz',NULL,0,NULL,NULL,1,0,NULL,NULL),(1086,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61202',1083,'Electricité',NULL,0,NULL,NULL,1,0,NULL,NULL),(1087,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61203',1083,'Vapeur',NULL,0,NULL,NULL,1,0,NULL,NULL),(1088,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6121',1082,'Téléphone, télégrammes, télex, téléfax, frais postaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(1089,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61210',1088,'Téléphone',NULL,0,NULL,NULL,1,0,NULL,NULL),(1090,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61211',1088,'Télégrammes',NULL,0,NULL,NULL,1,0,NULL,NULL),(1091,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61212',1088,'Télex et téléfax',NULL,0,NULL,NULL,1,0,NULL,NULL),(1092,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61213',1088,'Frais postaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(1093,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6122',1082,'Livres, bibliothèque',NULL,0,NULL,NULL,1,0,NULL,NULL),(1094,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6123',1082,'Imprimés et fournitures de bureau (si non comptabilisé au 601)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1095,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','613',1077,'Rétributions de tiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1096,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6130',1095,'Redevances et royalties',NULL,0,NULL,NULL,1,0,NULL,NULL),(1097,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61300',1096,'Redevances pour brevets, licences, marques et accessoires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1098,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61301',1096,'Autres redevances (procédés de fabrication)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1099,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6131',1095,'Assurances non relatives au personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(1100,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61310',1099,'Assurance incendie',NULL,0,NULL,NULL,1,0,NULL,NULL),(1101,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61311',1099,'Assurance vol',NULL,0,NULL,NULL,1,0,NULL,NULL),(1102,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61312',1099,'Assurance autos',NULL,0,NULL,NULL,1,0,NULL,NULL),(1103,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61313',1099,'Assurance crédit',NULL,0,NULL,NULL,1,0,NULL,NULL),(1104,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61314',1099,'Assurances frais généraux',NULL,0,NULL,NULL,1,0,NULL,NULL),(1105,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6132',1095,'Divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1106,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61320',1105,'Commissions aux tiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1107,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61321',1105,'Honoraires d\'avocats, d\'experts, etc',NULL,0,NULL,NULL,1,0,NULL,NULL),(1108,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61322',1105,'Cotisations aux groupements professionnels',NULL,0,NULL,NULL,1,0,NULL,NULL),(1109,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61323',1105,'Dons, libéralités, etc',NULL,0,NULL,NULL,1,0,NULL,NULL),(1110,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61324',1105,'Frais de contentieux',NULL,0,NULL,NULL,1,0,NULL,NULL),(1111,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61325',1105,'Publications légales',NULL,0,NULL,NULL,1,0,NULL,NULL),(1112,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6133',1095,'Transports et déplacements',NULL,0,NULL,NULL,1,0,NULL,NULL),(1113,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61330',1112,'Transports de personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(1114,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','61331',1112,'Voyages, déplacements et représentations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1115,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6134',1095,'Personnel intérimaire',NULL,0,NULL,NULL,1,0,NULL,NULL),(1116,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','614',1077,'Annonces, publicité, propagande et documentation',NULL,0,NULL,NULL,1,0,NULL,NULL),(1117,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6140',1116,'Annonces et insertions',NULL,0,NULL,NULL,1,0,NULL,NULL),(1118,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6141',1116,'Catalogues et imprimés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1119,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6142',1116,'Echantillons',NULL,0,NULL,NULL,1,0,NULL,NULL),(1120,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6143',1116,'Foires et expositions',NULL,0,NULL,NULL,1,0,NULL,NULL),(1121,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6144',1116,'Primes',NULL,0,NULL,NULL,1,0,NULL,NULL),(1122,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6145',1116,'Cadeaux à la clientèle',NULL,0,NULL,NULL,1,0,NULL,NULL),(1123,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6146',1116,'Missions et réceptions',NULL,0,NULL,NULL,1,0,NULL,NULL),(1124,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6147',1116,'Documentation',NULL,0,NULL,NULL,1,0,NULL,NULL),(1125,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','615',1077,'Sous-traitants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1126,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6150',1125,'Sous-traitants pour activités propres',NULL,0,NULL,NULL,1,0,NULL,NULL),(1127,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6151',1125,'Sous-traitants d\'associations momentanées (coparticipants)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1128,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6152',1125,'Quote-part bénéficiaire des coparticipants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1129,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','617',1077,'Personnel intérimaire et personnes mises à la disposition de l\'entreprise',NULL,0,NULL,NULL,1,0,NULL,NULL),(1130,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','618',1077,'Rémunérations, primes pour assurances extralégales, pensions de retraite et de survie des administrateurs, gérants et associés actifs qui ne sont pas attribuées en vertu d\'un contrat de travail',NULL,0,NULL,NULL,1,0,NULL,NULL),(1131,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','62',1356,'Rémunérations, charges sociales et pensions',NULL,0,NULL,NULL,1,0,NULL,NULL),(1132,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','620',1131,'Rémunérations et avantages sociaux directs',NULL,0,NULL,NULL,1,0,NULL,NULL),(1133,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6200',1132,'Administrateurs ou gérants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1134,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6201',1132,'Personnel de direction',NULL,0,NULL,NULL,1,0,NULL,NULL),(1135,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6202',1132,'Employés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1136,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6203',1132,'Ouvriers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1137,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6204',1132,'Autres membres du personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(1138,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','621',1131,'Cotisations patronales d\'assurances sociales',NULL,0,NULL,NULL,1,0,NULL,NULL),(1139,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6210',1138,'Sur salaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1140,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6211',1138,'Sur appointements et commissions',NULL,0,NULL,NULL,1,0,NULL,NULL),(1141,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','622',1131,'Primes patronales pour assurances extralégales',NULL,0,NULL,NULL,1,0,NULL,NULL),(1142,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','623',1131,'Autres frais de personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(1143,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6230',1142,'Assurances du personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(1144,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','62300',1143,'Assurances loi, responsabilité civile, chemin du travail',NULL,0,NULL,NULL,1,0,NULL,NULL),(1145,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','62301',1143,'Assurance salaire garanti',NULL,0,NULL,NULL,1,0,NULL,NULL),(1146,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','62302',1143,'Assurances individuelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1147,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6231',1142,'Charges sociales diverses',NULL,0,NULL,NULL,1,0,NULL,NULL),(1148,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','62310',1147,'Jours fériés payés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1149,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','62311',1147,'Salaire hebdomadaire garanti',NULL,0,NULL,NULL,1,0,NULL,NULL),(1150,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','62312',1147,'Allocations familiales complémentaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1151,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6232',1142,'Charges sociales des administrateurs, gérants et commissaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1152,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','62320',1151,'Allocations familiales complémentaires pour non salariés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1153,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','62321',1151,'Lois sociales pour indépendants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1154,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','62322',1151,'Divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1155,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','624',1131,'Pensions de retraite et de survie',NULL,0,NULL,NULL,1,0,NULL,NULL),(1156,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6240',1155,'Administrateurs et gérants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1157,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6241',1155,'Personnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(1158,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','625',1131,'Provision pour pécule de vacances',NULL,0,NULL,NULL,1,0,NULL,NULL),(1159,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6250',1158,'Dotations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1160,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6251',1158,'Utilisations et reprises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1161,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','63',1356,'Amortissements, réductions de valeur et provisions pour risques et charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(1162,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','630',1161,'Dotations aux amortissements et aux réductions de valeur sur immobilisations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1163,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6300',1162,'Dotations aux amortissements sur frais d\'établissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(1164,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6301',1162,'Dotations aux amortissements sur immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1165,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6302',1162,'Dotations aux amortissements sur immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1166,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6308',1162,'Dotations aux réductions de valeur sur immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1167,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6309',1162,'Dotations aux réductions de valeur sur immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1168,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','631',1161,'Réductions de valeur sur stocks',NULL,0,NULL,NULL,1,0,NULL,NULL),(1169,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6310',1168,'Dotations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1170,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6311',1168,'Reprises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1171,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','632',1161,'Réductions de valeur sur commandes en cours d\'exécution',NULL,0,NULL,NULL,1,0,NULL,NULL),(1172,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6320',1171,'Dotations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1173,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6321',1171,'Reprises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1174,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','633',1161,'Réductions de valeur sur créances commerciales à plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(1175,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6330',1174,'Dotations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1176,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6331',1174,'Reprises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1177,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','634',1161,'Réductions de valeur sur créances commerciales à un an au plus',NULL,0,NULL,NULL,1,0,NULL,NULL),(1178,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6340',1177,'Dotations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1179,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6341',1177,'Reprises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1180,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','635',1161,'Provisions pour pensions et obligations similaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1181,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6350',1180,'Dotations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1182,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6351',1180,'Utilisations et reprises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1183,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','636',11613,'Provisions pour grosses réparations et gros entretiens',NULL,0,NULL,NULL,1,0,NULL,NULL),(1184,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6360',1183,'Dotations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1185,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6361',1183,'Utilisations et reprises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1186,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','637',1161,'Provisions pour autres risques et charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(1187,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6370',1186,'Dotations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1188,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6371',1186,'Utilisations et reprises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1189,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','64',1356,'Autres charges d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(1190,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','640',1189,'Charges fiscales d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(1191,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6400',1190,'Taxes et impôts directs',NULL,0,NULL,NULL,1,0,NULL,NULL),(1192,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','64000',1191,'Taxes sur autos et camions',NULL,0,NULL,NULL,1,0,NULL,NULL),(1193,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6401',1190,'Taxes et impôts indirects',NULL,0,NULL,NULL,1,0,NULL,NULL),(1194,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','64010',1193,'Timbres fiscaux pris en charge par la firme',NULL,0,NULL,NULL,1,0,NULL,NULL),(1195,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','64011',1193,'Droits d\'enregistrement',NULL,0,NULL,NULL,1,0,NULL,NULL),(1196,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','64012',1193,'T.V.A. non déductible',NULL,0,NULL,NULL,1,0,NULL,NULL),(1197,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6402',1190,'Impôts provinciaux et communaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(1198,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','64020',1197,'Taxe sur la force motrice',NULL,0,NULL,NULL,1,0,NULL,NULL),(1199,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','64021',1197,'Taxe sur le personnel occupé',NULL,0,NULL,NULL,1,0,NULL,NULL),(1200,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6403',1190,'Taxes diverses',NULL,0,NULL,NULL,1,0,NULL,NULL),(1201,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','641',1189,'Moins-values sur réalisations courantes d\'immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1202,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','642',1189,'Moins-values sur réalisations de créances commerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(1203,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','643',1189,'à 648 Charges d\'exploitations diverses',NULL,0,NULL,NULL,1,0,NULL,NULL),(1204,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','649',1189,'Charges d\'exploitation portées à l\'actif au titre de restructuration',NULL,0,NULL,NULL,1,0,NULL,NULL),(1205,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','65',1356,'Charges financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(1206,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','650',1205,'Charges des dettes',NULL,0,NULL,NULL,1,0,NULL,NULL),(1207,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6500',1206,'Intérêts, commissions et frais afférents aux dettes',NULL,0,NULL,NULL,1,0,NULL,NULL),(1208,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6501',1206,'Amortissements des agios et frais d\'émission d\'emprunts',NULL,0,NULL,NULL,1,0,NULL,NULL),(1209,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6502',1206,'Autres charges de dettes',NULL,0,NULL,NULL,1,0,NULL,NULL),(1210,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6503',1206,'Intérêts intercalaires portés à l\'actif',NULL,0,NULL,NULL,1,0,NULL,NULL),(1211,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','651',1205,'Réductions de valeur sur actifs circulants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1212,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6510',1211,'Dotations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1213,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6511',1211,'Reprises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1214,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','652',1205,'Moins-values sur réalisation d\'actifs circulants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1215,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','653',1205,'Charges d\'escompte de créances',NULL,0,NULL,NULL,1,0,NULL,NULL),(1216,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','654',1205,'Différences de change',NULL,0,NULL,NULL,1,0,NULL,NULL),(1217,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','655',1205,'Ecarts de conversion des devises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1218,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','656',1205,'Frais de banques, de chèques postaux',NULL,0,NULL,NULL,1,0,NULL,NULL),(1219,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','657',1205,'Commissions sur ouvertures de crédit, cautions et avals',NULL,0,NULL,NULL,1,0,NULL,NULL),(1220,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','658',1205,'Frais de vente des titres',NULL,0,NULL,NULL,1,0,NULL,NULL),(1221,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','66',1356,'Charges exceptionnelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1222,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','660',1221,'Amortissements et réductions de valeur exceptionnels',NULL,0,NULL,NULL,1,0,NULL,NULL),(1223,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6600',1222,'Sur frais d\'établissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(1224,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6601',1222,'Sur immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1225,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6602',1222,'Sur immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1226,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','661',1221,'Réductions de valeur sur immobilisations financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(1227,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','662',1221,'Provisions pour risques et charges exceptionnels',NULL,0,NULL,NULL,1,0,NULL,NULL),(1228,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','663',1221,'Moins-values sur réalisation d\'actifs immobilisés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1229,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6630',1228,'Sur immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1230,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6631',1228,'Sur immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1231,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6632',1228,'Sur immobilisations détenues en location-financement et droits similaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1232,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6633',1228,'Sur immobilisations financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(1233,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6634',1228,'Sur immeubles acquis ou construits en vue de la revente',NULL,0,NULL,NULL,1,0,NULL,NULL),(1234,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','664',1221,'à 668 Autres charges exceptionnelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1236,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','665',1221,'Différence de charge',NULL,0,NULL,NULL,1,0,NULL,NULL),(1237,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','669',1221,'Charges exceptionnelles transférées à l\'actif en frais de restructuration',NULL,0,NULL,NULL,1,0,NULL,NULL),(1238,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','67',1356,'Impôts sur le résultat',NULL,0,NULL,NULL,1,0,NULL,NULL),(1239,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','670',1238,'Impôts belges sur le résultat de l\'exercice',NULL,0,NULL,NULL,1,0,NULL,NULL),(1240,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6700',1239,'Impôts et précomptes dus ou versés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1241,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6701',1239,'Excédent de versements d\'impôts et précomptes porté à l\'actif',NULL,0,NULL,NULL,1,0,NULL,NULL),(1242,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6702',1239,'Charges fiscales estimées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1243,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','671',1238,'Impôts belges sur le résultat d\'exercices antérieurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(1244,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6710',1243,'Suppléments d\'impôts dus ou versés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1245,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6711',1243,'Suppléments d\'impôts estimés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1246,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6712',1243,'Provisions fiscales constituées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1247,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','672',1238,'Impôts étrangers sur le résultat de l\'exercice',NULL,0,NULL,NULL,1,0,NULL,NULL),(1248,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','673',1238,'Impôts étrangers sur le résultat d\'exercices antérieurs',NULL,0,NULL,NULL,1,0,NULL,NULL),(1249,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','68',1356,'Transferts aux réserves immunisées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1250,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','69',1356,'Affectation des résultats',NULL,0,NULL,NULL,1,0,NULL,NULL),(1251,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','690',1250,'Perte reportée de l\'exercice précédent',NULL,0,NULL,NULL,1,0,NULL,NULL),(1252,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','691',1250,'Dotation à la réserve légale',NULL,0,NULL,NULL,1,0,NULL,NULL),(1253,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','692',1250,'Dotation aux autres réserves',NULL,0,NULL,NULL,1,0,NULL,NULL),(1254,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','693',1250,'Bénéfice à reporter',NULL,0,NULL,NULL,1,0,NULL,NULL),(1255,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','694',1250,'Rémunération du capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(1256,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','695',1250,'Administrateurs ou gérants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1257,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','696',1250,'Autres allocataires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1258,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','70',1357,'Chiffre d\'affaires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1260,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','700',1258,'Ventes de marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1261,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7000',1260,'Ventes en Belgique',NULL,0,NULL,NULL,1,0,NULL,NULL),(1262,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7001',1260,'Ventes dans les pays membres de la C.E.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(1263,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7002',1260,'Ventes à l\'exportation',NULL,0,NULL,NULL,1,0,NULL,NULL),(1264,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','701',1258,'Ventes de produits finis',NULL,0,NULL,NULL,1,0,NULL,NULL),(1265,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7010',1264,'Ventes en Belgique',NULL,0,NULL,NULL,1,0,NULL,NULL),(1266,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7011',1264,'Ventes dans les pays membres de la C.E.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(1267,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7012',1264,'Ventes à l\'exportation',NULL,0,NULL,NULL,1,0,NULL,NULL),(1268,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','702',1258,'Ventes de déchets et rebuts',NULL,0,NULL,NULL,1,0,NULL,NULL),(1269,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7020',1268,'Ventes en Belgique',NULL,0,NULL,NULL,1,0,NULL,NULL),(1270,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7021',1268,'Ventes dans les pays membres de la C.E.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(1271,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7022',1268,'Ventes à l\'exportation',NULL,0,NULL,NULL,1,0,NULL,NULL),(1272,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','703',1258,'Ventes d\'emballages récupérables',NULL,0,NULL,NULL,1,0,NULL,NULL),(1273,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','704',1258,'Facturations des travaux en cours (associations momentanées)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1274,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','705',1258,'Prestations de services',NULL,0,NULL,NULL,1,0,NULL,NULL),(1275,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7050',1274,'Prestations de services en Belgique',NULL,0,NULL,NULL,1,0,NULL,NULL),(1276,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7051',1274,'Prestations de services dans les pays membres de la C.E.E.',NULL,0,NULL,NULL,1,0,NULL,NULL),(1277,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7052',1274,'Prestations de services en vue de l\'exportation',NULL,0,NULL,NULL,1,0,NULL,NULL),(1278,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','706',1258,'Pénalités et dédits obtenus par l\'entreprise',NULL,0,NULL,NULL,1,0,NULL,NULL),(1279,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','708',1258,'Remises, ristournes et rabais accordés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1280,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7080',1279,'Sur ventes de marchandises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1281,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7081',1279,'Sur ventes de produits finis',NULL,0,NULL,NULL,1,0,NULL,NULL),(1282,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7082',1279,'Sur ventes de déchets et rebuts',NULL,0,NULL,NULL,1,0,NULL,NULL),(1283,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7083',1279,'Sur prestations de services',NULL,0,NULL,NULL,1,0,NULL,NULL),(1284,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7084',1279,'Mali sur travaux facturés aux associations momentanées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1285,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','71',1357,'Variation des stocks et des commandes en cours d\'exécution',NULL,0,NULL,NULL,1,0,NULL,NULL),(1286,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','712',1285,'Des en cours de fabrication',NULL,0,NULL,NULL,1,0,NULL,NULL),(1287,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','713',1285,'Des produits finis',NULL,0,NULL,NULL,1,0,NULL,NULL),(1288,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','715',1285,'Des immeubles construits destinés à la vente',NULL,0,NULL,NULL,1,0,NULL,NULL),(1289,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','717',1285,'Des commandes en cours d\'exécution',NULL,0,NULL,NULL,1,0,NULL,NULL),(1290,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7170',1289,'Commandes en cours - Coût de revient',NULL,0,NULL,NULL,1,0,NULL,NULL),(1291,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','71700',1290,'Coût des commandes en cours d\'exécution',NULL,0,NULL,NULL,1,0,NULL,NULL),(1292,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','71701',1290,'Coût des travaux en cours des associations momentanées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1293,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7171',1289,'Bénéfices portés en compte sur commandes en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(1294,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','71710',1293,'Sur commandes en cours d\'exécution',NULL,0,NULL,NULL,1,0,NULL,NULL),(1295,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','71711',1293,'Sur travaux en cours des associations momentanées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1296,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','72',1357,'Production immobilisée',NULL,0,NULL,NULL,1,0,NULL,NULL),(1297,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','720',1296,'En frais d\'établissement',NULL,0,NULL,NULL,1,0,NULL,NULL),(1298,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','721',1296,'En immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1299,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','722',1296,'En immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1300,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','723',1296,'En immobilisations en cours',NULL,0,NULL,NULL,1,0,NULL,NULL),(1301,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','74',1357,'Autres produits d\'exploitation',NULL,0,NULL,NULL,1,0,NULL,NULL),(1302,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','740',1301,'Subsides d\'exploitation et montants compensatoires',NULL,0,NULL,NULL,1,0,NULL,NULL),(1303,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','741',1301,'Plus-values sur réalisations courantes d\'immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1304,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','742',1301,'Plus-values sur réalisations de créances commerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(1305,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','743',1301,'à 749 Produits d\'exploitation divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1307,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','744',1301,'Commissions et courtages',NULL,0,NULL,NULL,1,0,NULL,NULL),(1308,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','745',1301,'Redevances pour brevets et licences',NULL,0,NULL,NULL,1,0,NULL,NULL),(1309,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','746',1301,'Prestations de services (transports, études, etc)',NULL,0,NULL,NULL,1,0,NULL,NULL),(1310,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','747',1301,'Revenus des immeubles affectés aux activités non professionnelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1311,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','748',1301,'Locations diverses à caractère professionnel',NULL,0,NULL,NULL,1,0,NULL,NULL),(1312,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','749',1301,'Produits divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1313,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7490',1312,'Bonis sur reprises d\'emballages consignés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1314,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7491',1312,'Bonis sur travaux en associations momentanées',NULL,0,NULL,NULL,1,0,NULL,NULL),(1315,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','75',1357,'Produits financiers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1316,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','750',1315,'Produits des immobilisations financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(1317,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7500',1316,'Revenus des actions',NULL,0,NULL,NULL,1,0,NULL,NULL),(1318,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7501',1316,'Revenus des obligations',NULL,0,NULL,NULL,1,0,NULL,NULL),(1319,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7502',1316,'Revenus des créances à plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(1320,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','751',1315,'Produits des actifs circulants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1321,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','752',1315,'Plus-values sur réalisations d\'actifs circulants',NULL,0,NULL,NULL,1,0,NULL,NULL),(1322,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','753',1315,'Subsides en capital et en intérêts',NULL,0,NULL,NULL,1,0,NULL,NULL),(1323,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','754',1315,'Différences de change',NULL,0,NULL,NULL,1,0,NULL,NULL),(1324,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','755',1315,'Ecarts de conversion des devises',NULL,0,NULL,NULL,1,0,NULL,NULL),(1325,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','756',1315,'à 759 Produits financiers divers',NULL,0,NULL,NULL,1,0,NULL,NULL),(1327,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','757',1315,'Escomptes obtenus',NULL,0,NULL,NULL,1,0,NULL,NULL),(1328,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','76',1357,'Produits exceptionnels',NULL,0,NULL,NULL,1,0,NULL,NULL),(1329,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','760',1328,'Reprises d\'amortissements et de réductions de valeur',NULL,0,NULL,NULL,1,0,NULL,NULL),(1330,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7600',1329,'Sur immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1331,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7601',1329,'Sur immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1332,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','761',1328,'Reprises de réductions de valeur sur immobilisations financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(1333,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','762',1328,'Reprises de provisions pour risques et charges exceptionnelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1334,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','763',1328,'Plus-values sur réalisation d\'actifs immobilisés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1335,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7630',1334,'Sur immobilisations incorporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1336,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7631',1334,'Sur immobilisations corporelles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1337,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7632',1334,'Sur immobilisations financières',NULL,0,NULL,NULL,1,0,NULL,NULL),(1338,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','764',1328,'Autres produits exceptionnels',NULL,0,NULL,NULL,1,0,NULL,NULL),(1339,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','77',1357,'Régularisations d\'impôts et reprises de provisions fiscales',NULL,0,NULL,NULL,1,0,NULL,NULL),(1340,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','771',1339,'Impôts belges sur le résultat',NULL,0,NULL,NULL,1,0,NULL,NULL),(1341,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7710',1340,'Régularisations d\'impôts dus ou versés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1342,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7711',1340,'Régularisations d\'impôts estimés',NULL,0,NULL,NULL,1,0,NULL,NULL),(1343,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7712',1340,'Reprises de provisions fiscales',NULL,0,NULL,NULL,1,0,NULL,NULL),(1344,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','773',1339,'Impôts étrangers sur le résultat',NULL,0,NULL,NULL,1,0,NULL,NULL),(1345,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','79',1357,'Affectation aux résultats',NULL,0,NULL,NULL,1,0,NULL,NULL),(1346,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','790',1345,'Bénéfice reporté de l\'exercice précédent',NULL,0,NULL,NULL,1,0,NULL,NULL),(1347,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','791',1345,'Prélèvement sur le capital et les primes d\'émission',NULL,0,NULL,NULL,1,0,NULL,NULL),(1348,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','792',1345,'Prélèvement sur les réserves',NULL,0,NULL,NULL,1,0,NULL,NULL),(1349,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','793',1345,'Perte à reporter',NULL,0,NULL,NULL,1,0,NULL,NULL),(1350,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','794',1345,'Intervention d\'associés (ou du propriétaire) dans la perte',NULL,0,NULL,NULL,1,0,NULL,NULL),(1351,1,NULL,'2018-07-30 11:12:54','PCMN-BASE','CAPIT','1',0,'Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(1352,1,NULL,'2018-07-30 11:12:54','PCMN-BASE','IMMO','2',0,'Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(1353,1,NULL,'2018-07-30 11:12:54','PCMN-BASE','STOCK','3',0,'Stock et commandes en cours d\'exécution',NULL,0,NULL,NULL,1,0,NULL,NULL),(1354,1,NULL,'2018-07-30 11:12:54','PCMN-BASE','TIERS','4',0,'Créances et dettes à un an au plus',NULL,0,NULL,NULL,1,0,NULL,NULL),(1355,1,NULL,'2018-07-30 11:12:54','PCMN-BASE','FINAN','5',0,'Placement de trésorerie et de valeurs disponibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1356,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','EXPENSE','6',0,'Charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(1357,1,NULL,'2018-01-19 11:17:49','PCMN-BASE','INCOME','7',0,'Produits',NULL,0,NULL,NULL,1,0,NULL,NULL),(1401,1,NULL,'2018-07-30 11:12:54','PCG99-ABREGE','CAPIT','1',0,'Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(1402,1,NULL,'2018-07-30 11:12:54','PCG99-ABREGE','IMMO','2',0,'Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(1403,1,NULL,'2018-07-30 11:12:54','PCG99-ABREGE','STOCK','3',0,'Stock et commandes en cours d\'exécution',NULL,0,NULL,NULL,1,0,NULL,NULL),(1404,1,NULL,'2018-07-30 11:12:54','PCG99-ABREGE','TIERS','4',0,'Créances et dettes à un an au plus',NULL,0,NULL,NULL,1,0,NULL,NULL),(1405,1,NULL,'2018-07-30 11:12:54','PCG99-ABREGE','FINAN','5',0,'Placement de trésorerie et de valeurs disponibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1406,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','EXPENSE','6',0,'Charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(1407,1,NULL,'2018-01-19 11:17:49','PCG99-ABREGE','INCOME','7',0,'Produits',NULL,0,NULL,NULL,1,0,NULL,NULL),(1501,1,NULL,'2017-02-20 10:46:43','PCG99-BASE','CAPIT','1',0,'Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(1502,1,NULL,'2018-07-30 11:12:54','PCG99-BASE','IMMO','2',0,'Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',NULL,0,NULL,NULL,1,0,NULL,NULL),(1503,1,NULL,'2018-07-30 11:12:54','PCG99-BASE','STOCK','3',0,'Stock et commandes en cours d\'exécution',NULL,0,NULL,NULL,1,0,NULL,NULL),(1504,1,NULL,'2018-07-30 11:12:54','PCG99-BASE','TIERS','4',0,'Créances et dettes à un an au plus',NULL,0,NULL,NULL,1,0,NULL,NULL),(1505,1,NULL,'2018-07-30 11:12:54','PCG99-BASE','FINAN','5',0,'Placement de trésorerie et de valeurs disponibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(1506,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','EXPENSE','6',0,'Charges',NULL,0,NULL,NULL,1,0,NULL,NULL),(1507,1,NULL,'2018-01-19 11:17:49','PCG99-BASE','INCOME','7',0,'Produits',NULL,0,NULL,NULL,1,0,NULL,NULL),(4001,1,NULL,'2018-07-30 11:12:54','PCG08-PYME','FINANCIACION','1',0,'Financiación básica',NULL,0,NULL,NULL,1,0,NULL,NULL),(4002,1,NULL,'2018-07-30 11:12:54','PCG08-PYME','ACTIVO','2',0,'Activo no corriente',NULL,0,NULL,NULL,1,0,NULL,NULL),(4003,1,NULL,'2018-07-30 11:12:54','PCG08-PYME','EXISTENCIAS','3',0,'Existencias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4004,1,NULL,'2018-07-30 11:12:54','PCG08-PYME','ACREEDORES_DEUDORES','4',0,'Acreedores y deudores por operaciones comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4005,1,NULL,'2018-07-30 11:12:54','PCG08-PYME','CUENTAS_FINANCIERAS','5',0,'Cuentas financieras',NULL,0,NULL,NULL,1,0,NULL,NULL),(4006,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6',0,'Compras y gastos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4007,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7',0,'Ventas e ingresos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4008,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','10',4001,'CAPITAL',NULL,0,NULL,NULL,1,0,NULL,NULL),(4009,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','100',4008,'Capital social',NULL,0,NULL,NULL,1,0,NULL,NULL),(4010,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','101',4008,'Fondo social',NULL,0,NULL,NULL,1,0,NULL,NULL),(4011,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','102',4008,'Capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(4012,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','103',4008,'Socios por desembolsos no exigidos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4013,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1030',4012,'Socios por desembolsos no exigidos capital social',NULL,0,NULL,NULL,1,0,NULL,NULL),(4014,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1034',4012,'Socios por desembolsos no exigidos capital pendiente de inscripción',NULL,0,NULL,NULL,1,0,NULL,NULL),(4015,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','104',4008,'Socios por aportaciones no dineradas pendientes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4016,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1040',4015,'Socios por aportaciones no dineradas pendientes capital social',NULL,0,NULL,NULL,1,0,NULL,NULL),(4017,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1044',4015,'Socios por aportaciones no dineradas pendientes capital pendiente de inscripción',NULL,0,NULL,NULL,1,0,NULL,NULL),(4018,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','108',4008,'Acciones o participaciones propias en situaciones especiales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4019,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','109',4008,'Acciones o participaciones propias para reducción de capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(4020,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','11',4001,'Reservas y otros instrumentos de patrimonio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4021,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','110',4020,'Prima de emisión o asunción',NULL,0,NULL,NULL,1,0,NULL,NULL),(4022,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','111',4020,'Otros instrumentos de patrimonio neto',NULL,0,NULL,NULL,1,0,NULL,NULL),(4023,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1110',4022,'Patrimonio neto por emisión de instrumentos financieros compuestos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4024,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1111',4022,'Resto de instrumentos de patrimoio neto',NULL,0,NULL,NULL,1,0,NULL,NULL),(4025,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','112',4020,'Reserva legal',NULL,0,NULL,NULL,1,0,NULL,NULL),(4026,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','113',4020,'Reservas voluntarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4027,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','114',4020,'Reservas especiales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4028,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1140',4027,'Reservas para acciones o participaciones de la sociedad dominante',NULL,0,NULL,NULL,1,0,NULL,NULL),(4029,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1141',4027,'Reservas estatutarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4030,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1142',4027,'Reservas por capital amortizado',NULL,0,NULL,NULL,1,0,NULL,NULL),(4031,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1143',4027,'Reservas por fondo de comercio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4032,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1144',4028,'Reservas por acciones propias aceptadas en garantía',NULL,0,NULL,NULL,1,0,NULL,NULL),(4033,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','115',4020,'Reservas por pérdidas y ganancias actuariales y otros ajustes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4034,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','118',4020,'Aportaciones de socios o propietarios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4035,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','119',4020,'Diferencias por ajuste del capital a euros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4036,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','12',4001,'Resultados pendientes de aplicación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4037,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','120',4036,'Remanente',NULL,0,NULL,NULL,1,0,NULL,NULL),(4038,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','121',4036,'Resultados negativos de ejercicios anteriores',NULL,0,NULL,NULL,1,0,NULL,NULL),(4039,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','129',4036,'Resultado del ejercicio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4040,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','13',4001,'Subvenciones, donaciones y ajustes por cambio de valor',NULL,0,NULL,NULL,1,0,NULL,NULL),(4041,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','130',4040,'Subvenciones oficiales de capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(4042,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','131',4040,'Donaciones y legados de capital',NULL,0,NULL,NULL,1,0,NULL,NULL),(4043,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','132',4040,'Otras subvenciones, donaciones y legados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4044,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','133',4040,'Ajustes por valoración en activos financieros disponibles para la venta',NULL,0,NULL,NULL,1,0,NULL,NULL),(4045,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','134',4040,'Operaciones de cobertura',NULL,0,NULL,NULL,1,0,NULL,NULL),(4046,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1340',4045,'Cobertura de flujos de efectivo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4047,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1341',4045,'Cobertura de una inversión neta en un negocio extranjero',NULL,0,NULL,NULL,1,0,NULL,NULL),(4048,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','135',4040,'Diferencias de conversión',NULL,0,NULL,NULL,1,0,NULL,NULL),(4049,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','136',4040,'Ajustes por valoración en activos no corrientes y grupos enajenables de elementos mantenidos para la venta',NULL,0,NULL,NULL,1,0,NULL,NULL),(4050,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','137',4040,'Ingresos fiscales a distribuir en varios ejercicios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4051,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1370',4050,'Ingresos fiscales por diferencias permanentes a distribuir en varios ejercicios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4052,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1371',4050,'Ingresos fiscales por deducciones y bonificaciones a distribuir en varios ejercicios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4053,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','14',4001,'Provisiones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4054,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','141',4053,'Provisión para impuestos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4055,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','142',4053,'Provisión para otras responsabilidades',NULL,0,NULL,NULL,1,0,NULL,NULL),(4056,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','143',4053,'Provisión por desmantelamiento, retiro o rehabilitación del inmovilizado',NULL,0,NULL,NULL,1,0,NULL,NULL),(4057,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','145',4053,'Provisión para actuaciones medioambientales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4058,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','15',4001,'Deudas a largo plazo con características especiales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4059,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','150',4058,'Acciones o participaciones a largo plazo consideradas como pasivos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4060,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','153',4058,'Desembolsos no exigidos por acciones o participaciones consideradas como pasivos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4061,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1533',4060,'Desembolsos no exigidos empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4062,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1534',4060,'Desembolsos no exigidos empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4063,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1535',4060,'Desembolsos no exigidos otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4064,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1536',4060,'Otros desembolsos no exigidos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4065,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','154',4058,'Aportaciones no dinerarias pendientes por acciones o participaciones consideradas como pasivos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4066,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1543',4065,'Aportaciones no dinerarias pendientes empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4067,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1544',4065,'Aportaciones no dinerarias pendientes empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4068,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1545',4065,'Aportaciones no dinerarias pendientes otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4069,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1546',4065,'Otras aportaciones no dinerarias pendientes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4070,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','16',4001,'Deudas a largo plazo con partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4071,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','160',4070,'Deudas a largo plazo con entidades de crédito vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4072,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1603',4071,'Deudas a largo plazo con entidades de crédito empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4073,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1604',4071,'Deudas a largo plazo con entidades de crédito empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4074,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1605',4071,'Deudas a largo plazo con otras entidades de crédito vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4075,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','161',4070,'Proveedores de inmovilizado a largo plazo partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4076,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1613',4075,'Proveedores de inmovilizado a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4077,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1614',4075,'Proveedores de inmovilizado a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4078,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1615',4075,'Proveedores de inmovilizado a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4079,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','162',4070,'Acreedores por arrendamiento financiero a largo plazo partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4080,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1623',4079,'Acreedores por arrendamiento financiero a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4081,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1624',4080,'Acreedores por arrendamiento financiero a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4082,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1625',4080,'Acreedores por arrendamiento financiero a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4083,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','163',4070,'Otras deudas a largo plazo con partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4084,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1633',4083,'Otras deudas a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4085,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1634',4083,'Otras deudas a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4086,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','1635',4083,'Otras deudas a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4087,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','17',4001,'Deudas a largo plazo por préstamos recibidos empresitos y otros conceptos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4088,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','170',4087,'Deudas a largo plazo con entidades de crédito',NULL,0,NULL,NULL,1,0,NULL,NULL),(4089,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','171',4087,'Deudas a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4090,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','172',4087,'Deudas a largo plazo transformables en suvbenciones donaciones y legados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4091,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','173',4087,'Proveedores de inmovilizado a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4092,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','174',4087,'Acreedores por arrendamiento financiero a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4093,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','175',4087,'Efectos a pagar a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4094,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','176',4087,'Pasivos por derivados financieros a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4095,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','177',4087,'Obligaciones y bonos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4096,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','179',4087,'Deudas representadas en otros valores negociables',NULL,0,NULL,NULL,1,0,NULL,NULL),(4097,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','18',4001,'Pasivos por fianzas garantias y otros conceptos a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4098,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','180',4097,'Fianzas recibidas a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4099,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','181',4097,'Anticipos recibidos por ventas o prestaciones de servicios a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4100,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','185',4097,'Depositos recibidos a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4101,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','19',4001,'Situaciones transitorias de financiación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4102,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','190',4101,'Acciones o participaciones emitidas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4103,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','192',4101,'Suscriptores de acciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4104,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','194',4101,'Capital emitido pendiente de inscripción',NULL,0,NULL,NULL,1,0,NULL,NULL),(4105,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','195',4101,'Acciones o participaciones emitidas consideradas como pasivos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4106,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','197',4101,'Suscriptores de acciones consideradas como pasivos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4107,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','FINANCIACION','199',4101,'Acciones o participaciones emitidas consideradas como pasivos financieros pendientes de inscripción',NULL,0,NULL,NULL,1,0,NULL,NULL),(4108,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','20',4002,'Inmovilizaciones intangibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(4109,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','200',4108,'Investigación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4110,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','201',4108,'Desarrollo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4111,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','202',4108,'Concesiones administrativas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4112,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','203',4108,'Propiedad industrial',NULL,0,NULL,NULL,1,0,NULL,NULL),(4113,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','205',4108,'Derechos de transpaso',NULL,0,NULL,NULL,1,0,NULL,NULL),(4114,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','206',4108,'Aplicaciones informáticas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4115,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','209',4108,'Anticipos para inmovilizaciones intangibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(4116,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','21',4002,'Inmovilizaciones materiales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4117,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','210',4116,'Terrenos y bienes naturales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4118,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','211',4116,'Construcciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4119,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','212',4116,'Instalaciones técnicas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4120,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','213',4116,'Maquinaria',NULL,0,NULL,NULL,1,0,NULL,NULL),(4121,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','214',4116,'Utillaje',NULL,0,NULL,NULL,1,0,NULL,NULL),(4122,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','215',4116,'Otras instalaciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4123,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','216',4116,'Mobiliario',NULL,0,NULL,NULL,1,0,NULL,NULL),(4124,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','217',4116,'Equipos para procesos de información',NULL,0,NULL,NULL,1,0,NULL,NULL),(4125,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','218',4116,'Elementos de transporte',NULL,0,NULL,NULL,1,0,NULL,NULL),(4126,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','219',4116,'Otro inmovilizado material',NULL,0,NULL,NULL,1,0,NULL,NULL),(4127,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','22',4002,'Inversiones inmobiliarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4128,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','220',4127,'Inversiones en terreons y bienes naturales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4129,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','221',4127,'Inversiones en construcciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4130,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','23',4002,'Inmovilizaciones materiales en curso',NULL,0,NULL,NULL,1,0,NULL,NULL),(4131,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','230',4130,'Adaptación de terrenos y bienes naturales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4132,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','231',4130,'Construcciones en curso',NULL,0,NULL,NULL,1,0,NULL,NULL),(4133,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','232',4130,'Instalaciones técnicas en montaje',NULL,0,NULL,NULL,1,0,NULL,NULL),(4134,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','233',4130,'Maquinaria en montaje',NULL,0,NULL,NULL,1,0,NULL,NULL),(4135,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','237',4130,'Equipos para procesos de información en montaje',NULL,0,NULL,NULL,1,0,NULL,NULL),(4136,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','239',4130,'Anticipos para inmovilizaciones materiales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4137,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','24',4002,'Inversiones financieras a largo plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4138,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','240',4137,'Participaciones a largo plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4139,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2403',4138,'Participaciones a largo plazo en empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4140,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2404',4138,'Participaciones a largo plazo en empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4141,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2405',4138,'Participaciones a largo plazo en otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4142,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','241',4137,'Valores representativos de deuda a largo plazo de partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4143,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2413',4142,'Valores representativos de deuda a largo plazo de empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4144,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2414',4142,'Valores representativos de deuda a largo plazo de empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4145,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2415',4142,'Valores representativos de deuda a largo plazo de otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4146,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','242',4137,'Créditos a largo plazo a partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4147,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2423',4146,'Créditos a largo plazo a empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4148,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2424',4146,'Créditos a largo plazo a empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4149,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2425',4146,'Créditos a largo plazo a otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4150,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','249',4137,'Desembolsos pendientes sobre participaciones a largo plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4151,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2493',4150,'Desembolsos pendientes sobre participaciones a largo plazo en empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4152,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2494',4150,'Desembolsos pendientes sobre participaciones a largo plazo en empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4153,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2495',4150,'Desembolsos pendientes sobre participaciones a largo plazo en otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4154,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','25',4002,'Otras inversiones financieras a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4155,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','250',4154,'Inversiones financieras a largo plazo en instrumentos de patrimonio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4156,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','251',4154,'Valores representativos de deuda a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4157,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','252',4154,'Créditos a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4158,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','253',4154,'Créditos a largo plazo por enajenación de inmovilizado',NULL,0,NULL,NULL,1,0,NULL,NULL),(4159,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','254',4154,'Créditos a largo plazo al personal',NULL,0,NULL,NULL,1,0,NULL,NULL),(4160,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','255',4154,'Activos por derivados financieros a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4161,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','258',4154,'Imposiciones a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4162,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','259',4154,'Desembolsos pendientes sobre participaciones en el patrimonio neto a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4163,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','26',4002,'Fianzas y depósitos constituidos a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4164,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','260',4163,'Fianzas constituidas a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4165,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','261',4163,'Depósitos constituidos a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4166,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','28',4002,'Amortización acumulada del inmovilizado',NULL,0,NULL,NULL,1,0,NULL,NULL),(4167,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','280',4166,'Amortización acumulado del inmovilizado intangible',NULL,0,NULL,NULL,1,0,NULL,NULL),(4168,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2800',4167,'Amortización acumulada de investigación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4169,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2801',4167,'Amortización acumulada de desarrollo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4170,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2802',4167,'Amortización acumulada de concesiones administrativas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4171,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2803',4167,'Amortización acumulada de propiedad industrial',NULL,0,NULL,NULL,1,0,NULL,NULL),(4172,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2805',4167,'Amortización acumulada de derechos de transpaso',NULL,0,NULL,NULL,1,0,NULL,NULL),(4173,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2806',4167,'Amortización acumulada de aplicaciones informáticas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4174,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','281',4166,'Amortización acumulado del inmovilizado material',NULL,0,NULL,NULL,1,0,NULL,NULL),(4175,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2811',4174,'Amortización acumulada de construcciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4176,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2812',4174,'Amortización acumulada de instalaciones técnicas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4177,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2813',4174,'Amortización acumulada de maquinaria',NULL,0,NULL,NULL,1,0,NULL,NULL),(4178,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2814',4174,'Amortización acumulada de utillaje',NULL,0,NULL,NULL,1,0,NULL,NULL),(4179,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2815',4174,'Amortización acumulada de otras instalaciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4180,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2816',4174,'Amortización acumulada de mobiliario',NULL,0,NULL,NULL,1,0,NULL,NULL),(4181,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2817',4174,'Amortización acumulada de equipos para proceso de información',NULL,0,NULL,NULL,1,0,NULL,NULL),(4182,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2818',4174,'Amortización acumulada de elementos de transporte',NULL,0,NULL,NULL,1,0,NULL,NULL),(4183,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2819',4175,'Amortización acumulada de otro inmovilizado material',NULL,0,NULL,NULL,1,0,NULL,NULL),(4184,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','282',4166,'Amortización acumulada de las inversiones inmobiliarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4185,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','29',4002,'Deterioro de valor de activos no corrientes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4186,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','290',4185,'Deterioro de valor del inmovilizado intangible',NULL,0,NULL,NULL,1,0,NULL,NULL),(4187,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2900',4186,'Deterioro de valor de investigación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4188,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2901',4186,'Deterioro de valor de desarrollo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4189,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2902',4186,'Deterioro de valor de concesiones administrativas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4190,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2903',4186,'Deterioro de valor de propiedad industrial',NULL,0,NULL,NULL,1,0,NULL,NULL),(4191,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2905',4186,'Deterioro de valor de derechos de transpaso',NULL,0,NULL,NULL,1,0,NULL,NULL),(4192,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2906',4186,'Deterioro de valor de aplicaciones informáticas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4193,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','291',4185,'Deterioro de valor del inmovilizado material',NULL,0,NULL,NULL,1,0,NULL,NULL),(4194,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2910',4193,'Deterioro de valor de terrenos y bienes naturales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4195,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2911',4193,'Deterioro de valor de construcciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4196,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2912',4193,'Deterioro de valor de instalaciones técnicas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4197,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2913',4193,'Deterioro de valor de maquinaria',NULL,0,NULL,NULL,1,0,NULL,NULL),(4198,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2914',4193,'Deterioro de valor de utillajes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4199,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2915',4194,'Deterioro de valor de otras instalaciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4200,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2916',4194,'Deterioro de valor de mobiliario',NULL,0,NULL,NULL,1,0,NULL,NULL),(4201,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2917',4194,'Deterioro de valor de equipos para proceso de información',NULL,0,NULL,NULL,1,0,NULL,NULL),(4202,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2918',4194,'Deterioro de valor de elementos de transporte',NULL,0,NULL,NULL,1,0,NULL,NULL),(4203,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2919',4194,'Deterioro de valor de otro inmovilizado material',NULL,0,NULL,NULL,1,0,NULL,NULL),(4204,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','292',4185,'Deterioro de valor de las inversiones inmobiliarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4205,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2920',4204,'Deterioro de valor de terrenos y bienes naturales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4206,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2921',4204,'Deterioro de valor de construcciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4207,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','293',4185,'Deterioro de valor de participaciones a largo plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4208,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2933',4207,'Deterioro de valor de participaciones a largo plazo en empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4209,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2934',4207,'Deterioro de valor de sobre participaciones a largo plazo en empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4210,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2935',4207,'Deterioro de valor de sobre participaciones a largo plazo en otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4211,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','294',4185,'Deterioro de valor de valores representativos de deuda a largo plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4212,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2943',4211,'Deterioro de valor de valores representativos de deuda a largo plazo en empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4213,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2944',4211,'Deterioro de valor de valores representativos de deuda a largo plazo en empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4214,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2945',4211,'Deterioro de valor de valores representativos de deuda a largo plazo en otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4215,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','295',4185,'Deterioro de valor de créditos a largo plazo a partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4216,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2953',4215,'Deterioro de valor de créditos a largo plazo a empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4217,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2954',4215,'Deterioro de valor de créditos a largo plazo a empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4218,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','2955',4215,'Deterioro de valor de créditos a largo plazo a otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4219,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','296',4185,'Deterioro de valor de participaciones en el patrimonio netoa largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4220,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','297',4185,'Deterioro de valor de valores representativos de deuda a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4221,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACTIVO','298',4185,'Deterioro de valor de créditos a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4222,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','30',4003,'Comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4223,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','300',4222,'Mercaderías A',NULL,0,NULL,NULL,1,0,NULL,NULL),(4224,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','301',4222,'Mercaderías B',NULL,0,NULL,NULL,1,0,NULL,NULL),(4225,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','31',4003,'Materias primas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4226,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','310',4225,'Materias primas A',NULL,0,NULL,NULL,1,0,NULL,NULL),(4227,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','311',4225,'Materias primas B',NULL,0,NULL,NULL,1,0,NULL,NULL),(4228,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','32',4003,'Otros aprovisionamientos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4229,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','320',4228,'Elementos y conjuntos incorporables',NULL,0,NULL,NULL,1,0,NULL,NULL),(4230,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','321',4228,'Combustibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(4231,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','322',4228,'Repuestos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4232,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','325',4228,'Materiales diversos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4233,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','326',4228,'Embalajes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4234,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','327',4228,'Envases',NULL,0,NULL,NULL,1,0,NULL,NULL),(4235,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','328',4229,'Material de oficina',NULL,0,NULL,NULL,1,0,NULL,NULL),(4236,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','33',4003,'Productos en curso',NULL,0,NULL,NULL,1,0,NULL,NULL),(4237,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','330',4236,'Productos en curos A',NULL,0,NULL,NULL,1,0,NULL,NULL),(4238,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','331',4236,'Productos en curso B',NULL,0,NULL,NULL,1,0,NULL,NULL),(4239,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','34',4003,'Productos semiterminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4240,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','340',4239,'Productos semiterminados A',NULL,0,NULL,NULL,1,0,NULL,NULL),(4241,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','341',4239,'Productos semiterminados B',NULL,0,NULL,NULL,1,0,NULL,NULL),(4242,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','35',4003,'Productos terminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4243,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','350',4242,'Productos terminados A',NULL,0,NULL,NULL,1,0,NULL,NULL),(4244,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','351',4242,'Productos terminados B',NULL,0,NULL,NULL,1,0,NULL,NULL),(4245,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','36',4003,'Subproductos, residuos y materiales recuperados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4246,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','360',4245,'Subproductos A',NULL,0,NULL,NULL,1,0,NULL,NULL),(4247,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','361',4245,'Subproductos B',NULL,0,NULL,NULL,1,0,NULL,NULL),(4248,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','365',4245,'Residuos A',NULL,0,NULL,NULL,1,0,NULL,NULL),(4249,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','366',4245,'Residuos B',NULL,0,NULL,NULL,1,0,NULL,NULL),(4250,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','368',4245,'Materiales recuperados A',NULL,0,NULL,NULL,1,0,NULL,NULL),(4251,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','369',4245,'Materiales recuperados B',NULL,0,NULL,NULL,1,0,NULL,NULL),(4252,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','39',4003,'Deterioro de valor de las existencias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4253,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','390',4252,'Deterioro de valor de las mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4254,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','391',4252,'Deterioro de valor de las materias primas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4255,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','392',4252,'Deterioro de valor de otros aprovisionamientos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4256,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','393',4252,'Deterioro de valor de los productos en curso',NULL,0,NULL,NULL,1,0,NULL,NULL),(4257,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','394',4252,'Deterioro de valor de los productos semiterminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4258,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','395',4252,'Deterioro de valor de los productos terminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4259,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','396',4252,'Deterioro de valor de los subproductos, residuos y materiales recuperados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4260,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','40',4004,'Proveedores',NULL,0,NULL,NULL,1,0,NULL,NULL),(4261,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','400',4260,'Proveedores',NULL,0,NULL,NULL,1,0,NULL,NULL),(4262,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4000',4261,'Proveedores euros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4263,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4004',4261,'Proveedores moneda extranjera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4264,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4009',4261,'Proveedores facturas pendientes de recibir o formalizar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4265,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','401',4260,'Proveedores efectos comerciales a pagar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4266,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','403',4260,'Proveedores empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4267,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4030',4266,'Proveedores empresas del grupo euros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4268,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4031',4266,'Efectos comerciales a pagar empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4269,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4034',4266,'Proveedores empresas del grupo moneda extranjera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4270,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4036',4266,'Envases y embalajes a devolver a proveedores empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4271,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4039',4266,'Proveedores empresas del grupo facturas pendientes de recibir o de formalizar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4272,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','404',4260,'Proveedores empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4273,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','405',4260,'Proveedores otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4274,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','406',4260,'Envases y embalajes a devolver a proveedores',NULL,0,NULL,NULL,1,0,NULL,NULL),(4275,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','407',4260,'Anticipos a proveedores',NULL,0,NULL,NULL,1,0,NULL,NULL),(4276,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','41',4004,'Acreedores varios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4277,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','410',4276,'Acreedores por prestaciones de servicios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4278,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4100',4277,'Acreedores por prestaciones de servicios euros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4279,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4104',4277,'Acreedores por prestaciones de servicios moneda extranjera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4280,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4109',4277,'Acreedores por prestaciones de servicios facturas pendientes de recibir o formalizar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4281,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','411',4276,'Acreedores efectos comerciales a pagar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4282,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','419',4276,'Acreedores por operaciones en común',NULL,0,NULL,NULL,1,0,NULL,NULL),(4283,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','43',4004,'Clientes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4284,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','430',4283,'Clientes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4285,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4300',4284,'Clientes euros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4286,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4304',4284,'Clientes moneda extranjera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4287,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4309',4284,'Clientes facturas pendientes de formalizar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4288,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','431',4283,'Clientes efectos comerciales a cobrar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4289,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4310',4288,'Efectos comerciales en cartera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4290,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4311',4288,'Efectos comerciales descontados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4291,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4312',4288,'Efectos comerciales en gestión de cobro',NULL,0,NULL,NULL,1,0,NULL,NULL),(4292,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4315',4288,'Efectos comerciales impagados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4293,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','432',4283,'Clientes operaciones de factoring',NULL,0,NULL,NULL,1,0,NULL,NULL),(4294,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','433',4283,'Clientes empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4295,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4330',4294,'Clientes empresas del grupo euros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4296,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4331',4294,'Efectos comerciales a cobrar empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4297,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4332',4294,'Clientes empresas del grupo operaciones de factoring',NULL,0,NULL,NULL,1,0,NULL,NULL),(4298,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4334',4294,'Clientes empresas del grupo moneda extranjera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4299,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4336',4294,'Clientes empresas del grupo dudoso cobro',NULL,0,NULL,NULL,1,0,NULL,NULL),(4300,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4337',4294,'Envases y embalajes a devolver a clientes empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4301,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4339',4294,'Clientes empresas del grupo facturas pendientes de formalizar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4302,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','434',4283,'Clientes empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4303,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','435',4283,'Clientes otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4304,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','436',4283,'Clientes de dudoso cobro',NULL,0,NULL,NULL,1,0,NULL,NULL),(4305,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','437',4283,'Envases y embalajes a devolver por clientes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4306,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','438',4283,'Anticipos de clientes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4307,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','44',4004,'Deudores varios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4308,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','440',4307,'Deudores',NULL,0,NULL,NULL,1,0,NULL,NULL),(4309,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4400',4308,'Deudores euros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4310,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4404',4308,'Deudores moneda extranjera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4311,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4409',4308,'Deudores facturas pendientes de formalizar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4312,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','441',4307,'Deudores efectos comerciales a cobrar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4313,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4410',4312,'Deudores efectos comerciales en cartera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4314,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4411',4312,'Deudores efectos comerciales descontados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4315,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4412',4312,'Deudores efectos comerciales en gestión de cobro',NULL,0,NULL,NULL,1,0,NULL,NULL),(4316,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4415',4312,'Deudores efectos comerciales impagados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4317,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','446',4307,'Deudores de dusoso cobro',NULL,0,NULL,NULL,1,0,NULL,NULL),(4318,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','449',4307,'Deudores por operaciones en común',NULL,0,NULL,NULL,1,0,NULL,NULL),(4319,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','46',4004,'Personal',NULL,0,NULL,NULL,1,0,NULL,NULL),(4320,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','460',4319,'Anticipos de renumeraciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4321,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','465',4319,'Renumeraciones pendientes de pago',NULL,0,NULL,NULL,1,0,NULL,NULL),(4322,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','47',4004,'Administraciones Públicas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4323,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','470',4322,'Hacienda Pública deudora por diversos conceptos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4324,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4700',4323,'Hacienda Pública deudora por IVA',NULL,0,NULL,NULL,1,0,NULL,NULL),(4325,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4708',4323,'Hacienda Pública deudora por subvenciones concedidas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4326,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4709',4323,'Hacienda Pública deudora por devolución de impuestos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4327,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','471',4322,'Organismos de la Seguridad Social deudores',NULL,0,NULL,NULL,1,0,NULL,NULL),(4328,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','472',4322,'Hacienda Pública IVA soportado',NULL,0,NULL,NULL,1,0,NULL,NULL),(4329,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','473',4322,'Hacienda Pública retenciones y pagos a cuenta',NULL,0,NULL,NULL,1,0,NULL,NULL),(4330,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','474',4322,'Activos por impuesto diferido',NULL,0,NULL,NULL,1,0,NULL,NULL),(4331,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4740',4330,'Activos por diferencias temporarias deducibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(4332,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4742',4330,'Derechos por deducciones y bonificaciones pendientes de aplicar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4333,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4745',4330,'Crédito por pérdidasa compensar del ejercicio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4334,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','475',4322,'Hacienda Pública acreedora por conceptos fiscales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4335,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4750',4334,'Hacienda Pública acreedora por IVA',NULL,0,NULL,NULL,1,0,NULL,NULL),(4336,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4751',4334,'Hacienda Pública acreedora por retenciones practicadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4337,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4752',4334,'Hacienda Pública acreedora por impuesto sobre sociedades',NULL,0,NULL,NULL,1,0,NULL,NULL),(4338,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4758',4334,'Hacienda Pública acreedora por subvenciones a integrar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4339,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','476',4322,'Organismos de la Seguridad Social acreedores',NULL,0,NULL,NULL,1,0,NULL,NULL),(4340,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','477',4322,'Hacienda Pública IVA repercutido',NULL,0,NULL,NULL,1,0,NULL,NULL),(4341,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','479',4322,'Pasivos por diferencias temporarias imponibles',NULL,0,NULL,NULL,1,0,NULL,NULL),(4342,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','48',4004,'Ajustes por periodificación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4343,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','480',4342,'Gastos anticipados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4344,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','485',4342,'Ingresos anticipados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4345,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','49',4004,'Deterioro de valor de créditos comerciales y provisiones a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4346,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','490',4345,'Deterioro de valor de créditos por operaciones comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4347,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','493',4345,'Deterioro de valor de créditos por operaciones comerciales con partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4348,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4933',4347,'Deterioro de valor de créditos por operaciones comerciales con empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4349,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4934',4347,'Deterioro de valor de créditos por operaciones comerciales con empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4350,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4935',4347,'Deterioro de valor de créditos por operaciones comerciales con otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4351,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','499',4345,'Provisiones por operaciones comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4352,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4994',4351,'Provisión para contratos anerosos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4353,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','4999',4351,'Provisión para otras operaciones comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4354,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','50',4005,'Emprésitos deudas con características especiales y otras emisiones análogas a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4355,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','500',4354,'Obligaciones y bonos a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4356,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','502',4354,'Acciones o participaciones a corto plazo consideradas como pasivos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4357,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','505',4354,'Deudas representadas en otros valores negociables a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4358,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','506',4354,'Intereses a corto plazo de emprésitos y otras emisiones analógicas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4359,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','507',4354,'Dividendos de acciones o participaciones consideradas como pasivos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4360,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','509',4354,'Valores negociables amortizados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4361,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5090',4360,'Obligaciones y bonos amortizados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4362,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5095',4360,'Otros valores negociables amortizados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4363,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','51',4005,'Deudas a corto plazo con partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4364,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','510',4363,'Deudas a corto plazo con entidades de crédito vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4365,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5103',4364,'Deudas a corto plazo con entidades de crédito empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4366,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5104',4364,'Deudas a corto plazo con entidades de crédito empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4367,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5105',4364,'Deudas a corto plazo con otras entidades de crédito vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4368,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','511',4363,'Proveedores de inmovilizado a corto plazo partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4369,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5113',4368,'Proveedores de inmovilizado a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4370,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5114',4368,'Proveedores de inmovilizado a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4371,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5115',4368,'Proveedores de inmovilizado a corto plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4372,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','512',4363,'Acreedores por arrendamiento financiero a corto plazo partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4373,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5123',4372,'Acreedores por arrendamiento financiero a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4374,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5124',4372,'Acreedores por arrendamiento financiero a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4375,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5125',4372,'Acreedores por arrendamiento financiero a corto plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4376,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','513',4363,'Otras deudas a corto plazo con partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4377,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5133',4376,'Otras deudas a corto plazo con empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4378,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5134',4376,'Otras deudas a corto plazo con empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4379,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5135',4376,'Otras deudas a corto plazo con partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4380,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','514',4363,'Intereses a corto plazo con partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4381,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5143',4380,'Intereses a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4382,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5144',4380,'Intereses a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4383,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5145',4380,'Intereses deudas a corto plazo partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4384,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','52',4005,'Deudas a corto plazo por préstamos recibidos y otros conceptos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4385,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','520',4384,'Deudas a corto plazo con entidades de crédito',NULL,0,NULL,NULL,1,0,NULL,NULL),(4386,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5200',4385,'Préstamos a corto plazo de entidades de crédito',NULL,0,NULL,NULL,1,0,NULL,NULL),(4387,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5201',4385,'Deudas a corto plazo por crédito dispuesto',NULL,0,NULL,NULL,1,0,NULL,NULL),(4388,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5208',4385,'Deudas por efectos descontados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4389,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5209',4385,'Deudas por operaciones de factoring',NULL,0,NULL,NULL,1,0,NULL,NULL),(4390,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','521',4384,'Deudas a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4391,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','522',4384,'Deudas a corto plazo transformables en subvenciones donaciones y legados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4392,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','523',4384,'Proveedores de inmovilizado a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4393,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','526',4384,'Dividendo activo a pagar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4394,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','527',4384,'Intereses a corto plazo de deudas con entidades de crédito',NULL,0,NULL,NULL,1,0,NULL,NULL),(4395,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','528',4384,'Intereses a corto plazo de deudas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4396,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','529',4384,'Provisiones a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4397,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5291',4396,'Provisión a corto plazo para impuestos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4398,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5292',4396,'Provisión a corto plazo para otras responsabilidades',NULL,0,NULL,NULL,1,0,NULL,NULL),(4399,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5293',4396,'Provisión a corto plazo por desmantelamiento retiro o rehabilitación del inmovilizado',NULL,0,NULL,NULL,1,0,NULL,NULL),(4400,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5295',4396,'Provisión a corto plazo para actuaciones medioambientales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4401,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','53',4005,'Inversiones financieras a corto plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4402,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','530',4401,'Participaciones a corto plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4403,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5303',4402,'Participaciones a corto plazo en empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4404,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5304',4402,'Participaciones a corto plazo en empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4405,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5305',4402,'Participaciones a corto plazo en otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4406,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','531',4401,'Valores representativos de deuda a corto plazo de partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4407,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5313',4406,'Valores representativos de deuda a corto plazo de empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4408,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5314',4406,'Valores representativos de deuda a corto plazo de empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4409,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5315',4406,'Valores representativos de deuda a corto plazo de otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4410,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','532',4401,'Créditos a corto plazo a partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4411,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5323',4410,'Créditos a corto plazo a empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4412,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5324',4410,'Créditos a corto plazo a empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4413,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5325',4410,'Créditos a corto plazo a otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4414,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','533',4401,'Intereses a corto plazo de valores representativos de deuda de partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4415,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5333',4414,'Intereses a corto plazo de valores representativos de deuda en empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4416,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5334',4414,'Intereses a corto plazo de valores representativos de deuda en empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4417,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5335',4414,'Intereses a corto plazo de valores representativos de deuda en otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4418,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','534',4401,'Intereses a corto plazo de créditos a partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4419,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5343',4418,'Intereses a corto plazo de créditos a empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4420,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5344',4418,'Intereses a corto plazo de créditos a empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4421,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5345',4418,'Intereses a corto plazo de créditos a otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4422,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','535',4401,'Dividendo a cobrar de inversiones financieras en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4423,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5353',4422,'Dividendo a cobrar de empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4424,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5354',4422,'Dividendo a cobrar de empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4425,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5355',4422,'Dividendo a cobrar de otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4426,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','539',4401,'Desembolsos pendientes sobre participaciones a corto plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4427,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5393',4426,'Desembolsos pendientes sobre participaciones a corto plazo en empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4428,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5394',4426,'Desembolsos pendientes sobre participaciones a corto plazo en empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4429,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5395',4426,'Desembolsos pendientes sobre participaciones a corto plazo en otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4430,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','54',4005,'Otras inversiones financieras a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4431,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','540',4430,'Inversiones financieras a corto plazo en instrumentos de patrimonio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4432,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','541',4430,'Valores representativos de deuda a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4433,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','542',4430,'Créditos a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4434,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','543',4430,'Créditos a corto plazo por enejenación de inmovilizado',NULL,0,NULL,NULL,1,0,NULL,NULL),(4435,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','544',4430,'Créditos a corto plazo al personal',NULL,0,NULL,NULL,1,0,NULL,NULL),(4436,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','545',4430,'Dividendo a cobrar',NULL,0,NULL,NULL,1,0,NULL,NULL),(4437,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','546',4430,'Intereses a corto plazo de valores reprsentativos de deuda',NULL,0,NULL,NULL,1,0,NULL,NULL),(4438,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','547',4430,'Intereses a corto plazo de créditos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4439,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','548',4430,'Imposiciones a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4440,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','549',4430,'Desembolsos pendientes sobre participaciones en el patrimonio neto a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4441,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','55',4005,'Otras cuentas no bancarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4442,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','550',4441,'Titular de la explotación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4443,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','551',4441,'Cuenta corriente con socios y administradores',NULL,0,NULL,NULL,1,0,NULL,NULL),(4444,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','552',4441,'Cuenta corriente otras personas y entidades vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4445,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5523',4444,'Cuenta corriente con empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4446,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5524',4444,'Cuenta corriente con empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4447,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5525',4444,'Cuenta corriente con otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4448,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','554',4441,'Cuenta corriente con uniones temporales de empresas y comunidades de bienes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4449,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','555',4441,'Partidas pendientes de aplicación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4450,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','556',4441,'Desembolsos exigidos sobre participaciones en el patrimonio neto',NULL,0,NULL,NULL,1,0,NULL,NULL),(4451,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5563',4450,'Desembolsos exigidos sobre participaciones empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4452,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5564',4450,'Desembolsos exigidos sobre participaciones empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4453,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5565',4450,'Desembolsos exigidos sobre participaciones otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4454,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5566',4450,'Desembolsos exigidos sobre participaciones otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4455,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','557',4441,'Dividendo activo a cuenta',NULL,0,NULL,NULL,1,0,NULL,NULL),(4456,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','558',4441,'Socios por desembolsos exigidos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4457,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5580',4456,'Socios por desembolsos exigidos sobre acciones o participaciones ordinarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4458,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5585',4456,'Socios por desembolsos exigidos sobre acciones o participaciones consideradas como pasivos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4459,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','559',4441,'Derivados financieros a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4460,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5590',4459,'Activos por derivados financieros a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4461,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5595',4459,'Pasivos por derivados financieros a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4462,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','56',4005,'Finanzas y depósitos recibidos y constituidos a corto plazo y ajustes por periodificación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4463,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','560',4462,'Finanzas recibidas a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4464,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','561',4462,'Depósitos recibidos a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4465,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','565',4462,'Finanzas constituidas a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4466,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','566',4462,'Depósitos constituidos a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4467,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','567',4462,'Intereses pagados por anticipado',NULL,0,NULL,NULL,1,0,NULL,NULL),(4468,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','568',4462,'Intereses cobrados a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4469,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','57',4005,'Tesorería',NULL,0,NULL,NULL,1,0,NULL,NULL),(4470,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','570',4469,'Caja euros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4471,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','571',4469,'Caja moneda extranjera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4472,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','572',4469,'Bancos e instituciones de crédito cc vista euros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4473,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','573',4469,'Bancos e instituciones de crédito cc vista moneda extranjera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4474,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','574',4469,'Bancos e instituciones de crédito cuentas de ahorro euros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4475,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','575',4469,'Bancos e instituciones de crédito cuentas de ahorro moneda extranjera',NULL,0,NULL,NULL,1,0,NULL,NULL),(4476,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','576',4469,'Inversiones a corto plazo de gran liquidez',NULL,0,NULL,NULL,1,0,NULL,NULL),(4477,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','59',4005,'Deterioro del valor de las inversiones financieras a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4478,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','593',4477,'Deterioro del valor de participaciones a corto plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4479,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5933',4478,'Deterioro del valor de participaciones a corto plazo en empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4480,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5934',4478,'Deterioro del valor de participaciones a corto plazo en empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4481,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5935',4478,'Deterioro del valor de participaciones a corto plazo en otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4482,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','594',4477,'Deterioro del valor de valores representativos de deuda a corto plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4483,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5943',4482,'Deterioro del valor de valores representativos de deuda a corto plazo en empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4484,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5944',4482,'Deterioro del valor de valores representativos de deuda a corto plazo en empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4485,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5945',4482,'Deterioro del valor de valores representativos de deuda a corto plazo en otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4486,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','595',4477,'Deterioro del valor de créditos a corto plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4487,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5953',4486,'Deterioro del valor de créditos a corto plazo en empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4488,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5954',4486,'Deterioro del valor de créditos a corto plazo en empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4489,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','5955',4486,'Deterioro del valor de créditos a corto plazo en otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4490,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','596',4477,'Deterioro del valor de participaciones a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4491,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','597',4477,'Deterioro del valor de valores representativos de deuda a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4492,1,NULL,'2018-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','598',4477,'Deterioro de valor de créditos a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4493,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','60',4006,'Compras',NULL,0,NULL,NULL,1,0,NULL,NULL),(4494,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','600',4493,'Compras de mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4495,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','601',4493,'Compras de materias primas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4496,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','602',4493,'Compras de otros aprovisionamientos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4497,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','606',4493,'Descuentos sobre compras por pronto pago',NULL,0,NULL,NULL,1,0,NULL,NULL),(4498,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6060',4497,'Descuentos sobre compras por pronto pago de mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4499,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6061',4497,'Descuentos sobre compras por pronto pago de materias primas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4500,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6062',4497,'Descuentos sobre compras por pronto pago de otros aprovisionamientos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4501,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','607',4493,'Trabajos realizados por otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4502,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','608',4493,'Devoluciones de compras y operaciones similares',NULL,0,NULL,NULL,1,0,NULL,NULL),(4503,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6080',4502,'Devoluciones de compras de mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4504,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6081',4502,'Devoluciones de compras de materias primas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4505,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6082',4502,'Devoluciones de compras de otros aprovisionamientos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4506,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','609',4493,'Rappels por compras',NULL,0,NULL,NULL,1,0,NULL,NULL),(4507,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6090',4506,'Rappels por compras de mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4508,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6091',4506,'Rappels por compras de materias primas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4509,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6092',4506,'Rappels por compras de otros aprovisionamientos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4510,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','61',4006,'Variación de existencias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4511,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','610',4510,'Variación de existencias de mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4512,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','611',4510,'Variación de existencias de materias primas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4513,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','612',4510,'Variación de existencias de otros aprovisionamientos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4514,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','62',4006,'Servicios exteriores',NULL,0,NULL,NULL,1,0,NULL,NULL),(4515,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','620',4514,'Gastos en investigación y desarrollo del ejercicio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4516,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','621',4514,'Arrendamientos y cánones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4517,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','622',4514,'Reparaciones y conservación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4518,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','623',4514,'Servicios profesionales independientes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4519,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','624',4514,'Transportes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4520,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','625',4514,'Primas de seguros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4521,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','626',4514,'Servicios bancarios y similares',NULL,0,NULL,NULL,1,0,NULL,NULL),(4522,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','627',4514,'Publicidad, propaganda y relaciones públicas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4523,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','628',4514,'Suministros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4524,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','629',4514,'Otros servicios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4525,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','63',4006,'Tributos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4526,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','630',4525,'Impuesto sobre benecifios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4527,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6300',4526,'Impuesto corriente',NULL,0,NULL,NULL,1,0,NULL,NULL),(4528,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6301',4526,'Impuesto diferido',NULL,0,NULL,NULL,1,0,NULL,NULL),(4529,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','631',4525,'Otros tributos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4530,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','633',4525,'Ajustes negativos en la imposición sobre beneficios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4531,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','634',4525,'Ajustes negativos en la imposición indirecta',NULL,0,NULL,NULL,1,0,NULL,NULL),(4532,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6341',4531,'Ajustes negativos en IVA de activo corriente',NULL,0,NULL,NULL,1,0,NULL,NULL),(4533,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6342',4531,'Ajustes negativos en IVA de inversiones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4534,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','636',4525,'Devolución de impuestos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4535,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','638',4525,'Ajustes positivos en la imposición sobre beneficios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4536,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','639',4525,'Ajustes positivos en la imposición directa',NULL,0,NULL,NULL,1,0,NULL,NULL),(4537,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6391',4536,'Ajustes positivos en IVA de activo corriente',NULL,0,NULL,NULL,1,0,NULL,NULL),(4538,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6392',4536,'Ajustes positivos en IVA de inversiones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4539,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','64',4006,'Gastos de personal',NULL,0,NULL,NULL,1,0,NULL,NULL),(4540,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','640',4539,'Sueldos y salarios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4541,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','641',4539,'Indemnizaciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4542,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','642',4539,'Seguridad social a cargo de la empresa',NULL,0,NULL,NULL,1,0,NULL,NULL),(4543,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','649',4539,'Otros gastos sociales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4544,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','65',4006,'Otros gastos de gestión',NULL,0,NULL,NULL,1,0,NULL,NULL),(4545,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','650',4544,'Pérdidas de créditos comerciales incobrables',NULL,0,NULL,NULL,1,0,NULL,NULL),(4546,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','651',4544,'Resultados de operaciones en común',NULL,0,NULL,NULL,1,0,NULL,NULL),(4547,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6510',4546,'Beneficio transferido gestor',NULL,0,NULL,NULL,1,0,NULL,NULL),(4548,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6511',4546,'Pérdida soportada participe o asociado no gestor',NULL,0,NULL,NULL,1,0,NULL,NULL),(4549,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','659',4544,'Otras pérdidas en gestión corriente',NULL,0,NULL,NULL,1,0,NULL,NULL),(4550,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','66',4006,'Gastos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4551,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','660',4550,'Gastos financieros por actualización de provisiones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4552,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','661',4550,'Intereses de obligaciones y bonos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4553,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6610',4452,'Intereses de obligaciones y bonos a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4554,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6611',4452,'Intereses de obligaciones y bonos a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4555,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6612',4452,'Intereses de obligaciones y bonos a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4556,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6613',4452,'Intereses de obligaciones y bonos a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4557,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6615',4452,'Intereses de obligaciones y bonos a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4558,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6616',4452,'Intereses de obligaciones y bonos a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4559,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6617',4452,'Intereses de obligaciones y bonos a corto plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4560,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6618',4452,'Intereses de obligaciones y bonos a corto plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4561,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','662',4550,'Intereses de deudas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4562,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6620',4561,'Intereses de deudas empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4563,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6621',4561,'Intereses de deudas empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4564,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6622',4561,'Intereses de deudas otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4565,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6623',4561,'Intereses de deudas con entidades de crédito',NULL,0,NULL,NULL,1,0,NULL,NULL),(4566,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6624',4561,'Intereses de deudas otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4567,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','663',4550,'Pérdidas por valorización de activos y pasivos financieros por su valor razonable',NULL,0,NULL,NULL,1,0,NULL,NULL),(4568,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','664',4550,'Gastos por dividendos de acciones o participaciones consideradas como pasivos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4569,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6640',4568,'Dividendos de pasivos empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4570,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6641',4568,'Dividendos de pasivos empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4571,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6642',4568,'Dividendos de pasivos otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4572,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6643',4568,'Dividendos de pasivos otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4573,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','665',4550,'Intereses por descuento de efectos y operaciones de factoring',NULL,0,NULL,NULL,1,0,NULL,NULL),(4574,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6650',4573,'Intereses por descuento de efectos en entidades de crédito del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4575,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6651',4573,'Intereses por descuento de efectos en entidades de crédito asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4576,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6652',4573,'Intereses por descuento de efectos en entidades de crédito vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4577,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6653',4573,'Intereses por descuento de efectos en otras entidades de crédito',NULL,0,NULL,NULL,1,0,NULL,NULL),(4578,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6654',4573,'Intereses por operaciones de factoring con entidades de crédito del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4579,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6655',4573,'Intereses por operaciones de factoring con entidades de crédito asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4580,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6656',4573,'Intereses por operaciones de factoring con otras entidades de crédito vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4581,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6657',4573,'Intereses por operaciones de factoring con otras entidades de crédito',NULL,0,NULL,NULL,1,0,NULL,NULL),(4582,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','666',4550,'Pérdidas en participaciones y valores representativos de deuda',NULL,0,NULL,NULL,1,0,NULL,NULL),(4583,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6660',4582,'Pérdidas en valores representativos de deuda a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4584,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6661',4582,'Pérdidas en valores representativos de deuda a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4585,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6662',4582,'Pérdidas en valores representativos de deuda a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4586,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6663',4582,'Pérdidas en participaciones y valores representativos de deuda a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4587,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6665',4582,'Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4588,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6666',4582,'Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4589,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6667',4582,'Pérdidas en valores representativos de deuda a corto plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4590,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6668',4582,'Pérdidas en valores representativos de deuda a corto plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4591,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','667',4550,'Pérdidas de créditos no comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4592,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6670',4591,'Pérdidas de créditos a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4593,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6671',4591,'Pérdidas de créditos a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4594,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6672',4591,'Pérdidas de créditos a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4595,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6673',4591,'Pérdidas de créditos a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4596,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6675',4591,'Pérdidas de créditos a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4597,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6676',4591,'Pérdidas de créditos a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4598,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6677',4591,'Pérdidas de créditos a corto plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4599,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6678',4591,'Pérdidas de créditos a corto plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4600,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','668',4550,'Diferencias negativas de cambio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4601,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','669',4550,'Otros gastos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4602,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','67',4006,'Pérdidas procedentes de activos no corrientes y gastos excepcionales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4603,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','670',4602,'Pérdidas procedentes del inmovilizado intangible',NULL,0,NULL,NULL,1,0,NULL,NULL),(4604,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','671',4602,'Pérdidas procedentes del inmovilizado material',NULL,0,NULL,NULL,1,0,NULL,NULL),(4605,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','672',4602,'Pérdidas procedentes de las inversiones inmobiliarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4607,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','673',4602,'Pérdidas procedentes de participaciones a largo plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4608,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6733',4607,'Pérdidas procedentes de participaciones a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4609,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6734',4607,'Pérdidas procedentes de participaciones a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4610,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6735',4607,'Pérdidas procedentes de participaciones a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4611,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','675',4602,'Pérdidas por operaciones con obligaciones propias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4612,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','678',4602,'Gastos excepcionales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4613,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','68',4006,'Dotaciones para amortizaciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4614,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','680',4613,'Amortización del inmovilizado intangible',NULL,0,NULL,NULL,1,0,NULL,NULL),(4615,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','681',4613,'Amortización del inmovilizado material',NULL,0,NULL,NULL,1,0,NULL,NULL),(4616,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','682',4613,'Amortización de las inversiones inmobiliarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4617,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','69',4006,'Pérdidas por deterioro y otras dotaciones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4618,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','690',4617,'Pérdidas por deterioro del inmovilizado intangible',NULL,0,NULL,NULL,1,0,NULL,NULL),(4619,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','691',4617,'Pérdidas por deterioro del inmovilizado material',NULL,0,NULL,NULL,1,0,NULL,NULL),(4620,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','692',4617,'Pérdidas por deterioro de las inversiones inmobiliarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4621,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','693',4617,'Pérdidas por deterioro de existencias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4622,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6930',4621,'Pérdidas por deterioro de productos terminados y en curso de fabricación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4623,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6931',4621,'Pérdidas por deterioro de mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4624,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6932',4621,'Pérdidas por deterioro de materias primas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4625,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6933',4621,'Pérdidas por deterioro de otros aprovisionamientos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4626,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','694',4617,'Pérdidas por deterioro de créditos por operaciones comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4627,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','695',4617,'Dotación a la provisión por operaciones comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4628,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6954',4627,'Dotación a la provisión por contratos onerosos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4629,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6959',4628,'Dotación a la provisión para otras operaciones comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4630,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','696',4617,'Pérdidas por deterioro de participaciones y valores representativos de deuda a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4631,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6960',4630,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4632,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6961',4630,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4633,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6962',4630,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4634,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6963',4630,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4635,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6965',4630,'Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4636,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6966',4630,'Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4637,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6967',4630,'Pérdidas por deterioro en valores representativos de deuda a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4638,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6968',4630,'Pérdidas por deterioro en valores representativos de deuda a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4639,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','697',4617,'Pérdidas por deterioro de créditos a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4640,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6970',4639,'Pérdidas por deterioro de créditos a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4641,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6971',4639,'Pérdidas por deterioro de créditos a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4642,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6972',4639,'Pérdidas por deterioro de créditos a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4643,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6973',4639,'Pérdidas por deterioro de créditos a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4644,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','698',4617,'Pérdidas por deterioro de participaciones y valores representativos de deuda a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4645,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6980',4644,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4646,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6981',4644,'Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4647,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6985',4644,'Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4648,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6986',4644,'Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4649,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6988',4644,'Pérdidas por deterioro en valores representativos de deuda a corto plazo de otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4650,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','699',4617,'Pérdidas por deterioro de crédito a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4651,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6990',4650,'Pérdidas por deterioro de crédito a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4652,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6991',4650,'Pérdidas por deterioro de crédito a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4653,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6992',4650,'Pérdidas por deterioro de crédito a corto plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4654,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','EXPENSE','6993',4650,'Pérdidas por deterioro de crédito a corto plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4655,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','70',4007,'Ventas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4656,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','700',4655,'Ventas de mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4657,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','701',4655,'Ventas de productos terminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4658,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','702',4655,'Ventas de productos semiterminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4659,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','703',4655,'Ventas de subproductos y residuos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4660,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','704',4655,'Ventas de envases y embalajes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4661,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','705',4655,'Prestaciones de servicios',NULL,0,NULL,NULL,1,0,NULL,NULL),(4662,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','706',4655,'Descuentos sobre ventas por pronto pago',NULL,0,NULL,NULL,1,0,NULL,NULL),(4663,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7060',4662,'Descuentos sobre ventas por pronto pago de mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4664,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7061',4662,'Descuentos sobre ventas por pronto pago de productos terminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4665,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7062',4662,'Descuentos sobre ventas por pronto pago de productos semiterminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4666,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7063',4662,'Descuentos sobre ventas por pronto pago de subproductos y residuos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4667,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','708',4655,'Devoluciones de ventas y operacioes similares',NULL,0,NULL,NULL,1,0,NULL,NULL),(4668,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7080',4667,'Devoluciones de ventas de mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4669,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7081',4667,'Devoluciones de ventas de productos terminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4670,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7082',4667,'Devoluciones de ventas de productos semiterminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4671,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7083',4667,'Devoluciones de ventas de subproductos y residuos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4672,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7084',4667,'Devoluciones de ventas de envases y embalajes',NULL,0,NULL,NULL,1,0,NULL,NULL),(4673,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','71',4007,'Variación de existencias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4674,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','710',4673,'Variación de existencias de productos en curso',NULL,0,NULL,NULL,1,0,NULL,NULL),(4675,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','711',4673,'Variación de existencias de productos semiterminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4676,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','712',4673,'Variación de existencias de productos terminados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4677,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','713',4673,'Variación de existencias de subproductos, residuos y materiales recuperados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4678,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','73',4007,'Trabajos realizados para la empresa',NULL,0,NULL,NULL,1,0,NULL,NULL),(4679,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','730',4678,'Trabajos realizados para el inmovilizado intangible',NULL,0,NULL,NULL,1,0,NULL,NULL),(4680,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','731',4678,'Trabajos realizados para el inmovilizado tangible',NULL,0,NULL,NULL,1,0,NULL,NULL),(4681,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','732',4678,'Trabajos realizados en inversiones inmobiliarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4682,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','733',4678,'Trabajos realizados para el inmovilizado material en curso',NULL,0,NULL,NULL,1,0,NULL,NULL),(4683,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','74',4007,'Subvenciones, donaciones y legados',NULL,0,NULL,NULL,1,0,NULL,NULL),(4684,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','740',4683,'Subvenciones, donaciones y legados a la explotación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4685,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','746',4683,'Subvenciones, donaciones y legados de capital transferidos al resultado del ejercicio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4686,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','747',4683,'Otras subvenciones, donaciones y legados transferidos al resultado del ejercicio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4687,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','75',4007,'Otros ingresos de gestión',NULL,0,NULL,NULL,1,0,NULL,NULL),(4688,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','751',4687,'Resultados de operaciones en común',NULL,0,NULL,NULL,1,0,NULL,NULL),(4689,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7510',4688,'Pérdida transferida gestor',NULL,0,NULL,NULL,1,0,NULL,NULL),(4690,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7511',4688,'Beneficio atribuido participe o asociado no gestor',NULL,0,NULL,NULL,1,0,NULL,NULL),(4691,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','752',4687,'Ingreso por arrendamiento',NULL,0,NULL,NULL,1,0,NULL,NULL),(4692,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','753',4687,'Ingresos de propiedad industrial cedida en explotación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4693,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','754',4687,'Ingresos por comisiones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4694,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','755',4687,'Ingresos por servicios al personal',NULL,0,NULL,NULL,1,0,NULL,NULL),(4695,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','759',4687,'Ingresos por servicios diversos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4696,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','76',4007,'Ingresos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4697,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','760',4696,'Ingresos de participaciones en instrumentos de patrimonio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4698,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7600',4697,'Ingresos de participaciones en instrumentos de patrimonio empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4699,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7601',4697,'Ingresos de participaciones en instrumentos de patrimonio empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4700,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7602',4697,'Ingresos de participaciones en instrumentos de patrimonio otras partes asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4701,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7603',4697,'Ingresos de participaciones en instrumentos de patrimonio otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4702,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','761',4696,'Ingresos de valores representativos de deuda',NULL,0,NULL,NULL,1,0,NULL,NULL),(4703,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7610',4702,'Ingresos de valores representativos de deuda empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4704,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7611',4702,'Ingresos de valores representativos de deuda empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4705,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7612',4702,'Ingresos de valores representativos de deuda otras partes asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4706,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7613',4702,'Ingresos de valores representativos de deuda otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4707,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','762',4696,'Ingresos de créditos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4708,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7620',4707,'Ingresos de créditos a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4709,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','76200',4708,'Ingresos de crédito a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4710,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','76201',4708,'Ingresos de crédito a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4711,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','76202',4708,'Ingresos de crédito a largo plazo otras partes asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4712,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','76203',4708,'Ingresos de crédito a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4713,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7621',4707,'Ingresos de créditos a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4714,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','76210',4713,'Ingresos de crédito a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4715,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','76211',4713,'Ingresos de crédito a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4716,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','76212',4713,'Ingresos de crédito a corto plazo otras partes asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4717,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','76213',4713,'Ingresos de crédito a corto plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4718,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','763',4696,'Beneficios por valorización de activos y pasivos financieros por su valor razonable',NULL,0,NULL,NULL,1,0,NULL,NULL),(4719,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','766',4696,'Beneficios en participaciones y valores representativos de deuda',NULL,0,NULL,NULL,1,0,NULL,NULL),(4720,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7660',4719,'Beneficios en participaciones y valores representativos de deuda a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4721,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7661',4719,'Beneficios en participaciones y valores representativos de deuda a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4722,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7662',4719,'Beneficios en participaciones y valores representativos de deuda a largo plazo otras partes asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4723,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7663',4719,'Beneficios en participaciones y valores representativos de deuda a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4724,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7665',4719,'Beneficios en participaciones y valores representativos de deuda a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4725,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7666',4719,'Beneficios en participaciones y valores representativos de deuda a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4726,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7667',4719,'Beneficios en participaciones y valores representativos de deuda a corto plazo otras partes asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4727,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7668',4719,'Beneficios en participaciones y valores representativos de deuda a corto plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4728,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','768',4696,'Diferencias positivas de cambio',NULL,0,NULL,NULL,1,0,NULL,NULL),(4729,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','769',4696,'Otros ingresos financieros',NULL,0,NULL,NULL,1,0,NULL,NULL),(4730,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','77',4007,'Beneficios procedentes de activos no corrientes e ingresos excepcionales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4731,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','770',4730,'Beneficios procedentes del inmovilizado intangible',NULL,0,NULL,NULL,1,0,NULL,NULL),(4732,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','771',4730,'Beneficios procedentes del inmovilizado material',NULL,0,NULL,NULL,1,0,NULL,NULL),(4733,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','772',4730,'Beneficios procedentes de las inversiones inmobiliarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4734,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','773',4730,'Beneficios procedentes de participaciones a largo plazo en partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4735,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7733',4734,'Beneficios procedentes de participaciones a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4736,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7734',4734,'Beneficios procedentes de participaciones a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4737,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7735',4734,'Beneficios procedentes de participaciones a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4738,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','775',4730,'Beneficios por operaciones con obligaciones propias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4739,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','778',4730,'Ingresos excepcionales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4741,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','79',4007,'Excesos y aplicaciones de provisiones y pérdidas por deterioro',NULL,0,NULL,NULL,1,0,NULL,NULL),(4742,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','790',4741,'Revisión del deterioro del inmovilizado intangible',NULL,0,NULL,NULL,1,0,NULL,NULL),(4743,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','791',4741,'Revisión del deterioro del inmovilizado material',NULL,0,NULL,NULL,1,0,NULL,NULL),(4744,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','792',4741,'Revisión del deterioro de las inversiones inmobiliarias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4745,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','793',4741,'Revisión del deterioro de las existencias',NULL,0,NULL,NULL,1,0,NULL,NULL),(4746,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7930',4745,'Revisión del deterioro de productos terminados y en curso de fabricación',NULL,0,NULL,NULL,1,0,NULL,NULL),(4747,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7931',4745,'Revisión del deterioro de mercaderías',NULL,0,NULL,NULL,1,0,NULL,NULL),(4748,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7932',4745,'Revisión del deterioro de materias primas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4749,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7933',4745,'Revisión del deterioro de otros aprovisionamientos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4750,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','794',4741,'Revisión del deterioro de créditos por operaciones comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4751,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','795',4741,'Exceso de provisiones',NULL,0,NULL,NULL,1,0,NULL,NULL),(4752,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7951',4751,'Exceso de provisión para impuestos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4753,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7952',4751,'Exceso de provisión para otras responsabilidades',NULL,0,NULL,NULL,1,0,NULL,NULL),(4755,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7954',4751,'Exceso de provisión para operaciones comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4756,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','79544',4755,'Exceso de provisión por contratos onerosos',NULL,0,NULL,NULL,1,0,NULL,NULL),(4757,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','79549',4755,'Exceso de provisión para otras operaciones comerciales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4758,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7955',4751,'Exceso de provisión para actuaciones medioambienteales',NULL,0,NULL,NULL,1,0,NULL,NULL),(4759,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','796',4741,'Revisión del deterioro de participaciones y valores representativos de deuda a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4760,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7960',4759,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4761,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7961',4759,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4762,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7962',4759,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4763,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7963',4759,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4764,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7965',4759,'Revisión del deterioro de valores representativos a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4765,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7966',4759,'Revisión del deterioro de valores representativos a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4766,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7967',4759,'Revisión del deterioro de valores representativos a largo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4767,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7968',4759,'Revisión del deterioro de valores representativos a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4768,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','797',4741,'Revisión del deterioro de créditos a largo plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4769,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7970',4768,'Revisión del deterioro de créditos a largo plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4770,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7971',4768,'Revisión del deterioro de créditos a largo plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4771,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7972',4768,'Revisión del deterioro de créditos a largo plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4772,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7973',4768,'Revisión del deterioro de créditos a largo plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4773,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','798',4741,'Revisión del deterioro de participaciones y valores representativos de deuda a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4774,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7980',4773,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4775,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7981',4773,'Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4776,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7985',4773,'Revisión del deterioro de valores representativos de deuda a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4777,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7986',4773,'Revisión del deterioro de valores representativos de deuda a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4778,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7987',4773,'Revisión del deterioro de valores representativos de deuda a corto plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4779,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7988',4773,'Revisión del deterioro de valores representativos de deuda a corto plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4780,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','799',4741,'Revisión del deterioro de créditos a corto plazo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4781,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7990',4780,'Revisión del deterioro de créditos a corto plazo empresas del grupo',NULL,0,NULL,NULL,1,0,NULL,NULL),(4782,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7991',4780,'Revisión del deterioro de créditos a corto plazo empresas asociadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4783,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7992',4780,'Revisión del deterioro de créditos a corto plazo otras partes vinculadas',NULL,0,NULL,NULL,1,0,NULL,NULL),(4784,1,NULL,'2018-01-19 11:17:49','PCG08-PYME','INCOME','7993',4780,'Revisión del deterioro de créditos a corto plazo otras empresas',NULL,0,NULL,NULL,1,0,NULL,NULL); /*!40000 ALTER TABLE `llx_accounting_account` ENABLE KEYS */; UNLOCK TABLES; @@ -91,10 +92,10 @@ CREATE TABLE `llx_accounting_bookkeeping` ( `piece_num` int(11) NOT NULL, `date_validated` datetime DEFAULT NULL, `date_export` datetime DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_user_modif` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `subledger_account` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `subledger_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -124,7 +125,7 @@ DROP TABLE IF EXISTS `llx_accounting_bookkeeping_tmp`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_accounting_bookkeeping_tmp` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `doc_date` date NOT NULL, `doc_type` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `doc_ref` varchar(300) COLLATE utf8_unicode_ci NOT NULL, @@ -147,7 +148,7 @@ CREATE TABLE `llx_accounting_bookkeeping_tmp` ( `fk_user_author` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `code_journal` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `journal_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -185,10 +186,10 @@ CREATE TABLE `llx_accounting_fiscalyear` ( `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `date_start` date DEFAULT NULL, `date_end` date DEFAULT NULL, - `statut` tinyint(4) NOT NULL DEFAULT '0', - `entity` int(11) NOT NULL DEFAULT '1', + `statut` tinyint(4) NOT NULL DEFAULT 0, + `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -215,9 +216,9 @@ CREATE TABLE `llx_accounting_journal` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, - `nature` smallint(6) NOT NULL DEFAULT '0', - `active` smallint(6) DEFAULT '0', - `entity` int(11) DEFAULT '1', + `nature` smallint(6) NOT NULL DEFAULT 0, + `active` smallint(6) DEFAULT 0, + `entity` int(11) DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_accounting_journal_code` (`code`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -244,11 +245,11 @@ CREATE TABLE `llx_accounting_system` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `pcg_version` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, - `active` smallint(6) DEFAULT '0', + `active` smallint(6) DEFAULT 0, `fk_country` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_accounting_system_pcg_version` (`pcg_version`) -) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -257,7 +258,7 @@ CREATE TABLE `llx_accounting_system` ( LOCK TABLES `llx_accounting_system` WRITE; /*!40000 ALTER TABLE `llx_accounting_system` DISABLE KEYS */; -INSERT INTO `llx_accounting_system` VALUES (1,'PCG99-ABREGE','The simple accountancy french plan',1,1),(2,'PCG99-BASE','The base accountancy french plan',1,1),(3,'PCMN-BASE','The base accountancy belgium plan',1,2),(4,'PCG08-PYME','The PYME accountancy spanish plan',1,4),(5,'PC-MIPYME','The PYME accountancy Chile plan',1,67),(6,'ENG-BASE','England plan',1,7),(7,'SYSCOHADA','Plan comptable Ouest-Africain',1,49),(39,'PCG14-DEV','The developed accountancy french plan 2014',1,1),(40,'PCG_SUISSE','Switzerland plan',1,6),(41,'PCN-LUXEMBURG','Plan comptable normalisé Luxembourgeois',1,140),(42,'DK-STD','Standardkontoplan fra SKAT',1,80),(43,'PCT','The Tunisia plan',1,10),(44,'PCG','The Moroccan chart of accounts',1,12),(47,'SYSCOHADA-BJ','Plan comptable Ouest-Africain',1,49),(48,'SYSCOHADA-BF','Plan comptable Ouest-Africain',1,60),(49,'SYSCOHADA-CM','Plan comptable Ouest-Africain',1,24),(50,'SYSCOHADA-CF','Plan comptable Ouest-Africain',1,65),(51,'SYSCOHADA-KM','Plan comptable Ouest-Africain',1,71),(52,'SYSCOHADA-CG','Plan comptable Ouest-Africain',1,72),(53,'SYSCOHADA-CI','Plan comptable Ouest-Africain',1,21),(54,'SYSCOHADA-GA','Plan comptable Ouest-Africain',1,16),(55,'SYSCOHADA-GQ','Plan comptable Ouest-Africain',1,87),(56,'SYSCOHADA-ML','Plan comptable Ouest-Africain',1,147),(57,'SYSCOHADA-NE','Plan comptable Ouest-Africain',1,168),(58,'SYSCOHADA-CD','Plan comptable Ouest-Africain',1,73),(59,'SYSCOHADA-SN','Plan comptable Ouest-Africain',1,22),(60,'SYSCOHADA-TD','Plan comptable Ouest-Africain',1,66),(61,'SYSCOHADA-TG','Plan comptable Ouest-Africain',1,15),(62,'RO-BASE','Plan de conturi romanesc',1,188),(63,'SKR03','Standardkontenrahmen SKR 03',1,5),(64,'SKR04','Standardkontenrahmen SKR 04',1,5),(65,'BAS-K1-MINI','The Swedish mini chart of accounts',1,20); +INSERT INTO `llx_accounting_system` VALUES (1,'PCG99-ABREGE','The simple accountancy french plan',1,1),(2,'PCG99-BASE','The base accountancy french plan',1,1),(3,'PCMN-BASE','The base accountancy belgium plan',1,2),(4,'PCG08-PYME','The PYME accountancy spanish plan',1,4),(5,'PC-MIPYME','The PYME accountancy Chile plan',1,67),(6,'ENG-BASE','England plan',1,7),(7,'SYSCOHADA','Plan comptable Ouest-Africain',0,NULL),(39,'PCG14-DEV','The developed accountancy french plan 2014',1,1),(40,'PCG_SUISSE','Switzerland plan',1,6),(41,'PCN-LUXEMBURG','Plan comptable normalisé Luxembourgeois',1,140),(42,'DK-STD','Standardkontoplan fra SKAT',1,80),(43,'PCT','The Tunisia plan',1,10),(44,'PCG','The Moroccan chart of accounts',1,12),(47,'SYSCOHADA-BJ','Plan comptable Ouest-Africain',1,49),(48,'SYSCOHADA-BF','Plan comptable Ouest-Africain',1,60),(49,'SYSCOHADA-CM','Plan comptable Ouest-Africain',1,24),(50,'SYSCOHADA-CF','Plan comptable Ouest-Africain',1,65),(51,'SYSCOHADA-KM','Plan comptable Ouest-Africain',1,71),(52,'SYSCOHADA-CG','Plan comptable Ouest-Africain',1,72),(53,'SYSCOHADA-CI','Plan comptable Ouest-Africain',1,21),(54,'SYSCOHADA-GA','Plan comptable Ouest-Africain',1,16),(55,'SYSCOHADA-GQ','Plan comptable Ouest-Africain',1,87),(56,'SYSCOHADA-ML','Plan comptable Ouest-Africain',1,147),(57,'SYSCOHADA-NE','Plan comptable Ouest-Africain',1,168),(58,'SYSCOHADA-CD','Plan comptable Ouest-Africain',1,73),(59,'SYSCOHADA-SN','Plan comptable Ouest-Africain',1,22),(60,'SYSCOHADA-TD','Plan comptable Ouest-Africain',1,66),(61,'SYSCOHADA-TG','Plan comptable Ouest-Africain',1,15),(62,'RO-BASE','Plan de conturi romanesc',1,188),(63,'SKR03','Standardkontenrahmen SKR 03',1,5),(64,'SKR04','Standardkontenrahmen SKR 04',1,5),(65,'BAS-K1-MINI','The Swedish mini chart of accounts',1,20),(67,'PCG18-ASSOC','French foundation chart of accounts 2018',1,1),(68,'PCGAFR14-DEV','The developed farm accountancy french plan 2014',1,1),(69,'AT-BASE','Plan Austria',1,41); /*!40000 ALTER TABLE `llx_accounting_system` ENABLE KEYS */; UNLOCK TABLES; @@ -271,31 +272,30 @@ DROP TABLE IF EXISTS `llx_actioncomm`; CREATE TABLE `llx_actioncomm` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datep` datetime DEFAULT NULL, `datep2` datetime DEFAULT NULL, `fk_action` int(11) DEFAULT NULL, `code` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_author` int(11) DEFAULT NULL, `fk_user_mod` int(11) DEFAULT NULL, `fk_project` int(11) DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, `fk_contact` int(11) DEFAULT NULL, - `fk_parent` int(11) NOT NULL DEFAULT '0', + `fk_parent` int(11) NOT NULL DEFAULT 0, `fk_user_action` int(11) DEFAULT NULL, `transparency` int(11) DEFAULT NULL, `fk_user_done` int(11) DEFAULT NULL, `priority` smallint(6) DEFAULT NULL, - `fulldayevent` smallint(6) NOT NULL DEFAULT '0', - `punctual` smallint(6) NOT NULL DEFAULT '1', - `percent` smallint(6) NOT NULL DEFAULT '0', + `fulldayevent` smallint(6) NOT NULL DEFAULT 0, + `percent` smallint(6) NOT NULL DEFAULT 0, `location` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `durationp` double DEFAULT NULL, `durationa` double DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_element` int(11) DEFAULT NULL, `elementtype` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email_msgid` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -324,7 +324,7 @@ CREATE TABLE `llx_actioncomm` ( KEY `idx_actioncomm_datep2` (`datep2`), KEY `idx_actioncomm_recurid` (`recurid`), KEY `idx_actioncomm_ref_ext` (`ref_ext`) -) ENGINE=InnoDB AUTO_INCREMENT=603 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=605 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -333,7 +333,7 @@ CREATE TABLE `llx_actioncomm` ( LOCK TABLES `llx_actioncomm` WRITE; /*!40000 ALTER TABLE `llx_actioncomm` DISABLE KEYS */; -INSERT INTO `llx_actioncomm` VALUES (1,NULL,1,'2012-07-08 14:21:44','2012-07-08 14:21:44',50,NULL,'Company AAA and Co added into Dolibarr','2012-07-08 14:21:44','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(2,NULL,1,'2012-07-08 14:23:48','2012-07-08 14:23:48',50,NULL,'Company Belin SARL added into Dolibarr','2012-07-08 14:23:48','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(3,NULL,1,'2012-07-08 22:42:12','2012-07-08 22:42:12',50,NULL,'Company Spanish Comp added into Dolibarr','2012-07-08 22:42:12','2016-12-21 12:50:33',1,NULL,NULL,3,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(4,NULL,1,'2012-07-08 22:48:18','2012-07-08 22:48:18',50,NULL,'Company Prospector Vaalen added into Dolibarr','2012-07-08 22:48:18','2016-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(5,NULL,1,'2012-07-08 23:22:57','2012-07-08 23:22:57',50,NULL,'Company NoCountry Co added into Dolibarr','2012-07-08 23:22:57','2016-12-21 12:50:33',1,NULL,NULL,5,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(6,NULL,1,'2012-07-09 00:15:09','2012-07-09 00:15:09',50,NULL,'Company Swiss customer added into Dolibarr','2012-07-09 00:15:09','2016-12-21 12:50:33',1,NULL,NULL,6,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(7,NULL,1,'2012-07-09 01:24:26','2012-07-09 01:24:26',50,NULL,'Company Generic customer added into Dolibarr','2012-07-09 01:24:26','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(8,NULL,1,'2012-07-10 14:54:27','2012-07-10 14:54:27',50,NULL,'Société Client salon ajoutée dans Dolibarr','2012-07-10 14:54:27','2016-12-21 12:50:33',1,NULL,NULL,8,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(9,NULL,1,'2012-07-10 14:54:44','2012-07-10 14:54:44',50,NULL,'Société Client salon invidivdu ajoutée dans Doliba','2012-07-10 14:54:44','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(10,NULL,1,'2012-07-10 14:56:10','2012-07-10 14:56:10',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:56:10','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(11,NULL,1,'2012-07-10 14:58:53','2012-07-10 14:58:53',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:58:53','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(12,NULL,1,'2012-07-10 15:00:55','2012-07-10 15:00:55',50,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr','2012-07-10 15:00:55','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(13,NULL,1,'2012-07-10 15:13:08','2012-07-10 15:13:08',50,NULL,'Société Smith Vick ajoutée dans Dolibarr','2012-07-10 15:13:08','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(14,NULL,1,'2012-07-10 15:21:00','2012-07-10 16:21:00',5,NULL,'RDV avec mon chef','2012-07-10 15:21:48','2012-07-10 13:21:48',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,1,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(15,NULL,1,'2012-07-10 18:18:16','2012-07-10 18:18:16',50,NULL,'Contrat CONTRAT1 validé dans Dolibarr','2012-07-10 18:18:16','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(16,NULL,1,'2012-07-10 18:35:57','2012-07-10 18:35:57',50,NULL,'Société Mon client ajoutée dans Dolibarr','2012-07-10 18:35:57','2016-12-21 12:50:33',1,NULL,NULL,11,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(17,NULL,1,'2012-07-11 16:18:08','2012-07-11 16:18:08',50,NULL,'Société Dupont Alain ajoutée dans Dolibarr','2012-07-11 16:18:08','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(18,NULL,1,'2012-07-11 17:11:00','2012-07-11 17:17:00',5,NULL,'Rendez-vous','2012-07-11 17:11:22','2012-07-11 15:11:22',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,1,0,'gfgdfgdf',360,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(19,NULL,1,'2012-07-11 17:13:20','2012-07-11 17:13:20',50,NULL,'Société Vendeur de chips ajoutée dans Dolibarr','2012-07-11 17:13:20','2016-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(20,NULL,1,'2012-07-11 17:15:42','2012-07-11 17:15:42',50,NULL,'Commande CF1007-0001 validée','2012-07-11 17:15:42','2016-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(21,NULL,1,'2012-07-11 18:47:33','2012-07-11 18:47:33',50,NULL,'Commande CF1007-0002 validée','2012-07-11 18:47:33','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(22,NULL,1,'2012-07-18 11:36:18','2012-07-18 11:36:18',50,NULL,'Proposition PR1007-0003 validée','2012-07-18 11:36:18','2016-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(23,NULL,1,'2013-07-18 20:49:58','2013-07-18 20:49:58',50,NULL,'Invoice FA1007-0002 validated in Dolibarr','2013-07-18 20:49:58','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(24,NULL,1,'2013-07-28 01:37:00',NULL,1,NULL,'Phone call','2013-07-28 01:37:48','2013-07-27 23:37:48',1,NULL,NULL,NULL,2,0,1,NULL,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(25,NULL,1,'2013-08-01 02:31:24','2013-08-01 02:31:24',50,NULL,'Company mmm added into Dolibarr','2013-08-01 02:31:24','2016-12-21 12:50:33',1,NULL,NULL,15,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(26,NULL,1,'2013-08-01 02:31:43','2013-08-01 02:31:43',50,NULL,'Company ppp added into Dolibarr','2013-08-01 02:31:43','2016-12-21 12:50:33',1,NULL,NULL,16,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(27,NULL,1,'2013-08-01 02:41:26','2013-08-01 02:41:26',50,NULL,'Company aaa added into Dolibarr','2013-08-01 02:41:26','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(28,NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(29,NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(30,NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(31,NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(38,NULL,1,'2013-08-08 02:41:55','2013-08-08 02:41:55',50,NULL,'Invoice FA1108-0005 validated in Dolibarr','2013-08-08 02:41:55','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(40,NULL,1,'2013-08-08 02:53:40','2013-08-08 02:53:40',50,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr','2013-08-08 02:53:40','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(41,NULL,1,'2013-08-08 02:54:05','2013-08-08 02:54:05',50,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr','2013-08-08 02:54:05','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(42,NULL,1,'2013-08-08 02:55:04','2013-08-08 02:55:04',50,NULL,'Invoice FA1107-0006 validated in Dolibarr','2013-08-08 02:55:04','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(43,NULL,1,'2013-08-08 02:55:26','2013-08-08 02:55:26',50,NULL,'Invoice FA1108-0007 validated in Dolibarr','2013-08-08 02:55:26','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(44,NULL,1,'2013-08-08 02:55:58','2013-08-08 02:55:58',50,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr','2013-08-08 02:55:58','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(45,NULL,1,'2013-08-08 03:04:22','2013-08-08 03:04:22',50,NULL,'Order CO1108-0001 validated','2013-08-08 03:04:22','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(46,NULL,1,'2013-08-08 13:59:09','2013-08-08 13:59:09',50,NULL,'Order CO1107-0002 validated','2013-08-08 13:59:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(47,NULL,1,'2013-08-08 14:24:18','2013-08-08 14:24:18',50,NULL,'Proposal PR1007-0001 validated','2013-08-08 14:24:18','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(48,NULL,1,'2013-08-08 14:24:24','2013-08-08 14:24:24',50,NULL,'Proposal PR1108-0004 validated','2013-08-08 14:24:24','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(49,NULL,1,'2013-08-08 15:04:37','2013-08-08 15:04:37',50,NULL,'Order CF1108-0003 validated','2013-08-08 15:04:37','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(50,NULL,1,'2014-12-08 17:56:47','2014-12-08 17:56:47',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:56:47','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(51,NULL,1,'2014-12-08 17:57:11','2014-12-08 17:57:11',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:57:11','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(52,NULL,1,'2014-12-08 17:58:27','2014-12-08 17:58:27',40,NULL,'Facture FA1212-0008 validée dans Dolibarr','2014-12-08 17:58:27','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0008 validée dans Dolibarr\nAuteur: admin',11,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(53,NULL,1,'2014-12-08 18:20:49','2014-12-08 18:20:49',40,NULL,'Facture AV1212-0002 validée dans Dolibarr','2014-12-08 18:20:49','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0002 validée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(54,NULL,1,'2014-12-09 18:35:07','2014-12-09 18:35:07',40,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr','2014-12-09 18:35:07','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(55,NULL,1,'2014-12-09 20:14:42','2014-12-09 20:14:42',40,NULL,'Société doe john ajoutée dans Dolibarr','2014-12-09 20:14:42','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Société doe john ajoutée dans Dolibarr\nAuteur: admin',18,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(56,NULL,1,'2014-12-12 18:54:19','2014-12-12 18:54:19',40,NULL,'Facture FA1212-0009 validée dans Dolibarr','2014-12-12 18:54:19','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0009 validée dans Dolibarr\nAuteur: admin',55,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(121,NULL,1,'2014-12-06 10:00:00',NULL,50,NULL,'aaab','2014-12-21 17:48:08','2014-12-21 16:54:07',3,1,NULL,NULL,NULL,0,3,NULL,NULL,1,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(122,NULL,1,'2014-12-21 18:09:52','2014-12-21 18:09:52',40,NULL,'Facture client FA1007-0001 envoyée par EMail','2014-12-21 18:09:52','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Mail envoyé par Firstname SuperAdminName à laurent@mycompany.fr.\nSujet du mail: Envoi facture FA1007-0001\nCorps du mail:\nVeuillez trouver ci-joint la facture FA1007-0001\r\n\r\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\r\n\r\nhttp://localhost/dolibarrnew/public/paypal/newpayment.php?source=invoice&ref=FA1007-0001&securekey=50c82fab36bb3b6aa83e2a50691803b2\r\n\r\nCordialement',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(123,NULL,1,'2015-01-06 13:13:57','2015-01-06 13:13:57',40,NULL,'Facture 16 validée dans Dolibarr','2015-01-06 13:13:57','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture 16 validée dans Dolibarr\nAuteur: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(124,NULL,1,'2015-01-12 12:23:05','2015-01-12 12:23:05',40,NULL,'Patient aaa ajouté','2015-01-12 12:23:05','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient aaa ajouté\nAuteur: admin',19,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(125,NULL,1,'2015-01-12 12:52:20','2015-01-12 12:52:20',40,NULL,'Patient pppoo ajouté','2015-01-12 12:52:20','2016-12-21 12:50:33',1,NULL,NULL,20,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient pppoo ajouté\nAuteur: admin',20,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(127,NULL,1,'2015-01-19 18:22:48','2015-01-19 18:22:48',40,NULL,'Facture FS1301-0001 validée dans Dolibarr','2015-01-19 18:22:48','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0001 validée dans Dolibarr\nAuteur: admin',148,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(128,NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 validée dans Dolibarr','2015-01-19 18:31:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA6801-0010 validée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(129,NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr','2015-01-19 18:31:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(130,NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 validée dans Dolibarr','2015-01-19 18:31:58','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0002 validée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(131,NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr','2015-01-19 18:31:58','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(132,NULL,1,'2015-01-23 15:07:54','2015-01-23 15:07:54',50,NULL,'Consultation 24 saisie (aaa)','2015-01-23 15:07:54','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Consultation 24 saisie (aaa)\nAuteur: admin',24,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(133,NULL,1,'2015-01-23 16:56:58','2015-01-23 16:56:58',40,NULL,'Patient pa ajouté','2015-01-23 16:56:58','2016-12-21 12:50:33',1,NULL,NULL,21,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient pa ajouté\nAuteur: admin',21,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(134,NULL,1,'2015-01-23 17:34:00',NULL,50,NULL,'bbcv','2015-01-23 17:35:21','2015-01-23 16:35:21',1,NULL,1,2,NULL,0,1,NULL,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(135,NULL,1,'2015-02-12 15:54:00','2015-02-12 15:54:00',40,NULL,'Facture FA1212-0011 validée dans Dolibarr','2015-02-12 15:54:37','2016-12-21 12:50:33',1,1,NULL,7,NULL,0,1,NULL,1,0,0,1,50,NULL,NULL,NULL,'Facture FA1212-0011 validée dans Dolibarr
\r\nAuteur: admin',13,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(136,NULL,1,'2015-02-12 17:06:51','2015-02-12 17:06:51',40,NULL,'Commande CO1107-0003 validée','2015-02-12 17:06:51','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1107-0003 validée\nAuteur: admin',2,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(137,NULL,1,'2015-02-17 16:22:10','2015-02-17 16:22:10',40,NULL,'Proposition PR1302-0009 validée','2015-02-17 16:22:10','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition PR1302-0009 validée\nAuteur: admin',9,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(138,NULL,1,'2015-02-17 16:27:00','2015-02-17 16:27:00',40,NULL,'Facture FA1302-0012 validée dans Dolibarr','2015-02-17 16:27:00','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1302-0012 validée dans Dolibarr\nAuteur: admin',152,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(139,NULL,1,'2015-02-17 16:27:29','2015-02-17 16:27:29',40,NULL,'Proposition PR1302-0010 validée','2015-02-17 16:27:29','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition PR1302-0010 validée\nAuteur: admin',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(140,NULL,1,'2015-02-17 18:27:56','2015-02-17 18:27:56',40,NULL,'Commande CO1107-0004 validée','2015-02-17 18:27:56','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1107-0004 validée\nAuteur: admin',3,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(141,NULL,1,'2015-02-17 18:38:14','2015-02-17 18:38:14',40,NULL,'Commande CO1302-0005 validée','2015-02-17 18:38:14','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1302-0005 validée\nAuteur: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(142,NULL,1,'2015-02-26 22:57:50','2015-02-26 22:57:50',40,NULL,'Company pppp added into Dolibarr','2015-02-26 22:57:50','2016-12-21 12:50:33',1,NULL,NULL,22,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company pppp added into Dolibarr\nAuthor: admin',22,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(143,NULL,1,'2015-02-26 22:58:13','2015-02-26 22:58:13',40,NULL,'Company ttttt added into Dolibarr','2015-02-26 22:58:13','2016-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ttttt added into Dolibarr\nAuthor: admin',23,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(144,NULL,1,'2015-02-27 10:00:00','2015-02-27 19:20:00',5,NULL,'Rendez-vous','2015-02-27 19:20:53','2015-02-27 18:20:53',1,NULL,NULL,NULL,NULL,0,1,NULL,1,0,0,1,-1,'',33600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(145,NULL,1,'2015-02-27 19:28:00',NULL,2,NULL,'fdsfsd','2015-02-27 19:28:48','2015-02-27 18:29:53',1,1,NULL,NULL,NULL,0,1,NULL,1,0,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(146,NULL,1,'2015-03-06 10:05:07','2015-03-06 10:05:07',40,NULL,'Contrat (PROV3) validé dans Dolibarr','2015-03-06 10:05:07','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Contrat (PROV3) validé dans Dolibarr\nAuteur: admin',3,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(147,NULL,1,'2015-03-06 16:43:37','2015-03-06 16:43:37',40,NULL,'Facture FA1307-0013 validée dans Dolibarr','2015-03-06 16:43:37','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1307-0013 validée dans Dolibarr\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(148,NULL,1,'2015-03-06 16:44:12','2015-03-06 16:44:12',40,NULL,'Facture FA1407-0014 validée dans Dolibarr','2015-03-06 16:44:12','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1407-0014 validée dans Dolibarr\nAuteur: admin',159,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(149,NULL,1,'2015-03-06 16:47:48','2015-03-06 16:47:48',40,NULL,'Facture FA1507-0015 validée dans Dolibarr','2015-03-06 16:47:48','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1507-0015 validée dans Dolibarr\nAuteur: admin',160,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(150,NULL,1,'2015-03-06 16:48:16','2015-03-06 16:48:16',40,NULL,'Facture FA1607-0016 validée dans Dolibarr','2015-03-06 16:48:16','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1607-0016 validée dans Dolibarr\nAuteur: admin',161,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(151,NULL,1,'2015-03-06 17:13:59','2015-03-06 17:13:59',40,NULL,'Société smith smith ajoutée dans Dolibarr','2015-03-06 17:13:59','2016-12-21 12:50:33',1,NULL,NULL,24,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Société smith smith ajoutée dans Dolibarr\nAuteur: admin',24,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(152,NULL,1,'2015-03-08 10:02:22','2015-03-08 10:02:22',40,NULL,'Proposition (PROV12) validée dans Dolibarr','2015-03-08 10:02:22','2016-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition (PROV12) validée dans Dolibarr\nAuteur: admin',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(203,NULL,1,'2015-03-09 19:39:27','2015-03-09 19:39:27',40,'AC_ORDER_SUPPLIER_VALIDATE','Commande CF1303-0004 validée','2015-03-09 19:39:27','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CF1303-0004 validée\nAuteur: admin',13,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(204,NULL,1,'2015-03-10 15:47:37','2015-03-10 15:47:37',40,'AC_COMPANY_CREATE','Patient créé','2015-03-10 15:47:37','2016-12-21 12:50:33',1,NULL,NULL,25,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient créé\nAuteur: admin',25,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(205,NULL,1,'2015-03-10 15:57:32','2015-03-10 15:57:32',40,'AC_COMPANY_CREATE','Tiers créé','2015-03-10 15:57:32','2016-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Tiers créé\nAuteur: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(206,NULL,1,'2015-03-10 15:58:28','2015-03-10 15:58:28',40,'AC_BILL_VALIDATE','Facture FA1303-0017 validée','2015-03-10 15:58:28','2016-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0017 validée\nAuteur: admin',208,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(207,NULL,1,'2015-03-19 09:38:10','2015-03-19 09:38:10',40,'AC_BILL_VALIDATE','Facture FA1303-0018 validée','2015-03-19 09:38:10','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0018 validée\nAuteur: admin',209,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(208,NULL,1,'2015-03-20 14:30:11','2015-03-20 14:30:11',40,'AC_BILL_VALIDATE','Facture FA1107-0019 validée','2015-03-20 14:30:11','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1107-0019 validée\nAuteur: admin',210,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(209,NULL,1,'2015-03-22 09:40:25','2015-03-22 09:40:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-22 09:40:25','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(210,NULL,1,'2015-03-23 17:16:25','2015-03-23 17:16:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-23 17:16:25','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(211,NULL,1,'2015-03-23 18:08:27','2015-03-23 18:08:27',40,'AC_BILL_VALIDATE','Facture FA1307-0013 validée','2015-03-23 18:08:27','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1307-0013 validée\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(212,NULL,1,'2015-03-24 15:54:00','2015-03-24 15:54:00',40,'AC_BILL_VALIDATE','Facture FA1212-0021 validée','2015-03-24 15:54:00','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0021 validée\nAuteur: admin',32,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(213,NULL,1,'2015-11-07 01:02:39','2015-11-07 01:02:39',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:02:39','2016-12-21 12:50:33',1,NULL,NULL,27,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',27,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(214,NULL,1,'2015-11-07 01:05:22','2015-11-07 01:05:22',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:05:22','2016-12-21 12:50:33',1,NULL,NULL,28,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',28,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(215,NULL,1,'2015-11-07 01:07:07','2015-11-07 01:07:07',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:07','2016-12-21 12:50:33',1,NULL,NULL,29,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',29,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(216,NULL,1,'2015-11-07 01:07:58','2015-11-07 01:07:58',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:58','2016-12-21 12:50:33',1,NULL,NULL,30,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',30,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(217,NULL,1,'2015-11-07 01:10:09','2015-11-07 01:10:09',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:10:09','2016-12-21 12:50:33',1,NULL,NULL,31,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',31,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(218,NULL,1,'2015-11-07 01:15:57','2015-11-07 01:15:57',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:15:57','2016-12-21 12:50:33',1,NULL,NULL,32,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',32,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(219,NULL,1,'2015-11-07 01:16:51','2015-11-07 01:16:51',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:16:51','2016-12-21 12:50:33',1,NULL,NULL,33,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',33,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(220,NULL,1,'2016-03-02 17:24:04','2016-03-02 17:24:04',40,'AC_BILL_VALIDATE','Invoice FA1302-0022 validated','2016-03-02 17:24:04','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1302-0022 validated\nAuthor: admin',157,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(221,NULL,1,'2016-03-02 17:24:28','2016-03-02 17:24:28',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 17:24:28','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(222,NULL,1,'2016-03-05 10:00:00','2016-03-05 10:00:00',5,NULL,'RDV John','2016-03-02 19:54:48','2016-03-02 18:55:29',1,1,NULL,NULL,NULL,0,1,0,NULL,0,0,1,-1,NULL,NULL,NULL,'gfdgdfgdf',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(223,NULL,1,'2016-03-13 10:00:00','2016-03-17 00:00:00',50,NULL,'Congress','2016-03-02 19:55:11','2016-03-02 18:55:11',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,1,-1,'',309600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(224,NULL,1,'2016-03-14 10:00:00',NULL,1,NULL,'Call john','2016-03-02 19:55:56','2016-03-02 18:55:56',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,1,0,'',NULL,NULL,'tttt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(225,NULL,1,'2016-03-02 20:11:31','2016-03-02 20:11:31',40,'AC_BILL_UNVALIDATE','Invoice FA1303-0020 go back to draft status','2016-03-02 20:11:31','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 go back to draft status\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(226,NULL,1,'2016-03-02 20:13:39','2016-03-02 20:13:39',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 20:13:39','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(227,NULL,1,'2016-03-03 19:20:10','2016-03-03 19:20:10',40,'AC_BILL_VALIDATE','Invoice FA1212-0023 validated','2016-03-03 19:20:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1212-0023 validated\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(228,NULL,1,'2016-03-03 19:20:25','2016-03-03 19:20:25',40,'AC_BILL_CANCEL','Invoice FA1212-0023 canceled in Dolibarr','2016-03-03 19:20:25','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1212-0023 canceled in Dolibarr\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(229,NULL,1,'2016-03-03 19:20:56','2016-03-03 19:20:56',40,'AC_BILL_VALIDATE','Invoice AV1403-0003 validated','2016-03-03 19:20:56','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1403-0003 validated\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(230,NULL,1,'2016-03-03 19:21:29','2016-03-03 19:21:29',40,'AC_BILL_UNVALIDATE','Invoice AV1403-0003 go back to draft status','2016-03-03 19:21:29','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1403-0003 go back to draft status\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(231,NULL,1,'2016-03-03 19:22:16','2016-03-03 19:22:16',40,'AC_BILL_VALIDATE','Invoice AV1303-0003 validated','2016-03-03 19:22:16','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1303-0003 validated\nAuthor: admin',213,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(232,NULL,1,'2018-01-22 18:54:39','2018-01-22 18:54:39',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:39','2018-01-22 17:54:39',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(233,NULL,1,'2018-01-22 18:54:46','2018-01-22 18:54:46',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:46','2018-01-22 17:54:46',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(234,NULL,1,'2018-07-05 10:00:00','2018-07-05 11:19:00',5,'AC_RDV','Meeting with my boss','2018-07-31 18:19:48','2018-07-31 14:19:48',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,1,-1,'',4740,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(235,NULL,1,'2018-07-13 00:00:00','2018-07-14 23:59:59',50,'AC_OTH','Trip at Las Vegas','2018-07-31 18:20:36','2018-07-31 14:20:36',12,NULL,4,NULL,2,0,12,1,NULL,0,1,1,-1,'',172799,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(236,NULL,1,'2018-07-29 10:00:00',NULL,4,'AC_EMAIL','Remind to send an email','2018-07-31 18:21:04','2018-07-31 14:21:04',12,NULL,NULL,NULL,NULL,0,4,0,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(237,NULL,1,'2018-07-01 10:00:00',NULL,1,'AC_TEL','Phone call with Mr Vaalen','2018-07-31 18:22:04','2018-07-31 14:22:04',12,NULL,6,4,NULL,0,13,0,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(238,NULL,1,'2018-08-02 10:00:00','2018-08-02 12:00:00',5,'AC_RDV','Meeting on radium','2018-08-01 01:15:50','2018-07-31 21:15:50',12,NULL,8,10,10,0,12,1,NULL,0,0,1,-1,'',7200,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(239,NULL,1,'2017-01-29 21:49:33','2017-01-29 21:49:33',40,'AC_OTH_AUTO','Proposal PR1302-0007 validated','2017-01-29 21:49:33','2017-01-29 17:49:33',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1302-0007 validated\nAuthor: admin',7,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(240,NULL,1,'2017-01-31 20:52:00',NULL,1,'AC_TEL','Call the boss','2017-01-31 20:52:10','2017-01-31 16:52:25',12,12,6,NULL,NULL,0,12,1,NULL,0,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(242,NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 validated','2017-02-01 18:52:04','2017-02-01 14:52:04',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CF1007-0001 validated\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(243,NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 approved','2017-02-01 18:52:04','2017-02-01 14:52:04',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CF1007-0001 approved\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(245,NULL,1,'2017-02-01 18:52:32','2017-02-01 18:52:32',40,'AC_OTH_AUTO','Supplier order CF1007-0001 submited','2017-02-01 18:52:32','2017-02-01 14:52:32',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Supplier order CF1007-0001 submited\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(249,NULL,1,'2017-02-01 18:54:01','2017-02-01 18:54:01',40,'AC_OTH_AUTO','Supplier order CF1007-0001 received','2017-02-01 18:54:01','2017-02-01 14:54:01',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Supplier order CF1007-0001 received \nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(250,NULL,1,'2017-02-01 18:54:42','2017-02-01 18:54:42',40,'AC_OTH_AUTO','Email sent by MyBigCompany To mycustomer@example.com','2017-02-01 18:54:42','2017-02-01 14:54:42',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): mycustomer@example.com
\nEMail topic: Submission of order CF1007-0001
\nEmail body:
\nYou will find here our order CF1007-0001
\r\n
\r\nSincerely
\n
\nAttached files and documents: CF1007-0001.pdf',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(251,NULL,1,'2017-02-01 19:02:21','2017-02-01 19:02:21',40,'AC_OTH_AUTO','Invoice SI1702-0001 validated','2017-02-01 19:02:21','2017-02-01 15:02:21',12,NULL,5,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice SI1702-0001 validated\nAuthor: admin',20,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(252,NULL,1,'2017-02-12 23:17:04','2017-02-12 23:17:04',40,'AC_OTH_AUTO','Patient créé','2017-02-12 23:17:04','2017-02-12 19:17:04',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Patient créé\nAuthor: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(253,NULL,1,'2017-02-12 23:18:33','2017-02-12 23:18:33',40,'AC_OTH_AUTO','Consultation 2 recorded (aaa)','2017-02-12 23:18:33','2017-02-12 19:18:33',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Consultation 2 recorded (aaa)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(254,NULL,1,'2017-02-15 23:28:41','2017-02-15 23:28:41',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:28:41','2017-02-15 22:28:41',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(255,NULL,1,'2017-02-15 23:28:56','2017-02-15 23:28:56',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:28:56','2017-02-15 22:28:56',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',8,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(256,NULL,1,'2017-02-15 23:34:33','2017-02-15 23:34:33',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:34:33','2017-02-15 22:34:33',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',9,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(257,NULL,1,'2017-02-15 23:35:03','2017-02-15 23:35:03',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-15 23:35:03','2017-02-15 22:35:03',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',10,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(263,NULL,1,'2017-02-15 23:50:34','2017-02-15 23:50:34',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:50:34','2017-02-15 22:50:34',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',17,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(264,NULL,1,'2017-02-15 23:51:23','2017-02-15 23:51:23',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:51:23','2017-02-15 22:51:23',12,NULL,NULL,7,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',18,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(265,NULL,1,'2017-02-15 23:54:51','2017-02-15 23:54:51',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:54:51','2017-02-15 22:54:51',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',19,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(266,NULL,1,'2017-02-15 23:55:52','2017-02-15 23:55:52',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:55:52','2017-02-15 22:55:52',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',20,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(267,NULL,1,'2017-02-16 00:03:44','2017-02-16 00:03:44',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-16 00:03:44','2017-02-15 23:03:44',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',29,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(268,NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0009 validated','2017-02-16 00:05:01','2017-02-15 23:05:01',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0009 validated\nAuthor: admin',34,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(269,NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0010 validated','2017-02-16 00:05:01','2017-02-15 23:05:01',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0010 validated\nAuthor: admin',38,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(270,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0011 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0011 validated\nAuthor: admin',40,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(271,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0012 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0012 validated\nAuthor: admin',43,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(272,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0013 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0013 validated\nAuthor: admin',47,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(273,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0014 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0014 validated\nAuthor: admin',48,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(274,NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0015 validated','2017-02-16 00:05:26','2017-02-15 23:05:26',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0015 validated\nAuthor: admin',50,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(275,NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0016 validated','2017-02-16 00:05:26','2017-02-15 23:05:26',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0016 validated\nAuthor: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(277,NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0018 validated','2017-02-16 00:05:35','2017-02-15 23:05:35',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0018 validated\nAuthor: admin',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(278,NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0019 validated','2017-02-16 00:05:35','2017-02-15 23:05:35',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0019 validated\nAuthor: admin',68,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(279,NULL,1,'2017-02-16 00:05:36','2017-02-16 00:05:36',40,'AC_OTH_AUTO','Order CO7001-0020 validated','2017-02-16 00:05:36','2017-02-15 23:05:36',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0020 validated\nAuthor: admin',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(281,NULL,1,'2017-02-16 00:05:37','2017-02-16 00:05:37',40,'AC_OTH_AUTO','Order CO7001-0022 validated','2017-02-16 00:05:37','2017-02-15 23:05:37',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0022 validated\nAuthor: admin',78,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(282,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0023 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0023 validated\nAuthor: admin',81,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(283,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0024 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0024 validated\nAuthor: admin',83,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(284,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0025 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,2,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0025 validated\nAuthor: admin',84,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(285,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0026 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0026 validated\nAuthor: admin',85,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(286,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0027 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Order CO7001-0027 validated\nAuthor: admin',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(287,NULL,1,'2017-02-16 03:05:56','2017-02-16 03:05:56',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Livrée','2017-02-16 03:05:56','2017-02-15 23:05:56',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0016 classée Livrée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(288,NULL,1,'2017-02-16 03:06:01','2017-02-16 03:06:01',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Facturée','2017-02-16 03:06:01','2017-02-15 23:06:01',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0016 classée Facturée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(294,NULL,1,'2017-02-16 03:53:04','2017-02-16 03:53:04',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 03:53:04','2017-02-15 23:53:04',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(295,NULL,1,'2017-02-16 03:58:08','2017-02-16 03:58:08',40,'AC_OTH_AUTO','Expédition SH1702-0002 validée','2017-02-16 03:58:08','2017-02-15 23:58:08',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Expédition SH1702-0002 validée\nAuteur: admin',3,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(296,NULL,1,'2017-02-16 04:12:29','2017-02-16 04:12:29',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:12:29','2017-02-16 00:12:29',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(297,NULL,1,'2017-02-16 04:14:20','2017-02-16 04:14:20',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:14:20','2017-02-16 00:14:20',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(298,NULL,1,'2017-02-16 01:44:58','2017-02-16 01:44:58',40,'AC_OTH_AUTO','Proposal PR1702-0009 validated','2017-02-16 01:44:58','2017-02-16 00:44:58',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0009 validated\nAuthor: aeinstein',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(299,NULL,1,'2017-02-16 01:45:44','2017-02-16 01:45:44',40,'AC_OTH_AUTO','Proposal PR1702-0010 validated','2017-02-16 01:45:44','2017-02-16 00:45:44',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0010 validated\nAuthor: demo',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(300,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0011 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0011 validated\nAuthor: aeinstein',13,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(301,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0012 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,3,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0012 validated\nAuthor: demo',14,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(302,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0013 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0013 validated\nAuthor: demo',15,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(303,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0014 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0014 validated\nAuthor: demo',16,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(304,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0015 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0015 validated\nAuthor: aeinstein',17,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(305,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0016 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0016 validated\nAuthor: demo',18,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(306,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0017 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0017 validated\nAuthor: demo',19,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(307,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0018 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0018 validated\nAuthor: aeinstein',20,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(308,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0019 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0019 validated\nAuthor: aeinstein',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(309,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0020 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0020 validated\nAuthor: aeinstein',22,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(310,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0021 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0021 validated\nAuthor: demo',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(311,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0022 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0022 validated\nAuthor: demo',24,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(312,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0023 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',1,NULL,NULL,3,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0023 validated\nAuthor: aeinstein',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(313,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0024 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0024 validated\nAuthor: demo',26,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(314,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0025 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',1,NULL,NULL,6,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0025 validated\nAuthor: aeinstein',27,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(315,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0026 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0026 validated\nAuthor: demo',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(316,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0027 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0027 validated\nAuthor: demo',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(317,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0028 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0028 validated\nAuthor: demo',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(318,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0029 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',1,NULL,NULL,11,NULL,0,1,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0029 validated\nAuthor: aeinstein',31,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(319,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0030 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposal PR1702-0030 validated\nAuthor: demo',32,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(320,NULL,1,'2017-02-16 04:46:31','2017-02-16 04:46:31',40,'AC_OTH_AUTO','Proposition PR1702-0026 signée','2017-02-16 04:46:31','2017-02-16 00:46:31',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0026 signée\nAuteur: admin',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(321,NULL,1,'2017-02-16 04:46:37','2017-02-16 04:46:37',40,'AC_OTH_AUTO','Proposition PR1702-0027 signée','2017-02-16 04:46:37','2017-02-16 00:46:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0027 signée\nAuteur: admin',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(322,NULL,1,'2017-02-16 04:46:42','2017-02-16 04:46:42',40,'AC_OTH_AUTO','Proposition PR1702-0028 refusée','2017-02-16 04:46:42','2017-02-16 00:46:42',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0028 refusée\nAuteur: admin',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(323,NULL,1,'2017-02-16 04:47:09','2017-02-16 04:47:09',40,'AC_OTH_AUTO','Proposition PR1702-0019 validée','2017-02-16 04:47:09','2017-02-16 00:47:09',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0019 validée\nAuteur: admin',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(324,NULL,1,'2017-02-16 04:47:25','2017-02-16 04:47:25',40,'AC_OTH_AUTO','Proposition PR1702-0023 signée','2017-02-16 04:47:25','2017-02-16 00:47:25',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0023 signée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(325,NULL,1,'2017-02-16 04:47:29','2017-02-16 04:47:29',40,'AC_OTH_AUTO','Proposition PR1702-0023 classée payée','2017-02-16 04:47:29','2017-02-16 00:47:29',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0023 classée payée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(326,NULL,1,'2017-02-17 16:07:18','2017-02-17 16:07:18',40,'AC_OTH_AUTO','Proposition PR1702-0021 validée','2017-02-17 16:07:18','2017-02-17 12:07:18',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Proposition PR1702-0021 validée\nAuteur: admin',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(327,NULL,1,'2017-05-12 13:53:44','2017-05-12 13:53:44',40,'AC_OTH_AUTO','Email sent by MyBigCompany To Einstein','2017-05-12 13:53:44','2017-05-12 09:53:44',12,NULL,NULL,11,12,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): Einstein <genius@example.com>
\nBcc: Einstein <genius@example.com>
\nEMail topic: Test
\nEmail body:
\nTest\nAuthor: admin',11,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(328,NULL,1,'2017-08-29 22:39:09','2017-08-29 22:39:09',40,'AC_OTH_AUTO','Invoice FA1601-0024 validated','2017-08-29 22:39:09','2017-08-29 18:39:09',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice FA1601-0024 validated\nAuthor: admin',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(329,NULL,1,'2019-09-26 13:38:11','2019-09-26 13:38:11',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:38:11','2019-09-26 11:38:11',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(330,NULL,1,'2019-09-26 13:49:21','2019-09-26 13:49:21',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:49:21','2019-09-26 11:49:21',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(331,NULL,1,'2019-09-26 17:33:37','2019-09-26 17:33:37',40,'AC_BILL_VALIDATE','Invoice FA1909-0025 validated','2019-09-26 17:33:37','2019-09-26 15:33:37',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1909-0025 validated',218,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(333,NULL,1,'2019-09-27 16:54:30','2019-09-27 16:54:30',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0031 validated','2019-09-27 16:54:30','2019-09-27 14:54:30',12,NULL,4,7,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0031 validated',10,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(335,NULL,1,'2019-09-27 17:08:59','2019-09-27 17:08:59',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0032 validated','2019-09-27 17:08:59','2019-09-27 15:08:59',12,NULL,6,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0032 validated',33,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(337,NULL,1,'2019-09-27 17:13:13','2019-09-27 17:13:13',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0033 validated','2019-09-27 17:13:13','2019-09-27 15:13:13',12,NULL,6,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 validated',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(338,NULL,1,'2019-09-27 17:53:31','2019-09-27 17:53:31',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 17:53:31','2019-09-27 15:53:31',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(339,NULL,1,'2019-09-27 18:15:00','2019-09-27 18:15:00',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:15:00','2019-09-27 16:15:00',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(340,NULL,1,'2019-09-27 18:40:32','2019-09-27 18:40:32',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:40:32','2019-09-27 16:40:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(341,NULL,1,'2019-09-27 19:16:07','2019-09-27 19:16:07',40,'AC_PRODUCT_CREATE','Product ppp created','2019-09-27 19:16:07','2019-09-27 17:16:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ppp created',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(342,NULL,1,'2019-09-27 19:18:01','2019-09-27 19:18:01',40,'AC_PRODUCT_MODIFY','Product ppp modified','2019-09-27 19:18:01','2019-09-27 17:18:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ppp modified',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(343,NULL,1,'2019-09-27 19:31:45','2019-09-27 19:31:45',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:31:45','2019-09-27 17:31:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(344,NULL,1,'2019-09-27 19:32:12','2019-09-27 19:32:12',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:32:12','2019-09-27 17:32:12',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(345,NULL,1,'2019-09-27 19:38:30','2019-09-27 19:38:30',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:30','2019-09-27 17:38:30',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(346,NULL,1,'2019-09-27 19:38:37','2019-09-27 19:38:37',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:37','2019-09-27 17:38:37',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(347,NULL,1,'2019-09-30 15:49:52',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #15ff11cay39skiaa] New message','2019-09-30 15:49:52','2019-09-30 13:49:52',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'dfsdfds',2,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(348,NULL,1,'2019-10-01 13:48:36','2019-10-01 13:48:36',40,'AC_PROJECT_MODIFY','Project PJ1607-0001 modified','2019-10-01 13:48:36','2019-10-01 11:48:36',12,NULL,6,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1607-0001 modified\nTask: PJ1607-0001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(349,NULL,1,'2019-10-04 10:10:25','2019-10-04 10:10:25',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:10:25','2019-10-04 08:10:25',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(350,NULL,1,'2019-10-04 10:10:47','2019-10-04 10:10:47',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:10:47','2019-10-04 08:10:47',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(351,NULL,1,'2019-10-04 10:26:49','2019-10-04 10:26:49',40,'AC_BILL_UNVALIDATE','Invoice FA6801-0010 go back to draft status','2019-10-04 10:26:49','2019-10-04 08:26:49',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 go back to draft status',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(352,NULL,1,'2019-10-04 10:27:00','2019-10-04 10:27:00',40,'AC_BILL_VALIDATE','Invoice FA6801-0010 validated','2019-10-04 10:27:00','2019-10-04 08:27:00',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 validated',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(353,NULL,1,'2019-10-04 10:28:14','2019-10-04 10:28:14',40,'AC_BILL_PAYED','Invoice FA6801-0010 changed to paid','2019-10-04 10:28:14','2019-10-04 08:28:14',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 changed to paid',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(354,NULL,1,'2019-10-04 10:29:22','2019-10-04 10:29:22',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:29:22','2019-10-04 08:29:22',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(355,NULL,1,'2019-10-04 10:29:41','2019-10-04 10:29:41',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI1601-0002 go back to draft status','2019-10-04 10:29:41','2019-10-04 08:29:41',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 go back to draft status',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(356,NULL,1,'2019-10-04 10:31:30','2019-10-04 10:31:30',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:31:30','2019-10-04 08:31:30',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(357,NULL,1,'2019-10-04 16:56:21',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 16:56:21','2019-10-04 14:56:21',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'aaaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(358,NULL,1,'2019-10-04 17:08:04',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:08:04','2019-10-04 15:08:04',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'ddddd',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(359,NULL,1,'2019-10-04 17:25:05',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:25:05','2019-10-04 15:25:05',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(360,NULL,1,'2019-10-04 17:26:14',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:26:14','2019-10-04 15:26:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(361,NULL,1,'2019-10-04 17:30:10',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:30:10','2019-10-04 15:30:10',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(362,NULL,1,'2019-10-04 17:51:43',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:51:43','2019-10-04 15:51:43',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(363,NULL,1,'2019-10-04 17:52:02',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:02','2019-10-04 15:52:02',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(364,NULL,1,'2019-10-04 17:52:17',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:17','2019-10-04 15:52:17',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(365,NULL,1,'2019-10-04 17:52:39',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:39','2019-10-04 15:52:39',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(366,NULL,1,'2019-10-04 17:52:53',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:53','2019-10-04 15:52:53',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(367,NULL,1,'2019-10-04 17:53:13',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:13','2019-10-04 15:53:13',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(368,NULL,1,'2019-10-04 17:53:26',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:26','2019-10-04 15:53:26',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(369,NULL,1,'2019-10-04 17:53:48',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:48','2019-10-04 15:53:48',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(370,NULL,1,'2019-10-04 17:54:09',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:09','2019-10-04 15:54:09',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(371,NULL,1,'2019-10-04 17:54:28',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:28','2019-10-04 15:54:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(372,NULL,1,'2019-10-04 17:55:43',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:55:43','2019-10-04 15:55:43',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(373,NULL,1,'2019-10-04 17:56:01',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:56:01','2019-10-04 15:56:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(374,NULL,1,'2019-10-04 18:00:32',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:32','2019-10-04 16:00:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(375,NULL,1,'2019-10-04 18:00:58',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:58','2019-10-04 16:00:58',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(376,NULL,1,'2019-10-04 18:11:30',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:11:30','2019-10-04 16:11:30',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(377,NULL,1,'2019-10-04 18:12:02',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:12:02','2019-10-04 16:12:02',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fffffff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(378,NULL,1,'2019-10-04 18:49:30',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:49:30','2019-10-04 16:49:30',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(379,NULL,1,'2019-10-04 19:00:22',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:00:22','2019-10-04 17:00:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'fff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(380,NULL,1,'2019-10-04 19:24:20','2019-10-04 19:24:20',40,'AC_PROPAL_SENTBYMAIL','Email sent by Alice Adminson To NLTechno','2019-10-04 19:24:20','2019-10-04 17:24:20',12,NULL,6,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nSender: Alice Adminson <aadminson@example.com>
\nReceiver(s): NLTechno <notanemail@nltechno.com>
\nEmail topic: Envoi de la proposition commerciale PR1909-0032
\nEmail body:
\nHello
\r\n
\r\nVeuillez trouver, ci-joint, la proposition commerciale PR1909-0032
\r\n
\r\n
\r\nSincerely
\r\n
\r\nAlice - 123
\n
\nAttached files and documents: PR1909-0032.pdf',33,'propal',NULL,'Envoi de la proposition commerciale PR1909-0032','Alice Adminson ',NULL,'NLTechno ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(381,NULL,1,'2019-10-04 19:30:13',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:30:13','2019-10-04 17:30:13',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(382,NULL,1,'2019-10-04 19:32:55',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:32:55','2019-10-04 17:32:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'uuuuuu\n\nAttached files and documents: Array',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(383,NULL,1,'2019-10-04 19:37:16',NULL,40,'TICKET_MSG','','2019-10-04 19:37:16','2019-10-04 17:37:16',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,100,'',NULL,NULL,'f\n\nFichiers et documents joints: dolihelp.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(384,NULL,1,'2019-10-04 19:39:07',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:39:07','2019-10-04 17:39:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'aaafff\n\nAttached files and documents: dolibarr.gif;doliadmin.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(385,NULL,1,'2019-10-07 12:17:07','2019-10-07 12:17:07',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:07','2019-10-07 10:17:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',17,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(386,NULL,1,'2019-10-07 12:17:32','2019-10-07 12:17:32',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:32','2019-10-07 10:17:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',18,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(387,NULL,1,'2019-10-08 19:21:07','2019-10-08 19:21:07',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-10-08 19:21:07','2019-10-08 17:21:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(388,NULL,1,'2019-10-08 21:01:07','2019-10-08 21:01:07',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-10-08 21:01:07','2019-10-08 19:01:07',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(389,NULL,1,'2019-10-08 21:01:22','2019-10-08 21:01:22',40,'AC_MEMBER_MODIFY','Member doe john modified','2019-10-08 21:01:22','2019-10-08 19:01:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(390,NULL,1,'2019-10-08 21:01:45','2019-10-08 21:01:45',40,'AC_MEMBER_MODIFY','Member smith smith modified','2019-10-08 21:01:45','2019-10-08 19:01:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(391,NULL,1,'2019-10-08 21:02:18','2019-10-08 21:02:18',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2019-10-08 21:02:18','2019-10-08 19:02:18',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(392,NULL,1,'2019-11-28 15:54:46','2019-11-28 15:54:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1911-0005 validated','2019-11-28 15:54:47','2019-11-28 11:54:47',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI1911-0005 validated',21,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(393,NULL,1,'2019-11-28 16:33:35','2019-11-28 16:33:35',40,'AC_PRODUCT_CREATE','Product FR-CAR created','2019-11-28 16:33:35','2019-11-28 12:33:35',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR created',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(394,NULL,1,'2019-11-28 16:34:08','2019-11-28 16:34:08',40,'AC_PRODUCT_DELETE','Product ppp deleted','2019-11-28 16:34:08','2019-11-28 12:34:08',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct ppp deleted',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(395,NULL,1,'2019-11-28 16:34:33','2019-11-28 16:34:33',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:33','2019-11-28 12:34:33',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(396,NULL,1,'2019-11-28 16:34:46','2019-11-28 16:34:46',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:46','2019-11-28 12:34:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(397,NULL,1,'2019-11-28 16:36:56','2019-11-28 16:36:56',40,'AC_PRODUCT_MODIFY','Product POS-CAR modified','2019-11-28 16:36:56','2019-11-28 12:36:56',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(398,NULL,1,'2019-11-28 16:37:36','2019-11-28 16:37:36',40,'AC_PRODUCT_CREATE','Product POS-APPLE created','2019-11-28 16:37:36','2019-11-28 12:37:36',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE created',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(399,NULL,1,'2019-11-28 16:37:58','2019-11-28 16:37:58',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 16:37:58','2019-11-28 12:37:58',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(400,NULL,1,'2019-11-28 16:38:44','2019-11-28 16:38:44',40,'AC_PRODUCT_CREATE','Product POS-KIWI created','2019-11-28 16:38:44','2019-11-28 12:38:44',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-KIWI created',26,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(401,NULL,1,'2019-11-28 16:39:21','2019-11-28 16:39:21',40,'AC_PRODUCT_CREATE','Product POS-PEACH created','2019-11-28 16:39:21','2019-11-28 12:39:21',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-PEACH created',27,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(402,NULL,1,'2019-11-28 16:39:58','2019-11-28 16:39:58',40,'AC_PRODUCT_CREATE','Product POS-ORANGE created','2019-11-28 16:39:58','2019-11-28 12:39:58',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-ORANGE created',28,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(403,NULL,1,'2019-11-28 17:00:28','2019-11-28 17:00:28',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2019-11-28 17:00:28','2019-11-28 13:00:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(404,NULL,1,'2019-11-28 17:00:46','2019-11-28 17:00:46',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 17:00:46','2019-11-28 13:00:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(405,NULL,1,'2019-11-28 17:01:57','2019-11-28 17:01:57',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 17:01:57','2019-11-28 13:01:57',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(406,NULL,1,'2019-11-28 17:03:14','2019-11-28 17:03:14',40,'AC_PRODUCT_CREATE','Product POS-Eggs created','2019-11-28 17:03:14','2019-11-28 13:03:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs created',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(407,NULL,1,'2019-11-28 17:04:17','2019-11-28 17:04:17',40,'AC_PRODUCT_MODIFY','Product POS-Eggs modified','2019-11-28 17:04:17','2019-11-28 13:04:17',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs modified',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(408,NULL,1,'2019-11-28 17:09:14','2019-11-28 17:09:14',40,'AC_PRODUCT_CREATE','Product POS-Chips created','2019-11-28 17:09:14','2019-11-28 13:09:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips created',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(409,NULL,1,'2019-11-28 17:09:54','2019-11-28 17:09:54',40,'AC_PRODUCT_MODIFY','Product POS-Chips modified','2019-11-28 17:09:54','2019-11-28 13:09:54',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips modified',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(410,NULL,1,'2019-11-28 18:46:20','2019-11-28 18:46:20',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 18:46:20','2019-11-28 14:46:20',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(411,NULL,1,'2019-11-28 18:59:29','2019-11-28 18:59:29',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 18:59:29','2019-11-28 14:59:29',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(412,NULL,1,'2019-11-28 19:02:01','2019-11-28 19:02:01',40,'AC_PRODUCT_MODIFY','Product POS-CARROT modified','2019-11-28 19:02:01','2019-11-28 15:02:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct POS-CARROT modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(413,NULL,1,'2019-11-28 19:09:50','2019-11-28 19:09:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:09:50','2019-11-28 15:09:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(414,NULL,1,'2019-11-28 19:12:50','2019-11-28 19:12:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:12:50','2019-11-28 15:12:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(415,NULL,1,'2019-11-29 12:46:29','2019-11-29 12:46:29',40,'AC_TICKET_CREATE','Ticket TS1911-0004 created','2019-11-29 12:46:29','2019-11-29 08:46:29',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 created',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(416,NULL,1,'2019-11-29 12:46:34','2019-11-29 12:46:34',40,'AC_TICKET_MODIFY','Ticket TS1911-0004 read by Alice Adminson','2019-11-29 12:46:34','2019-11-29 08:46:34',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 read by Alice Adminson',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(417,NULL,1,'2019-11-29 12:46:47','2019-11-29 12:46:47',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0004 assigned','2019-11-29 12:46:47','2019-11-29 08:46:47',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 assigned\nOld user: None\nNew user: Commerson Charle1',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(418,NULL,1,'2019-11-29 12:47:13',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #5gvo9bsjri55zef9] New message','2019-11-29 12:47:13','2019-11-29 08:47:13',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'Where do you want to install Dolibarr ?
\r\nOn-Premise or on the Cloud ?',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(419,NULL,1,'2019-11-29 12:50:45','2019-11-29 12:50:45',40,'AC_TICKET_CREATE','Ticket TS1911-0005 créé','2019-11-29 12:50:45','2019-11-29 08:50:45',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,-1,'',NULL,NULL,'Auteur: \nTicket TS1911-0005 créé',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(420,NULL,1,'2019-11-29 12:52:32','2019-11-29 12:52:32',40,'AC_TICKET_MODIFY','Ticket TS1911-0005 read by Alice Adminson','2019-11-29 12:52:32','2019-11-29 08:52:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 read by Alice Adminson',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(421,NULL,1,'2019-11-29 12:52:53','2019-11-29 12:52:53',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0005 assigned','2019-11-29 12:52:53','2019-11-29 08:52:53',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 assigned\nOld user: None\nNew user: Commerson Charle1',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(422,NULL,1,'2019-11-29 12:54:04',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:54:04','2019-11-29 08:54:04',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'Hi.
\r\nThanks for your interest in using Dolibarr ERP CRM.
\r\nI need more information to give you the correct answer : Where do you want to install Dolibarr. On premise or on Cloud',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(423,NULL,1,'2019-11-29 12:54:46',NULL,40,'TICKET_MSG','','2019-11-29 12:54:46','2019-11-29 08:54:46',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,100,'',NULL,NULL,'I need it On-Premise.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(424,NULL,1,'2019-11-29 12:55:42',NULL,40,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:55:42','2019-11-29 08:55:42',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,100,'',NULL,NULL,'When used on-premise, you can download and install Dolibarr yourself from ou web portal: https://www.dolibarr.org
\r\nIt is completely free.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(425,NULL,1,'2019-11-29 12:55:48','2019-11-29 12:55:48',40,'AC_TICKET_CLOSE','Ticket TS1911-0005 closed','2019-11-29 12:55:48','2019-11-29 08:55:48',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 closed',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(426,NULL,1,'2019-11-29 12:56:47','2019-11-29 12:56:47',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2019-11-29 12:56:47','2019-11-29 08:56:47',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(427,NULL,1,'2019-11-29 12:57:14','2019-11-29 12:57:14',40,'AC_BOM_VALIDATE','BOM validated','2019-11-29 12:57:14','2019-11-29 08:57:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(428,NULL,1,'2019-12-20 16:40:14','2019-12-20 16:40:14',40,'AC_MO_DELETE','MO deleted','2019-12-20 16:40:14','2019-12-20 12:40:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO deleted',3,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(429,NULL,1,'2019-12-20 17:00:43','2019-12-20 17:00:43',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:43','2019-12-20 13:00:43',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO deleted',7,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(430,NULL,1,'2019-12-20 17:00:56','2019-12-20 17:00:56',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:56','2019-12-20 13:00:56',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO deleted',6,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(431,NULL,1,'2019-12-20 20:00:03','2019-12-20 20:00:03',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:00:03','2019-12-20 16:00:03',12,NULL,6,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO deleted',1,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(432,NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2019-12-20 16:22:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO deleted',10,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(433,NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2019-12-20 16:22:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO deleted',12,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(434,NULL,1,'2019-12-20 20:22:20','2019-12-20 20:22:20',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:20','2019-12-20 16:22:20',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO deleted',9,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(435,NULL,1,'2019-12-20 20:27:07','2019-12-20 20:27:07',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:27:07','2019-12-20 16:27:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO deleted',13,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(436,NULL,1,'2019-12-20 20:42:42','2019-12-20 20:42:42',40,'AC_ORDER_VALIDATE','Order CO7001-0027 validated','2019-12-20 20:42:42','2019-12-20 16:42:42',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0027 validated',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(437,NULL,1,'2019-12-20 20:46:25','2019-12-20 20:46:25',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:46:25','2019-12-20 16:46:25',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(438,NULL,1,'2019-12-20 20:46:45','2019-12-20 20:46:45',40,'AC_ORDER_SUPPLIER_CLASSIFY_BILLED','Purchase Order CF1007-0001 set billed','2019-12-20 20:46:45','2019-12-20 16:46:45',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 set billed',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(439,NULL,1,'2019-12-20 20:47:02','2019-12-20 20:47:02',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:02','2019-12-20 16:47:02',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(440,NULL,1,'2019-12-20 20:47:44','2019-12-20 20:47:44',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:44','2019-12-20 16:47:44',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(441,NULL,1,'2019-12-20 20:47:53','2019-12-20 20:47:53',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:53','2019-12-20 16:47:53',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(442,NULL,1,'2019-12-20 20:48:05','2019-12-20 20:48:05',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:48:05','2019-12-20 16:48:05',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(443,NULL,1,'2019-12-20 20:48:45','2019-12-20 20:48:45',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0016 classified billed','2019-12-20 20:48:45','2019-12-20 16:48:45',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0016 classified billed',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(444,NULL,1,'2019-12-20 20:48:55','2019-12-20 20:48:55',40,'AC_ORDER_CLOSE','Order CO7001-0018 classified delivered','2019-12-20 20:48:55','2019-12-20 16:48:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0018 classified delivered',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(445,NULL,1,'2019-12-20 20:49:43','2019-12-20 20:49:43',40,'AC_PROPAL_CLASSIFY_BILLED','Proposal PR1702-0027 classified billed','2019-12-20 20:49:43','2019-12-20 16:49:43',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 classified billed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(446,NULL,1,'2019-12-20 20:49:54','2019-12-20 20:49:54',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:49:54','2019-12-20 16:49:54',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(447,NULL,1,'2019-12-20 20:50:14','2019-12-20 20:50:14',40,'AC_PROPAL_CLOSE_REFUSED','Proposal PR1702-0027 refused','2019-12-20 20:50:14','2019-12-20 16:50:14',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 refused',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(448,NULL,1,'2019-12-20 20:50:23','2019-12-20 20:50:23',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:50:23','2019-12-20 16:50:23',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(449,NULL,1,'2019-12-21 17:18:22','2019-12-21 17:18:22',40,'AC_BOM_CLOSE','BOM disabled','2019-12-21 17:18:22','2019-12-21 13:18:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(450,NULL,1,'2019-12-21 17:18:38','2019-12-21 17:18:38',40,'AC_MEMBER_RESILIATE','Member Vick Smith terminated','2019-12-21 17:18:38','2019-12-21 13:18:38',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith terminated\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(451,NULL,1,'2019-12-21 19:46:33','2019-12-21 19:46:33',40,'AC_PROJECT_CREATE','Project PJ1912-0005 created','2019-12-21 19:46:33','2019-12-21 15:46:33',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 created\nProject: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(452,NULL,1,'2019-12-21 19:47:03','2019-12-21 19:47:03',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:03','2019-12-21 15:47:03',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(453,NULL,1,'2019-12-21 19:47:24','2019-12-21 19:47:24',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:24','2019-12-21 15:47:24',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(454,NULL,1,'2019-12-21 19:47:52','2019-12-21 19:47:52',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:52','2019-12-21 15:47:52',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(455,NULL,1,'2019-12-21 19:48:06','2019-12-21 19:48:06',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:48:06','2019-12-21 15:48:06',12,NULL,10,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(456,NULL,1,'2019-12-21 19:49:28','2019-12-21 19:49:28',40,'AC_PROJECT_CREATE','Project PJ1912-0006 created','2019-12-21 19:49:28','2019-12-21 15:49:28',12,NULL,11,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 created\nProject: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(457,NULL,1,'2019-12-21 19:52:12','2019-12-21 19:52:12',40,'AC_PROJECT_CREATE','Project PJ1912-0007 created','2019-12-21 19:52:12','2019-12-21 15:52:12',12,NULL,12,4,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0007 created\nProject: PJ1912-0007',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(458,NULL,1,'2019-12-21 19:53:21','2019-12-21 19:53:21',40,'AC_PROJECT_CREATE','Project PJ1912-0008 created','2019-12-21 19:53:21','2019-12-21 15:53:21',12,NULL,13,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 created\nProject: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(459,NULL,1,'2019-12-21 19:53:42','2019-12-21 19:53:42',40,'AC_PROJECT_MODIFY','Project PJ1912-0008 modified','2019-12-21 19:53:42','2019-12-21 15:53:42',12,NULL,13,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 modified\nTask: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(460,NULL,1,'2019-12-21 19:55:23','2019-12-21 19:55:23',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 19:55:23','2019-12-21 15:55:23',12,NULL,11,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(461,NULL,1,'2019-12-21 20:10:21','2019-12-21 20:10:21',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 20:10:21','2019-12-21 16:10:21',12,NULL,11,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(462,NULL,1,'2019-12-11 10:00:00','2019-12-11 10:00:00',5,'AC_RDV','Meeting with all employees','2019-12-21 20:29:32','2019-12-21 16:29:32',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(463,NULL,1,'2019-12-06 00:00:00',NULL,11,'AC_INT','Intervention on customer site','2019-12-21 20:30:11','2019-12-21 16:30:11',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,1,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(464,NULL,1,'2019-12-23 14:16:59','2019-12-23 14:16:59',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:16:59','2019-12-23 10:16:59',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(465,NULL,1,'2019-12-23 14:17:18','2019-12-23 14:17:18',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:17:18','2019-12-23 10:17:18',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(466,NULL,1,'2019-11-23 14:25:00',NULL,50,'AC_OTH','Test','2019-12-23 17:25:14','2019-12-23 13:25:14',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,1,-1,'',NULL,NULL,'18/11 17h06 : Message laissé. Me rappeler pour m'en dire plus. 
\r\n
\r\n20/11 10h17 "A rappeler suite au msg laissé le 14/11, dit que c'est urgent"
\r\n12h22 : message laissé. Je lui envoie un sms
\r\n
\r\n"Déclaration de sinistre originale" : constat de ce qui s'est passé.
\r\nElle envoie le chèque de solde dès demain.
\r\n
\r\n3/12 : Elle préfère avoir plus d'infos sur le sinistre pour l'assurance.
\r\nCourrier envoyé le 4/12/19 par mail et par courrier postal
\r\n
\r\n6/12 15h02 : ont obtenu le feu vert de l'assurance.
\r\nOn bloque 16/12 PM à partir de 14h30. ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(467,NULL,1,'2020-01-01 14:35:47','2020-01-01 14:35:47',40,'AC_MEMBER_VALIDATE','Adhérent aze aze validé','2020-01-01 14:35:47','2020-01-01 10:35:47',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,-1,'',NULL,NULL,'Auteur: \nAdhérent aze aze validé\nAdhérent: aze aze\nType: Board members',5,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(468,NULL,1,'2020-01-01 14:50:59','2020-01-01 14:50:59',40,'AC_MEMBER_VALIDATE','Adhérent azr azr validé','2020-01-01 14:50:59','2020-01-01 10:50:59',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,-1,'',NULL,NULL,'Auteur: \nAdhérent azr azr validé\nAdhérent: azr azr\nType: Board members',6,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(469,NULL,1,'2020-01-01 15:00:16','2020-01-01 15:00:16',40,'AC_MEMBER_VALIDATE','Adhérent azt azt validé','2020-01-01 15:00:16','2020-01-01 11:00:16',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,-1,'',NULL,NULL,'Auteur: \nAdhérent azt azt validé\nAdhérent: azt azt\nType: Board members',7,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(470,NULL,1,'2020-01-01 15:08:20','2020-01-01 15:08:20',40,'AC_MEMBER_VALIDATE','Adhérent azu azu validé','2020-01-01 15:08:20','2020-01-01 11:08:20',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,-1,'',NULL,NULL,'Auteur: \nAdhérent azu azu validé\nAdhérent: azu azu\nType: Board members',8,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(471,NULL,1,'2020-01-01 15:27:24','2020-01-01 15:27:24',40,'AC_MEMBER_VALIDATE','Adhérent azi azi validé','2020-01-01 15:27:24','2020-01-01 11:27:24',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,-1,'',NULL,NULL,'Auteur: \nAdhérent azi azi validé\nAdhérent: azi azi\nType: Board members',9,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(472,NULL,1,'2020-01-01 15:36:29','2020-01-01 15:36:29',40,'AC_MEMBER_VALIDATE','Adhérent azo azo validé','2020-01-01 15:36:29','2020-01-01 11:36:29',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,-1,'',NULL,NULL,'Auteur: \nAdhérent azo azo validé\nAdhérent: azo azo\nType: Board members',10,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(473,NULL,1,'2020-01-01 15:44:25','2020-01-01 15:44:25',40,'AC_MEMBER_VALIDATE','Adhérent azp azp validé','2020-01-01 15:44:25','2020-01-01 11:44:25',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,-1,'',NULL,NULL,'Auteur: \nAdhérent azp azp validé\nAdhérent: azp azp\nType: Board members',11,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(478,NULL,1,'2020-01-01 16:52:32','2020-01-01 16:52:32',40,'AC_MEMBER_VALIDATE','Adhérent azq azq validé','2020-01-01 16:52:32','2020-01-01 12:52:32',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,1,-1,'',NULL,NULL,'Auteur: \nAdhérent azq azq validé\nAdhérent: azq azq\nType: Board members',12,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(483,NULL,1,'2020-01-01 17:49:05','2020-01-01 17:49:05',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 17:49:05','2020-01-01 13:49:05',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(484,NULL,1,'2020-01-01 17:50:41','2020-01-01 17:50:41',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 17:50:41','2020-01-01 13:50:41',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(485,NULL,1,'2020-01-01 17:50:44','2020-01-01 17:50:44',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 17:50:44','2020-01-01 13:50:44',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(486,NULL,1,'2020-01-01 17:51:22','2020-01-01 17:51:22',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 17:51:22','2020-01-01 13:51:22',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(487,NULL,1,'2020-01-01 20:17:00','2020-01-01 20:17:00',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:17:00','2020-01-01 16:17:00',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(488,NULL,1,'2020-01-01 20:17:46','2020-01-01 20:17:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:17:46','2020-01-01 16:17:46',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(489,NULL,1,'2020-01-01 20:17:51','2020-01-01 20:17:51',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:17:51','2020-01-01 16:17:51',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(490,NULL,1,'2020-01-01 20:20:22','2020-01-01 20:20:22',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:20:22','2020-01-01 16:20:22',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(491,NULL,1,'2020-01-01 20:20:31','2020-01-01 20:20:31',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:20:31','2020-01-01 16:20:31',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(492,NULL,1,'2020-01-01 20:21:35','2020-01-01 20:21:35',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 20:21:35','2020-01-01 16:21:35',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(493,NULL,1,'2020-01-01 20:21:42','2020-01-01 20:21:42',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:21:42','2020-01-01 16:21:42',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(494,NULL,1,'2020-01-01 20:21:55','2020-01-01 20:21:55',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:21:55','2020-01-01 16:21:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(495,NULL,1,'2020-01-01 20:23:02','2020-01-01 20:23:02',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0007 validated','2020-01-01 20:23:02','2020-01-01 16:23:02',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 validated',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(496,NULL,1,'2020-01-01 20:23:17','2020-01-01 20:23:17',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:23:17','2020-01-01 16:23:17',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(497,NULL,1,'2020-01-01 20:25:36','2020-01-01 20:25:36',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 20:25:36','2020-01-01 16:25:36',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(498,NULL,1,'2020-01-01 20:51:37','2020-01-01 20:51:37',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0002 validated','2020-01-01 20:51:37','2020-01-01 16:51:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 validated',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(499,NULL,1,'2020-01-01 20:51:48','2020-01-01 20:51:48',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0002 changed to paid','2020-01-01 20:51:48','2020-01-01 16:51:48',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 changed to paid',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(500,NULL,1,'2020-01-01 21:02:39','2020-01-01 21:02:39',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:02:39','2020-01-01 17:02:39',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(501,NULL,1,'2020-01-01 21:03:01','2020-01-01 21:03:01',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:03:01','2020-01-01 17:03:01',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(502,NULL,1,'2020-01-01 21:11:10','2020-01-01 21:11:10',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:11:10','2020-01-01 17:11:10',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(503,NULL,1,'2020-01-01 21:20:07','2020-01-01 21:20:07',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:20:07','2020-01-01 17:20:07',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(504,NULL,1,'2020-01-01 21:21:28','2020-01-01 21:21:28',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 21:21:28','2020-01-01 17:21:28',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(505,NULL,1,'2020-01-01 22:06:30','2020-01-01 22:06:30',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 22:06:31','2020-01-01 18:06:31',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(506,NULL,1,'2020-01-01 23:54:16','2020-01-01 23:54:16',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-01 23:54:16','2020-01-01 19:54:16',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(507,NULL,1,'2020-01-02 20:49:34','2020-01-02 20:49:34',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2020-01-02 20:49:34','2020-01-02 16:49:34',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(508,NULL,1,'2020-01-02 23:02:35','2020-01-02 23:02:35',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-02 23:02:35','2020-01-02 19:02:35',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(509,NULL,1,'2020-01-02 23:45:01','2020-01-02 23:45:01',40,'AC_BOM_REOPEN','BOM reopen','2020-01-02 23:45:01','2020-01-02 19:45:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(511,NULL,1,'2020-01-02 23:57:42','2020-01-02 23:57:42',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-02 23:57:42','2020-01-02 19:57:42',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO validated',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(512,NULL,1,'2020-01-03 13:33:54','2020-01-03 13:33:54',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-03 13:33:54','2020-01-03 09:33:54',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(513,NULL,1,'2020-01-03 13:34:11','2020-01-03 13:34:11',40,'AC_BOM_VALIDATE','BOM validated','2020-01-03 13:34:11','2020-01-03 09:34:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(514,NULL,1,'2020-01-03 13:35:45','2020-01-03 13:35:45',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 13:35:45','2020-01-03 09:35:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(515,NULL,1,'2020-01-03 14:10:41','2020-01-03 14:10:41',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 14:10:41','2020-01-03 10:10:41',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(516,NULL,1,'2020-01-06 00:39:58','2020-01-06 00:39:58',40,'AC_COMPANY_CREATE','Patient créé','2020-01-06 00:39:58','2020-01-05 20:39:58',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nPatient créé',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(517,NULL,1,'2020-01-06 00:49:06','2020-01-06 00:49:06',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-06 00:49:06','2020-01-05 20:49:06',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(518,NULL,1,'2020-01-06 06:50:05','2020-01-06 06:50:05',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-06 06:50:05','2020-01-06 02:50:05',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(519,NULL,1,'2020-01-06 20:52:28','2020-01-06 20:52:28',40,'AC_OTH_AUTO','Consultation 2 recorded (Patient)','2020-01-06 20:52:28','2020-01-06 16:52:28',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Consultation 2 recorded (Patient)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(520,NULL,1,'2020-01-07 20:25:02','2020-01-07 20:25:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 20:25:02','2020-01-07 16:25:02',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(521,NULL,1,'2020-01-07 21:12:37','2020-01-07 21:12:37',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:12:37','2020-01-07 17:12:37',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(522,NULL,1,'2020-01-07 21:13:00','2020-01-07 21:13:00',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:00','2020-01-07 17:13:00',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(523,NULL,1,'2020-01-07 21:13:49','2020-01-07 21:13:49',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:49','2020-01-07 17:13:49',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(524,NULL,1,'2020-01-07 21:46:58','2020-01-07 21:46:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:46:58','2020-01-07 17:46:58',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(525,NULL,1,'2020-01-07 21:52:34','2020-01-07 21:52:34',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:52:34','2020-01-07 17:52:34',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(526,NULL,1,'2020-01-07 21:53:44','2020-01-07 21:53:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:44','2020-01-07 17:53:44',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(527,NULL,1,'2020-01-07 21:53:58','2020-01-07 21:53:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:58','2020-01-07 17:53:58',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(528,NULL,1,'2020-01-07 21:54:12','2020-01-07 21:54:12',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:54:12','2020-01-07 17:54:12',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(529,NULL,1,'2020-01-07 22:00:55','2020-01-07 22:00:55',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:00:55','2020-01-07 18:00:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(530,NULL,1,'2020-01-07 22:39:52','2020-01-07 22:39:52',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:39:52','2020-01-07 18:39:52',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(531,NULL,1,'2020-01-07 23:09:04','2020-01-07 23:09:04',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:09:04','2020-01-07 19:09:04',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(532,NULL,1,'2020-01-07 23:39:09','2020-01-07 23:39:09',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:39:09','2020-01-07 19:39:09',12,NULL,6,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(533,NULL,1,'2020-01-07 23:43:06','2020-01-07 23:43:06',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:43:06','2020-01-07 19:43:06',12,NULL,6,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(534,NULL,1,'2020-01-07 23:50:40','2020-01-07 23:50:40',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:50:40','2020-01-07 19:50:40',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(535,NULL,1,'2020-01-07 23:51:27','2020-01-07 23:51:27',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:51:27','2020-01-07 19:51:27',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(536,NULL,1,'2020-01-08 00:25:23','2020-01-08 00:25:23',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:23','2020-01-07 20:25:23',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(537,NULL,1,'2020-01-08 00:25:43','2020-01-08 00:25:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:43','2020-01-07 20:25:43',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(538,NULL,1,'2020-01-08 00:29:24','2020-01-08 00:29:24',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:24','2020-01-07 20:29:24',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(539,NULL,1,'2020-01-08 00:29:43','2020-01-08 00:29:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:43','2020-01-07 20:29:43',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(540,NULL,1,'2020-01-08 01:09:15','2020-01-08 01:09:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:09:15','2020-01-07 21:09:15',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(541,NULL,1,'2020-01-08 01:15:02','2020-01-08 01:15:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:15:02','2020-01-07 21:15:02',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(542,NULL,1,'2020-01-08 01:17:16','2020-01-08 01:17:16',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:17:16','2020-01-07 21:17:16',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(543,NULL,1,'2020-01-08 05:31:44','2020-01-08 05:31:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 05:31:44','2020-01-08 01:31:44',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(544,NULL,1,'2020-01-08 05:39:46','2020-01-08 05:39:46',40,'AC_BOM_CLOSE','BOM disabled','2020-01-08 05:39:46','2020-01-08 01:39:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(545,NULL,1,'2020-01-08 05:39:50','2020-01-08 05:39:50',40,'AC_BOM_REOPEN','BOM reopen','2020-01-08 05:39:50','2020-01-08 01:39:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(546,NULL,1,'2020-01-08 06:06:50','2020-01-08 06:06:50',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 06:06:50','2020-01-08 02:06:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(547,NULL,1,'2020-01-08 19:34:53','2020-01-08 19:34:53',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:34:53','2020-01-08 15:34:53',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(548,NULL,1,'2020-01-08 19:40:27','2020-01-08 19:40:27',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-08 19:40:27','2020-01-08 15:40:27',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(549,NULL,1,'2020-01-08 19:40:46','2020-01-08 19:40:46',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-08 19:40:46','2020-01-08 15:40:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(550,NULL,1,'2020-01-08 19:40:59','2020-01-08 19:40:59',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:40:59','2020-01-08 15:40:59',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(551,NULL,1,'2020-01-08 19:41:11','2020-01-08 19:41:11',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:41:11','2020-01-08 15:41:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(552,NULL,1,'2020-01-08 19:41:49','2020-01-08 19:41:49',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:41:49','2020-01-08 15:41:49',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(553,NULL,1,'2020-01-08 20:12:55','2020-01-08 20:12:55',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-08 20:12:55','2020-01-08 16:12:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO validated',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(554,NULL,1,'2020-01-08 20:21:22','2020-01-08 20:21:22',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:21:22','2020-01-08 16:21:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(555,NULL,1,'2020-01-08 20:41:19','2020-01-08 20:41:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:41:19','2020-01-08 16:41:19',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(556,NULL,1,'2020-01-08 22:25:19','2020-01-08 22:25:19',40,'AC_BOM_DELETE','BOM deleted','2020-01-08 22:25:19','2020-01-08 18:25:19',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nBOM deleted',7,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(557,NULL,1,'2020-01-13 15:11:07','2020-01-13 15:11:07',40,'AC_MO_DELETE','MO_DELETEInDolibarr','2020-01-13 15:11:07','2020-01-13 11:11:07',12,NULL,6,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO_DELETEInDolibarr',25,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(558,NULL,1,'2020-01-13 15:11:54','2020-01-13 15:11:54',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-13 15:11:54','2020-01-13 11:11:54',12,NULL,6,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO validated',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(559,NULL,1,'2020-01-13 15:13:19','2020-01-13 15:13:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:13:19','2020-01-13 11:13:19',12,NULL,6,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(560,NULL,1,'2020-01-13 15:14:15','2020-01-13 15:14:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:14:15','2020-01-13 11:14:15',12,NULL,6,26,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(561,NULL,1,'2020-01-13 15:29:30','2020-01-13 15:29:30',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:29:30','2020-01-13 11:29:30',12,NULL,7,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(562,NULL,1,'2020-01-13 17:19:24','2020-01-13 17:19:24',40,'AC_COMPANY_CREATE','Third party Italo created','2020-01-13 17:19:24','2020-01-13 13:19:24',12,NULL,NULL,30,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nThird party Italo created',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(563,NULL,1,'2020-01-15 16:27:15','2020-01-15 16:27:15',40,'AC_PROJECT_MODIFY','Project RMLL modified','2020-01-15 16:27:15','2020-01-15 12:27:15',12,NULL,5,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject RMLL modified\nTask: RMLL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(564,NULL,1,'2020-01-15 16:40:50','2020-01-15 16:40:50',40,'AC_PROJECT_MODIFY','Project PROJINDIAN modified','2020-01-15 16:40:50','2020-01-15 12:40:50',12,NULL,3,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProject PROJINDIAN modified\nTask: PROJINDIAN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(565,NULL,1,'2020-01-16 02:22:16','2020-01-16 02:22:16',40,'AC_BILL_VALIDATE','Invoice AC2001-0001 validated','2020-01-16 02:22:16','2020-01-16 01:22:16',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 validated',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(566,NULL,1,'2020-01-16 02:22:24','2020-01-16 02:22:24',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0001 go back to draft status','2020-01-16 02:22:24','2020-01-16 01:22:24',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 go back to draft status',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(567,NULL,1,'2020-01-16 02:33:27','2020-01-16 02:33:27',40,'AC_BILL_VALIDATE','Invoice AC2001-0002 validated','2020-01-16 02:33:27','2020-01-16 01:33:27',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 validated',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(568,NULL,1,'2020-01-16 02:36:48','2020-01-16 02:36:48',40,'AC_BILL_PAYED','Invoice AC2001-0002 changed to paid','2020-01-16 02:36:48','2020-01-16 01:36:48',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 changed to paid',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(569,NULL,1,'2020-01-16 02:42:12','2020-01-16 02:42:12',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0020 classified billed','2020-01-16 02:42:12','2020-01-16 01:42:12',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified billed',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(570,NULL,1,'2020-01-16 02:42:17','2020-01-16 02:42:17',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:17','2020-01-16 01:42:17',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(571,NULL,1,'2020-01-16 02:42:56','2020-01-16 02:42:56',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:56','2020-01-16 01:42:56',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(572,NULL,1,'2020-01-16 18:05:43','2020-01-16 18:05:43',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-16 18:05:43','2020-01-16 17:05:43',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(573,NULL,1,'2020-01-17 14:54:18','2020-01-17 14:54:18',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 14:54:18','2020-01-17 13:54:18',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(574,NULL,1,'2020-01-17 15:22:28','2020-01-17 15:22:28',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 15:22:28','2020-01-17 14:22:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(575,NULL,1,'2020-01-19 14:22:27','2020-01-19 14:22:27',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:22:27','2020-01-19 13:22:27',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(576,NULL,1,'2020-01-19 14:22:34','2020-01-19 14:22:34',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:22:34','2020-01-19 13:22:34',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(577,NULL,1,'2020-01-19 14:24:22','2020-01-19 14:24:22',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:24:22','2020-01-19 13:24:22',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(578,NULL,1,'2020-01-19 14:24:27','2020-01-19 14:24:27',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:24:27','2020-01-19 13:24:27',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(579,NULL,1,'2020-01-19 14:51:43','2020-01-19 14:51:43',40,'AC_BILL_VALIDATE','Invoice AC2001-0003 validated','2020-01-19 14:51:43','2020-01-19 13:51:43',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 validated',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(580,NULL,1,'2020-01-19 14:51:48','2020-01-19 14:51:48',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0003 go back to draft status','2020-01-19 14:51:48','2020-01-19 13:51:48',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 go back to draft status',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(581,NULL,1,'2020-01-19 15:01:26','2020-01-19 15:01:26',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:01:26','2020-01-19 14:01:26',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(582,NULL,1,'2020-01-19 15:04:37','2020-01-19 15:04:37',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:04:37','2020-01-19 14:04:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(583,NULL,1,'2020-01-19 15:04:53','2020-01-19 15:04:53',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:04:53','2020-01-19 14:04:53',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(584,NULL,1,'2020-01-19 15:09:14','2020-01-19 15:09:14',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:09:14','2020-01-19 14:09:14',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(585,NULL,1,'2020-01-19 15:13:07','2020-01-19 15:13:07',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:13:07','2020-01-19 14:13:07',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(586,NULL,1,'2020-01-20 12:20:11','2020-01-20 12:20:11',40,'AC_ORDER_SUPPLIER_CREATE','Order (PROV14) created','2020-01-20 12:20:11','2020-01-20 11:20:11',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nOrder (PROV14) created',14,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(588,NULL,1,'2020-01-21 01:02:14','2020-01-21 01:02:14',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 2 for member Vick Smith added','2020-01-21 01:02:14','2020-01-21 00:02:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nSubscription 2 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2013 - 07/17/2014',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(589,NULL,1,'2020-01-21 10:22:37','2020-01-21 10:22:37',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 3 for member Vick Smith added','2020-01-21 10:22:37','2020-01-21 09:22:37',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nSubscription 3 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(590,NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 4 for member Vick Smith added','2020-01-21 10:23:17','2020-01-21 09:23:17',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nSubscription 4 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(591,NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_VALIDATE','Invoice FA1707-0026 validated','2020-01-21 10:23:17','2020-01-21 09:23:17',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 validated',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(592,NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_PAYED','Invoice FA1707-0026 changed to paid','2020-01-21 10:23:17','2020-01-21 09:23:17',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 changed to paid',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(593,NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 5 for member Vick Smith added','2020-01-21 10:23:28','2020-01-21 09:23:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nSubscription 5 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2018 - 07/17/2019',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(594,NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_VALIDATE','Invoice FA1807-0027 validated','2020-01-21 10:23:28','2020-01-21 09:23:28',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 validated',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(595,NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_PAYED','Invoice FA1807-0027 changed to paid','2020-01-21 10:23:28','2020-01-21 09:23:28',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 changed to paid',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(596,NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 6 for member Vick Smith added','2020-01-21 10:23:49','2020-01-21 09:23:49',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nSubscription 6 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2019 - 07/17/2020',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(597,NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_VALIDATE','Invoice FA1907-0028 validated','2020-01-21 10:23:49','2020-01-21 09:23:49',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 validated',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(598,NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_PAYED','Invoice FA1907-0028 changed to paid','2020-01-21 10:23:49','2020-01-21 09:23:49',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 changed to paid',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(599,NULL,1,'2020-01-21 10:30:27','2020-01-21 10:30:27',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2020-01-21 10:30:27','2020-01-21 09:30:27',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(600,NULL,1,'2020-01-21 10:30:36','2020-01-21 10:30:36',40,'AC_MEMBER_MODIFY','Member doe john modified','2020-01-21 10:30:36','2020-01-21 09:30:36',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(601,NULL,1,'2020-01-21 10:30:42','2020-01-21 10:30:42',40,'AC_MEMBER_MODIFY','Member smith smith modified','2020-01-21 10:30:42','2020-01-21 09:30:42',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(602,NULL,1,'2020-01-21 10:30:57','2020-01-21 10:30:57',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2020-01-21 10:30:57','2020-01-21 09:30:57',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'); +INSERT INTO `llx_actioncomm` VALUES (1,NULL,1,'2012-07-08 14:21:44','2012-07-08 14:21:44',50,NULL,'Company AAA and Co added into Dolibarr','2012-07-08 14:21:44','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(2,NULL,1,'2012-07-08 14:23:48','2012-07-08 14:23:48',50,NULL,'Company Belin SARL added into Dolibarr','2012-07-08 14:23:48','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(3,NULL,1,'2012-07-08 22:42:12','2012-07-08 22:42:12',50,NULL,'Company Spanish Comp added into Dolibarr','2012-07-08 22:42:12','2016-12-21 12:50:33',1,NULL,NULL,3,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(4,NULL,1,'2012-07-08 22:48:18','2012-07-08 22:48:18',50,NULL,'Company Prospector Vaalen added into Dolibarr','2012-07-08 22:48:18','2016-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(5,NULL,1,'2012-07-08 23:22:57','2012-07-08 23:22:57',50,NULL,'Company NoCountry Co added into Dolibarr','2012-07-08 23:22:57','2016-12-21 12:50:33',1,NULL,NULL,5,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(6,NULL,1,'2012-07-09 00:15:09','2012-07-09 00:15:09',50,NULL,'Company Swiss customer added into Dolibarr','2012-07-09 00:15:09','2016-12-21 12:50:33',1,NULL,NULL,6,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(7,NULL,1,'2012-07-09 01:24:26','2012-07-09 01:24:26',50,NULL,'Company Generic customer added into Dolibarr','2012-07-09 01:24:26','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(8,NULL,1,'2012-07-10 14:54:27','2012-07-10 14:54:27',50,NULL,'Société Client salon ajoutée dans Dolibarr','2012-07-10 14:54:27','2016-12-21 12:50:33',1,NULL,NULL,8,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(9,NULL,1,'2012-07-10 14:54:44','2012-07-10 14:54:44',50,NULL,'Société Client salon invidivdu ajoutée dans Doliba','2012-07-10 14:54:44','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(10,NULL,1,'2012-07-10 14:56:10','2012-07-10 14:56:10',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:56:10','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(11,NULL,1,'2012-07-10 14:58:53','2012-07-10 14:58:53',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:58:53','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(12,NULL,1,'2012-07-10 15:00:55','2012-07-10 15:00:55',50,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr','2012-07-10 15:00:55','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(13,NULL,1,'2012-07-10 15:13:08','2012-07-10 15:13:08',50,NULL,'Société Smith Vick ajoutée dans Dolibarr','2012-07-10 15:13:08','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(14,NULL,1,'2012-07-10 15:21:00','2012-07-10 16:21:00',5,NULL,'RDV avec mon chef','2012-07-10 15:21:48','2012-07-10 13:21:48',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(15,NULL,1,'2012-07-10 18:18:16','2012-07-10 18:18:16',50,NULL,'Contrat CONTRAT1 validé dans Dolibarr','2012-07-10 18:18:16','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(16,NULL,1,'2012-07-10 18:35:57','2012-07-10 18:35:57',50,NULL,'Société Mon client ajoutée dans Dolibarr','2012-07-10 18:35:57','2016-12-21 12:50:33',1,NULL,NULL,11,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(17,NULL,1,'2012-07-11 16:18:08','2012-07-11 16:18:08',50,NULL,'Société Dupont Alain ajoutée dans Dolibarr','2012-07-11 16:18:08','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(18,NULL,1,'2012-07-11 17:11:00','2012-07-11 17:17:00',5,NULL,'Rendez-vous','2012-07-11 17:11:22','2012-07-11 15:11:22',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,'gfgdfgdf',360,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(19,NULL,1,'2012-07-11 17:13:20','2012-07-11 17:13:20',50,NULL,'Société Vendeur de chips ajoutée dans Dolibarr','2012-07-11 17:13:20','2016-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(20,NULL,1,'2012-07-11 17:15:42','2012-07-11 17:15:42',50,NULL,'Commande CF1007-0001 validée','2012-07-11 17:15:42','2016-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(21,NULL,1,'2012-07-11 18:47:33','2012-07-11 18:47:33',50,NULL,'Commande CF1007-0002 validée','2012-07-11 18:47:33','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(22,NULL,1,'2012-07-18 11:36:18','2012-07-18 11:36:18',50,NULL,'Proposition PR1007-0003 validée','2012-07-18 11:36:18','2016-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(23,NULL,1,'2013-07-18 20:49:58','2013-07-18 20:49:58',50,NULL,'Invoice FA1007-0002 validated in Dolibarr','2013-07-18 20:49:58','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(24,NULL,1,'2013-07-28 01:37:00',NULL,1,NULL,'Phone call','2013-07-28 01:37:48','2013-07-27 23:37:48',1,NULL,NULL,NULL,2,0,1,NULL,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(25,NULL,1,'2013-08-01 02:31:24','2013-08-01 02:31:24',50,NULL,'Company mmm added into Dolibarr','2013-08-01 02:31:24','2016-12-21 12:50:33',1,NULL,NULL,15,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(26,NULL,1,'2013-08-01 02:31:43','2013-08-01 02:31:43',50,NULL,'Company ppp added into Dolibarr','2013-08-01 02:31:43','2016-12-21 12:50:33',1,NULL,NULL,16,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(27,NULL,1,'2013-08-01 02:41:26','2013-08-01 02:41:26',50,NULL,'Company aaa added into Dolibarr','2013-08-01 02:41:26','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(28,NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(29,NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(30,NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(31,NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(38,NULL,1,'2013-08-08 02:41:55','2013-08-08 02:41:55',50,NULL,'Invoice FA1108-0005 validated in Dolibarr','2013-08-08 02:41:55','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(40,NULL,1,'2013-08-08 02:53:40','2013-08-08 02:53:40',50,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr','2013-08-08 02:53:40','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(41,NULL,1,'2013-08-08 02:54:05','2013-08-08 02:54:05',50,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr','2013-08-08 02:54:05','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(42,NULL,1,'2013-08-08 02:55:04','2013-08-08 02:55:04',50,NULL,'Invoice FA1107-0006 validated in Dolibarr','2013-08-08 02:55:04','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(43,NULL,1,'2013-08-08 02:55:26','2013-08-08 02:55:26',50,NULL,'Invoice FA1108-0007 validated in Dolibarr','2013-08-08 02:55:26','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(44,NULL,1,'2013-08-08 02:55:58','2013-08-08 02:55:58',50,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr','2013-08-08 02:55:58','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(45,NULL,1,'2013-08-08 03:04:22','2013-08-08 03:04:22',50,NULL,'Order CO1108-0001 validated','2013-08-08 03:04:22','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(46,NULL,1,'2013-08-08 13:59:09','2013-08-08 13:59:09',50,NULL,'Order CO1107-0002 validated','2013-08-08 13:59:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(47,NULL,1,'2013-08-08 14:24:18','2013-08-08 14:24:18',50,NULL,'Proposal PR1007-0001 validated','2013-08-08 14:24:18','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(48,NULL,1,'2013-08-08 14:24:24','2013-08-08 14:24:24',50,NULL,'Proposal PR1108-0004 validated','2013-08-08 14:24:24','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(49,NULL,1,'2013-08-08 15:04:37','2013-08-08 15:04:37',50,NULL,'Order CF1108-0003 validated','2013-08-08 15:04:37','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(50,NULL,1,'2014-12-08 17:56:47','2014-12-08 17:56:47',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:56:47','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(51,NULL,1,'2014-12-08 17:57:11','2014-12-08 17:57:11',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:57:11','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(52,NULL,1,'2014-12-08 17:58:27','2014-12-08 17:58:27',40,NULL,'Facture FA1212-0008 validée dans Dolibarr','2014-12-08 17:58:27','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0008 validée dans Dolibarr\nAuteur: admin',11,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(53,NULL,1,'2014-12-08 18:20:49','2014-12-08 18:20:49',40,NULL,'Facture AV1212-0002 validée dans Dolibarr','2014-12-08 18:20:49','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0002 validée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(54,NULL,1,'2014-12-09 18:35:07','2014-12-09 18:35:07',40,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr','2014-12-09 18:35:07','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(55,NULL,1,'2014-12-09 20:14:42','2014-12-09 20:14:42',40,NULL,'Société doe john ajoutée dans Dolibarr','2014-12-09 20:14:42','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Société doe john ajoutée dans Dolibarr\nAuteur: admin',18,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(56,NULL,1,'2014-12-12 18:54:19','2014-12-12 18:54:19',40,NULL,'Facture FA1212-0009 validée dans Dolibarr','2014-12-12 18:54:19','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0009 validée dans Dolibarr\nAuteur: admin',55,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(121,NULL,1,'2014-12-06 10:00:00',NULL,50,NULL,'aaab','2014-12-21 17:48:08','2014-12-21 16:54:07',3,1,NULL,NULL,NULL,0,3,NULL,NULL,1,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(122,NULL,1,'2014-12-21 18:09:52','2014-12-21 18:09:52',40,NULL,'Facture client FA1007-0001 envoyée par EMail','2014-12-21 18:09:52','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Mail envoyé par Firstname SuperAdminName à laurent@mycompany.fr.\nSujet du mail: Envoi facture FA1007-0001\nCorps du mail:\nVeuillez trouver ci-joint la facture FA1007-0001\r\n\r\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\r\n\r\nhttp://localhost/dolibarrnew/public/paypal/newpayment.php?source=invoice&ref=FA1007-0001&securekey=50c82fab36bb3b6aa83e2a50691803b2\r\n\r\nCordialement',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(123,NULL,1,'2015-01-06 13:13:57','2015-01-06 13:13:57',40,NULL,'Facture 16 validée dans Dolibarr','2015-01-06 13:13:57','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture 16 validée dans Dolibarr\nAuteur: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(124,NULL,1,'2015-01-12 12:23:05','2015-01-12 12:23:05',40,NULL,'Patient aaa ajouté','2015-01-12 12:23:05','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient aaa ajouté\nAuteur: admin',19,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(125,NULL,1,'2015-01-12 12:52:20','2015-01-12 12:52:20',40,NULL,'Patient pppoo ajouté','2015-01-12 12:52:20','2016-12-21 12:50:33',1,NULL,NULL,20,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient pppoo ajouté\nAuteur: admin',20,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(127,NULL,1,'2015-01-19 18:22:48','2015-01-19 18:22:48',40,NULL,'Facture FS1301-0001 validée dans Dolibarr','2015-01-19 18:22:48','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0001 validée dans Dolibarr\nAuteur: admin',148,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(128,NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 validée dans Dolibarr','2015-01-19 18:31:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA6801-0010 validée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(129,NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr','2015-01-19 18:31:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(130,NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 validée dans Dolibarr','2015-01-19 18:31:58','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0002 validée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(131,NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr','2015-01-19 18:31:58','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(132,NULL,1,'2015-01-23 15:07:54','2015-01-23 15:07:54',50,NULL,'Consultation 24 saisie (aaa)','2015-01-23 15:07:54','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Consultation 24 saisie (aaa)\nAuteur: admin',24,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(133,NULL,1,'2015-01-23 16:56:58','2015-01-23 16:56:58',40,NULL,'Patient pa ajouté','2015-01-23 16:56:58','2016-12-21 12:50:33',1,NULL,NULL,21,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient pa ajouté\nAuteur: admin',21,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(134,NULL,1,'2015-01-23 17:34:00',NULL,50,NULL,'bbcv','2015-01-23 17:35:21','2015-01-23 16:35:21',1,NULL,1,2,NULL,0,1,NULL,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(135,NULL,1,'2015-02-12 15:54:00','2015-02-12 15:54:00',40,NULL,'Facture FA1212-0011 validée dans Dolibarr','2015-02-12 15:54:37','2016-12-21 12:50:33',1,1,NULL,7,NULL,0,1,NULL,1,0,0,50,NULL,NULL,NULL,'Facture FA1212-0011 validée dans Dolibarr
\r\nAuteur: admin',13,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(136,NULL,1,'2015-02-12 17:06:51','2015-02-12 17:06:51',40,NULL,'Commande CO1107-0003 validée','2015-02-12 17:06:51','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1107-0003 validée\nAuteur: admin',2,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(137,NULL,1,'2015-02-17 16:22:10','2015-02-17 16:22:10',40,NULL,'Proposition PR1302-0009 validée','2015-02-17 16:22:10','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition PR1302-0009 validée\nAuteur: admin',9,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(138,NULL,1,'2015-02-17 16:27:00','2015-02-17 16:27:00',40,NULL,'Facture FA1302-0012 validée dans Dolibarr','2015-02-17 16:27:00','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1302-0012 validée dans Dolibarr\nAuteur: admin',152,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(139,NULL,1,'2015-02-17 16:27:29','2015-02-17 16:27:29',40,NULL,'Proposition PR1302-0010 validée','2015-02-17 16:27:29','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition PR1302-0010 validée\nAuteur: admin',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(140,NULL,1,'2015-02-17 18:27:56','2015-02-17 18:27:56',40,NULL,'Commande CO1107-0004 validée','2015-02-17 18:27:56','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1107-0004 validée\nAuteur: admin',3,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(141,NULL,1,'2015-02-17 18:38:14','2015-02-17 18:38:14',40,NULL,'Commande CO1302-0005 validée','2015-02-17 18:38:14','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1302-0005 validée\nAuteur: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(142,NULL,1,'2015-02-26 22:57:50','2015-02-26 22:57:50',40,NULL,'Company pppp added into Dolibarr','2015-02-26 22:57:50','2016-12-21 12:50:33',1,NULL,NULL,22,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company pppp added into Dolibarr\nAuthor: admin',22,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(143,NULL,1,'2015-02-26 22:58:13','2015-02-26 22:58:13',40,NULL,'Company ttttt added into Dolibarr','2015-02-26 22:58:13','2016-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company ttttt added into Dolibarr\nAuthor: admin',23,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(144,NULL,1,'2015-02-27 10:00:00','2015-02-27 19:20:00',5,NULL,'Rendez-vous','2015-02-27 19:20:53','2015-02-27 18:20:53',1,NULL,NULL,NULL,NULL,0,1,NULL,1,0,0,-1,'',33600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(145,NULL,1,'2015-02-27 19:28:00',NULL,2,NULL,'fdsfsd','2015-02-27 19:28:48','2015-02-27 18:29:53',1,1,NULL,NULL,NULL,0,1,NULL,1,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(146,NULL,1,'2015-03-06 10:05:07','2015-03-06 10:05:07',40,NULL,'Contrat (PROV3) validé dans Dolibarr','2015-03-06 10:05:07','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Contrat (PROV3) validé dans Dolibarr\nAuteur: admin',3,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(147,NULL,1,'2015-03-06 16:43:37','2015-03-06 16:43:37',40,NULL,'Facture FA1307-0013 validée dans Dolibarr','2015-03-06 16:43:37','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1307-0013 validée dans Dolibarr\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(148,NULL,1,'2015-03-06 16:44:12','2015-03-06 16:44:12',40,NULL,'Facture FA1407-0014 validée dans Dolibarr','2015-03-06 16:44:12','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1407-0014 validée dans Dolibarr\nAuteur: admin',159,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(149,NULL,1,'2015-03-06 16:47:48','2015-03-06 16:47:48',40,NULL,'Facture FA1507-0015 validée dans Dolibarr','2015-03-06 16:47:48','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1507-0015 validée dans Dolibarr\nAuteur: admin',160,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(150,NULL,1,'2015-03-06 16:48:16','2015-03-06 16:48:16',40,NULL,'Facture FA1607-0016 validée dans Dolibarr','2015-03-06 16:48:16','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1607-0016 validée dans Dolibarr\nAuteur: admin',161,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(151,NULL,1,'2015-03-06 17:13:59','2015-03-06 17:13:59',40,NULL,'Société smith smith ajoutée dans Dolibarr','2015-03-06 17:13:59','2016-12-21 12:50:33',1,NULL,NULL,24,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Société smith smith ajoutée dans Dolibarr\nAuteur: admin',24,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(152,NULL,1,'2015-03-08 10:02:22','2015-03-08 10:02:22',40,NULL,'Proposition (PROV12) validée dans Dolibarr','2015-03-08 10:02:22','2016-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition (PROV12) validée dans Dolibarr\nAuteur: admin',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(203,NULL,1,'2015-03-09 19:39:27','2015-03-09 19:39:27',40,'AC_ORDER_SUPPLIER_VALIDATE','Commande CF1303-0004 validée','2015-03-09 19:39:27','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CF1303-0004 validée\nAuteur: admin',13,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(204,NULL,1,'2015-03-10 15:47:37','2015-03-10 15:47:37',40,'AC_COMPANY_CREATE','Patient créé','2015-03-10 15:47:37','2016-12-21 12:50:33',1,NULL,NULL,25,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient créé\nAuteur: admin',25,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(205,NULL,1,'2015-03-10 15:57:32','2015-03-10 15:57:32',40,'AC_COMPANY_CREATE','Tiers créé','2015-03-10 15:57:32','2016-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Tiers créé\nAuteur: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(206,NULL,1,'2015-03-10 15:58:28','2015-03-10 15:58:28',40,'AC_BILL_VALIDATE','Facture FA1303-0017 validée','2015-03-10 15:58:28','2016-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0017 validée\nAuteur: admin',208,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(207,NULL,1,'2015-03-19 09:38:10','2015-03-19 09:38:10',40,'AC_BILL_VALIDATE','Facture FA1303-0018 validée','2015-03-19 09:38:10','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0018 validée\nAuteur: admin',209,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(208,NULL,1,'2015-03-20 14:30:11','2015-03-20 14:30:11',40,'AC_BILL_VALIDATE','Facture FA1107-0019 validée','2015-03-20 14:30:11','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1107-0019 validée\nAuteur: admin',210,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(209,NULL,1,'2015-03-22 09:40:25','2015-03-22 09:40:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-22 09:40:25','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(210,NULL,1,'2015-03-23 17:16:25','2015-03-23 17:16:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-23 17:16:25','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(211,NULL,1,'2015-03-23 18:08:27','2015-03-23 18:08:27',40,'AC_BILL_VALIDATE','Facture FA1307-0013 validée','2015-03-23 18:08:27','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1307-0013 validée\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(212,NULL,1,'2015-03-24 15:54:00','2015-03-24 15:54:00',40,'AC_BILL_VALIDATE','Facture FA1212-0021 validée','2015-03-24 15:54:00','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0021 validée\nAuteur: admin',32,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(213,NULL,1,'2015-11-07 01:02:39','2015-11-07 01:02:39',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:02:39','2016-12-21 12:50:33',1,NULL,NULL,27,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',27,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(214,NULL,1,'2015-11-07 01:05:22','2015-11-07 01:05:22',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:05:22','2016-12-21 12:50:33',1,NULL,NULL,28,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',28,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(215,NULL,1,'2015-11-07 01:07:07','2015-11-07 01:07:07',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:07','2016-12-21 12:50:33',1,NULL,NULL,29,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',29,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(216,NULL,1,'2015-11-07 01:07:58','2015-11-07 01:07:58',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:58','2016-12-21 12:50:33',1,NULL,NULL,30,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',30,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(217,NULL,1,'2015-11-07 01:10:09','2015-11-07 01:10:09',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:10:09','2016-12-21 12:50:33',1,NULL,NULL,31,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',31,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(218,NULL,1,'2015-11-07 01:15:57','2015-11-07 01:15:57',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:15:57','2016-12-21 12:50:33',1,NULL,NULL,32,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',32,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(219,NULL,1,'2015-11-07 01:16:51','2015-11-07 01:16:51',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:16:51','2016-12-21 12:50:33',1,NULL,NULL,33,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',33,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(220,NULL,1,'2016-03-02 17:24:04','2016-03-02 17:24:04',40,'AC_BILL_VALIDATE','Invoice FA1302-0022 validated','2016-03-02 17:24:04','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1302-0022 validated\nAuthor: admin',157,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(221,NULL,1,'2016-03-02 17:24:28','2016-03-02 17:24:28',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 17:24:28','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(222,NULL,1,'2016-03-05 10:00:00','2016-03-05 10:00:00',5,NULL,'RDV John','2016-03-02 19:54:48','2016-03-02 18:55:29',1,1,NULL,NULL,NULL,0,1,0,NULL,0,0,-1,NULL,NULL,NULL,'gfdgdfgdf',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(223,NULL,1,'2016-03-13 10:00:00','2016-03-17 00:00:00',50,NULL,'Congress','2016-03-02 19:55:11','2016-03-02 18:55:11',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,-1,'',309600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(224,NULL,1,'2016-03-14 10:00:00',NULL,1,NULL,'Call john','2016-03-02 19:55:56','2016-03-02 18:55:56',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,0,'',NULL,NULL,'tttt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(225,NULL,1,'2016-03-02 20:11:31','2016-03-02 20:11:31',40,'AC_BILL_UNVALIDATE','Invoice FA1303-0020 go back to draft status','2016-03-02 20:11:31','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 go back to draft status\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(226,NULL,1,'2016-03-02 20:13:39','2016-03-02 20:13:39',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 20:13:39','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(227,NULL,1,'2016-03-03 19:20:10','2016-03-03 19:20:10',40,'AC_BILL_VALIDATE','Invoice FA1212-0023 validated','2016-03-03 19:20:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1212-0023 validated\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(228,NULL,1,'2016-03-03 19:20:25','2016-03-03 19:20:25',40,'AC_BILL_CANCEL','Invoice FA1212-0023 canceled in Dolibarr','2016-03-03 19:20:25','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1212-0023 canceled in Dolibarr\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(229,NULL,1,'2016-03-03 19:20:56','2016-03-03 19:20:56',40,'AC_BILL_VALIDATE','Invoice AV1403-0003 validated','2016-03-03 19:20:56','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1403-0003 validated\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(230,NULL,1,'2016-03-03 19:21:29','2016-03-03 19:21:29',40,'AC_BILL_UNVALIDATE','Invoice AV1403-0003 go back to draft status','2016-03-03 19:21:29','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1403-0003 go back to draft status\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(231,NULL,1,'2016-03-03 19:22:16','2016-03-03 19:22:16',40,'AC_BILL_VALIDATE','Invoice AV1303-0003 validated','2016-03-03 19:22:16','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1303-0003 validated\nAuthor: admin',213,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(232,NULL,1,'2018-01-22 18:54:39','2018-01-22 18:54:39',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:39','2018-01-22 17:54:39',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(233,NULL,1,'2018-01-22 18:54:46','2018-01-22 18:54:46',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:46','2018-01-22 17:54:46',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(234,NULL,1,'2018-07-05 10:00:00','2018-07-05 11:19:00',5,'AC_RDV','Meeting with my boss','2018-07-31 18:19:48','2018-07-31 14:19:48',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',4740,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(235,NULL,1,'2018-07-13 00:00:00','2018-07-14 23:59:59',50,'AC_OTH','Trip at Las Vegas','2018-07-31 18:20:36','2018-07-31 14:20:36',12,NULL,4,NULL,2,0,12,1,NULL,0,1,-1,'',172799,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(236,NULL,1,'2018-07-29 10:00:00',NULL,4,'AC_EMAIL','Remind to send an email','2018-07-31 18:21:04','2018-07-31 14:21:04',12,NULL,NULL,NULL,NULL,0,4,0,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(237,NULL,1,'2018-07-01 10:00:00',NULL,1,'AC_TEL','Phone call with Mr Vaalen','2018-07-31 18:22:04','2018-07-31 14:22:04',12,NULL,6,4,NULL,0,13,0,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(238,NULL,1,'2018-08-02 10:00:00','2018-08-02 12:00:00',5,'AC_RDV','Meeting on radium','2018-08-01 01:15:50','2018-07-31 21:15:50',12,NULL,8,10,10,0,12,1,NULL,0,0,-1,'',7200,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(239,NULL,1,'2017-01-29 21:49:33','2017-01-29 21:49:33',40,'AC_OTH_AUTO','Proposal PR1302-0007 validated','2017-01-29 21:49:33','2017-01-29 17:49:33',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1302-0007 validated\nAuthor: admin',7,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(240,NULL,1,'2017-01-31 20:52:00',NULL,1,'AC_TEL','Call the boss','2017-01-31 20:52:10','2017-01-31 16:52:25',12,12,6,NULL,NULL,0,12,1,NULL,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(242,NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 validated','2017-02-01 18:52:04','2017-02-01 14:52:04',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CF1007-0001 validated\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(243,NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 approved','2017-02-01 18:52:04','2017-02-01 14:52:04',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CF1007-0001 approved\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(245,NULL,1,'2017-02-01 18:52:32','2017-02-01 18:52:32',40,'AC_OTH_AUTO','Supplier order CF1007-0001 submited','2017-02-01 18:52:32','2017-02-01 14:52:32',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Supplier order CF1007-0001 submited\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(249,NULL,1,'2017-02-01 18:54:01','2017-02-01 18:54:01',40,'AC_OTH_AUTO','Supplier order CF1007-0001 received','2017-02-01 18:54:01','2017-02-01 14:54:01',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Supplier order CF1007-0001 received \nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(250,NULL,1,'2017-02-01 18:54:42','2017-02-01 18:54:42',40,'AC_OTH_AUTO','Email sent by MyBigCompany To mycustomer@example.com','2017-02-01 18:54:42','2017-02-01 14:54:42',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): mycustomer@example.com
\nEMail topic: Submission of order CF1007-0001
\nEmail body:
\nYou will find here our order CF1007-0001
\r\n
\r\nSincerely
\n
\nAttached files and documents: CF1007-0001.pdf',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(251,NULL,1,'2017-02-01 19:02:21','2017-02-01 19:02:21',40,'AC_OTH_AUTO','Invoice SI1702-0001 validated','2017-02-01 19:02:21','2017-02-01 15:02:21',12,NULL,5,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice SI1702-0001 validated\nAuthor: admin',20,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(252,NULL,1,'2017-02-12 23:17:04','2017-02-12 23:17:04',40,'AC_OTH_AUTO','Patient créé','2017-02-12 23:17:04','2017-02-12 19:17:04',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Patient créé\nAuthor: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(253,NULL,1,'2017-02-12 23:18:33','2017-02-12 23:18:33',40,'AC_OTH_AUTO','Consultation 2 recorded (aaa)','2017-02-12 23:18:33','2017-02-12 19:18:33',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Consultation 2 recorded (aaa)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(254,NULL,1,'2017-02-15 23:28:41','2017-02-15 23:28:41',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:28:41','2017-02-15 22:28:41',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(255,NULL,1,'2017-02-15 23:28:56','2017-02-15 23:28:56',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:28:56','2017-02-15 22:28:56',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',8,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(256,NULL,1,'2017-02-15 23:34:33','2017-02-15 23:34:33',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:34:33','2017-02-15 22:34:33',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',9,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(257,NULL,1,'2017-02-15 23:35:03','2017-02-15 23:35:03',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-15 23:35:03','2017-02-15 22:35:03',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',10,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(263,NULL,1,'2017-02-15 23:50:34','2017-02-15 23:50:34',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:50:34','2017-02-15 22:50:34',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',17,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(264,NULL,1,'2017-02-15 23:51:23','2017-02-15 23:51:23',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:51:23','2017-02-15 22:51:23',12,NULL,NULL,7,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',18,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(265,NULL,1,'2017-02-15 23:54:51','2017-02-15 23:54:51',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:54:51','2017-02-15 22:54:51',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',19,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(266,NULL,1,'2017-02-15 23:55:52','2017-02-15 23:55:52',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:55:52','2017-02-15 22:55:52',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',20,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(267,NULL,1,'2017-02-16 00:03:44','2017-02-16 00:03:44',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-16 00:03:44','2017-02-15 23:03:44',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',29,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(268,NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0009 validated','2017-02-16 00:05:01','2017-02-15 23:05:01',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0009 validated\nAuthor: admin',34,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(269,NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0010 validated','2017-02-16 00:05:01','2017-02-15 23:05:01',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0010 validated\nAuthor: admin',38,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(270,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0011 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0011 validated\nAuthor: admin',40,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(271,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0012 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0012 validated\nAuthor: admin',43,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(272,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0013 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0013 validated\nAuthor: admin',47,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(273,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0014 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0014 validated\nAuthor: admin',48,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(274,NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0015 validated','2017-02-16 00:05:26','2017-02-15 23:05:26',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0015 validated\nAuthor: admin',50,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(275,NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0016 validated','2017-02-16 00:05:26','2017-02-15 23:05:26',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0016 validated\nAuthor: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(277,NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0018 validated','2017-02-16 00:05:35','2017-02-15 23:05:35',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0018 validated\nAuthor: admin',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(278,NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0019 validated','2017-02-16 00:05:35','2017-02-15 23:05:35',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0019 validated\nAuthor: admin',68,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(279,NULL,1,'2017-02-16 00:05:36','2017-02-16 00:05:36',40,'AC_OTH_AUTO','Order CO7001-0020 validated','2017-02-16 00:05:36','2017-02-15 23:05:36',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0020 validated\nAuthor: admin',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(281,NULL,1,'2017-02-16 00:05:37','2017-02-16 00:05:37',40,'AC_OTH_AUTO','Order CO7001-0022 validated','2017-02-16 00:05:37','2017-02-15 23:05:37',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0022 validated\nAuthor: admin',78,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(282,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0023 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0023 validated\nAuthor: admin',81,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(283,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0024 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0024 validated\nAuthor: admin',83,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(284,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0025 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,2,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0025 validated\nAuthor: admin',84,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(285,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0026 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0026 validated\nAuthor: admin',85,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(286,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0027 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0027 validated\nAuthor: admin',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(287,NULL,1,'2017-02-16 03:05:56','2017-02-16 03:05:56',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Livrée','2017-02-16 03:05:56','2017-02-15 23:05:56',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0016 classée Livrée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(288,NULL,1,'2017-02-16 03:06:01','2017-02-16 03:06:01',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Facturée','2017-02-16 03:06:01','2017-02-15 23:06:01',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0016 classée Facturée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(294,NULL,1,'2017-02-16 03:53:04','2017-02-16 03:53:04',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 03:53:04','2017-02-15 23:53:04',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(295,NULL,1,'2017-02-16 03:58:08','2017-02-16 03:58:08',40,'AC_OTH_AUTO','Expédition SH1702-0002 validée','2017-02-16 03:58:08','2017-02-15 23:58:08',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Expédition SH1702-0002 validée\nAuteur: admin',3,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(296,NULL,1,'2017-02-16 04:12:29','2017-02-16 04:12:29',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:12:29','2017-02-16 00:12:29',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(297,NULL,1,'2017-02-16 04:14:20','2017-02-16 04:14:20',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:14:20','2017-02-16 00:14:20',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(298,NULL,1,'2017-02-16 01:44:58','2017-02-16 01:44:58',40,'AC_OTH_AUTO','Proposal PR1702-0009 validated','2017-02-16 01:44:58','2017-02-16 00:44:58',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0009 validated\nAuthor: aeinstein',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(299,NULL,1,'2017-02-16 01:45:44','2017-02-16 01:45:44',40,'AC_OTH_AUTO','Proposal PR1702-0010 validated','2017-02-16 01:45:44','2017-02-16 00:45:44',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0010 validated\nAuthor: demo',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(300,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0011 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0011 validated\nAuthor: aeinstein',13,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(301,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0012 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,3,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0012 validated\nAuthor: demo',14,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(302,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0013 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0013 validated\nAuthor: demo',15,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(303,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0014 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0014 validated\nAuthor: demo',16,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(304,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0015 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0015 validated\nAuthor: aeinstein',17,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(305,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0016 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0016 validated\nAuthor: demo',18,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(306,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0017 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0017 validated\nAuthor: demo',19,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(307,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0018 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0018 validated\nAuthor: aeinstein',20,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(308,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0019 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0019 validated\nAuthor: aeinstein',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(309,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0020 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0020 validated\nAuthor: aeinstein',22,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(310,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0021 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0021 validated\nAuthor: demo',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(311,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0022 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0022 validated\nAuthor: demo',24,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(312,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0023 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',1,NULL,NULL,3,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0023 validated\nAuthor: aeinstein',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(313,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0024 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0024 validated\nAuthor: demo',26,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(314,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0025 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',1,NULL,NULL,6,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0025 validated\nAuthor: aeinstein',27,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(315,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0026 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0026 validated\nAuthor: demo',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(316,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0027 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0027 validated\nAuthor: demo',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(317,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0028 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0028 validated\nAuthor: demo',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(318,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0029 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',1,NULL,NULL,11,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0029 validated\nAuthor: aeinstein',31,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(319,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0030 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0030 validated\nAuthor: demo',32,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(320,NULL,1,'2017-02-16 04:46:31','2017-02-16 04:46:31',40,'AC_OTH_AUTO','Proposition PR1702-0026 signée','2017-02-16 04:46:31','2017-02-16 00:46:31',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0026 signée\nAuteur: admin',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(321,NULL,1,'2017-02-16 04:46:37','2017-02-16 04:46:37',40,'AC_OTH_AUTO','Proposition PR1702-0027 signée','2017-02-16 04:46:37','2017-02-16 00:46:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0027 signée\nAuteur: admin',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(322,NULL,1,'2017-02-16 04:46:42','2017-02-16 04:46:42',40,'AC_OTH_AUTO','Proposition PR1702-0028 refusée','2017-02-16 04:46:42','2017-02-16 00:46:42',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0028 refusée\nAuteur: admin',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(323,NULL,1,'2017-02-16 04:47:09','2017-02-16 04:47:09',40,'AC_OTH_AUTO','Proposition PR1702-0019 validée','2017-02-16 04:47:09','2017-02-16 00:47:09',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0019 validée\nAuteur: admin',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(324,NULL,1,'2017-02-16 04:47:25','2017-02-16 04:47:25',40,'AC_OTH_AUTO','Proposition PR1702-0023 signée','2017-02-16 04:47:25','2017-02-16 00:47:25',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0023 signée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(325,NULL,1,'2017-02-16 04:47:29','2017-02-16 04:47:29',40,'AC_OTH_AUTO','Proposition PR1702-0023 classée payée','2017-02-16 04:47:29','2017-02-16 00:47:29',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0023 classée payée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(326,NULL,1,'2017-02-17 16:07:18','2017-02-17 16:07:18',40,'AC_OTH_AUTO','Proposition PR1702-0021 validée','2017-02-17 16:07:18','2017-02-17 12:07:18',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0021 validée\nAuteur: admin',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(327,NULL,1,'2017-05-12 13:53:44','2017-05-12 13:53:44',40,'AC_OTH_AUTO','Email sent by MyBigCompany To Einstein','2017-05-12 13:53:44','2017-05-12 09:53:44',12,NULL,NULL,11,12,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): Einstein <genius@example.com>
\nBcc: Einstein <genius@example.com>
\nEMail topic: Test
\nEmail body:
\nTest\nAuthor: admin',11,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(328,NULL,1,'2017-08-29 22:39:09','2017-08-29 22:39:09',40,'AC_OTH_AUTO','Invoice FA1601-0024 validated','2017-08-29 22:39:09','2017-08-29 18:39:09',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice FA1601-0024 validated\nAuthor: admin',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(329,NULL,1,'2019-09-26 13:38:11','2019-09-26 13:38:11',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:38:11','2019-09-26 11:38:11',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(330,NULL,1,'2019-09-26 13:49:21','2019-09-26 13:49:21',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:49:21','2019-09-26 11:49:21',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(331,NULL,1,'2019-09-26 17:33:37','2019-09-26 17:33:37',40,'AC_BILL_VALIDATE','Invoice FA1909-0025 validated','2019-09-26 17:33:37','2019-09-26 15:33:37',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1909-0025 validated',218,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(333,NULL,1,'2019-09-27 16:54:30','2019-09-27 16:54:30',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0031 validated','2019-09-27 16:54:30','2019-09-27 14:54:30',12,NULL,4,7,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0031 validated',10,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(335,NULL,1,'2019-09-27 17:08:59','2019-09-27 17:08:59',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0032 validated','2019-09-27 17:08:59','2019-09-27 15:08:59',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0032 validated',33,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(337,NULL,1,'2019-09-27 17:13:13','2019-09-27 17:13:13',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0033 validated','2019-09-27 17:13:13','2019-09-27 15:13:13',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 validated',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(338,NULL,1,'2019-09-27 17:53:31','2019-09-27 17:53:31',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 17:53:31','2019-09-27 15:53:31',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(339,NULL,1,'2019-09-27 18:15:00','2019-09-27 18:15:00',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:15:00','2019-09-27 16:15:00',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(340,NULL,1,'2019-09-27 18:40:32','2019-09-27 18:40:32',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:40:32','2019-09-27 16:40:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(341,NULL,1,'2019-09-27 19:16:07','2019-09-27 19:16:07',40,'AC_PRODUCT_CREATE','Product ppp created','2019-09-27 19:16:07','2019-09-27 17:16:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp created',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(342,NULL,1,'2019-09-27 19:18:01','2019-09-27 19:18:01',40,'AC_PRODUCT_MODIFY','Product ppp modified','2019-09-27 19:18:01','2019-09-27 17:18:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp modified',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(343,NULL,1,'2019-09-27 19:31:45','2019-09-27 19:31:45',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:31:45','2019-09-27 17:31:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(344,NULL,1,'2019-09-27 19:32:12','2019-09-27 19:32:12',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:32:12','2019-09-27 17:32:12',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(345,NULL,1,'2019-09-27 19:38:30','2019-09-27 19:38:30',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:30','2019-09-27 17:38:30',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(346,NULL,1,'2019-09-27 19:38:37','2019-09-27 19:38:37',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:37','2019-09-27 17:38:37',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(347,NULL,1,'2019-09-30 15:49:52',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #15ff11cay39skiaa] New message','2019-09-30 15:49:52','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'dfsdfds',2,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(348,NULL,1,'2019-10-01 13:48:36','2019-10-01 13:48:36',40,'AC_PROJECT_MODIFY','Project PJ1607-0001 modified','2019-10-01 13:48:36','2019-10-01 11:48:36',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1607-0001 modified\nTask: PJ1607-0001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(349,NULL,1,'2019-10-04 10:10:25','2019-10-04 10:10:25',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:10:25','2019-10-04 08:10:25',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(350,NULL,1,'2019-10-04 10:10:47','2019-10-04 10:10:47',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:10:47','2019-10-04 08:10:47',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(351,NULL,1,'2019-10-04 10:26:49','2019-10-04 10:26:49',40,'AC_BILL_UNVALIDATE','Invoice FA6801-0010 go back to draft status','2019-10-04 10:26:49','2019-10-04 08:26:49',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 go back to draft status',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(352,NULL,1,'2019-10-04 10:27:00','2019-10-04 10:27:00',40,'AC_BILL_VALIDATE','Invoice FA6801-0010 validated','2019-10-04 10:27:00','2019-10-04 08:27:00',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 validated',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(353,NULL,1,'2019-10-04 10:28:14','2019-10-04 10:28:14',40,'AC_BILL_PAYED','Invoice FA6801-0010 changed to paid','2019-10-04 10:28:14','2019-10-04 08:28:14',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 changed to paid',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(354,NULL,1,'2019-10-04 10:29:22','2019-10-04 10:29:22',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:29:22','2019-10-04 08:29:22',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(355,NULL,1,'2019-10-04 10:29:41','2019-10-04 10:29:41',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI1601-0002 go back to draft status','2019-10-04 10:29:41','2019-10-04 08:29:41',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 go back to draft status',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(356,NULL,1,'2019-10-04 10:31:30','2019-10-04 10:31:30',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:31:30','2019-10-04 08:31:30',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(357,NULL,1,'2019-10-04 16:56:21',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 16:56:21','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(358,NULL,1,'2019-10-04 17:08:04',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:08:04','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'ddddd',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(359,NULL,1,'2019-10-04 17:25:05',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:25:05','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(360,NULL,1,'2019-10-04 17:26:14',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:26:14','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(361,NULL,1,'2019-10-04 17:30:10',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:30:10','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(362,NULL,1,'2019-10-04 17:51:43',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:51:43','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(363,NULL,1,'2019-10-04 17:52:02',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:02','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(364,NULL,1,'2019-10-04 17:52:17',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:17','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(365,NULL,1,'2019-10-04 17:52:39',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:39','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(366,NULL,1,'2019-10-04 17:52:53',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:53','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(367,NULL,1,'2019-10-04 17:53:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:13','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(368,NULL,1,'2019-10-04 17:53:26',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:26','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(369,NULL,1,'2019-10-04 17:53:48',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:48','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(370,NULL,1,'2019-10-04 17:54:09',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:09','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(371,NULL,1,'2019-10-04 17:54:28',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:28','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(372,NULL,1,'2019-10-04 17:55:43',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:55:43','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(373,NULL,1,'2019-10-04 17:56:01',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:56:01','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(374,NULL,1,'2019-10-04 18:00:32',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:32','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(375,NULL,1,'2019-10-04 18:00:58',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:58','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(376,NULL,1,'2019-10-04 18:11:30',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:11:30','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(377,NULL,1,'2019-10-04 18:12:02',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:12:02','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fffffff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(378,NULL,1,'2019-10-04 18:49:30',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:49:30','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(379,NULL,1,'2019-10-04 19:00:22',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:00:22','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(380,NULL,1,'2019-10-04 19:24:20','2019-10-04 19:24:20',40,'AC_PROPAL_SENTBYMAIL','Email sent by Alice Adminson To NLTechno','2019-10-04 19:24:20','2019-10-04 17:24:20',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSender: Alice Adminson <aadminson@example.com>
\nReceiver(s): NLTechno <notanemail@nltechno.com>
\nEmail topic: Envoi de la proposition commerciale PR1909-0032
\nEmail body:
\nHello
\r\n
\r\nVeuillez trouver, ci-joint, la proposition commerciale PR1909-0032
\r\n
\r\n
\r\nSincerely
\r\n
\r\nAlice - 123
\n
\nAttached files and documents: PR1909-0032.pdf',33,'propal',NULL,'Envoi de la proposition commerciale PR1909-0032','Alice Adminson ',NULL,'NLTechno ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(381,NULL,1,'2019-10-04 19:30:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:30:13','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(382,NULL,1,'2019-10-04 19:32:55',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:32:55','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'uuuuuu\n\nAttached files and documents: Array',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(383,NULL,1,'2019-10-04 19:37:16',NULL,50,'TICKET_MSG','','2019-10-04 19:37:16','2020-06-12 17:12:24',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,100,'',NULL,NULL,'f\n\nFichiers et documents joints: dolihelp.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(384,NULL,1,'2019-10-04 19:39:07',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:39:07','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaafff\n\nAttached files and documents: dolibarr.gif;doliadmin.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(385,NULL,1,'2019-10-07 12:17:07','2019-10-07 12:17:07',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:07','2019-10-07 10:17:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',17,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(386,NULL,1,'2019-10-07 12:17:32','2019-10-07 12:17:32',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:32','2019-10-07 10:17:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',18,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(387,NULL,1,'2019-10-08 19:21:07','2019-10-08 19:21:07',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-10-08 19:21:07','2019-10-08 17:21:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(388,NULL,1,'2019-10-08 21:01:07','2019-10-08 21:01:07',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-10-08 21:01:07','2019-10-08 19:01:07',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(389,NULL,1,'2019-10-08 21:01:22','2019-10-08 21:01:22',40,'AC_MEMBER_MODIFY','Member doe john modified','2019-10-08 21:01:22','2019-10-08 19:01:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(390,NULL,1,'2019-10-08 21:01:45','2019-10-08 21:01:45',40,'AC_MEMBER_MODIFY','Member smith smith modified','2019-10-08 21:01:45','2019-10-08 19:01:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(391,NULL,1,'2019-10-08 21:02:18','2019-10-08 21:02:18',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2019-10-08 21:02:18','2019-10-08 19:02:18',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(392,NULL,1,'2019-11-28 15:54:46','2019-11-28 15:54:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1911-0005 validated','2019-11-28 15:54:47','2019-11-28 11:54:47',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1911-0005 validated',21,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(393,NULL,1,'2019-11-28 16:33:35','2019-11-28 16:33:35',40,'AC_PRODUCT_CREATE','Product FR-CAR created','2019-11-28 16:33:35','2019-11-28 12:33:35',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR created',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(394,NULL,1,'2019-11-28 16:34:08','2019-11-28 16:34:08',40,'AC_PRODUCT_DELETE','Product ppp deleted','2019-11-28 16:34:08','2019-11-28 12:34:08',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp deleted',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(395,NULL,1,'2019-11-28 16:34:33','2019-11-28 16:34:33',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:33','2019-11-28 12:34:33',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(396,NULL,1,'2019-11-28 16:34:46','2019-11-28 16:34:46',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:46','2019-11-28 12:34:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(397,NULL,1,'2019-11-28 16:36:56','2019-11-28 16:36:56',40,'AC_PRODUCT_MODIFY','Product POS-CAR modified','2019-11-28 16:36:56','2019-11-28 12:36:56',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(398,NULL,1,'2019-11-28 16:37:36','2019-11-28 16:37:36',40,'AC_PRODUCT_CREATE','Product POS-APPLE created','2019-11-28 16:37:36','2019-11-28 12:37:36',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE created',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(399,NULL,1,'2019-11-28 16:37:58','2019-11-28 16:37:58',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 16:37:58','2019-11-28 12:37:58',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(400,NULL,1,'2019-11-28 16:38:44','2019-11-28 16:38:44',40,'AC_PRODUCT_CREATE','Product POS-KIWI created','2019-11-28 16:38:44','2019-11-28 12:38:44',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-KIWI created',26,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(401,NULL,1,'2019-11-28 16:39:21','2019-11-28 16:39:21',40,'AC_PRODUCT_CREATE','Product POS-PEACH created','2019-11-28 16:39:21','2019-11-28 12:39:21',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-PEACH created',27,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(402,NULL,1,'2019-11-28 16:39:58','2019-11-28 16:39:58',40,'AC_PRODUCT_CREATE','Product POS-ORANGE created','2019-11-28 16:39:58','2019-11-28 12:39:58',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-ORANGE created',28,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(403,NULL,1,'2019-11-28 17:00:28','2019-11-28 17:00:28',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2019-11-28 17:00:28','2019-11-28 13:00:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(404,NULL,1,'2019-11-28 17:00:46','2019-11-28 17:00:46',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 17:00:46','2019-11-28 13:00:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(405,NULL,1,'2019-11-28 17:01:57','2019-11-28 17:01:57',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 17:01:57','2019-11-28 13:01:57',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(406,NULL,1,'2019-11-28 17:03:14','2019-11-28 17:03:14',40,'AC_PRODUCT_CREATE','Product POS-Eggs created','2019-11-28 17:03:14','2019-11-28 13:03:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs created',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(407,NULL,1,'2019-11-28 17:04:17','2019-11-28 17:04:17',40,'AC_PRODUCT_MODIFY','Product POS-Eggs modified','2019-11-28 17:04:17','2019-11-28 13:04:17',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs modified',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(408,NULL,1,'2019-11-28 17:09:14','2019-11-28 17:09:14',40,'AC_PRODUCT_CREATE','Product POS-Chips created','2019-11-28 17:09:14','2019-11-28 13:09:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips created',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(409,NULL,1,'2019-11-28 17:09:54','2019-11-28 17:09:54',40,'AC_PRODUCT_MODIFY','Product POS-Chips modified','2019-11-28 17:09:54','2019-11-28 13:09:54',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips modified',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(410,NULL,1,'2019-11-28 18:46:20','2019-11-28 18:46:20',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 18:46:20','2019-11-28 14:46:20',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(411,NULL,1,'2019-11-28 18:59:29','2019-11-28 18:59:29',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 18:59:29','2019-11-28 14:59:29',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(412,NULL,1,'2019-11-28 19:02:01','2019-11-28 19:02:01',40,'AC_PRODUCT_MODIFY','Product POS-CARROT modified','2019-11-28 19:02:01','2019-11-28 15:02:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-CARROT modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(413,NULL,1,'2019-11-28 19:09:50','2019-11-28 19:09:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:09:50','2019-11-28 15:09:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(414,NULL,1,'2019-11-28 19:12:50','2019-11-28 19:12:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:12:50','2019-11-28 15:12:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(415,NULL,1,'2019-11-29 12:46:29','2019-11-29 12:46:29',40,'AC_TICKET_CREATE','Ticket TS1911-0004 created','2019-11-29 12:46:29','2019-11-29 08:46:29',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 created',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(416,NULL,1,'2019-11-29 12:46:34','2019-11-29 12:46:34',40,'AC_TICKET_MODIFY','Ticket TS1911-0004 read by Alice Adminson','2019-11-29 12:46:34','2019-11-29 08:46:34',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 read by Alice Adminson',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(417,NULL,1,'2019-11-29 12:46:47','2019-11-29 12:46:47',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0004 assigned','2019-11-29 12:46:47','2019-11-29 08:46:47',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 assigned\nOld user: None\nNew user: Commerson Charle1',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(418,NULL,1,'2019-11-29 12:47:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #5gvo9bsjri55zef9] New message','2019-11-29 12:47:13','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'Where do you want to install Dolibarr ?
\r\nOn-Premise or on the Cloud ?',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(419,NULL,1,'2019-11-29 12:50:45','2019-11-29 12:50:45',40,'AC_TICKET_CREATE','Ticket TS1911-0005 créé','2019-11-29 12:50:45','2019-11-29 08:50:45',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nTicket TS1911-0005 créé',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(420,NULL,1,'2019-11-29 12:52:32','2019-11-29 12:52:32',40,'AC_TICKET_MODIFY','Ticket TS1911-0005 read by Alice Adminson','2019-11-29 12:52:32','2019-11-29 08:52:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 read by Alice Adminson',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(421,NULL,1,'2019-11-29 12:52:53','2019-11-29 12:52:53',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0005 assigned','2019-11-29 12:52:53','2019-11-29 08:52:53',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 assigned\nOld user: None\nNew user: Commerson Charle1',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(422,NULL,1,'2019-11-29 12:54:04',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:54:04','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'Hi.
\r\nThanks for your interest in using Dolibarr ERP CRM.
\r\nI need more information to give you the correct answer : Where do you want to install Dolibarr. On premise or on Cloud',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(423,NULL,1,'2019-11-29 12:54:46',NULL,50,'TICKET_MSG','','2019-11-29 12:54:46','2020-06-12 17:12:24',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,100,'',NULL,NULL,'I need it On-Premise.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(424,NULL,1,'2019-11-29 12:55:42',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:55:42','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'When used on-premise, you can download and install Dolibarr yourself from ou web portal: https://www.dolibarr.org
\r\nIt is completely free.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(425,NULL,1,'2019-11-29 12:55:48','2019-11-29 12:55:48',40,'AC_TICKET_CLOSE','Ticket TS1911-0005 closed','2019-11-29 12:55:48','2019-11-29 08:55:48',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 closed',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(426,NULL,1,'2019-11-29 12:56:47','2019-11-29 12:56:47',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2019-11-29 12:56:47','2019-11-29 08:56:47',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(427,NULL,1,'2019-11-29 12:57:14','2019-11-29 12:57:14',40,'AC_BOM_VALIDATE','BOM validated','2019-11-29 12:57:14','2019-11-29 08:57:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(428,NULL,1,'2019-12-20 16:40:14','2019-12-20 16:40:14',40,'AC_MO_DELETE','MO deleted','2019-12-20 16:40:14','2019-12-20 12:40:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',3,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(429,NULL,1,'2019-12-20 17:00:43','2019-12-20 17:00:43',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:43','2019-12-20 13:00:43',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',7,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(430,NULL,1,'2019-12-20 17:00:56','2019-12-20 17:00:56',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:56','2019-12-20 13:00:56',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',6,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(431,NULL,1,'2019-12-20 20:00:03','2019-12-20 20:00:03',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:00:03','2019-12-20 16:00:03',12,NULL,6,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',1,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(432,NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2019-12-20 16:22:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',10,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(433,NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2019-12-20 16:22:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',12,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(434,NULL,1,'2019-12-20 20:22:20','2019-12-20 20:22:20',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:20','2019-12-20 16:22:20',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',9,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(435,NULL,1,'2019-12-20 20:27:07','2019-12-20 20:27:07',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:27:07','2019-12-20 16:27:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',13,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(436,NULL,1,'2019-12-20 20:42:42','2019-12-20 20:42:42',40,'AC_ORDER_VALIDATE','Order CO7001-0027 validated','2019-12-20 20:42:42','2019-12-20 16:42:42',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0027 validated',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(437,NULL,1,'2019-12-20 20:46:25','2019-12-20 20:46:25',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:46:25','2019-12-20 16:46:25',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(438,NULL,1,'2019-12-20 20:46:45','2019-12-20 20:46:45',40,'AC_ORDER_SUPPLIER_CLASSIFY_BILLED','Purchase Order CF1007-0001 set billed','2019-12-20 20:46:45','2019-12-20 16:46:45',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 set billed',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(439,NULL,1,'2019-12-20 20:47:02','2019-12-20 20:47:02',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:02','2019-12-20 16:47:02',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(440,NULL,1,'2019-12-20 20:47:44','2019-12-20 20:47:44',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:44','2019-12-20 16:47:44',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(441,NULL,1,'2019-12-20 20:47:53','2019-12-20 20:47:53',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:53','2019-12-20 16:47:53',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(442,NULL,1,'2019-12-20 20:48:05','2019-12-20 20:48:05',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:48:05','2019-12-20 16:48:05',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(443,NULL,1,'2019-12-20 20:48:45','2019-12-20 20:48:45',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0016 classified billed','2019-12-20 20:48:45','2019-12-20 16:48:45',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0016 classified billed',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(444,NULL,1,'2019-12-20 20:48:55','2019-12-20 20:48:55',40,'AC_ORDER_CLOSE','Order CO7001-0018 classified delivered','2019-12-20 20:48:55','2019-12-20 16:48:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0018 classified delivered',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(445,NULL,1,'2019-12-20 20:49:43','2019-12-20 20:49:43',40,'AC_PROPAL_CLASSIFY_BILLED','Proposal PR1702-0027 classified billed','2019-12-20 20:49:43','2019-12-20 16:49:43',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 classified billed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(446,NULL,1,'2019-12-20 20:49:54','2019-12-20 20:49:54',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:49:54','2019-12-20 16:49:54',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(447,NULL,1,'2019-12-20 20:50:14','2019-12-20 20:50:14',40,'AC_PROPAL_CLOSE_REFUSED','Proposal PR1702-0027 refused','2019-12-20 20:50:14','2019-12-20 16:50:14',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 refused',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(448,NULL,1,'2019-12-20 20:50:23','2019-12-20 20:50:23',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:50:23','2019-12-20 16:50:23',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(449,NULL,1,'2019-12-21 17:18:22','2019-12-21 17:18:22',40,'AC_BOM_CLOSE','BOM disabled','2019-12-21 17:18:22','2019-12-21 13:18:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(450,NULL,1,'2019-12-21 17:18:38','2019-12-21 17:18:38',40,'AC_MEMBER_RESILIATE','Member Vick Smith terminated','2019-12-21 17:18:38','2019-12-21 13:18:38',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith terminated\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(451,NULL,1,'2019-12-21 19:46:33','2019-12-21 19:46:33',40,'AC_PROJECT_CREATE','Project PJ1912-0005 created','2019-12-21 19:46:33','2019-12-21 15:46:33',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 created\nProject: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(452,NULL,1,'2019-12-21 19:47:03','2019-12-21 19:47:03',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:03','2019-12-21 15:47:03',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(453,NULL,1,'2019-12-21 19:47:24','2019-12-21 19:47:24',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:24','2019-12-21 15:47:24',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(454,NULL,1,'2019-12-21 19:47:52','2019-12-21 19:47:52',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:52','2019-12-21 15:47:52',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(455,NULL,1,'2019-12-21 19:48:06','2019-12-21 19:48:06',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:48:06','2019-12-21 15:48:06',12,NULL,10,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(456,NULL,1,'2019-12-21 19:49:28','2019-12-21 19:49:28',40,'AC_PROJECT_CREATE','Project PJ1912-0006 created','2019-12-21 19:49:28','2019-12-21 15:49:28',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 created\nProject: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(457,NULL,1,'2019-12-21 19:52:12','2019-12-21 19:52:12',40,'AC_PROJECT_CREATE','Project PJ1912-0007 created','2019-12-21 19:52:12','2019-12-21 15:52:12',12,NULL,12,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0007 created\nProject: PJ1912-0007',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(458,NULL,1,'2019-12-21 19:53:21','2019-12-21 19:53:21',40,'AC_PROJECT_CREATE','Project PJ1912-0008 created','2019-12-21 19:53:21','2019-12-21 15:53:21',12,NULL,13,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 created\nProject: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(459,NULL,1,'2019-12-21 19:53:42','2019-12-21 19:53:42',40,'AC_PROJECT_MODIFY','Project PJ1912-0008 modified','2019-12-21 19:53:42','2019-12-21 15:53:42',12,NULL,13,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 modified\nTask: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(460,NULL,1,'2019-12-21 19:55:23','2019-12-21 19:55:23',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 19:55:23','2019-12-21 15:55:23',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(461,NULL,1,'2019-12-21 20:10:21','2019-12-21 20:10:21',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 20:10:21','2019-12-21 16:10:21',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(462,NULL,1,'2019-12-11 10:00:00','2019-12-11 10:00:00',5,'AC_RDV','Meeting with all employees','2019-12-21 20:29:32','2019-12-21 16:29:32',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(463,NULL,1,'2019-12-06 00:00:00',NULL,11,'AC_INT','Intervention on customer site','2019-12-21 20:30:11','2019-12-21 16:30:11',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(464,NULL,1,'2019-12-23 14:16:59','2019-12-23 14:16:59',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:16:59','2019-12-23 10:16:59',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(465,NULL,1,'2019-12-23 14:17:18','2019-12-23 14:17:18',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:17:18','2019-12-23 10:17:18',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(466,NULL,1,'2019-11-23 14:25:00',NULL,50,'AC_OTH','Test','2019-12-23 17:25:14','2019-12-23 13:25:14',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',NULL,NULL,'18/11 17h06 : Message laissé. Me rappeler pour m'en dire plus. 
\r\n
\r\n20/11 10h17 "A rappeler suite au msg laissé le 14/11, dit que c'est urgent"
\r\n12h22 : message laissé. Je lui envoie un sms
\r\n
\r\n"Déclaration de sinistre originale" : constat de ce qui s'est passé.
\r\nElle envoie le chèque de solde dès demain.
\r\n
\r\n3/12 : Elle préfère avoir plus d'infos sur le sinistre pour l'assurance.
\r\nCourrier envoyé le 4/12/19 par mail et par courrier postal
\r\n
\r\n6/12 15h02 : ont obtenu le feu vert de l'assurance.
\r\nOn bloque 16/12 PM à partir de 14h30. ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(467,NULL,1,'2020-01-01 14:35:47','2020-01-01 14:35:47',40,'AC_MEMBER_VALIDATE','Adhérent aze aze validé','2020-01-01 14:35:47','2020-01-01 10:35:47',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent aze aze validé\nAdhérent: aze aze\nType: Board members',5,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(468,NULL,1,'2020-01-01 14:50:59','2020-01-01 14:50:59',40,'AC_MEMBER_VALIDATE','Adhérent azr azr validé','2020-01-01 14:50:59','2020-01-01 10:50:59',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azr azr validé\nAdhérent: azr azr\nType: Board members',6,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(469,NULL,1,'2020-01-01 15:00:16','2020-01-01 15:00:16',40,'AC_MEMBER_VALIDATE','Adhérent azt azt validé','2020-01-01 15:00:16','2020-01-01 11:00:16',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azt azt validé\nAdhérent: azt azt\nType: Board members',7,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(470,NULL,1,'2020-01-01 15:08:20','2020-01-01 15:08:20',40,'AC_MEMBER_VALIDATE','Adhérent azu azu validé','2020-01-01 15:08:20','2020-01-01 11:08:20',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azu azu validé\nAdhérent: azu azu\nType: Board members',8,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(471,NULL,1,'2020-01-01 15:27:24','2020-01-01 15:27:24',40,'AC_MEMBER_VALIDATE','Adhérent azi azi validé','2020-01-01 15:27:24','2020-01-01 11:27:24',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azi azi validé\nAdhérent: azi azi\nType: Board members',9,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(472,NULL,1,'2020-01-01 15:36:29','2020-01-01 15:36:29',40,'AC_MEMBER_VALIDATE','Adhérent azo azo validé','2020-01-01 15:36:29','2020-01-01 11:36:29',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azo azo validé\nAdhérent: azo azo\nType: Board members',10,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(473,NULL,1,'2020-01-01 15:44:25','2020-01-01 15:44:25',40,'AC_MEMBER_VALIDATE','Adhérent azp azp validé','2020-01-01 15:44:25','2020-01-01 11:44:25',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azp azp validé\nAdhérent: azp azp\nType: Board members',11,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(478,NULL,1,'2020-01-01 16:52:32','2020-01-01 16:52:32',40,'AC_MEMBER_VALIDATE','Adhérent azq azq validé','2020-01-01 16:52:32','2020-01-01 12:52:32',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azq azq validé\nAdhérent: azq azq\nType: Board members',12,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(483,NULL,1,'2020-01-01 17:49:05','2020-01-01 17:49:05',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 17:49:05','2020-01-01 13:49:05',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(484,NULL,1,'2020-01-01 17:50:41','2020-01-01 17:50:41',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 17:50:41','2020-01-01 13:50:41',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(485,NULL,1,'2020-01-01 17:50:44','2020-01-01 17:50:44',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 17:50:44','2020-01-01 13:50:44',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(486,NULL,1,'2020-01-01 17:51:22','2020-01-01 17:51:22',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 17:51:22','2020-01-01 13:51:22',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(487,NULL,1,'2020-01-01 20:17:00','2020-01-01 20:17:00',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:17:00','2020-01-01 16:17:00',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(488,NULL,1,'2020-01-01 20:17:46','2020-01-01 20:17:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:17:46','2020-01-01 16:17:46',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(489,NULL,1,'2020-01-01 20:17:51','2020-01-01 20:17:51',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:17:51','2020-01-01 16:17:51',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(490,NULL,1,'2020-01-01 20:20:22','2020-01-01 20:20:22',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:20:22','2020-01-01 16:20:22',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(491,NULL,1,'2020-01-01 20:20:31','2020-01-01 20:20:31',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:20:31','2020-01-01 16:20:31',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(492,NULL,1,'2020-01-01 20:21:35','2020-01-01 20:21:35',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 20:21:35','2020-01-01 16:21:35',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(493,NULL,1,'2020-01-01 20:21:42','2020-01-01 20:21:42',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:21:42','2020-01-01 16:21:42',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(494,NULL,1,'2020-01-01 20:21:55','2020-01-01 20:21:55',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:21:55','2020-01-01 16:21:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(495,NULL,1,'2020-01-01 20:23:02','2020-01-01 20:23:02',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0007 validated','2020-01-01 20:23:02','2020-01-01 16:23:02',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 validated',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(496,NULL,1,'2020-01-01 20:23:17','2020-01-01 20:23:17',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:23:17','2020-01-01 16:23:17',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(497,NULL,1,'2020-01-01 20:25:36','2020-01-01 20:25:36',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 20:25:36','2020-01-01 16:25:36',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(498,NULL,1,'2020-01-01 20:51:37','2020-01-01 20:51:37',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0002 validated','2020-01-01 20:51:37','2020-01-01 16:51:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 validated',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(499,NULL,1,'2020-01-01 20:51:48','2020-01-01 20:51:48',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0002 changed to paid','2020-01-01 20:51:48','2020-01-01 16:51:48',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 changed to paid',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(500,NULL,1,'2020-01-01 21:02:39','2020-01-01 21:02:39',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:02:39','2020-01-01 17:02:39',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(501,NULL,1,'2020-01-01 21:03:01','2020-01-01 21:03:01',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:03:01','2020-01-01 17:03:01',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(502,NULL,1,'2020-01-01 21:11:10','2020-01-01 21:11:10',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:11:10','2020-01-01 17:11:10',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(503,NULL,1,'2020-01-01 21:20:07','2020-01-01 21:20:07',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:20:07','2020-01-01 17:20:07',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(504,NULL,1,'2020-01-01 21:21:28','2020-01-01 21:21:28',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 21:21:28','2020-01-01 17:21:28',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(505,NULL,1,'2020-01-01 22:06:30','2020-01-01 22:06:30',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 22:06:31','2020-01-01 18:06:31',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(506,NULL,1,'2020-01-01 23:54:16','2020-01-01 23:54:16',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-01 23:54:16','2020-01-01 19:54:16',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(507,NULL,1,'2020-01-02 20:49:34','2020-01-02 20:49:34',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2020-01-02 20:49:34','2020-01-02 16:49:34',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(508,NULL,1,'2020-01-02 23:02:35','2020-01-02 23:02:35',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-02 23:02:35','2020-01-02 19:02:35',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(509,NULL,1,'2020-01-02 23:45:01','2020-01-02 23:45:01',40,'AC_BOM_REOPEN','BOM reopen','2020-01-02 23:45:01','2020-01-02 19:45:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(511,NULL,1,'2020-01-02 23:57:42','2020-01-02 23:57:42',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-02 23:57:42','2020-01-02 19:57:42',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(512,NULL,1,'2020-01-03 13:33:54','2020-01-03 13:33:54',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-03 13:33:54','2020-01-03 09:33:54',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(513,NULL,1,'2020-01-03 13:34:11','2020-01-03 13:34:11',40,'AC_BOM_VALIDATE','BOM validated','2020-01-03 13:34:11','2020-01-03 09:34:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(514,NULL,1,'2020-01-03 13:35:45','2020-01-03 13:35:45',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 13:35:45','2020-01-03 09:35:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(515,NULL,1,'2020-01-03 14:10:41','2020-01-03 14:10:41',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 14:10:41','2020-01-03 10:10:41',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(516,NULL,1,'2020-01-06 00:39:58','2020-01-06 00:39:58',40,'AC_COMPANY_CREATE','Patient créé','2020-01-06 00:39:58','2020-01-05 20:39:58',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPatient créé',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(517,NULL,1,'2020-01-06 00:49:06','2020-01-06 00:49:06',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-06 00:49:06','2020-01-05 20:49:06',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(518,NULL,1,'2020-01-06 06:50:05','2020-01-06 06:50:05',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-06 06:50:05','2020-01-06 02:50:05',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(519,NULL,1,'2020-01-06 20:52:28','2020-01-06 20:52:28',40,'AC_OTH_AUTO','Consultation 2 recorded (Patient)','2020-01-06 20:52:28','2020-01-06 16:52:28',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Consultation 2 recorded (Patient)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(520,NULL,1,'2020-01-07 20:25:02','2020-01-07 20:25:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 20:25:02','2020-01-07 16:25:02',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(521,NULL,1,'2020-01-07 21:12:37','2020-01-07 21:12:37',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:12:37','2020-01-07 17:12:37',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(522,NULL,1,'2020-01-07 21:13:00','2020-01-07 21:13:00',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:00','2020-01-07 17:13:00',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(523,NULL,1,'2020-01-07 21:13:49','2020-01-07 21:13:49',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:49','2020-01-07 17:13:49',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(524,NULL,1,'2020-01-07 21:46:58','2020-01-07 21:46:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:46:58','2020-01-07 17:46:58',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(525,NULL,1,'2020-01-07 21:52:34','2020-01-07 21:52:34',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:52:34','2020-01-07 17:52:34',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(526,NULL,1,'2020-01-07 21:53:44','2020-01-07 21:53:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:44','2020-01-07 17:53:44',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(527,NULL,1,'2020-01-07 21:53:58','2020-01-07 21:53:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:58','2020-01-07 17:53:58',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(528,NULL,1,'2020-01-07 21:54:12','2020-01-07 21:54:12',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:54:12','2020-01-07 17:54:12',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(529,NULL,1,'2020-01-07 22:00:55','2020-01-07 22:00:55',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:00:55','2020-01-07 18:00:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(530,NULL,1,'2020-01-07 22:39:52','2020-01-07 22:39:52',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:39:52','2020-01-07 18:39:52',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(531,NULL,1,'2020-01-07 23:09:04','2020-01-07 23:09:04',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:09:04','2020-01-07 19:09:04',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(532,NULL,1,'2020-01-07 23:39:09','2020-01-07 23:39:09',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:39:09','2020-01-07 19:39:09',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(533,NULL,1,'2020-01-07 23:43:06','2020-01-07 23:43:06',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:43:06','2020-01-07 19:43:06',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(534,NULL,1,'2020-01-07 23:50:40','2020-01-07 23:50:40',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:50:40','2020-01-07 19:50:40',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(535,NULL,1,'2020-01-07 23:51:27','2020-01-07 23:51:27',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:51:27','2020-01-07 19:51:27',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(536,NULL,1,'2020-01-08 00:25:23','2020-01-08 00:25:23',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:23','2020-01-07 20:25:23',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(537,NULL,1,'2020-01-08 00:25:43','2020-01-08 00:25:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:43','2020-01-07 20:25:43',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(538,NULL,1,'2020-01-08 00:29:24','2020-01-08 00:29:24',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:24','2020-01-07 20:29:24',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(539,NULL,1,'2020-01-08 00:29:43','2020-01-08 00:29:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:43','2020-01-07 20:29:43',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(540,NULL,1,'2020-01-08 01:09:15','2020-01-08 01:09:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:09:15','2020-01-07 21:09:15',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(541,NULL,1,'2020-01-08 01:15:02','2020-01-08 01:15:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:15:02','2020-01-07 21:15:02',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(542,NULL,1,'2020-01-08 01:17:16','2020-01-08 01:17:16',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:17:16','2020-01-07 21:17:16',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(543,NULL,1,'2020-01-08 05:31:44','2020-01-08 05:31:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 05:31:44','2020-01-08 01:31:44',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(544,NULL,1,'2020-01-08 05:39:46','2020-01-08 05:39:46',40,'AC_BOM_CLOSE','BOM disabled','2020-01-08 05:39:46','2020-01-08 01:39:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(545,NULL,1,'2020-01-08 05:39:50','2020-01-08 05:39:50',40,'AC_BOM_REOPEN','BOM reopen','2020-01-08 05:39:50','2020-01-08 01:39:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(546,NULL,1,'2020-01-08 06:06:50','2020-01-08 06:06:50',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 06:06:50','2020-01-08 02:06:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(547,NULL,1,'2020-01-08 19:34:53','2020-01-08 19:34:53',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:34:53','2020-01-08 15:34:53',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(548,NULL,1,'2020-01-08 19:40:27','2020-01-08 19:40:27',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-08 19:40:27','2020-01-08 15:40:27',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(549,NULL,1,'2020-01-08 19:40:46','2020-01-08 19:40:46',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-08 19:40:46','2020-01-08 15:40:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(550,NULL,1,'2020-01-08 19:40:59','2020-01-08 19:40:59',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:40:59','2020-01-08 15:40:59',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(551,NULL,1,'2020-01-08 19:41:11','2020-01-08 19:41:11',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:41:11','2020-01-08 15:41:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(552,NULL,1,'2020-01-08 19:41:49','2020-01-08 19:41:49',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:41:49','2020-01-08 15:41:49',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(553,NULL,1,'2020-01-08 20:12:55','2020-01-08 20:12:55',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-08 20:12:55','2020-01-08 16:12:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(554,NULL,1,'2020-01-08 20:21:22','2020-01-08 20:21:22',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:21:22','2020-01-08 16:21:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(555,NULL,1,'2020-01-08 20:41:19','2020-01-08 20:41:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:41:19','2020-01-08 16:41:19',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(556,NULL,1,'2020-01-08 22:25:19','2020-01-08 22:25:19',40,'AC_BOM_DELETE','BOM deleted','2020-01-08 22:25:19','2020-01-08 18:25:19',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM deleted',7,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(557,NULL,1,'2020-01-13 15:11:07','2020-01-13 15:11:07',40,'AC_MO_DELETE','MO_DELETEInDolibarr','2020-01-13 15:11:07','2020-01-13 11:11:07',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO_DELETEInDolibarr',25,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(558,NULL,1,'2020-01-13 15:11:54','2020-01-13 15:11:54',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-13 15:11:54','2020-01-13 11:11:54',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(559,NULL,1,'2020-01-13 15:13:19','2020-01-13 15:13:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:13:19','2020-01-13 11:13:19',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(560,NULL,1,'2020-01-13 15:14:15','2020-01-13 15:14:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:14:15','2020-01-13 11:14:15',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(561,NULL,1,'2020-01-13 15:29:30','2020-01-13 15:29:30',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:29:30','2020-01-13 11:29:30',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(562,NULL,1,'2020-01-13 17:19:24','2020-01-13 17:19:24',40,'AC_COMPANY_CREATE','Third party Italo created','2020-01-13 17:19:24','2020-01-13 13:19:24',12,NULL,NULL,30,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nThird party Italo created',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(563,NULL,1,'2020-01-15 16:27:15','2020-01-15 16:27:15',40,'AC_PROJECT_MODIFY','Project RMLL modified','2020-01-15 16:27:15','2020-01-15 12:27:15',12,NULL,5,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject RMLL modified\nTask: RMLL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(564,NULL,1,'2020-01-15 16:40:50','2020-01-15 16:40:50',40,'AC_PROJECT_MODIFY','Project PROJINDIAN modified','2020-01-15 16:40:50','2020-01-15 12:40:50',12,NULL,3,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PROJINDIAN modified\nTask: PROJINDIAN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(565,NULL,1,'2020-01-16 02:22:16','2020-01-16 02:22:16',40,'AC_BILL_VALIDATE','Invoice AC2001-0001 validated','2020-01-16 02:22:16','2020-01-16 01:22:16',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 validated',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(566,NULL,1,'2020-01-16 02:22:24','2020-01-16 02:22:24',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0001 go back to draft status','2020-01-16 02:22:24','2020-01-16 01:22:24',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 go back to draft status',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(567,NULL,1,'2020-01-16 02:33:27','2020-01-16 02:33:27',40,'AC_BILL_VALIDATE','Invoice AC2001-0002 validated','2020-01-16 02:33:27','2020-01-16 01:33:27',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 validated',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(568,NULL,1,'2020-01-16 02:36:48','2020-01-16 02:36:48',40,'AC_BILL_PAYED','Invoice AC2001-0002 changed to paid','2020-01-16 02:36:48','2020-01-16 01:36:48',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 changed to paid',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(569,NULL,1,'2020-01-16 02:42:12','2020-01-16 02:42:12',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0020 classified billed','2020-01-16 02:42:12','2020-01-16 01:42:12',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified billed',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(570,NULL,1,'2020-01-16 02:42:17','2020-01-16 02:42:17',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:17','2020-01-16 01:42:17',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(571,NULL,1,'2020-01-16 02:42:56','2020-01-16 02:42:56',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:56','2020-01-16 01:42:56',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(572,NULL,1,'2020-01-16 18:05:43','2020-01-16 18:05:43',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-16 18:05:43','2020-01-16 17:05:43',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(573,NULL,1,'2020-01-17 14:54:18','2020-01-17 14:54:18',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 14:54:18','2020-01-17 13:54:18',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(574,NULL,1,'2020-01-17 15:22:28','2020-01-17 15:22:28',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 15:22:28','2020-01-17 14:22:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(575,NULL,1,'2020-01-19 14:22:27','2020-01-19 14:22:27',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:22:27','2020-01-19 13:22:27',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(576,NULL,1,'2020-01-19 14:22:34','2020-01-19 14:22:34',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:22:34','2020-01-19 13:22:34',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(577,NULL,1,'2020-01-19 14:24:22','2020-01-19 14:24:22',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:24:22','2020-01-19 13:24:22',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(578,NULL,1,'2020-01-19 14:24:27','2020-01-19 14:24:27',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:24:27','2020-01-19 13:24:27',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(579,NULL,1,'2020-01-19 14:51:43','2020-01-19 14:51:43',40,'AC_BILL_VALIDATE','Invoice AC2001-0003 validated','2020-01-19 14:51:43','2020-01-19 13:51:43',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 validated',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(580,NULL,1,'2020-01-19 14:51:48','2020-01-19 14:51:48',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0003 go back to draft status','2020-01-19 14:51:48','2020-01-19 13:51:48',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 go back to draft status',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(581,NULL,1,'2020-01-19 15:01:26','2020-01-19 15:01:26',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:01:26','2020-01-19 14:01:26',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(582,NULL,1,'2020-01-19 15:04:37','2020-01-19 15:04:37',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:04:37','2020-01-19 14:04:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(583,NULL,1,'2020-01-19 15:04:53','2020-01-19 15:04:53',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:04:53','2020-01-19 14:04:53',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(584,NULL,1,'2020-01-19 15:09:14','2020-01-19 15:09:14',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:09:14','2020-01-19 14:09:14',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(585,NULL,1,'2020-01-19 15:13:07','2020-01-19 15:13:07',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:13:07','2020-01-19 14:13:07',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(586,NULL,1,'2020-01-20 12:20:11','2020-01-20 12:20:11',40,'AC_ORDER_SUPPLIER_CREATE','Order (PROV14) created','2020-01-20 12:20:11','2020-01-20 11:20:11',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder (PROV14) created',14,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(588,NULL,1,'2020-01-21 01:02:14','2020-01-21 01:02:14',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 2 for member Vick Smith added','2020-01-21 01:02:14','2020-01-21 00:02:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 2 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2013 - 07/17/2014',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(589,NULL,1,'2020-01-21 10:22:37','2020-01-21 10:22:37',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 3 for member Vick Smith added','2020-01-21 10:22:37','2020-01-21 09:22:37',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 3 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(590,NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 4 for member Vick Smith added','2020-01-21 10:23:17','2020-01-21 09:23:17',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 4 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(591,NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_VALIDATE','Invoice FA1707-0026 validated','2020-01-21 10:23:17','2020-01-21 09:23:17',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 validated',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(592,NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_PAYED','Invoice FA1707-0026 changed to paid','2020-01-21 10:23:17','2020-01-21 09:23:17',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 changed to paid',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(593,NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 5 for member Vick Smith added','2020-01-21 10:23:28','2020-01-21 09:23:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 5 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2018 - 07/17/2019',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(594,NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_VALIDATE','Invoice FA1807-0027 validated','2020-01-21 10:23:28','2020-01-21 09:23:28',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 validated',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(595,NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_PAYED','Invoice FA1807-0027 changed to paid','2020-01-21 10:23:28','2020-01-21 09:23:28',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 changed to paid',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(596,NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 6 for member Vick Smith added','2020-01-21 10:23:49','2020-01-21 09:23:49',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 6 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2019 - 07/17/2020',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(597,NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_VALIDATE','Invoice FA1907-0028 validated','2020-01-21 10:23:49','2020-01-21 09:23:49',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 validated',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(598,NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_PAYED','Invoice FA1907-0028 changed to paid','2020-01-21 10:23:49','2020-01-21 09:23:49',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 changed to paid',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(599,NULL,1,'2020-01-21 10:30:27','2020-01-21 10:30:27',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2020-01-21 10:30:27','2020-01-21 09:30:27',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(600,NULL,1,'2020-01-21 10:30:36','2020-01-21 10:30:36',40,'AC_MEMBER_MODIFY','Member doe john modified','2020-01-21 10:30:36','2020-01-21 09:30:36',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(601,NULL,1,'2020-01-21 10:30:42','2020-01-21 10:30:42',40,'AC_MEMBER_MODIFY','Member smith smith modified','2020-01-21 10:30:42','2020-01-21 09:30:42',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(602,NULL,1,'2020-01-21 10:30:57','2020-01-21 10:30:57',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2020-01-21 10:30:57','2020-01-21 09:30:57',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(603,NULL,1,'2020-06-12 10:00:00','2020-06-12 11:30:00',5,'AC_RDV','Meetings','2020-06-12 19:26:44','2020-06-12 17:26:44',12,NULL,3,NULL,NULL,0,12,1,NULL,0,0,-1,'Room 24',5400,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'),(604,NULL,1,'2020-06-01 10:00:00','2020-06-01 10:27:00',1,'AC_TEL','Called Mr X','2020-06-12 19:28:13','2020-06-12 17:28:25',12,12,3,NULL,NULL,0,12,1,NULL,0,0,100,NULL,1620,NULL,'Customer ask another call.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default'); /*!40000 ALTER TABLE `llx_actioncomm` ENABLE KEYS */; UNLOCK TABLES; @@ -346,7 +346,7 @@ DROP TABLE IF EXISTS `llx_actioncomm_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_actioncomm_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -377,7 +377,7 @@ CREATE TABLE `llx_actioncomm_reminder` ( `fk_user` int(11) NOT NULL, `offsetvalue` int(11) NOT NULL, `offsetunit` varchar(1) COLLATE utf8_unicode_ci NOT NULL, - `status` int(11) NOT NULL DEFAULT '0', + `status` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_actioncomm_reminder_unique` (`fk_user`,`typeremind`,`offsetvalue`,`offsetunit`), KEY `idx_actioncomm_reminder_rowid` (`rowid`), @@ -409,11 +409,11 @@ CREATE TABLE `llx_actioncomm_resources` ( `fk_element` int(11) NOT NULL, `answer_status` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `mandatory` smallint(6) DEFAULT NULL, - `transparency` smallint(6) DEFAULT '1', + `transparency` smallint(6) DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_actioncomm_resources` (`fk_actioncomm`,`element_type`,`fk_element`), KEY `idx_actioncomm_resources_fk_element` (`fk_element`) -) ENGINE=InnoDB AUTO_INCREMENT=482 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=485 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -422,7 +422,7 @@ CREATE TABLE `llx_actioncomm_resources` ( LOCK TABLES `llx_actioncomm_resources` WRITE; /*!40000 ALTER TABLE `llx_actioncomm_resources` DISABLE KEYS */; -INSERT INTO `llx_actioncomm_resources` VALUES (1,1,'user',1,NULL,NULL,1),(2,2,'user',1,NULL,NULL,1),(3,3,'user',1,NULL,NULL,1),(4,4,'user',1,NULL,NULL,1),(5,5,'user',1,NULL,NULL,1),(6,6,'user',1,NULL,NULL,1),(7,7,'user',1,NULL,NULL,1),(8,8,'user',1,NULL,NULL,1),(9,9,'user',1,NULL,NULL,1),(10,10,'user',1,NULL,NULL,1),(11,11,'user',1,NULL,NULL,1),(12,12,'user',1,NULL,NULL,1),(13,13,'user',1,NULL,NULL,1),(14,14,'user',1,NULL,NULL,1),(15,15,'user',1,NULL,NULL,1),(16,16,'user',1,NULL,NULL,1),(17,17,'user',1,NULL,NULL,1),(18,18,'user',1,NULL,NULL,1),(19,19,'user',1,NULL,NULL,1),(20,20,'user',1,NULL,NULL,1),(21,21,'user',1,NULL,NULL,1),(22,22,'user',1,NULL,NULL,1),(23,23,'user',1,NULL,NULL,1),(24,24,'user',1,NULL,NULL,1),(25,25,'user',1,NULL,NULL,1),(26,26,'user',1,NULL,NULL,1),(27,27,'user',1,NULL,NULL,1),(28,28,'user',1,NULL,NULL,1),(29,29,'user',1,NULL,NULL,1),(30,30,'user',1,NULL,NULL,1),(31,31,'user',1,NULL,NULL,1),(32,38,'user',1,NULL,NULL,1),(33,40,'user',1,NULL,NULL,1),(34,41,'user',1,NULL,NULL,1),(35,42,'user',1,NULL,NULL,1),(36,43,'user',1,NULL,NULL,1),(37,44,'user',1,NULL,NULL,1),(38,45,'user',1,NULL,NULL,1),(39,46,'user',1,NULL,NULL,1),(40,47,'user',1,NULL,NULL,1),(41,48,'user',1,NULL,NULL,1),(42,49,'user',1,NULL,NULL,1),(43,50,'user',1,NULL,NULL,1),(44,51,'user',1,NULL,NULL,1),(45,52,'user',1,NULL,NULL,1),(46,53,'user',1,NULL,NULL,1),(47,54,'user',1,NULL,NULL,1),(48,55,'user',1,NULL,NULL,1),(49,56,'user',1,NULL,NULL,1),(50,121,'user',3,NULL,NULL,1),(51,122,'user',1,NULL,NULL,1),(52,123,'user',1,NULL,NULL,1),(53,124,'user',1,NULL,NULL,1),(54,125,'user',1,NULL,NULL,1),(55,127,'user',1,NULL,NULL,1),(56,128,'user',1,NULL,NULL,1),(57,129,'user',1,NULL,NULL,1),(58,130,'user',1,NULL,NULL,1),(59,131,'user',1,NULL,NULL,1),(60,132,'user',1,NULL,NULL,1),(61,133,'user',1,NULL,NULL,1),(62,134,'user',1,NULL,NULL,1),(63,135,'user',1,NULL,NULL,1),(64,136,'user',1,NULL,NULL,1),(65,137,'user',1,NULL,NULL,1),(66,138,'user',1,NULL,NULL,1),(67,139,'user',1,NULL,NULL,1),(68,140,'user',1,NULL,NULL,1),(69,141,'user',1,NULL,NULL,1),(70,142,'user',1,NULL,NULL,1),(71,143,'user',1,NULL,NULL,1),(72,144,'user',1,NULL,NULL,1),(73,145,'user',1,NULL,NULL,1),(74,146,'user',1,NULL,NULL,1),(75,147,'user',1,NULL,NULL,1),(76,148,'user',1,NULL,NULL,1),(77,149,'user',1,NULL,NULL,1),(78,150,'user',1,NULL,NULL,1),(79,151,'user',1,NULL,NULL,1),(80,152,'user',1,NULL,NULL,1),(81,203,'user',1,NULL,NULL,1),(82,204,'user',1,NULL,NULL,1),(83,205,'user',1,NULL,NULL,1),(84,206,'user',1,NULL,NULL,1),(85,207,'user',1,NULL,NULL,1),(86,208,'user',1,NULL,NULL,1),(87,209,'user',1,NULL,NULL,1),(88,210,'user',1,NULL,NULL,1),(89,211,'user',1,NULL,NULL,1),(90,212,'user',1,NULL,NULL,1),(91,213,'user',1,NULL,NULL,1),(92,214,'user',1,NULL,NULL,1),(93,215,'user',1,NULL,NULL,1),(94,216,'user',1,NULL,NULL,1),(95,217,'user',1,NULL,NULL,1),(96,218,'user',1,NULL,NULL,1),(97,219,'user',1,NULL,NULL,1),(98,220,'user',1,NULL,NULL,1),(99,221,'user',1,NULL,NULL,1),(100,222,'user',1,NULL,NULL,1),(101,223,'user',1,NULL,NULL,1),(102,224,'user',1,NULL,NULL,1),(103,225,'user',1,NULL,NULL,1),(104,226,'user',1,NULL,NULL,1),(105,227,'user',1,NULL,NULL,1),(106,228,'user',1,NULL,NULL,1),(107,229,'user',1,NULL,NULL,1),(108,230,'user',1,NULL,NULL,1),(109,231,'user',1,NULL,NULL,1),(110,232,'user',12,'0',0,0),(111,233,'user',12,'0',0,0),(112,234,'user',12,'0',0,1),(113,235,'user',12,'0',0,1),(114,236,'user',4,'0',0,0),(115,237,'user',13,'0',0,0),(116,237,'user',16,'0',0,0),(117,237,'user',18,'0',0,0),(118,238,'user',12,'0',0,1),(119,238,'user',3,'0',0,1),(120,238,'user',10,'0',0,1),(121,239,'user',12,'0',0,0),(123,240,'user',12,'0',0,1),(125,242,'user',12,'0',0,0),(126,243,'user',12,'0',0,0),(128,245,'user',12,'0',0,0),(132,249,'user',12,'0',0,0),(133,250,'user',12,'0',0,0),(134,251,'user',12,'0',0,0),(135,252,'user',12,'0',0,0),(136,253,'user',12,'0',0,0),(137,254,'user',12,'0',0,0),(138,255,'user',12,'0',0,0),(139,256,'user',12,'0',0,0),(140,257,'user',12,'0',0,0),(146,263,'user',12,'0',0,0),(147,264,'user',12,'0',0,0),(148,265,'user',12,'0',0,0),(149,266,'user',12,'0',0,0),(150,267,'user',12,'0',0,0),(151,268,'user',12,'0',0,0),(152,269,'user',12,'0',0,0),(153,270,'user',12,'0',0,0),(154,271,'user',12,'0',0,0),(155,272,'user',12,'0',0,0),(156,273,'user',12,'0',0,0),(157,274,'user',12,'0',0,0),(158,275,'user',12,'0',0,0),(160,277,'user',12,'0',0,0),(161,278,'user',12,'0',0,0),(162,279,'user',12,'0',0,0),(164,281,'user',12,'0',0,0),(165,282,'user',12,'0',0,0),(166,283,'user',12,'0',0,0),(167,284,'user',12,'0',0,0),(168,285,'user',12,'0',0,0),(169,286,'user',12,'0',0,0),(170,287,'user',12,'0',0,0),(171,288,'user',12,'0',0,0),(177,294,'user',12,'0',0,0),(178,295,'user',12,'0',0,0),(179,296,'user',12,'0',0,0),(180,297,'user',12,'0',0,0),(181,298,'user',1,'0',0,0),(182,299,'user',2,'0',0,0),(183,300,'user',1,'0',0,0),(184,301,'user',2,'0',0,0),(185,302,'user',2,'0',0,0),(186,303,'user',2,'0',0,0),(187,304,'user',1,'0',0,0),(188,305,'user',2,'0',0,0),(189,306,'user',2,'0',0,0),(190,307,'user',1,'0',0,0),(191,308,'user',1,'0',0,0),(192,309,'user',1,'0',0,0),(193,310,'user',2,'0',0,0),(194,311,'user',2,'0',0,0),(195,312,'user',1,'0',0,0),(196,313,'user',2,'0',0,0),(197,314,'user',1,'0',0,0),(198,315,'user',2,'0',0,0),(199,316,'user',2,'0',0,0),(200,317,'user',2,'0',0,0),(201,318,'user',1,'0',0,0),(202,319,'user',2,'0',0,0),(203,320,'user',12,'0',0,0),(204,321,'user',12,'0',0,0),(205,322,'user',12,'0',0,0),(206,323,'user',12,'0',0,0),(207,324,'user',12,'0',0,0),(208,325,'user',12,'0',0,0),(209,326,'user',12,'0',0,0),(210,327,'user',12,'0',0,0),(211,328,'user',12,'0',0,0),(212,24,'socpeople',2,NULL,NULL,1),(213,235,'socpeople',2,NULL,NULL,1),(214,238,'socpeople',10,NULL,NULL,1),(215,327,'socpeople',12,NULL,NULL,1),(216,329,'user',12,'0',0,0),(217,330,'user',12,'0',0,0),(218,331,'user',12,'0',0,0),(220,333,'user',12,'0',0,0),(222,335,'user',12,'0',0,0),(224,337,'user',12,'0',0,0),(225,338,'user',12,'0',0,0),(226,339,'user',12,'0',0,0),(227,340,'user',12,'0',0,0),(228,341,'user',12,'0',0,0),(229,342,'user',12,'0',0,0),(230,343,'user',12,'0',0,0),(231,344,'user',12,'0',0,0),(232,345,'user',12,'0',0,0),(233,346,'user',12,'0',0,0),(234,347,'user',12,'0',0,0),(235,348,'user',12,'0',0,0),(236,349,'user',12,'0',0,0),(237,350,'user',12,'0',0,0),(238,351,'user',12,'0',0,0),(239,352,'user',12,'0',0,0),(240,353,'user',12,'0',0,0),(241,354,'user',12,'0',0,0),(242,355,'user',12,'0',0,0),(243,356,'user',12,'0',0,0),(244,357,'user',12,'0',0,0),(245,358,'user',12,'0',0,0),(246,359,'user',12,'0',0,0),(247,360,'user',12,'0',0,0),(248,361,'user',12,'0',0,0),(249,362,'user',12,'0',0,0),(250,363,'user',12,'0',0,0),(251,364,'user',12,'0',0,0),(252,365,'user',12,'0',0,0),(253,366,'user',12,'0',0,0),(254,367,'user',12,'0',0,0),(255,368,'user',12,'0',0,0),(256,369,'user',12,'0',0,0),(257,370,'user',12,'0',0,0),(258,371,'user',12,'0',0,0),(259,372,'user',12,'0',0,0),(260,373,'user',12,'0',0,0),(261,374,'user',12,'0',0,0),(262,375,'user',12,'0',0,0),(263,376,'user',12,'0',0,0),(264,377,'user',12,'0',0,0),(265,378,'user',12,'0',0,0),(266,379,'user',12,'0',0,0),(267,380,'user',12,'0',0,0),(268,381,'user',12,'0',0,0),(269,382,'user',12,'0',0,0),(270,383,'user',0,'0',0,0),(271,384,'user',12,'0',0,0),(272,385,'user',12,'0',0,0),(273,386,'user',12,'0',0,0),(274,387,'user',12,'0',0,0),(275,388,'user',12,'0',0,0),(276,389,'user',12,'0',0,0),(277,390,'user',12,'0',0,0),(278,391,'user',12,'0',0,0),(279,392,'user',12,'0',0,0),(280,393,'user',12,'0',0,0),(281,394,'user',12,'0',0,0),(282,395,'user',12,'0',0,0),(283,396,'user',12,'0',0,0),(284,397,'user',12,'0',0,0),(285,398,'user',12,'0',0,0),(286,399,'user',12,'0',0,0),(287,400,'user',12,'0',0,0),(288,401,'user',12,'0',0,0),(289,402,'user',12,'0',0,0),(290,403,'user',12,'0',0,0),(291,404,'user',12,'0',0,0),(292,405,'user',12,'0',0,0),(293,406,'user',12,'0',0,0),(294,407,'user',12,'0',0,0),(295,408,'user',12,'0',0,0),(296,409,'user',12,'0',0,0),(297,410,'user',12,'0',0,0),(298,411,'user',12,'0',0,0),(299,412,'user',12,'0',0,0),(300,413,'user',12,'0',0,0),(301,414,'user',12,'0',0,0),(302,415,'user',12,'0',0,0),(303,416,'user',12,'0',0,0),(304,417,'user',12,'0',0,0),(305,418,'user',12,'0',0,0),(306,419,'user',0,'0',0,0),(307,420,'user',12,'0',0,0),(308,421,'user',12,'0',0,0),(309,422,'user',12,'0',0,0),(310,423,'user',0,'0',0,0),(311,424,'user',12,'0',0,0),(312,425,'user',12,'0',0,0),(313,426,'user',12,'0',0,0),(314,427,'user',12,'0',0,0),(315,428,'user',12,'0',0,0),(316,429,'user',12,'0',0,0),(317,430,'user',12,'0',0,0),(318,431,'user',12,'0',0,0),(319,432,'user',12,'0',0,0),(320,433,'user',12,'0',0,0),(321,434,'user',12,'0',0,0),(322,435,'user',12,'0',0,0),(323,436,'user',12,'0',0,0),(324,437,'user',12,'0',0,0),(325,438,'user',12,'0',0,0),(326,439,'user',12,'0',0,0),(327,440,'user',12,'0',0,0),(328,441,'user',12,'0',0,0),(329,442,'user',12,'0',0,0),(330,443,'user',12,'0',0,0),(331,444,'user',12,'0',0,0),(332,445,'user',12,'0',0,0),(333,446,'user',12,'0',0,0),(334,447,'user',12,'0',0,0),(335,448,'user',12,'0',0,0),(336,449,'user',12,'0',0,0),(337,450,'user',12,'0',0,0),(338,451,'user',12,'0',0,0),(339,452,'user',12,'0',0,0),(340,453,'user',12,'0',0,0),(341,454,'user',12,'0',0,0),(342,455,'user',12,'0',0,0),(343,456,'user',12,'0',0,0),(344,457,'user',12,'0',0,0),(345,458,'user',12,'0',0,0),(346,459,'user',12,'0',0,0),(347,460,'user',12,'0',0,0),(348,461,'user',12,'0',0,0),(349,462,'user',12,'0',0,1),(350,463,'user',12,'0',0,1),(351,463,'user',4,'0',0,1),(352,463,'user',13,'0',0,1),(353,463,'user',2,'0',0,1),(354,464,'user',12,'0',0,0),(355,465,'user',12,'0',0,0),(356,466,'user',12,'0',0,1),(357,467,'user',0,'0',0,0),(358,468,'user',0,'0',0,0),(359,469,'user',0,'0',0,0),(360,470,'user',0,'0',0,0),(361,471,'user',0,'0',0,0),(362,483,'user',12,'0',0,0),(363,484,'user',12,'0',0,0),(364,485,'user',12,'0',0,0),(365,486,'user',12,'0',0,0),(366,487,'user',12,'0',0,0),(367,488,'user',12,'0',0,0),(368,489,'user',12,'0',0,0),(369,490,'user',12,'0',0,0),(370,491,'user',12,'0',0,0),(371,492,'user',12,'0',0,0),(372,493,'user',12,'0',0,0),(373,494,'user',12,'0',0,0),(374,495,'user',12,'0',0,0),(375,496,'user',12,'0',0,0),(376,497,'user',12,'0',0,0),(377,498,'user',12,'0',0,0),(378,499,'user',12,'0',0,0),(379,500,'user',12,'0',0,0),(380,501,'user',12,'0',0,0),(381,502,'user',12,'0',0,0),(382,503,'user',12,'0',0,0),(383,504,'user',12,'0',0,0),(384,505,'user',12,'0',0,0),(385,506,'user',12,'0',0,0),(386,507,'user',12,'0',0,0),(387,508,'user',12,'0',0,0),(388,509,'user',12,'0',0,0),(390,511,'user',12,'0',0,0),(391,512,'user',12,'0',0,0),(392,513,'user',12,'0',0,0),(393,514,'user',12,'0',0,0),(394,515,'user',12,'0',0,0),(395,516,'user',12,'0',0,0),(396,517,'user',12,'0',0,0),(397,518,'user',12,'0',0,0),(398,519,'user',12,'0',0,0),(399,520,'user',12,'0',0,0),(400,521,'user',12,'0',0,0),(401,522,'user',12,'0',0,0),(402,523,'user',12,'0',0,0),(403,524,'user',12,'0',0,0),(404,525,'user',12,'0',0,0),(405,526,'user',12,'0',0,0),(406,527,'user',12,'0',0,0),(407,528,'user',12,'0',0,0),(408,529,'user',12,'0',0,0),(409,530,'user',12,'0',0,0),(410,531,'user',12,'0',0,0),(411,532,'user',12,'0',0,0),(412,533,'user',12,'0',0,0),(413,534,'user',12,'0',0,0),(414,535,'user',12,'0',0,0),(415,536,'user',12,'0',0,0),(416,537,'user',12,'0',0,0),(417,538,'user',12,'0',0,0),(418,539,'user',12,'0',0,0),(419,540,'user',12,'0',0,0),(420,541,'user',12,'0',0,0),(421,542,'user',12,'0',0,0),(422,543,'user',12,'0',0,0),(423,544,'user',12,'0',0,0),(424,545,'user',12,'0',0,0),(425,546,'user',12,'0',0,0),(426,547,'user',12,'0',0,0),(427,548,'user',12,'0',0,0),(428,549,'user',12,'0',0,0),(429,550,'user',12,'0',0,0),(430,551,'user',12,'0',0,0),(431,552,'user',12,'0',0,0),(432,553,'user',12,'0',0,0),(433,554,'user',12,'0',0,0),(434,555,'user',12,'0',0,0),(435,556,'user',12,'0',0,0),(436,557,'user',12,'0',0,0),(437,558,'user',12,'0',0,0),(438,559,'user',12,'0',0,0),(439,560,'user',12,'0',0,0),(440,561,'user',12,'0',0,0),(441,562,'user',12,'0',0,0),(442,563,'user',12,'0',0,0),(443,564,'user',12,'0',0,0),(444,565,'user',12,'0',0,0),(445,566,'user',12,'0',0,0),(446,567,'user',12,'0',0,0),(447,568,'user',12,'0',0,0),(448,569,'user',12,'0',0,0),(449,570,'user',12,'0',0,0),(450,571,'user',12,'0',0,0),(451,572,'user',12,'0',0,0),(452,573,'user',12,'0',0,0),(453,574,'user',12,'0',0,0),(454,575,'user',12,'0',0,0),(455,576,'user',12,'0',0,0),(456,577,'user',12,'0',0,0),(457,578,'user',12,'0',0,0),(458,579,'user',12,'0',0,0),(459,580,'user',12,'0',0,0),(460,581,'user',12,'0',0,0),(461,582,'user',12,'0',0,0),(462,583,'user',12,'0',0,0),(463,584,'user',12,'0',0,0),(464,585,'user',12,'0',0,0),(465,586,'user',12,'0',0,0),(467,588,'user',12,'0',0,0),(468,589,'user',12,'0',0,0),(469,590,'user',12,'0',0,0),(470,591,'user',12,'0',0,0),(471,592,'user',12,'0',0,0),(472,593,'user',12,'0',0,0),(473,594,'user',12,'0',0,0),(474,595,'user',12,'0',0,0),(475,596,'user',12,'0',0,0),(476,597,'user',12,'0',0,0),(477,598,'user',12,'0',0,0),(478,599,'user',12,'0',0,0),(479,600,'user',12,'0',0,0),(480,601,'user',12,'0',0,0),(481,602,'user',12,'0',0,0); +INSERT INTO `llx_actioncomm_resources` VALUES (1,1,'user',1,NULL,NULL,1),(2,2,'user',1,NULL,NULL,1),(3,3,'user',1,NULL,NULL,1),(4,4,'user',1,NULL,NULL,1),(5,5,'user',1,NULL,NULL,1),(6,6,'user',1,NULL,NULL,1),(7,7,'user',1,NULL,NULL,1),(8,8,'user',1,NULL,NULL,1),(9,9,'user',1,NULL,NULL,1),(10,10,'user',1,NULL,NULL,1),(11,11,'user',1,NULL,NULL,1),(12,12,'user',1,NULL,NULL,1),(13,13,'user',1,NULL,NULL,1),(14,14,'user',1,NULL,NULL,1),(15,15,'user',1,NULL,NULL,1),(16,16,'user',1,NULL,NULL,1),(17,17,'user',1,NULL,NULL,1),(18,18,'user',1,NULL,NULL,1),(19,19,'user',1,NULL,NULL,1),(20,20,'user',1,NULL,NULL,1),(21,21,'user',1,NULL,NULL,1),(22,22,'user',1,NULL,NULL,1),(23,23,'user',1,NULL,NULL,1),(24,24,'user',1,NULL,NULL,1),(25,25,'user',1,NULL,NULL,1),(26,26,'user',1,NULL,NULL,1),(27,27,'user',1,NULL,NULL,1),(28,28,'user',1,NULL,NULL,1),(29,29,'user',1,NULL,NULL,1),(30,30,'user',1,NULL,NULL,1),(31,31,'user',1,NULL,NULL,1),(32,38,'user',1,NULL,NULL,1),(33,40,'user',1,NULL,NULL,1),(34,41,'user',1,NULL,NULL,1),(35,42,'user',1,NULL,NULL,1),(36,43,'user',1,NULL,NULL,1),(37,44,'user',1,NULL,NULL,1),(38,45,'user',1,NULL,NULL,1),(39,46,'user',1,NULL,NULL,1),(40,47,'user',1,NULL,NULL,1),(41,48,'user',1,NULL,NULL,1),(42,49,'user',1,NULL,NULL,1),(43,50,'user',1,NULL,NULL,1),(44,51,'user',1,NULL,NULL,1),(45,52,'user',1,NULL,NULL,1),(46,53,'user',1,NULL,NULL,1),(47,54,'user',1,NULL,NULL,1),(48,55,'user',1,NULL,NULL,1),(49,56,'user',1,NULL,NULL,1),(50,121,'user',3,NULL,NULL,1),(51,122,'user',1,NULL,NULL,1),(52,123,'user',1,NULL,NULL,1),(53,124,'user',1,NULL,NULL,1),(54,125,'user',1,NULL,NULL,1),(55,127,'user',1,NULL,NULL,1),(56,128,'user',1,NULL,NULL,1),(57,129,'user',1,NULL,NULL,1),(58,130,'user',1,NULL,NULL,1),(59,131,'user',1,NULL,NULL,1),(60,132,'user',1,NULL,NULL,1),(61,133,'user',1,NULL,NULL,1),(62,134,'user',1,NULL,NULL,1),(63,135,'user',1,NULL,NULL,1),(64,136,'user',1,NULL,NULL,1),(65,137,'user',1,NULL,NULL,1),(66,138,'user',1,NULL,NULL,1),(67,139,'user',1,NULL,NULL,1),(68,140,'user',1,NULL,NULL,1),(69,141,'user',1,NULL,NULL,1),(70,142,'user',1,NULL,NULL,1),(71,143,'user',1,NULL,NULL,1),(72,144,'user',1,NULL,NULL,1),(73,145,'user',1,NULL,NULL,1),(74,146,'user',1,NULL,NULL,1),(75,147,'user',1,NULL,NULL,1),(76,148,'user',1,NULL,NULL,1),(77,149,'user',1,NULL,NULL,1),(78,150,'user',1,NULL,NULL,1),(79,151,'user',1,NULL,NULL,1),(80,152,'user',1,NULL,NULL,1),(81,203,'user',1,NULL,NULL,1),(82,204,'user',1,NULL,NULL,1),(83,205,'user',1,NULL,NULL,1),(84,206,'user',1,NULL,NULL,1),(85,207,'user',1,NULL,NULL,1),(86,208,'user',1,NULL,NULL,1),(87,209,'user',1,NULL,NULL,1),(88,210,'user',1,NULL,NULL,1),(89,211,'user',1,NULL,NULL,1),(90,212,'user',1,NULL,NULL,1),(91,213,'user',1,NULL,NULL,1),(92,214,'user',1,NULL,NULL,1),(93,215,'user',1,NULL,NULL,1),(94,216,'user',1,NULL,NULL,1),(95,217,'user',1,NULL,NULL,1),(96,218,'user',1,NULL,NULL,1),(97,219,'user',1,NULL,NULL,1),(98,220,'user',1,NULL,NULL,1),(99,221,'user',1,NULL,NULL,1),(100,222,'user',1,NULL,NULL,1),(101,223,'user',1,NULL,NULL,1),(102,224,'user',1,NULL,NULL,1),(103,225,'user',1,NULL,NULL,1),(104,226,'user',1,NULL,NULL,1),(105,227,'user',1,NULL,NULL,1),(106,228,'user',1,NULL,NULL,1),(107,229,'user',1,NULL,NULL,1),(108,230,'user',1,NULL,NULL,1),(109,231,'user',1,NULL,NULL,1),(110,232,'user',12,'0',0,0),(111,233,'user',12,'0',0,0),(112,234,'user',12,'0',0,1),(113,235,'user',12,'0',0,1),(114,236,'user',4,'0',0,0),(115,237,'user',13,'0',0,0),(116,237,'user',16,'0',0,0),(117,237,'user',18,'0',0,0),(118,238,'user',12,'0',0,1),(119,238,'user',3,'0',0,1),(120,238,'user',10,'0',0,1),(121,239,'user',12,'0',0,0),(123,240,'user',12,'0',0,1),(125,242,'user',12,'0',0,0),(126,243,'user',12,'0',0,0),(128,245,'user',12,'0',0,0),(132,249,'user',12,'0',0,0),(133,250,'user',12,'0',0,0),(134,251,'user',12,'0',0,0),(135,252,'user',12,'0',0,0),(136,253,'user',12,'0',0,0),(137,254,'user',12,'0',0,0),(138,255,'user',12,'0',0,0),(139,256,'user',12,'0',0,0),(140,257,'user',12,'0',0,0),(146,263,'user',12,'0',0,0),(147,264,'user',12,'0',0,0),(148,265,'user',12,'0',0,0),(149,266,'user',12,'0',0,0),(150,267,'user',12,'0',0,0),(151,268,'user',12,'0',0,0),(152,269,'user',12,'0',0,0),(153,270,'user',12,'0',0,0),(154,271,'user',12,'0',0,0),(155,272,'user',12,'0',0,0),(156,273,'user',12,'0',0,0),(157,274,'user',12,'0',0,0),(158,275,'user',12,'0',0,0),(160,277,'user',12,'0',0,0),(161,278,'user',12,'0',0,0),(162,279,'user',12,'0',0,0),(164,281,'user',12,'0',0,0),(165,282,'user',12,'0',0,0),(166,283,'user',12,'0',0,0),(167,284,'user',12,'0',0,0),(168,285,'user',12,'0',0,0),(169,286,'user',12,'0',0,0),(170,287,'user',12,'0',0,0),(171,288,'user',12,'0',0,0),(177,294,'user',12,'0',0,0),(178,295,'user',12,'0',0,0),(179,296,'user',12,'0',0,0),(180,297,'user',12,'0',0,0),(181,298,'user',1,'0',0,0),(182,299,'user',2,'0',0,0),(183,300,'user',1,'0',0,0),(184,301,'user',2,'0',0,0),(185,302,'user',2,'0',0,0),(186,303,'user',2,'0',0,0),(187,304,'user',1,'0',0,0),(188,305,'user',2,'0',0,0),(189,306,'user',2,'0',0,0),(190,307,'user',1,'0',0,0),(191,308,'user',1,'0',0,0),(192,309,'user',1,'0',0,0),(193,310,'user',2,'0',0,0),(194,311,'user',2,'0',0,0),(195,312,'user',1,'0',0,0),(196,313,'user',2,'0',0,0),(197,314,'user',1,'0',0,0),(198,315,'user',2,'0',0,0),(199,316,'user',2,'0',0,0),(200,317,'user',2,'0',0,0),(201,318,'user',1,'0',0,0),(202,319,'user',2,'0',0,0),(203,320,'user',12,'0',0,0),(204,321,'user',12,'0',0,0),(205,322,'user',12,'0',0,0),(206,323,'user',12,'0',0,0),(207,324,'user',12,'0',0,0),(208,325,'user',12,'0',0,0),(209,326,'user',12,'0',0,0),(210,327,'user',12,'0',0,0),(211,328,'user',12,'0',0,0),(212,24,'socpeople',2,NULL,NULL,1),(213,235,'socpeople',2,NULL,NULL,1),(214,238,'socpeople',10,NULL,NULL,1),(215,327,'socpeople',12,NULL,NULL,1),(216,329,'user',12,'0',0,0),(217,330,'user',12,'0',0,0),(218,331,'user',12,'0',0,0),(220,333,'user',12,'0',0,0),(222,335,'user',12,'0',0,0),(224,337,'user',12,'0',0,0),(225,338,'user',12,'0',0,0),(226,339,'user',12,'0',0,0),(227,340,'user',12,'0',0,0),(228,341,'user',12,'0',0,0),(229,342,'user',12,'0',0,0),(230,343,'user',12,'0',0,0),(231,344,'user',12,'0',0,0),(232,345,'user',12,'0',0,0),(233,346,'user',12,'0',0,0),(234,347,'user',12,'0',0,0),(235,348,'user',12,'0',0,0),(236,349,'user',12,'0',0,0),(237,350,'user',12,'0',0,0),(238,351,'user',12,'0',0,0),(239,352,'user',12,'0',0,0),(240,353,'user',12,'0',0,0),(241,354,'user',12,'0',0,0),(242,355,'user',12,'0',0,0),(243,356,'user',12,'0',0,0),(244,357,'user',12,'0',0,0),(245,358,'user',12,'0',0,0),(246,359,'user',12,'0',0,0),(247,360,'user',12,'0',0,0),(248,361,'user',12,'0',0,0),(249,362,'user',12,'0',0,0),(250,363,'user',12,'0',0,0),(251,364,'user',12,'0',0,0),(252,365,'user',12,'0',0,0),(253,366,'user',12,'0',0,0),(254,367,'user',12,'0',0,0),(255,368,'user',12,'0',0,0),(256,369,'user',12,'0',0,0),(257,370,'user',12,'0',0,0),(258,371,'user',12,'0',0,0),(259,372,'user',12,'0',0,0),(260,373,'user',12,'0',0,0),(261,374,'user',12,'0',0,0),(262,375,'user',12,'0',0,0),(263,376,'user',12,'0',0,0),(264,377,'user',12,'0',0,0),(265,378,'user',12,'0',0,0),(266,379,'user',12,'0',0,0),(267,380,'user',12,'0',0,0),(268,381,'user',12,'0',0,0),(269,382,'user',12,'0',0,0),(270,383,'user',0,'0',0,0),(271,384,'user',12,'0',0,0),(272,385,'user',12,'0',0,0),(273,386,'user',12,'0',0,0),(274,387,'user',12,'0',0,0),(275,388,'user',12,'0',0,0),(276,389,'user',12,'0',0,0),(277,390,'user',12,'0',0,0),(278,391,'user',12,'0',0,0),(279,392,'user',12,'0',0,0),(280,393,'user',12,'0',0,0),(281,394,'user',12,'0',0,0),(282,395,'user',12,'0',0,0),(283,396,'user',12,'0',0,0),(284,397,'user',12,'0',0,0),(285,398,'user',12,'0',0,0),(286,399,'user',12,'0',0,0),(287,400,'user',12,'0',0,0),(288,401,'user',12,'0',0,0),(289,402,'user',12,'0',0,0),(290,403,'user',12,'0',0,0),(291,404,'user',12,'0',0,0),(292,405,'user',12,'0',0,0),(293,406,'user',12,'0',0,0),(294,407,'user',12,'0',0,0),(295,408,'user',12,'0',0,0),(296,409,'user',12,'0',0,0),(297,410,'user',12,'0',0,0),(298,411,'user',12,'0',0,0),(299,412,'user',12,'0',0,0),(300,413,'user',12,'0',0,0),(301,414,'user',12,'0',0,0),(302,415,'user',12,'0',0,0),(303,416,'user',12,'0',0,0),(304,417,'user',12,'0',0,0),(305,418,'user',12,'0',0,0),(306,419,'user',0,'0',0,0),(307,420,'user',12,'0',0,0),(308,421,'user',12,'0',0,0),(309,422,'user',12,'0',0,0),(310,423,'user',0,'0',0,0),(311,424,'user',12,'0',0,0),(312,425,'user',12,'0',0,0),(313,426,'user',12,'0',0,0),(314,427,'user',12,'0',0,0),(315,428,'user',12,'0',0,0),(316,429,'user',12,'0',0,0),(317,430,'user',12,'0',0,0),(318,431,'user',12,'0',0,0),(319,432,'user',12,'0',0,0),(320,433,'user',12,'0',0,0),(321,434,'user',12,'0',0,0),(322,435,'user',12,'0',0,0),(323,436,'user',12,'0',0,0),(324,437,'user',12,'0',0,0),(325,438,'user',12,'0',0,0),(326,439,'user',12,'0',0,0),(327,440,'user',12,'0',0,0),(328,441,'user',12,'0',0,0),(329,442,'user',12,'0',0,0),(330,443,'user',12,'0',0,0),(331,444,'user',12,'0',0,0),(332,445,'user',12,'0',0,0),(333,446,'user',12,'0',0,0),(334,447,'user',12,'0',0,0),(335,448,'user',12,'0',0,0),(336,449,'user',12,'0',0,0),(337,450,'user',12,'0',0,0),(338,451,'user',12,'0',0,0),(339,452,'user',12,'0',0,0),(340,453,'user',12,'0',0,0),(341,454,'user',12,'0',0,0),(342,455,'user',12,'0',0,0),(343,456,'user',12,'0',0,0),(344,457,'user',12,'0',0,0),(345,458,'user',12,'0',0,0),(346,459,'user',12,'0',0,0),(347,460,'user',12,'0',0,0),(348,461,'user',12,'0',0,0),(349,462,'user',12,'0',0,1),(350,463,'user',12,'0',0,1),(351,463,'user',4,'0',0,1),(352,463,'user',13,'0',0,1),(353,463,'user',2,'0',0,1),(354,464,'user',12,'0',0,0),(355,465,'user',12,'0',0,0),(356,466,'user',12,'0',0,1),(357,467,'user',0,'0',0,0),(358,468,'user',0,'0',0,0),(359,469,'user',0,'0',0,0),(360,470,'user',0,'0',0,0),(361,471,'user',0,'0',0,0),(362,483,'user',12,'0',0,0),(363,484,'user',12,'0',0,0),(364,485,'user',12,'0',0,0),(365,486,'user',12,'0',0,0),(366,487,'user',12,'0',0,0),(367,488,'user',12,'0',0,0),(368,489,'user',12,'0',0,0),(369,490,'user',12,'0',0,0),(370,491,'user',12,'0',0,0),(371,492,'user',12,'0',0,0),(372,493,'user',12,'0',0,0),(373,494,'user',12,'0',0,0),(374,495,'user',12,'0',0,0),(375,496,'user',12,'0',0,0),(376,497,'user',12,'0',0,0),(377,498,'user',12,'0',0,0),(378,499,'user',12,'0',0,0),(379,500,'user',12,'0',0,0),(380,501,'user',12,'0',0,0),(381,502,'user',12,'0',0,0),(382,503,'user',12,'0',0,0),(383,504,'user',12,'0',0,0),(384,505,'user',12,'0',0,0),(385,506,'user',12,'0',0,0),(386,507,'user',12,'0',0,0),(387,508,'user',12,'0',0,0),(388,509,'user',12,'0',0,0),(390,511,'user',12,'0',0,0),(391,512,'user',12,'0',0,0),(392,513,'user',12,'0',0,0),(393,514,'user',12,'0',0,0),(394,515,'user',12,'0',0,0),(395,516,'user',12,'0',0,0),(396,517,'user',12,'0',0,0),(397,518,'user',12,'0',0,0),(398,519,'user',12,'0',0,0),(399,520,'user',12,'0',0,0),(400,521,'user',12,'0',0,0),(401,522,'user',12,'0',0,0),(402,523,'user',12,'0',0,0),(403,524,'user',12,'0',0,0),(404,525,'user',12,'0',0,0),(405,526,'user',12,'0',0,0),(406,527,'user',12,'0',0,0),(407,528,'user',12,'0',0,0),(408,529,'user',12,'0',0,0),(409,530,'user',12,'0',0,0),(410,531,'user',12,'0',0,0),(411,532,'user',12,'0',0,0),(412,533,'user',12,'0',0,0),(413,534,'user',12,'0',0,0),(414,535,'user',12,'0',0,0),(415,536,'user',12,'0',0,0),(416,537,'user',12,'0',0,0),(417,538,'user',12,'0',0,0),(418,539,'user',12,'0',0,0),(419,540,'user',12,'0',0,0),(420,541,'user',12,'0',0,0),(421,542,'user',12,'0',0,0),(422,543,'user',12,'0',0,0),(423,544,'user',12,'0',0,0),(424,545,'user',12,'0',0,0),(425,546,'user',12,'0',0,0),(426,547,'user',12,'0',0,0),(427,548,'user',12,'0',0,0),(428,549,'user',12,'0',0,0),(429,550,'user',12,'0',0,0),(430,551,'user',12,'0',0,0),(431,552,'user',12,'0',0,0),(432,553,'user',12,'0',0,0),(433,554,'user',12,'0',0,0),(434,555,'user',12,'0',0,0),(435,556,'user',12,'0',0,0),(436,557,'user',12,'0',0,0),(437,558,'user',12,'0',0,0),(438,559,'user',12,'0',0,0),(439,560,'user',12,'0',0,0),(440,561,'user',12,'0',0,0),(441,562,'user',12,'0',0,0),(442,563,'user',12,'0',0,0),(443,564,'user',12,'0',0,0),(444,565,'user',12,'0',0,0),(445,566,'user',12,'0',0,0),(446,567,'user',12,'0',0,0),(447,568,'user',12,'0',0,0),(448,569,'user',12,'0',0,0),(449,570,'user',12,'0',0,0),(450,571,'user',12,'0',0,0),(451,572,'user',12,'0',0,0),(452,573,'user',12,'0',0,0),(453,574,'user',12,'0',0,0),(454,575,'user',12,'0',0,0),(455,576,'user',12,'0',0,0),(456,577,'user',12,'0',0,0),(457,578,'user',12,'0',0,0),(458,579,'user',12,'0',0,0),(459,580,'user',12,'0',0,0),(460,581,'user',12,'0',0,0),(461,582,'user',12,'0',0,0),(462,583,'user',12,'0',0,0),(463,584,'user',12,'0',0,0),(464,585,'user',12,'0',0,0),(465,586,'user',12,'0',0,0),(467,588,'user',12,'0',0,0),(468,589,'user',12,'0',0,0),(469,590,'user',12,'0',0,0),(470,591,'user',12,'0',0,0),(471,592,'user',12,'0',0,0),(472,593,'user',12,'0',0,0),(473,594,'user',12,'0',0,0),(474,595,'user',12,'0',0,0),(475,596,'user',12,'0',0,0),(476,597,'user',12,'0',0,0),(477,598,'user',12,'0',0,0),(478,599,'user',12,'0',0,0),(479,600,'user',12,'0',0,0),(480,601,'user',12,'0',0,0),(481,602,'user',12,'0',0,0),(482,603,'user',12,'0',0,1),(484,604,'user',12,'0',0,1); /*!40000 ALTER TABLE `llx_actioncomm_resources` ENABLE KEYS */; UNLOCK TABLES; @@ -435,7 +435,7 @@ DROP TABLE IF EXISTS `llx_adherent`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_adherent` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `civility` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `lastname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -447,27 +447,27 @@ CREATE TABLE `llx_adherent` ( `morphy` varchar(3) COLLATE utf8_unicode_ci NOT NULL, `societe` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, - `address` text COLLATE utf8_unicode_ci, + `address` text COLLATE utf8_unicode_ci DEFAULT NULL, `zip` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `state_id` int(11) DEFAULT NULL, `country` int(11) DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `socialnetworks` text COLLATE utf8_unicode_ci, + `socialnetworks` text COLLATE utf8_unicode_ci DEFAULT NULL, `skype` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phone` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `phone_perso` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `phone_mobile` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `birth` date DEFAULT NULL, `photo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `statut` smallint(6) NOT NULL DEFAULT '0', - `public` smallint(6) NOT NULL DEFAULT '0', + `statut` smallint(6) NOT NULL DEFAULT 0, + `public` smallint(6) NOT NULL DEFAULT 0, `datefin` datetime DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `datevalid` datetime DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_author` int(11) DEFAULT NULL, `fk_user_mod` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, @@ -511,7 +511,7 @@ DROP TABLE IF EXISTS `llx_adherent_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_adherent_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `aaa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sssss` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -542,14 +542,14 @@ DROP TABLE IF EXISTS `llx_adherent_type`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_adherent_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `statut` smallint(6) NOT NULL DEFAULT '0', + `entity` int(11) NOT NULL DEFAULT 1, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `statut` smallint(6) NOT NULL DEFAULT 0, `libelle` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `subscription` varchar(3) COLLATE utf8_unicode_ci NOT NULL DEFAULT '1', - `vote` varchar(3) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'yes', - `note` text COLLATE utf8_unicode_ci, - `mail_valid` text COLLATE utf8_unicode_ci, + `vote` varchar(3) COLLATE utf8_unicode_ci NOT NULL DEFAULT '1', + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, + `mail_valid` text COLLATE utf8_unicode_ci DEFAULT NULL, `morphy` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `duration` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -563,7 +563,7 @@ CREATE TABLE `llx_adherent_type` ( LOCK TABLES `llx_adherent_type` WRITE; /*!40000 ALTER TABLE `llx_adherent_type` DISABLE KEYS */; -INSERT INTO `llx_adherent_type` VALUES (1,1,'2012-07-08 21:41:55',1,'Board members','1','1','','
',NULL,NULL),(2,1,'2020-01-21 09:29:31',1,'Standard members','1','1','','','','1y'); +INSERT INTO `llx_adherent_type` VALUES (1,1,'2020-06-12 17:20:50',1,'Board members','1','1','','','','1y'),(2,1,'2020-06-12 17:21:21',1,'Standard members','1','1','','','','y'); /*!40000 ALTER TABLE `llx_adherent_type` ENABLE KEYS */; UNLOCK TABLES; @@ -576,13 +576,13 @@ DROP TABLE IF EXISTS `llx_adherent_type_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_adherent_type_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extradatamembertype` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_adherent_type_extrafields` (`fk_object`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -591,7 +591,7 @@ CREATE TABLE `llx_adherent_type_extrafields` ( LOCK TABLES `llx_adherent_type_extrafields` WRITE; /*!40000 ALTER TABLE `llx_adherent_type_extrafields` DISABLE KEYS */; -INSERT INTO `llx_adherent_type_extrafields` VALUES (1,'2020-01-21 09:29:31',2,NULL,NULL); +INSERT INTO `llx_adherent_type_extrafields` VALUES (2,'2020-06-12 17:20:50',1,NULL,NULL),(4,'2020-06-12 17:21:21',2,NULL,NULL); /*!40000 ALTER TABLE `llx_adherent_type_extrafields` ENABLE KEYS */; UNLOCK TABLES; @@ -604,14 +604,14 @@ DROP TABLE IF EXISTS `llx_adherent_type_lang`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_adherent_type_lang` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_type` int(11) NOT NULL DEFAULT '0', + `fk_type` int(11) NOT NULL DEFAULT 0, `lang` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci, - `email` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `email` text COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -620,7 +620,7 @@ CREATE TABLE `llx_adherent_type_lang` ( LOCK TABLES `llx_adherent_type_lang` WRITE; /*!40000 ALTER TABLE `llx_adherent_type_lang` DISABLE KEYS */; -INSERT INTO `llx_adherent_type_lang` VALUES (1,2,'en_US','Standard members','',NULL,NULL); +INSERT INTO `llx_adherent_type_lang` VALUES (1,2,'en_US','Standard members','',NULL,NULL),(2,1,'en_US','Board members','',NULL,NULL); /*!40000 ALTER TABLE `llx_adherent_type_lang` ENABLE KEYS */; UNLOCK TABLES; @@ -634,12 +634,12 @@ DROP TABLE IF EXISTS `llx_advtargetemailing`; CREATE TABLE `llx_advtargetemailing` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `filtervalue` text COLLATE utf8_unicode_ci, + `entity` int(11) NOT NULL DEFAULT 1, + `filtervalue` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_author` int(11) NOT NULL, `datec` datetime NOT NULL, `fk_user_mod` int(11) NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_element` int(11) NOT NULL, `type_element` varchar(180) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`), @@ -666,16 +666,16 @@ DROP TABLE IF EXISTS `llx_asset`; CREATE TABLE `llx_asset` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_asset_type` int(11) NOT NULL, `fk_soc` int(11) DEFAULT NULL, - `description` mediumtext COLLATE utf8_unicode_ci, - `note_public` mediumtext COLLATE utf8_unicode_ci, - `note_private` mediumtext COLLATE utf8_unicode_ci, + `description` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -708,7 +708,7 @@ DROP TABLE IF EXISTS `llx_asset_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_asset_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -733,13 +733,13 @@ DROP TABLE IF EXISTS `llx_asset_type`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_asset_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `entity` int(11) NOT NULL DEFAULT 1, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `label` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `accountancy_code_asset` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code_depreciation_asset` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code_depreciation_expense` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `note` mediumtext COLLATE utf8_unicode_ci, + `note` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_asset_type_label` (`label`,`entity`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -763,7 +763,7 @@ DROP TABLE IF EXISTS `llx_asset_type_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_asset_type_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -790,10 +790,10 @@ DROP TABLE IF EXISTS `llx_bank`; CREATE TABLE `llx_bank` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datev` date DEFAULT NULL, `dateo` date DEFAULT NULL, - `amount` double(24,8) NOT NULL DEFAULT '0.00000000', + `amount` double(24,8) NOT NULL DEFAULT 0.00000000, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, @@ -801,9 +801,9 @@ CREATE TABLE `llx_bank` ( `fk_type` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `num_releve` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `num_chq` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `rappro` tinyint(4) DEFAULT '0', - `note` text COLLATE utf8_unicode_ci, - `fk_bordereau` int(11) DEFAULT '0', + `rappro` tinyint(4) DEFAULT 0, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, + `fk_bordereau` int(11) DEFAULT 0, `banque` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `emetteur` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `author` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -823,7 +823,7 @@ CREATE TABLE `llx_bank` ( LOCK TABLES `llx_bank` WRITE; /*!40000 ALTER TABLE `llx_bank` DISABLE KEYS */; -INSERT INTO `llx_bank` VALUES (1,'2012-07-08 23:56:14','2018-07-30 15:16:10','2018-07-08','2018-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:00:24','2018-07-30 15:16:10','2018-07-09','2018-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(3,'2012-07-10 13:33:42','2018-07-30 15:16:10','2018-07-10','2018-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(5,'2013-07-18 20:50:24','2018-07-30 15:16:10','2018-07-08','2018-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(6,'2013-07-18 20:50:47','2018-07-30 15:16:10','2018-07-08','2018-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(8,'2013-08-01 03:34:11','2020-01-20 01:09:44','2017-08-15','2017-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(12,'2013-08-05 23:11:37','2020-01-19 19:33:46','2017-08-12','2017-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(13,'2013-08-06 20:33:54','2018-07-30 15:21:31','2017-08-06','2017-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(14,'2013-08-08 02:53:40','2018-07-30 15:21:31','2017-08-08','2017-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(15,'2013-08-08 02:55:58','2018-07-30 15:21:31','2017-08-08','2017-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(16,'2014-12-09 15:28:44','2018-07-30 15:21:31','2017-12-09','2017-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(17,'2014-12-09 15:28:53','2018-07-30 15:21:31','2017-12-09','2017-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(18,'2014-12-09 17:35:55','2018-07-30 15:21:31','2017-12-09','2017-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(19,'2014-12-09 17:37:02','2018-07-30 15:21:31','2017-12-09','2017-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(20,'2014-12-09 18:35:07','2018-07-30 15:21:31','2017-12-09','2017-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(21,'2014-12-12 18:54:33','2018-07-30 15:21:31','2017-12-12','2017-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(22,'2015-03-06 16:48:16','2018-07-30 15:16:10','2018-03-06','2018-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(23,'2015-03-20 14:30:11','2018-07-30 15:16:10','2018-03-20','2018-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(24,'2016-03-02 19:57:58','2018-07-30 15:16:10','2018-07-09','2018-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL,NULL),(26,'2016-03-02 20:01:39','2018-07-30 15:16:10','2018-03-19','2018-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(27,'2016-03-02 20:02:06','2018-07-30 15:16:10','2018-03-21','2018-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL,NULL),(28,'2016-03-03 19:22:32','2018-07-30 15:21:31','2017-10-03','2017-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(29,'2016-03-03 19:23:16','2018-07-30 15:16:10','2018-03-10','2018-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(30,'2018-01-22 18:56:34','2018-01-22 17:56:34','2018-01-22','2018-01-22',-900.00000000,'(SupplierInvoicePayment)',1,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(31,'2018-07-30 22:42:14','2018-07-30 14:42:14','2018-07-30','2018-07-30',0.00000000,'(Initial balance)',4,0,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(32,'2017-02-01 19:02:44','2017-02-01 15:02:44','2017-02-01','2017-02-01',-200.00000000,'(SupplierInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(33,'2017-02-06 08:10:24','2017-02-06 04:12:05','2018-03-22','2018-03-22',150.00000000,'(CustomerInvoicePayment)',1,12,NULL,'CHQ',NULL,NULL,0,NULL,2,NULL,'Magic Food Store',NULL,NULL),(34,'2017-02-06 08:10:50','2017-02-06 04:10:50','2018-03-25','2018-03-25',140.00000000,'(CustomerInvoicePayment)',1,12,NULL,'PRE',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(36,'2017-02-16 02:22:09','2017-02-15 22:22:09','2017-02-16','2017-02-16',-1.00000000,'(ExpenseReportPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(37,'2017-02-21 16:07:43','2017-02-21 12:07:43','2017-02-21','2017-02-21',50.00000000,'(WithdrawalPayment)',1,12,NULL,'PRE',NULL,'T170201',0,NULL,0,NULL,NULL,NULL,NULL),(38,'2017-09-06 20:08:36','2017-09-06 16:08:36','2017-09-06','2017-09-06',10.00000000,'(DonationPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(39,'2018-03-16 13:59:31','2018-03-16 09:59:31','2018-03-16','2018-03-16',10.00000000,'(CustomerInvoicePayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Indian SAS',NULL,''),(41,'2019-10-04 10:28:14','2019-10-04 08:28:14','2018-01-19','2018-01-19',5.63000000,'(CustomerInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(42,'2019-10-08 13:18:50','2019-10-08 11:18:50','2019-10-08','2019-10-08',-1000.00000000,'Salary payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(43,'2019-12-26 01:48:30','2019-12-25 21:48:30','2019-12-25','2019-12-25',-5.00000000,'(SocialContributionPayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(44,'2019-12-26 01:48:46','2019-12-25 21:48:46','2019-12-25','2019-12-25',-5.00000000,'(SocialContributionPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(47,'2020-01-01 20:28:49','2020-01-01 16:28:49','2020-01-01','2020-01-01',304.69000000,'(SupplierInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(48,'2020-01-06 20:52:28','2020-01-06 16:52:28','2020-01-06','2020-01-06',10.00000000,'Patient payment',1,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,'Patient',NULL,''),(49,'2020-01-10 04:42:47','2020-01-10 00:42:47','2020-01-10','2020-01-10',-10.00000000,'Miscellaneous payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(50,'2020-01-16 02:36:48','2020-01-16 01:36:48','2020-01-16','2020-01-16',20.50000000,'(CustomerInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'Magic Food Store',NULL,''),(51,'2020-01-21 01:02:14','2020-01-21 00:02:14','2013-07-18','2013-07-18',50.00000000,'Subscription 2013',4,12,NULL,'CB',NULL,'12345',0,NULL,0,'Bank CBN',NULL,NULL,''),(52,'2020-01-21 10:22:37','2020-01-21 09:22:37','2020-01-21','2020-01-21',50.00000000,'Subscription 2017',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'smith smith',NULL,''),(53,'2020-01-21 10:23:17','2020-01-21 09:23:17','2020-01-21','2020-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,''),(54,'2020-01-21 10:23:28','2020-01-21 09:23:28','2020-01-21','2020-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,''),(55,'2020-01-21 10:23:49','2020-01-21 09:23:49','2020-01-21','2020-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''); +INSERT INTO `llx_bank` VALUES (1,'2012-07-08 23:56:14','2020-06-12 17:12:09','2019-07-08','2019-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:00:24','2020-06-12 17:12:09','2019-07-09','2019-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(3,'2012-07-10 13:33:42','2020-06-12 17:12:09','2019-07-10','2019-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(5,'2013-07-18 20:50:24','2020-06-12 17:12:09','2019-07-08','2019-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(6,'2013-07-18 20:50:47','2020-06-12 17:12:09','2019-07-08','2019-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(8,'2013-08-01 03:34:11','2020-06-12 17:12:08','2019-08-15','2019-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(12,'2013-08-05 23:11:37','2020-06-12 17:12:08','2019-08-12','2019-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(13,'2013-08-06 20:33:54','2020-06-12 17:12:08','2019-08-06','2019-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(14,'2013-08-08 02:53:40','2020-06-12 17:12:08','2019-08-08','2019-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(15,'2013-08-08 02:55:58','2020-06-12 17:12:08','2019-08-08','2019-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(16,'2014-12-09 15:28:44','2020-06-12 17:12:08','2019-12-09','2019-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(17,'2014-12-09 15:28:53','2020-06-12 17:12:08','2019-12-09','2019-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(18,'2014-12-09 17:35:55','2020-06-12 17:12:08','2019-12-09','2019-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(19,'2014-12-09 17:37:02','2020-06-12 17:12:08','2019-12-09','2019-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(20,'2014-12-09 18:35:07','2020-06-12 17:12:08','2019-12-09','2019-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(21,'2014-12-12 18:54:33','2020-06-12 17:12:08','2019-12-12','2019-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL),(22,'2015-03-06 16:48:16','2020-06-12 17:12:09','2020-03-06','2020-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(23,'2015-03-20 14:30:11','2020-06-12 17:12:09','2020-03-20','2020-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(24,'2016-03-02 19:57:58','2020-06-12 17:12:09','2019-07-09','2019-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL,NULL),(26,'2016-03-02 20:01:39','2020-06-12 17:12:09','2020-03-19','2020-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(27,'2016-03-02 20:02:06','2020-06-12 17:12:09','2020-03-21','2020-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL,NULL),(28,'2016-03-03 19:22:32','2020-06-12 17:12:08','2019-10-03','2019-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(29,'2016-03-03 19:23:16','2020-06-12 17:12:09','2020-03-10','2020-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(30,'2018-01-22 18:56:34','2020-06-12 17:12:09','2020-01-22','2020-01-22',-900.00000000,'(SupplierInvoicePayment)',1,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(31,'2018-07-30 22:42:14','2020-06-12 17:12:09','2019-07-30','2019-07-30',0.00000000,'(Initial balance)',4,0,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(32,'2017-02-01 19:02:44','2020-06-12 17:12:08','2020-02-01','2020-02-01',-200.00000000,'(SupplierInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(33,'2017-02-06 08:10:24','2020-06-12 17:12:09','2020-03-22','2020-03-22',150.00000000,'(CustomerInvoicePayment)',1,12,NULL,'CHQ',NULL,NULL,0,NULL,2,NULL,'Magic Food Store',NULL,NULL),(34,'2017-02-06 08:10:50','2020-06-12 17:12:09','2020-03-25','2020-03-25',140.00000000,'(CustomerInvoicePayment)',1,12,NULL,'PRE',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(36,'2017-02-16 02:22:09','2020-06-12 17:12:08','2020-02-16','2020-02-16',-1.00000000,'(ExpenseReportPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(37,'2017-02-21 16:07:43','2020-06-12 17:12:08','2020-02-21','2020-02-21',50.00000000,'(WithdrawalPayment)',1,12,NULL,'PRE',NULL,'T170201',0,NULL,0,NULL,NULL,NULL,NULL),(38,'2017-09-06 20:08:36','2020-06-12 17:12:08','2019-09-06','2019-09-06',10.00000000,'(DonationPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(39,'2018-03-16 13:59:31','2020-06-12 17:12:09','2020-03-16','2020-03-16',10.00000000,'(CustomerInvoicePayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Indian SAS',NULL,''),(41,'2019-10-04 10:28:14','2020-06-12 17:12:09','2020-01-19','2020-01-19',5.63000000,'(CustomerInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(42,'2019-10-08 13:18:50','2019-10-08 11:18:50','2019-10-08','2019-10-08',-1000.00000000,'Salary payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(43,'2019-12-26 01:48:30','2019-12-25 21:48:30','2019-12-25','2019-12-25',-5.00000000,'(SocialContributionPayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(44,'2019-12-26 01:48:46','2019-12-25 21:48:46','2019-12-25','2019-12-25',-5.00000000,'(SocialContributionPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(47,'2020-01-01 20:28:49','2020-01-01 16:28:49','2020-01-01','2020-01-01',304.69000000,'(SupplierInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(48,'2020-01-06 20:52:28','2020-01-06 16:52:28','2020-01-06','2020-01-06',10.00000000,'Patient payment',1,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,'Patient',NULL,''),(49,'2020-01-10 04:42:47','2020-01-10 00:42:47','2020-01-10','2020-01-10',-10.00000000,'Miscellaneous payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''),(50,'2020-01-16 02:36:48','2020-01-16 01:36:48','2020-01-16','2020-01-16',20.50000000,'(CustomerInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'Magic Food Store',NULL,''),(51,'2020-01-21 01:02:14','2020-06-12 17:12:08','2019-07-18','2019-07-18',50.00000000,'Subscription 2013',4,12,NULL,'CB',NULL,'12345',0,NULL,0,'Bank CBN',NULL,NULL,''),(52,'2020-01-21 10:22:37','2020-01-21 09:22:37','2020-01-21','2020-01-21',50.00000000,'Subscription 2017',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'smith smith',NULL,''),(53,'2020-01-21 10:23:17','2020-01-21 09:23:17','2020-01-21','2020-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,''),(54,'2020-01-21 10:23:28','2020-01-21 09:23:28','2020-01-21','2020-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,''),(55,'2020-01-21 10:23:49','2020-01-21 09:23:49','2020-01-21','2020-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,NULL,NULL,''); /*!40000 ALTER TABLE `llx_bank` ENABLE KEYS */; UNLOCK TABLES; @@ -837,10 +837,10 @@ DROP TABLE IF EXISTS `llx_bank_account`; CREATE TABLE `llx_bank_account` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `ref` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(30) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `bank` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, `code_banque` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `code_guichet` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -854,20 +854,20 @@ CREATE TABLE `llx_bank_account` ( `state_id` int(11) DEFAULT NULL, `fk_pays` int(11) NOT NULL, `proprio` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `owner_address` text COLLATE utf8_unicode_ci, - `courant` smallint(6) NOT NULL DEFAULT '0', - `clos` smallint(6) NOT NULL DEFAULT '0', - `rappro` smallint(6) DEFAULT '1', + `owner_address` text COLLATE utf8_unicode_ci DEFAULT NULL, + `courant` smallint(6) NOT NULL DEFAULT 0, + `clos` smallint(6) NOT NULL DEFAULT 0, + `rappro` smallint(6) DEFAULT 1, `url` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `account_number` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_journal` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `currency_code` varchar(3) COLLATE utf8_unicode_ci NOT NULL, - `min_allowed` int(11) DEFAULT '0', - `min_desired` int(11) DEFAULT '0', - `comment` text COLLATE utf8_unicode_ci, + `min_allowed` int(11) DEFAULT 0, + `min_desired` int(11) DEFAULT 0, + `comment` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `note_public` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -898,7 +898,7 @@ DROP TABLE IF EXISTS `llx_bank_account_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_bank_account_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -925,7 +925,7 @@ DROP TABLE IF EXISTS `llx_bank_categ`; CREATE TABLE `llx_bank_categ` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1001,7 +1001,7 @@ DROP TABLE IF EXISTS `llx_blockedlog`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_blockedlog` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `action` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `amounts` double(24,8) DEFAULT NULL, `signature` varchar(100) COLLATE utf8_unicode_ci NOT NULL, @@ -1010,12 +1010,13 @@ CREATE TABLE `llx_blockedlog` ( `fk_object` int(11) DEFAULT NULL, `ref_object` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_object` datetime DEFAULT NULL, - `object_data` text COLLATE utf8_unicode_ci, + `object_data` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `certified` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `user_fullname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `object_version` varchar(32) COLLATE utf8_unicode_ci DEFAULT '', PRIMARY KEY (`rowid`), KEY `signature` (`signature`), KEY `fk_object_element` (`fk_object`,`element`), @@ -1032,7 +1033,7 @@ CREATE TABLE `llx_blockedlog` ( LOCK TABLES `llx_blockedlog` WRITE; /*!40000 ALTER TABLE `llx_blockedlog` DISABLE KEYS */; -INSERT INTO `llx_blockedlog` VALUES (20,'2018-03-16 09:57:22','MODULE_RESET',0.00000000,'d6dd5fe6c2eec2de6368f3b6da30188566f0a1a7be4b1589ccd8352d2c827ad5','fbc11d0396d9b76ea48f892bd5f0fe652e5bdf7d44873acb4bf1e1b70352bd30','module',1,'systemevent','2018-03-16 13:57:22','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1521194242;}',12,1,0,'2018-03-16 13:57:22','Alice Adminson'),(21,'2018-03-16 09:57:24','MODULE_SET',0.00000000,'d6b66df837d8d33bd8b9744e2afa46ab8c65ae8ca462246c406de19f8254e146','0a3aae975056417705f4eb7b4a4926384075cc2b6c899603715643c8f1d6ff9b','module',1,'systemevent','2018-03-16 13:57:24','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1521194244;}',12,1,0,'2018-03-16 13:57:24','Alice Adminson'),(22,'2018-03-16 09:59:31','PAYMENT_CUSTOMER_CREATE',10.00000000,'9beb9e3ba04582d441b49f176f995900c16572c789bcf48a1c9f285a74be76c8','86813eb2563252c0e270baaf1fffade82475fe51af5f88d14613005fd0e07783','payment',38,'PAY1803-0004','2018-03-16 12:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:3:\"ref\";s:12:\"PAY1803-0004\";s:4:\"date\";i:1521187200;s:9:\"type_code\";s:3:\"CHQ\";s:11:\"payment_num\";N;s:4:\"note\";s:0:\"\";s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"10\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:10:\"Indian SAS\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1453147200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"20.00000000\";s:9:\"total_tva\";s:10:\"1.80000000\";s:9:\"total_ttc\";s:11:\"23.60000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1601-0024\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:10;}',12,1,0,'2018-03-16 13:59:31','Alice Adminson'),(23,'2019-09-26 15:33:37','BILL_VALIDATE',43.58000000,'6a1e049c00f51afa6eaca799e6281bd8abfdaa12bdf42ee2a002b0bec588a2a5','451b12ea66d25259c9c1df9993a902affe124c9f27c97093613cf7184fe388aa','facture',218,'FA1909-0025','2019-09-26 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1569448800;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";d:42.5;s:9:\"total_tva\";d:1.08;s:9:\"total_ttc\";d:43.58;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:5:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLICLOUD\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"9.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:10:\"9.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"9.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"9.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:2;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLIDROID\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"5.50000000\";s:23:\"multicurrency_total_tva\";s:10:\"1.08000000\";s:23:\"multicurrency_total_ttc\";s:10:\"6.58000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:6:\"19.600\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"5.50000000\";s:9:\"total_tva\";s:10:\"1.08000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"6.58000000\";s:9:\"info_bits\";s:1:\"0\";}i:3;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLICLOUD\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"9.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:10:\"9.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"9.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"9.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:4;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLICLOUD\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"9.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:10:\"9.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"9.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"9.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:5;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"10.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"10.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"10.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"10.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA1909-0025\";s:11:\"note_public\";N;}',12,1,0,'2019-09-26 17:33:37','Alice Adminson'),(24,'2019-10-04 08:27:00','BILL_VALIDATE',5.63000000,'aa16d46e6ea7376fe0f91a4aeb7b1d534ed351fae071ded64c393e61269c4c35','316e03ffb8327d837c8601e7dbafc91509581b0be9449a89827a14e6cfa2688a','facture',150,'FA6801-0010','2018-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1516316400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";d:5;s:9:\"total_tva\";d:0.63;s:9:\"total_ttc\";d:5.63;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";s:7:\"PEARPIE\";s:18:\"multicurrency_code\";N;s:22:\"multicurrency_total_ht\";s:10:\"5.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.63000000\";s:23:\"multicurrency_total_ttc\";s:10:\"5.63000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:6:\"12.500\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"5.00000000\";s:9:\"total_tva\";s:10:\"0.63000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"5.63000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA6801-0010\";s:11:\"note_public\";N;}',12,1,0,'2019-10-04 10:27:00','Alice Adminson'),(25,'2019-10-04 08:28:14','PAYMENT_CUSTOMER_CREATE',5.63000000,'fa5c9b4bb975af8401744390d47e62218a7ec47a2e96c60f5e58d7f6be38dc44','9bfe069dc130dd71c31f914ff0afa7835fd40932790ac88be0005638342ccb87','payment',39,'PAY1801-0005','2018-01-19 12:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY1801-0005\";s:4:\"date\";i:1516359600;s:9:\"type_code\";s:3:\"LIQ\";s:11:\"payment_num\";N;s:4:\"note\";s:0:\"\";s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:4:\"5.63\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1516316400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:10:\"5.00000000\";s:9:\"total_tva\";s:10:\"0.63000000\";s:9:\"total_ttc\";s:10:\"5.63000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA6801-0010\";s:11:\"note_public\";N;}}}s:6:\"amount\";d:5.63;}',12,1,0,'2019-10-04 10:28:14','Alice Adminson'),(26,'2019-12-22 19:01:48','CASHCONTROL_VALIDATE',400.00000000,'bb14150a5ea65d97f9d22f6bc3d3d357ccfb2aa681f2ecbcc81a9d870260c58c','7b03131558731b2e7b4000189214b132f4323621c596d4418cfeba233a085e83','cashcontrol',1,'1','2019-12-22 23:01:02','O:8:\"stdClass\":37:{s:9:\"mycompany\";O:8:\"stdClass\":26:{s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:0;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:0;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;}s:7:\"element\";s:11:\"cashcontrol\";s:2:\"id\";i:1;s:7:\"opening\";d:-324.29;s:6:\"status\";i:1;s:10:\"year_close\";i:2019;s:11:\"month_close\";i:11;s:9:\"day_close\";N;s:9:\"posmodule\";s:7:\"takepos\";s:9:\"posnumber\";s:1:\"1\";s:4:\"cash\";d:400;s:6:\"cheque\";d:0;s:4:\"card\";d:0;s:10:\"date_valid\";i:1577041308;s:13:\"date_creation\";i:1577041262;s:17:\"date_modification\";N;s:10:\"import_key\";N;s:13:\"array_options\";a:0:{}s:6:\"canvas\";N;s:7:\"project\";N;s:10:\"fk_project\";N;s:10:\"thirdparty\";N;s:4:\"user\";N;s:3:\"ref\";s:1:\"1\";s:7:\"ref_ext\";N;s:6:\"statut\";N;s:10:\"fk_account\";N;s:11:\"note_public\";N;s:12:\"note_private\";N;s:4:\"note\";N;s:8:\"comments\";a:0:{}s:15:\"date_validation\";N;s:16:\"next_prev_filter\";N;s:6:\"entity\";i:1;s:5:\"label\";N;s:3:\"tms\";i:1577030462;s:13:\"fk_user_valid\";s:2:\"12\";}',12,1,0,'2019-12-22 23:01:48','Alice Adminson'),(34,'2020-01-10 00:42:47','PAYMENT_VARIOUS_CREATE',10.00000000,'e20ec32652d7564cdca915e95528b68bd3b770b82defe64ead1af3f6dc6bc150','25514deeca716e41c02699d9466fc640f4b7da0a0c953637b542c555f9634f9b','payment_various',4,'4','2020-01-10 12:00:00','O:8:\"stdClass\":7:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";i:4;s:4:\"date\";i:1578643200;s:9:\"type_code\";s:3:\"VIR\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";s:0:\"\";s:6:\"amount\";i:10;}',12,1,0,'2020-01-10 04:42:47','Alice Adminson'),(35,'2020-01-10 01:08:37','PAYMENT_VARIOUS_MODIFY',10.00000000,'94bd3491e8e553e6e633cd4a40c8c0ef3a6af0bd60df1d8e768d3c8c2a37b79b','eeadf2ffc7bd611e3b739e8825307f9e9cb2d9dddbd9e16b1f092fa5d881a5ca','payment_various',4,'4','2020-01-10 00:00:00','O:8:\"stdClass\":7:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:1:\"4\";s:4:\"date\";i:1578600000;s:9:\"type_code\";s:3:\"VIR\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";s:0:\"\";s:6:\"amount\";d:10;}',12,1,0,'2020-01-10 05:08:37','Alice Adminson'),(36,'2020-01-10 01:08:43','PAYMENT_VARIOUS_MODIFY',10.00000000,'02ecc274221832fcbf8f525ed64f1391415a29dded01022a5a4c51cfb2c5ad49','c274f2f609af56bd40b74000eaa2f6866a734feb0fc262ce3431ac9f91a754e2','payment_various',4,'4','2020-01-10 00:00:00','O:8:\"stdClass\":7:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:1:\"4\";s:4:\"date\";i:1578600000;s:9:\"type_code\";s:0:\"\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";s:0:\"\";s:6:\"amount\";d:10;}',12,1,0,'2020-01-10 05:08:43','Alice Adminson'),(37,'2020-01-10 01:17:51','PAYMENT_VARIOUS_MODIFY',10.00000000,'214ad5673f893c2da41a8c87ccbcae92dccf17c9d4a13b3d04a9497d21bf68b8','ffbebb278eaa1c75f0cf5afdd05c8367887615a7329f2b3ab628b8f0da10f9d8','payment_various',4,'4','2020-01-10 00:00:00','O:8:\"stdClass\":7:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:1:\"4\";s:4:\"date\";i:1578600000;s:9:\"type_code\";s:0:\"\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";s:0:\"\";s:6:\"amount\";d:10;}',12,1,0,'2020-01-10 05:17:51','Alice Adminson'),(38,'2020-01-16 01:22:16','BILL_VALIDATE',123.00000000,'aae0a1eb8b3da6686020252194f47ce82301fb604ee213ae120a2885197735d5','b414061da9abbd2dec7153a7d53978c177c5c5f55ed8ace177a02e46e7a74312','facture',221,'AC2001-0001','2020-01-16 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:16:\"Magic Food Store\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:22:\"65 holdywood boulevard\";s:3:\"zip\";s:6:\"123456\";s:4:\"town\";s:7:\"BigTown\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";s:4:\"0101\";s:5:\"email\";s:18:\"myemail@domain.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:10:\"10/10/2010\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1301-0008\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"ES\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579129200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:123;s:9:\"total_tva\";d:0;s:9:\"total_ttc\";d:123;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:12:\"123.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:12:\"123.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:12:\"123.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:12:\"123.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0001\";s:11:\"note_public\";N;}',12,1,0,'2020-01-16 02:22:16','Alice Adminson'),(39,'2020-01-16 01:33:27','BILL_VALIDATE',20.50000000,'777eb88a0b91c6d376881534a7c84a9b9ee5a6d7efedbae3b0c00d7e36bacba9','b78e5b5909c49c575142b429f2d09abb2d19c5545f815a1cabe0f2ed80ded6e4','facture',224,'AC2001-0002','2020-01-16 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:16:\"Magic Food Store\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:22:\"65 holdywood boulevard\";s:3:\"zip\";s:6:\"123456\";s:4:\"town\";s:7:\"BigTown\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";s:4:\"0101\";s:5:\"email\";s:18:\"myemail@domain.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:10:\"10/10/2010\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1301-0008\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"ES\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579129200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:20.5;s:9:\"total_tva\";d:0;s:9:\"total_ttc\";d:20.5;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"20.50000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"20.50000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"20.50000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"20.50000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0002\";s:11:\"note_public\";N;}',12,1,0,'2020-01-16 02:33:27','Alice Adminson'),(40,'2020-01-16 01:36:48','PAYMENT_CUSTOMER_CREATE',20.50000000,'cb03ceef89e1630e5a3ba8b3b1ca6c77e42b97fc2884a661c04e9e5c8b3afa1e','18bed0f0566b20ffa32c49c901cfc8b46485ef2172b22c676cef07ce8bd2d90b','payment',40,'PAY2001-0006','2020-01-16 12:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY2001-0006\";s:4:\"date\";i:1579172400;s:9:\"type_code\";s:3:\"VIR\";s:11:\"payment_num\";N;s:4:\"note\";s:0:\"\";s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:4:\"20.5\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:16:\"Magic Food Store\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:22:\"65 holdywood boulevard\";s:3:\"zip\";s:6:\"123456\";s:4:\"town\";s:7:\"BigTown\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";s:4:\"0101\";s:5:\"email\";s:18:\"myemail@domain.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:10:\"10/10/2010\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1301-0008\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"ES\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1579129200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";s:11:\"20.50000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"20.50000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"AC2001-0002\";s:11:\"note_public\";N;}}}s:6:\"amount\";d:20.5;}',12,1,0,'2020-01-16 02:36:48','Alice Adminson'),(41,'2020-01-19 13:51:43','BILL_VALIDATE',239.20000000,'7f38eaf315003f652b72fd27e55e71010a5ed0339086aa100b9a91a6045bb06f','26d074106c5f096ea1795ce7ed399cda6c2b2d5ac78dd9c2e152a0a0aa6ef47b','facture',227,'AC2001-0003','2020-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579388400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:200;s:9:\"total_tva\";d:39.2;s:9:\"total_ttc\";d:239.2;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:12:\"200.00000000\";s:23:\"multicurrency_total_tva\";s:11:\"39.20000000\";s:23:\"multicurrency_total_ttc\";s:12:\"239.20000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:6:\"19.600\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:12:\"200.00000000\";s:9:\"total_tva\";s:11:\"39.20000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:12:\"239.20000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0003\";s:11:\"note_public\";N;}',12,1,0,'2020-01-19 14:51:43','Alice Adminson'),(42,'2020-01-19 14:01:26','BILL_VALIDATE',50.54000000,'107572ffe2f1ccf1ee4fe7b39c5a4ed40a485c1d37c926fbff8a0e420396d641','352ac5e380c996d7bff798c1369f8a85e86cc98a2864e278cbe0cb6b309c12a5','facture',228,'AC2001-0004','2020-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579388400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:48.6;s:9:\"total_tva\";d:1.94;s:9:\"total_ttc\";d:50.54;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:2:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"2.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"52.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"2.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"52.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:2;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"-1.40000000\";s:23:\"multicurrency_total_tva\";s:11:\"-0.06000000\";s:23:\"multicurrency_total_ttc\";s:11:\"-1.46000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"-1.40000000\";s:9:\"total_tva\";s:11:\"-0.06000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"-1.46000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0004\";s:11:\"note_public\";N;}',12,1,0,'2020-01-19 15:01:26','Alice Adminson'),(43,'2020-01-19 14:04:53','BILL_VALIDATE',50.54000000,'795f9c5b741f360e3194ac8b3bb163c244b2761125f7507935baa44b319c624a','8cbb81e210f60d71b33a7fdcae0202721c2b4a8cdd59fe77ff2a8942839159b4','facture',228,'AC2001-0004','2020-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579388400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:48.6;s:9:\"total_tva\";d:1.94;s:9:\"total_ttc\";d:50.54;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:2:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"2.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"52.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"2.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"52.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:2;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"-1.40000000\";s:23:\"multicurrency_total_tva\";s:11:\"-0.06000000\";s:23:\"multicurrency_total_ttc\";s:11:\"-1.46000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"-1.40000000\";s:9:\"total_tva\";s:11:\"-0.06000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"-1.46000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0004\";s:11:\"note_public\";N;}',12,1,0,'2020-01-19 15:04:53','Alice Adminson'),(44,'2020-01-19 14:13:07','BILL_VALIDATE',50.54000000,'0c5b79703d1db88579a1fdb74053596defebddb7a1e6d4c5c8b065729be10201','41669e482d1e5e7a58c132c2bf85bc75372cadb4d9b97047a98cc74a9d1fd767','facture',228,'AC2001-0004','2020-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579388400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:48.6;s:9:\"total_tva\";d:1.94;s:9:\"total_ttc\";d:50.54;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:2:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"2.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"52.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"2.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"52.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:2;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"-1.40000000\";s:23:\"multicurrency_total_tva\";s:11:\"-0.06000000\";s:23:\"multicurrency_total_ttc\";s:11:\"-1.46000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"-1.40000000\";s:9:\"total_tva\";s:11:\"-0.06000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"-1.46000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0004\";s:11:\"note_public\";N;}',12,1,0,'2020-01-19 15:13:07','Alice Adminson'),(46,'2020-01-21 00:02:14','MEMBER_SUBSCRIPTION_CREATE',50.00000000,'aacdc952cc25b2d4f90222cea6f684320c76477e55b87687397d82e70694c517','ce99e3278ebb1f5f2540a0d7205a4b1230e2e23c4bed48b567433b34786b88e4','subscription',2,'','2013-07-18 00:00:00','O:8:\"stdClass\":10:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:5:\"datec\";i:1579564934;s:5:\"dateh\";i:1374098400;s:5:\"datef\";i:1405548000;s:11:\"fk_adherent\";s:1:\"3\";s:6:\"amount\";s:2:\"50\";s:2:\"id\";i:2;s:10:\"import_key\";N;s:6:\"statut\";N;s:4:\"note\";s:17:\"Subscription 2013\";}',12,1,0,'2020-01-21 01:02:14','Alice Adminson'),(47,'2020-01-21 09:22:37','MEMBER_SUBSCRIPTION_CREATE',50.00000000,'43a9804c627e78b20c7842a563099892a2d464b207f96bb393886f0b0ea52b4a','c6befc858191e428330c0054328f84d09f7be0f5603fb5b15e3a59980bb8e6eb','subscription',3,'','2017-07-18 00:00:00','O:8:\"stdClass\":10:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:5:\"datec\";i:1579598557;s:5:\"dateh\";i:1500328800;s:5:\"datef\";i:1531778400;s:11:\"fk_adherent\";s:1:\"4\";s:6:\"amount\";s:2:\"50\";s:2:\"id\";i:3;s:10:\"import_key\";N;s:6:\"statut\";N;s:4:\"note\";s:17:\"Subscription 2017\";}',12,1,0,'2020-01-21 10:22:37','Alice Adminson'),(48,'2020-01-21 09:23:17','MEMBER_SUBSCRIPTION_CREATE',50.00000000,'d44357a1d55ffedd8f24690cd3c8aa43f9bfd33aa362ad558fd486b3b7f62a50','7c32d13e68bb245ab06b8e11efa5ed9e5fdb15650265dc80d5cb00d4674c134d','subscription',4,'','2017-07-18 00:00:00','O:8:\"stdClass\":10:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:5:\"datec\";i:1579598597;s:5:\"dateh\";i:1500328800;s:5:\"datef\";i:1531778400;s:11:\"fk_adherent\";s:1:\"2\";s:6:\"amount\";s:2:\"50\";s:2:\"id\";i:4;s:10:\"import_key\";N;s:6:\"statut\";N;s:4:\"note\";s:17:\"Subscription 2017\";}',12,1,0,'2020-01-21 10:23:17','Alice Adminson'),(49,'2020-01-21 09:23:17','BILL_VALIDATE',50.00000000,'30d0b37723f3cd2fce6afefd56cbdeb90f7cdee0e898e6ebaa411d84d3123ca0','e0301b9c4da11aa095a90cd9989b9fb6d0c635263cb2a8998b4ba57b60751d11','facture',229,'FA1707-0026','2017-07-18 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1500328800;s:10:\"ref_client\";s:0:\"\";s:4:\"type\";i:0;s:8:\"total_ht\";d:50;s:9:\"total_tva\";d:0;s:9:\"total_ttc\";d:50;s:12:\"revenuestamp\";N;s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"50.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA1707-0026\";s:11:\"note_public\";s:0:\"\";}',12,1,0,'2020-01-21 10:23:17','Alice Adminson'),(50,'2020-01-21 09:23:17','PAYMENT_CUSTOMER_CREATE',50.00000000,'41e6e00dfd2b96c3d9056489f22241959407ad0282405d37ada32da919e2d744','625ed1ef1ab9edddabc0b1588542eb6eac30ac9224e75812dabcbdfa0211b918','payment',41,'PAY2001-0007','2020-01-21 00:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY2001-0007\";s:4:\"date\";i:1579561200;s:9:\"type_code\";s:3:\"CHQ\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";N;s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"50\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1500328800;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1707-0026\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:50;}',12,1,0,'2020-01-21 10:23:17','Alice Adminson'),(51,'2020-01-21 09:23:28','MEMBER_SUBSCRIPTION_CREATE',50.00000000,'b24dfe36f8a3e5971898dd4fcfc61d775d4f0937169f44986bc9478d189e8e60','6160f4fb0fe73ce769a03f9d5460db7051602796090b9e44b51c6eadbd63c309','subscription',5,'','2018-07-18 00:00:00','O:8:\"stdClass\":10:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:5:\"datec\";i:1579598608;s:5:\"dateh\";i:1531864800;s:5:\"datef\";i:1563314400;s:11:\"fk_adherent\";s:1:\"2\";s:6:\"amount\";s:2:\"50\";s:2:\"id\";i:5;s:10:\"import_key\";N;s:6:\"statut\";N;s:4:\"note\";s:17:\"Subscription 2018\";}',12,1,0,'2020-01-21 10:23:28','Alice Adminson'),(52,'2020-01-21 09:23:28','BILL_VALIDATE',50.00000000,'a6ba6c4518b94977daa8a65b6e9063e81b37563037455ee4608724674c53ea01','3724c09a72bbaab46bdde59c79ffd5d439ffb43f2a509c49ebe05aa9acdcda7a','facture',230,'FA1807-0027','2018-07-18 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1531864800;s:10:\"ref_client\";s:0:\"\";s:4:\"type\";i:0;s:8:\"total_ht\";d:50;s:9:\"total_tva\";d:0;s:9:\"total_ttc\";d:50;s:12:\"revenuestamp\";N;s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"50.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA1807-0027\";s:11:\"note_public\";s:0:\"\";}',12,1,0,'2020-01-21 10:23:28','Alice Adminson'),(53,'2020-01-21 09:23:28','PAYMENT_CUSTOMER_CREATE',50.00000000,'54bbe038c35a0b1f63cccfbd89ce3232fc5dff8a56e7ff33bffebb9f412827bc','444449d4566c78f70a64b92d0008e9ddc933be75326cebdf5d41c4a94acdddc4','payment',42,'PAY2001-0008','2020-01-21 00:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY2001-0008\";s:4:\"date\";i:1579561200;s:9:\"type_code\";s:3:\"CHQ\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";N;s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"50\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1531864800;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1807-0027\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:50;}',12,1,0,'2020-01-21 10:23:28','Alice Adminson'),(54,'2020-01-21 09:23:49','MEMBER_SUBSCRIPTION_CREATE',50.00000000,'c4b9d402ebf74ae10353550d9ef1ce08c899b6533bdc5434fa105599da3e28ce','4642f26ec597360d7616ed0d925080970614232397fc17022922eecad2e727c9','subscription',6,'','2019-07-18 00:00:00','O:8:\"stdClass\":10:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:5:\"datec\";i:1579598629;s:5:\"dateh\";i:1563400800;s:5:\"datef\";i:1594936800;s:11:\"fk_adherent\";s:1:\"2\";s:6:\"amount\";s:2:\"50\";s:2:\"id\";i:6;s:10:\"import_key\";N;s:6:\"statut\";N;s:4:\"note\";s:17:\"Subscription 2019\";}',12,1,0,'2020-01-21 10:23:49','Alice Adminson'),(55,'2020-01-21 09:23:49','BILL_VALIDATE',50.00000000,'3e7b2c3b0b26c1982a3f8205b48a68756d81cd5bb673e1d2c7c09ce12c2086b9','ca332254195c3a59ee8c2ed0c60aec16a4229e83f5138f69747e65136ad370fa','facture',231,'FA1907-0028','2019-07-18 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1563400800;s:10:\"ref_client\";s:0:\"\";s:4:\"type\";i:0;s:8:\"total_ht\";d:50;s:9:\"total_tva\";d:0;s:9:\"total_ttc\";d:50;s:12:\"revenuestamp\";N;s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"50.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA1907-0028\";s:11:\"note_public\";s:0:\"\";}',12,1,0,'2020-01-21 10:23:49','Alice Adminson'),(56,'2020-01-21 09:23:49','PAYMENT_CUSTOMER_CREATE',50.00000000,'87cab3c0d2443145bb01b7364b78917756b2bf9b7908355b1a3258c28ecf1400','966571aa0fe244a6e762172fff34c03610ba4066f6f95369f514076c97975b6b','payment',43,'PAY2001-0009','2020-01-21 00:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY2001-0009\";s:4:\"date\";i:1579561200;s:9:\"type_code\";s:2:\"CB\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";N;s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"50\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1563400800;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1907-0028\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:50;}',12,1,0,'2020-01-21 10:23:49','Alice Adminson'),(57,'2020-01-21 09:33:28','MODULE_RESET',0.00000000,'0000000000','d8134616ec977d8204a6856269ccfc799ea7eccc80074ac62350a5cdee3b070b','module',1,'systemevent','2020-01-21 10:33:28','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1579599208;}',12,1,0,'2020-01-21 10:33:28','Alice Adminson'); +INSERT INTO `llx_blockedlog` VALUES (20,'2018-03-16 09:57:22','MODULE_RESET',0.00000000,'d6dd5fe6c2eec2de6368f3b6da30188566f0a1a7be4b1589ccd8352d2c827ad5','fbc11d0396d9b76ea48f892bd5f0fe652e5bdf7d44873acb4bf1e1b70352bd30','module',1,'systemevent','2018-03-16 13:57:22','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1521194242;}',12,1,0,'2018-03-16 13:57:22','Alice Adminson',''),(21,'2018-03-16 09:57:24','MODULE_SET',0.00000000,'d6b66df837d8d33bd8b9744e2afa46ab8c65ae8ca462246c406de19f8254e146','0a3aae975056417705f4eb7b4a4926384075cc2b6c899603715643c8f1d6ff9b','module',1,'systemevent','2018-03-16 13:57:24','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1521194244;}',12,1,0,'2018-03-16 13:57:24','Alice Adminson',''),(22,'2018-03-16 09:59:31','PAYMENT_CUSTOMER_CREATE',10.00000000,'9beb9e3ba04582d441b49f176f995900c16572c789bcf48a1c9f285a74be76c8','86813eb2563252c0e270baaf1fffade82475fe51af5f88d14613005fd0e07783','payment',38,'PAY1803-0004','2018-03-16 12:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:1:\"1\";s:7:\"idprof3\";s:1:\"1\";s:7:\"idprof4\";s:1:\"1\";s:7:\"idprof5\";s:1:\"1\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:9:\"FR1234567\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:12:\"MyBigCompany\";}s:3:\"ref\";s:12:\"PAY1803-0004\";s:4:\"date\";i:1521187200;s:9:\"type_code\";s:3:\"CHQ\";s:11:\"payment_num\";N;s:4:\"note\";s:0:\"\";s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"10\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";s:4:\"name\";s:10:\"Indian SAS\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1453147200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"20.00000000\";s:9:\"total_tva\";s:10:\"1.80000000\";s:9:\"total_ttc\";s:11:\"23.60000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1601-0024\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:10;}',12,1,0,'2018-03-16 13:59:31','Alice Adminson',''),(23,'2019-09-26 15:33:37','BILL_VALIDATE',43.58000000,'6a1e049c00f51afa6eaca799e6281bd8abfdaa12bdf42ee2a002b0bec588a2a5','451b12ea66d25259c9c1df9993a902affe124c9f27c97093613cf7184fe388aa','facture',218,'FA1909-0025','2019-09-26 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1569448800;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";d:42.5;s:9:\"total_tva\";d:1.08;s:9:\"total_ttc\";d:43.58;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:5:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLICLOUD\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"9.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:10:\"9.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"9.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"9.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:2;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLIDROID\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"5.50000000\";s:23:\"multicurrency_total_tva\";s:10:\"1.08000000\";s:23:\"multicurrency_total_ttc\";s:10:\"6.58000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:6:\"19.600\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"5.50000000\";s:9:\"total_tva\";s:10:\"1.08000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"6.58000000\";s:9:\"info_bits\";s:1:\"0\";}i:3;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLICLOUD\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"9.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:10:\"9.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"9.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"9.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:4;O:8:\"stdClass\":17:{s:3:\"ref\";s:9:\"DOLICLOUD\";s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:10:\"9.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:10:\"9.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"9.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"9.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:5;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"10.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"10.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"10.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"10.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA1909-0025\";s:11:\"note_public\";N;}',12,1,0,'2019-09-26 17:33:37','Alice Adminson',''),(24,'2019-10-04 08:27:00','BILL_VALIDATE',5.63000000,'aa16d46e6ea7376fe0f91a4aeb7b1d534ed351fae071ded64c393e61269c4c35','316e03ffb8327d837c8601e7dbafc91509581b0be9449a89827a14e6cfa2688a','facture',150,'FA6801-0010','2018-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1516316400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";d:5;s:9:\"total_tva\";d:0.63;s:9:\"total_ttc\";d:5.63;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";s:7:\"PEARPIE\";s:18:\"multicurrency_code\";N;s:22:\"multicurrency_total_ht\";s:10:\"5.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.63000000\";s:23:\"multicurrency_total_ttc\";s:10:\"5.63000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:6:\"12.500\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:10:\"5.00000000\";s:9:\"total_tva\";s:10:\"0.63000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:10:\"5.63000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA6801-0010\";s:11:\"note_public\";N;}',12,1,0,'2019-10-04 10:27:00','Alice Adminson',''),(25,'2019-10-04 08:28:14','PAYMENT_CUSTOMER_CREATE',5.63000000,'fa5c9b4bb975af8401744390d47e62218a7ec47a2e96c60f5e58d7f6be38dc44','9bfe069dc130dd71c31f914ff0afa7835fd40932790ac88be0005638342ccb87','payment',39,'PAY1801-0005','2018-01-19 12:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:24:\"21 Jump street..ll..ee \"\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";N;s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY1801-0005\";s:4:\"date\";i:1516359600;s:9:\"type_code\";s:3:\"LIQ\";s:11:\"payment_num\";N;s:4:\"note\";s:0:\"\";s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:4:\"5.63\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1516316400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:10:\"5.00000000\";s:9:\"total_tva\";s:10:\"0.63000000\";s:9:\"total_ttc\";s:10:\"5.63000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA6801-0010\";s:11:\"note_public\";N;}}}s:6:\"amount\";d:5.63;}',12,1,0,'2019-10-04 10:28:14','Alice Adminson',''),(26,'2019-12-22 19:01:48','CASHCONTROL_VALIDATE',400.00000000,'bb14150a5ea65d97f9d22f6bc3d3d357ccfb2aa681f2ecbcc81a9d870260c58c','7b03131558731b2e7b4000189214b132f4323621c596d4418cfeba233a085e83','cashcontrol',1,'1','2019-12-22 23:01:02','O:8:\"stdClass\":37:{s:9:\"mycompany\";O:8:\"stdClass\":26:{s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:0;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:0;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;}s:7:\"element\";s:11:\"cashcontrol\";s:2:\"id\";i:1;s:7:\"opening\";d:-324.29;s:6:\"status\";i:1;s:10:\"year_close\";i:2019;s:11:\"month_close\";i:11;s:9:\"day_close\";N;s:9:\"posmodule\";s:7:\"takepos\";s:9:\"posnumber\";s:1:\"1\";s:4:\"cash\";d:400;s:6:\"cheque\";d:0;s:4:\"card\";d:0;s:10:\"date_valid\";i:1577041308;s:13:\"date_creation\";i:1577041262;s:17:\"date_modification\";N;s:10:\"import_key\";N;s:13:\"array_options\";a:0:{}s:6:\"canvas\";N;s:7:\"project\";N;s:10:\"fk_project\";N;s:10:\"thirdparty\";N;s:4:\"user\";N;s:3:\"ref\";s:1:\"1\";s:7:\"ref_ext\";N;s:6:\"statut\";N;s:10:\"fk_account\";N;s:11:\"note_public\";N;s:12:\"note_private\";N;s:4:\"note\";N;s:8:\"comments\";a:0:{}s:15:\"date_validation\";N;s:16:\"next_prev_filter\";N;s:6:\"entity\";i:1;s:5:\"label\";N;s:3:\"tms\";i:1577030462;s:13:\"fk_user_valid\";s:2:\"12\";}',12,1,0,'2019-12-22 23:01:48','Alice Adminson',''),(34,'2020-01-10 00:42:47','PAYMENT_VARIOUS_CREATE',10.00000000,'e20ec32652d7564cdca915e95528b68bd3b770b82defe64ead1af3f6dc6bc150','25514deeca716e41c02699d9466fc640f4b7da0a0c953637b542c555f9634f9b','payment_various',4,'4','2020-01-10 12:00:00','O:8:\"stdClass\":7:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";i:4;s:4:\"date\";i:1578643200;s:9:\"type_code\";s:3:\"VIR\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";s:0:\"\";s:6:\"amount\";i:10;}',12,1,0,'2020-01-10 04:42:47','Alice Adminson',''),(35,'2020-01-10 01:08:37','PAYMENT_VARIOUS_MODIFY',10.00000000,'94bd3491e8e553e6e633cd4a40c8c0ef3a6af0bd60df1d8e768d3c8c2a37b79b','eeadf2ffc7bd611e3b739e8825307f9e9cb2d9dddbd9e16b1f092fa5d881a5ca','payment_various',4,'4','2020-01-10 00:00:00','O:8:\"stdClass\":7:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:1:\"4\";s:4:\"date\";i:1578600000;s:9:\"type_code\";s:3:\"VIR\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";s:0:\"\";s:6:\"amount\";d:10;}',12,1,0,'2020-01-10 05:08:37','Alice Adminson',''),(36,'2020-01-10 01:08:43','PAYMENT_VARIOUS_MODIFY',10.00000000,'02ecc274221832fcbf8f525ed64f1391415a29dded01022a5a4c51cfb2c5ad49','c274f2f609af56bd40b74000eaa2f6866a734feb0fc262ce3431ac9f91a754e2','payment_various',4,'4','2020-01-10 00:00:00','O:8:\"stdClass\":7:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:1:\"4\";s:4:\"date\";i:1578600000;s:9:\"type_code\";s:0:\"\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";s:0:\"\";s:6:\"amount\";d:10;}',12,1,0,'2020-01-10 05:08:43','Alice Adminson',''),(37,'2020-01-10 01:17:51','PAYMENT_VARIOUS_MODIFY',10.00000000,'214ad5673f893c2da41a8c87ccbcae92dccf17c9d4a13b3d04a9497d21bf68b8','ffbebb278eaa1c75f0cf5afdd05c8367887615a7329f2b3ab628b8f0da10f9d8','payment_various',4,'4','2020-01-10 00:00:00','O:8:\"stdClass\":7:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:1:\"4\";s:4:\"date\";i:1578600000;s:9:\"type_code\";s:0:\"\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";s:0:\"\";s:6:\"amount\";d:10;}',12,1,0,'2020-01-10 05:17:51','Alice Adminson',''),(38,'2020-01-16 01:22:16','BILL_VALIDATE',123.00000000,'aae0a1eb8b3da6686020252194f47ce82301fb604ee213ae120a2885197735d5','b414061da9abbd2dec7153a7d53978c177c5c5f55ed8ace177a02e46e7a74312','facture',221,'AC2001-0001','2020-01-16 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:16:\"Magic Food Store\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:22:\"65 holdywood boulevard\";s:3:\"zip\";s:6:\"123456\";s:4:\"town\";s:7:\"BigTown\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";s:4:\"0101\";s:5:\"email\";s:18:\"myemail@domain.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:10:\"10/10/2010\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1301-0008\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"ES\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579129200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:123;s:9:\"total_tva\";d:0;s:9:\"total_ttc\";d:123;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:12:\"123.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:12:\"123.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:12:\"123.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:12:\"123.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0001\";s:11:\"note_public\";N;}',12,1,0,'2020-01-16 02:22:16','Alice Adminson',''),(39,'2020-01-16 01:33:27','BILL_VALIDATE',20.50000000,'777eb88a0b91c6d376881534a7c84a9b9ee5a6d7efedbae3b0c00d7e36bacba9','b78e5b5909c49c575142b429f2d09abb2d19c5545f815a1cabe0f2ed80ded6e4','facture',224,'AC2001-0002','2020-01-16 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:16:\"Magic Food Store\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:22:\"65 holdywood boulevard\";s:3:\"zip\";s:6:\"123456\";s:4:\"town\";s:7:\"BigTown\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";s:4:\"0101\";s:5:\"email\";s:18:\"myemail@domain.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:10:\"10/10/2010\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1301-0008\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"ES\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579129200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:20.5;s:9:\"total_tva\";d:0;s:9:\"total_ttc\";d:20.5;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"20.50000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"20.50000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"20.50000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"20.50000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0002\";s:11:\"note_public\";N;}',12,1,0,'2020-01-16 02:33:27','Alice Adminson',''),(40,'2020-01-16 01:36:48','PAYMENT_CUSTOMER_CREATE',20.50000000,'cb03ceef89e1630e5a3ba8b3b1ca6c77e42b97fc2884a661c04e9e5c8b3afa1e','18bed0f0566b20ffa32c49c901cfc8b46485ef2172b22c676cef07ce8bd2d90b','payment',40,'PAY2001-0006','2020-01-16 12:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY2001-0006\";s:4:\"date\";i:1579172400;s:9:\"type_code\";s:3:\"VIR\";s:11:\"payment_num\";N;s:4:\"note\";s:0:\"\";s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:4:\"20.5\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:16:\"Magic Food Store\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:22:\"65 holdywood boulevard\";s:3:\"zip\";s:6:\"123456\";s:4:\"town\";s:7:\"BigTown\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";s:4:\"0101\";s:5:\"email\";s:18:\"myemail@domain.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:10:\"10/10/2010\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1301-0008\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"ES\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1579129200;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";s:11:\"20.50000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"20.50000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"AC2001-0002\";s:11:\"note_public\";N;}}}s:6:\"amount\";d:20.5;}',12,1,0,'2020-01-16 02:36:48','Alice Adminson',''),(41,'2020-01-19 13:51:43','BILL_VALIDATE',239.20000000,'7f38eaf315003f652b72fd27e55e71010a5ed0339086aa100b9a91a6045bb06f','26d074106c5f096ea1795ce7ed399cda6c2b2d5ac78dd9c2e152a0a0aa6ef47b','facture',227,'AC2001-0003','2020-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579388400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:200;s:9:\"total_tva\";d:39.2;s:9:\"total_ttc\";d:239.2;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:12:\"200.00000000\";s:23:\"multicurrency_total_tva\";s:11:\"39.20000000\";s:23:\"multicurrency_total_ttc\";s:12:\"239.20000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:6:\"19.600\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:12:\"200.00000000\";s:9:\"total_tva\";s:11:\"39.20000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:12:\"239.20000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0003\";s:11:\"note_public\";N;}',12,1,0,'2020-01-19 14:51:43','Alice Adminson',''),(42,'2020-01-19 14:01:26','BILL_VALIDATE',50.54000000,'107572ffe2f1ccf1ee4fe7b39c5a4ed40a485c1d37c926fbff8a0e420396d641','352ac5e380c996d7bff798c1369f8a85e86cc98a2864e278cbe0cb6b309c12a5','facture',228,'AC2001-0004','2020-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579388400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:48.6;s:9:\"total_tva\";d:1.94;s:9:\"total_ttc\";d:50.54;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:2:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"2.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"52.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"2.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"52.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:2;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"-1.40000000\";s:23:\"multicurrency_total_tva\";s:11:\"-0.06000000\";s:23:\"multicurrency_total_ttc\";s:11:\"-1.46000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"-1.40000000\";s:9:\"total_tva\";s:11:\"-0.06000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"-1.46000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0004\";s:11:\"note_public\";N;}',12,1,0,'2020-01-19 15:01:26','Alice Adminson',''),(43,'2020-01-19 14:04:53','BILL_VALIDATE',50.54000000,'795f9c5b741f360e3194ac8b3bb163c244b2761125f7507935baa44b319c624a','8cbb81e210f60d71b33a7fdcae0202721c2b4a8cdd59fe77ff2a8942839159b4','facture',228,'AC2001-0004','2020-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579388400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:48.6;s:9:\"total_tva\";d:1.94;s:9:\"total_ttc\";d:50.54;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:2:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"2.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"52.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"2.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"52.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:2;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"-1.40000000\";s:23:\"multicurrency_total_tva\";s:11:\"-0.06000000\";s:23:\"multicurrency_total_ttc\";s:11:\"-1.46000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"-1.40000000\";s:9:\"total_tva\";s:11:\"-0.06000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"-1.46000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0004\";s:11:\"note_public\";N;}',12,1,0,'2020-01-19 15:04:53','Alice Adminson',''),(44,'2020-01-19 14:13:07','BILL_VALIDATE',50.54000000,'0c5b79703d1db88579a1fdb74053596defebddb7a1e6d4c5c8b065729be10201','41669e482d1e5e7a58c132c2bf85bc75372cadb4d9b97047a98cc74a9d1fd767','facture',228,'AC2001-0004','2020-01-19 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:10:\"Indian SAS\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:13:\"1 alalah road\";s:3:\"zip\";N;s:4:\"town\";s:5:\"Delhi\";s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";N;s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:13:\"5000.00000000\";s:11:\"typent_code\";s:8:\"TE_SMALL\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1212-0007\";s:16:\"code_fournisseur\";s:11:\"SU1212-0005\";s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1579388400;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"3\";s:8:\"total_ht\";d:48.6;s:9:\"total_tva\";d:1.94;s:9:\"total_ttc\";d:50.54;s:12:\"revenuestamp\";s:10:\"0.00000000\";s:11:\"invoiceline\";a:2:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"2.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"52.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"2.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"52.00000000\";s:9:\"info_bits\";s:1:\"0\";}i:2;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"-1.40000000\";s:23:\"multicurrency_total_tva\";s:11:\"-0.06000000\";s:23:\"multicurrency_total_ttc\";s:11:\"-1.46000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"0\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"4.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"-1.40000000\";s:9:\"total_tva\";s:11:\"-0.06000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"-1.46000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"AC2001-0004\";s:11:\"note_public\";N;}',12,1,0,'2020-01-19 15:13:07','Alice Adminson',''),(46,'2020-01-21 00:02:14','MEMBER_SUBSCRIPTION_CREATE',50.00000000,'aacdc952cc25b2d4f90222cea6f684320c76477e55b87687397d82e70694c517','ce99e3278ebb1f5f2540a0d7205a4b1230e2e23c4bed48b567433b34786b88e4','subscription',2,'','2013-07-18 00:00:00','O:8:\"stdClass\":10:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:5:\"datec\";i:1579564934;s:5:\"dateh\";i:1374098400;s:5:\"datef\";i:1405548000;s:11:\"fk_adherent\";s:1:\"3\";s:6:\"amount\";s:2:\"50\";s:2:\"id\";i:2;s:10:\"import_key\";N;s:6:\"statut\";N;s:4:\"note\";s:17:\"Subscription 2013\";}',12,1,0,'2020-01-21 01:02:14','Alice Adminson',''),(47,'2020-01-21 09:22:37','MEMBER_SUBSCRIPTION_CREATE',50.00000000,'43a9804c627e78b20c7842a563099892a2d464b207f96bb393886f0b0ea52b4a','c6befc858191e428330c0054328f84d09f7be0f5603fb5b15e3a59980bb8e6eb','subscription',3,'','2017-07-18 00:00:00','O:8:\"stdClass\":10:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:5:\"datec\";i:1579598557;s:5:\"dateh\";i:1500328800;s:5:\"datef\";i:1531778400;s:11:\"fk_adherent\";s:1:\"4\";s:6:\"amount\";s:2:\"50\";s:2:\"id\";i:3;s:10:\"import_key\";N;s:6:\"statut\";N;s:4:\"note\";s:17:\"Subscription 2017\";}',12,1,0,'2020-01-21 10:22:37','Alice Adminson',''),(48,'2020-01-21 09:23:17','MEMBER_SUBSCRIPTION_CREATE',50.00000000,'d44357a1d55ffedd8f24690cd3c8aa43f9bfd33aa362ad558fd486b3b7f62a50','7c32d13e68bb245ab06b8e11efa5ed9e5fdb15650265dc80d5cb00d4674c134d','subscription',4,'','2017-07-18 00:00:00','O:8:\"stdClass\":10:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:5:\"datec\";i:1579598597;s:5:\"dateh\";i:1500328800;s:5:\"datef\";i:1531778400;s:11:\"fk_adherent\";s:1:\"2\";s:6:\"amount\";s:2:\"50\";s:2:\"id\";i:4;s:10:\"import_key\";N;s:6:\"statut\";N;s:4:\"note\";s:17:\"Subscription 2017\";}',12,1,0,'2020-01-21 10:23:17','Alice Adminson',''),(49,'2020-01-21 09:23:17','BILL_VALIDATE',50.00000000,'30d0b37723f3cd2fce6afefd56cbdeb90f7cdee0e898e6ebaa411d84d3123ca0','e0301b9c4da11aa095a90cd9989b9fb6d0c635263cb2a8998b4ba57b60751d11','facture',229,'FA1707-0026','2017-07-18 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1500328800;s:10:\"ref_client\";s:0:\"\";s:4:\"type\";i:0;s:8:\"total_ht\";d:50;s:9:\"total_tva\";d:0;s:9:\"total_ttc\";d:50;s:12:\"revenuestamp\";N;s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"50.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA1707-0026\";s:11:\"note_public\";s:0:\"\";}',12,1,0,'2020-01-21 10:23:17','Alice Adminson',''),(50,'2020-01-21 09:23:17','PAYMENT_CUSTOMER_CREATE',50.00000000,'41e6e00dfd2b96c3d9056489f22241959407ad0282405d37ada32da919e2d744','625ed1ef1ab9edddabc0b1588542eb6eac30ac9224e75812dabcbdfa0211b918','payment',41,'PAY2001-0007','2020-01-21 00:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY2001-0007\";s:4:\"date\";i:1579561200;s:9:\"type_code\";s:3:\"CHQ\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";N;s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"50\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1500328800;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1707-0026\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:50;}',12,1,0,'2020-01-21 10:23:17','Alice Adminson',''),(51,'2020-01-21 09:23:28','MEMBER_SUBSCRIPTION_CREATE',50.00000000,'b24dfe36f8a3e5971898dd4fcfc61d775d4f0937169f44986bc9478d189e8e60','6160f4fb0fe73ce769a03f9d5460db7051602796090b9e44b51c6eadbd63c309','subscription',5,'','2018-07-18 00:00:00','O:8:\"stdClass\":10:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:5:\"datec\";i:1579598608;s:5:\"dateh\";i:1531864800;s:5:\"datef\";i:1563314400;s:11:\"fk_adherent\";s:1:\"2\";s:6:\"amount\";s:2:\"50\";s:2:\"id\";i:5;s:10:\"import_key\";N;s:6:\"statut\";N;s:4:\"note\";s:17:\"Subscription 2018\";}',12,1,0,'2020-01-21 10:23:28','Alice Adminson',''),(52,'2020-01-21 09:23:28','BILL_VALIDATE',50.00000000,'a6ba6c4518b94977daa8a65b6e9063e81b37563037455ee4608724674c53ea01','3724c09a72bbaab46bdde59c79ffd5d439ffb43f2a509c49ebe05aa9acdcda7a','facture',230,'FA1807-0027','2018-07-18 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1531864800;s:10:\"ref_client\";s:0:\"\";s:4:\"type\";i:0;s:8:\"total_ht\";d:50;s:9:\"total_tva\";d:0;s:9:\"total_ttc\";d:50;s:12:\"revenuestamp\";N;s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"50.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA1807-0027\";s:11:\"note_public\";s:0:\"\";}',12,1,0,'2020-01-21 10:23:28','Alice Adminson',''),(53,'2020-01-21 09:23:28','PAYMENT_CUSTOMER_CREATE',50.00000000,'54bbe038c35a0b1f63cccfbd89ce3232fc5dff8a56e7ff33bffebb9f412827bc','444449d4566c78f70a64b92d0008e9ddc933be75326cebdf5d41c4a94acdddc4','payment',42,'PAY2001-0008','2020-01-21 00:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY2001-0008\";s:4:\"date\";i:1579561200;s:9:\"type_code\";s:3:\"CHQ\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";N;s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"50\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1531864800;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1807-0027\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:50;}',12,1,0,'2020-01-21 10:23:28','Alice Adminson',''),(54,'2020-01-21 09:23:49','MEMBER_SUBSCRIPTION_CREATE',50.00000000,'c4b9d402ebf74ae10353550d9ef1ce08c899b6533bdc5434fa105599da3e28ce','4642f26ec597360d7616ed0d925080970614232397fc17022922eecad2e727c9','subscription',6,'','2019-07-18 00:00:00','O:8:\"stdClass\":10:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:5:\"datec\";i:1579598629;s:5:\"dateh\";i:1563400800;s:5:\"datef\";i:1594936800;s:11:\"fk_adherent\";s:1:\"2\";s:6:\"amount\";s:2:\"50\";s:2:\"id\";i:6;s:10:\"import_key\";N;s:6:\"statut\";N;s:4:\"note\";s:17:\"Subscription 2019\";}',12,1,0,'2020-01-21 10:23:49','Alice Adminson',''),(55,'2020-01-21 09:23:49','BILL_VALIDATE',50.00000000,'3e7b2c3b0b26c1982a3f8205b48a68756d81cd5bb673e1d2c7c09ce12c2086b9','ca332254195c3a59ee8c2ed0c60aec16a4229e83f5138f69747e65136ad370fa','facture',231,'FA1907-0028','2019-07-18 00:00:00','O:8:\"stdClass\":12:{s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:4:\"date\";i:1563400800;s:10:\"ref_client\";s:0:\"\";s:4:\"type\";i:0;s:8:\"total_ht\";d:50;s:9:\"total_tva\";d:0;s:9:\"total_ttc\";d:50;s:12:\"revenuestamp\";N;s:11:\"invoiceline\";a:1:{i:1;O:8:\"stdClass\":17:{s:3:\"ref\";N;s:18:\"multicurrency_code\";s:3:\"EUR\";s:22:\"multicurrency_total_ht\";s:11:\"50.00000000\";s:23:\"multicurrency_total_tva\";s:10:\"0.00000000\";s:23:\"multicurrency_total_ttc\";s:11:\"50.00000000\";s:3:\"qty\";s:1:\"1\";s:12:\"product_type\";s:1:\"1\";s:12:\"vat_src_code\";s:0:\"\";s:6:\"tva_tx\";s:5:\"0.000\";s:12:\"localtax1_tx\";s:5:\"0.000\";s:12:\"localtax2_tx\";s:5:\"0.000\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:15:\"total_localtax1\";s:10:\"0.00000000\";s:15:\"total_localtax2\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:9:\"info_bits\";s:1:\"0\";}}s:3:\"ref\";s:11:\"FA1907-0028\";s:11:\"note_public\";s:0:\"\";}',12,1,0,'2020-01-21 10:23:49','Alice Adminson',''),(56,'2020-01-21 09:23:49','PAYMENT_CUSTOMER_CREATE',50.00000000,'87cab3c0d2443145bb01b7364b78917756b2bf9b7908355b1a3258c28ecf1400','966571aa0fe244a6e762172fff34c03610ba4066f6f95369f514076c97975b6b','payment',43,'PAY2001-0009','2020-01-21 00:00:00','O:8:\"stdClass\":8:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:3:\"ref\";s:12:\"PAY2001-0009\";s:4:\"date\";i:1579561200;s:9:\"type_code\";s:2:\"CB\";s:11:\"payment_num\";s:0:\"\";s:4:\"note\";N;s:12:\"payment_part\";a:1:{i:1;O:8:\"stdClass\":3:{s:6:\"amount\";s:2:\"50\";s:10:\"thirdparty\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"Dupont Alain\";s:10:\"name_alias\";s:0:\"\";s:7:\"address\";s:0:\"\";s:3:\"zip\";N;s:4:\"town\";N;s:10:\"state_code\";N;s:5:\"phone\";N;s:3:\"fax\";N;s:5:\"email\";s:18:\"pcurie@example.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:0:\"\";s:7:\"idprof2\";s:0:\"\";s:7:\"idprof3\";s:0:\"\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:0:\"\";s:15:\"localtax1_assuj\";N;s:15:\"localtax1_value\";s:5:\"0.000\";s:15:\"localtax2_assuj\";N;s:15:\"localtax2_value\";s:5:\"0.000\";s:8:\"managers\";N;s:7:\"capital\";s:10:\"0.00000000\";s:11:\"typent_code\";s:10:\"TE_UNKNOWN\";s:20:\"forme_juridique_code\";N;s:11:\"code_client\";s:11:\"CU1601-0019\";s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:0:\"\";}s:7:\"invoice\";O:8:\"stdClass\":9:{s:4:\"date\";i:1563400800;s:10:\"ref_client\";N;s:4:\"type\";s:1:\"0\";s:8:\"total_ht\";s:11:\"50.00000000\";s:9:\"total_tva\";s:10:\"0.00000000\";s:9:\"total_ttc\";s:11:\"50.00000000\";s:12:\"revenuestamp\";s:10:\"0.00000000\";s:3:\"ref\";s:11:\"FA1907-0028\";s:11:\"note_public\";N;}}}s:6:\"amount\";i:50;}',12,1,0,'2020-01-21 10:23:49','Alice Adminson',''),(57,'2020-01-21 09:33:28','MODULE_RESET',0.00000000,'0000000000','d8134616ec977d8204a6856269ccfc799ea7eccc80074ac62350a5cdee3b070b','module',1,'systemevent','2020-01-21 10:33:28','O:8:\"stdClass\":6:{s:9:\"mycompany\";O:8:\"stdClass\":29:{s:4:\"name\";s:12:\"MyBigCompany\";s:10:\"name_alias\";N;s:7:\"address\";s:15:\"21 Jump street.\";s:3:\"zip\";s:5:\"75500\";s:4:\"town\";s:6:\"MyTown\";s:10:\"state_code\";s:0:\"\";s:5:\"phone\";s:8:\"09123123\";s:3:\"fax\";s:8:\"09123124\";s:5:\"email\";s:24:\"myemail@mybigcompany.com\";s:7:\"barcode\";N;s:7:\"idprof1\";s:6:\"123456\";s:7:\"idprof2\";s:7:\"ABC-DEF\";s:7:\"idprof3\";s:9:\"15E-45-8D\";s:7:\"idprof4\";s:0:\"\";s:7:\"idprof5\";s:0:\"\";s:7:\"idprof6\";s:0:\"\";s:9:\"tva_intra\";s:10:\"FR12345678\";s:15:\"localtax1_assuj\";i:1;s:15:\"localtax1_value\";N;s:15:\"localtax2_assuj\";i:1;s:15:\"localtax2_value\";N;s:8:\"managers\";s:10:\"Zack Zeceo\";s:7:\"capital\";s:5:\"10000\";s:11:\"typent_code\";N;s:20:\"forme_juridique_code\";s:0:\"\";s:11:\"code_client\";N;s:16:\"code_fournisseur\";N;s:7:\"ref_ext\";N;s:12:\"country_code\";s:2:\"IN\";}s:2:\"id\";i:1;s:7:\"element\";s:6:\"module\";s:3:\"ref\";s:11:\"systemevent\";s:6:\"entity\";i:1;s:4:\"date\";i:1579599208;}',12,1,0,'2020-01-21 10:33:28','Alice Adminson',''); /*!40000 ALTER TABLE `llx_blockedlog` ENABLE KEYS */; UNLOCK TABLES; @@ -1047,7 +1048,7 @@ CREATE TABLE `llx_blockedlog_authority` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `blockchain` longtext COLLATE utf8_unicode_ci NOT NULL, `signature` varchar(100) COLLATE utf8_unicode_ci NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), KEY `signature` (`signature`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1071,17 +1072,17 @@ DROP TABLE IF EXISTS `llx_bom_bom`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_bom_bom` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, - `note_private` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, `qty` double(24,8) DEFAULT NULL, - `efficiency` double(8,4) DEFAULT '1.0000', + `efficiency` double(8,4) DEFAULT 1.0000, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `date_valid` datetime DEFAULT NULL, `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -1121,7 +1122,7 @@ DROP TABLE IF EXISTS `llx_bom_bom_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_bom_bom_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -1149,13 +1150,13 @@ CREATE TABLE `llx_bom_bomline` ( `fk_bom` int(11) NOT NULL, `fk_product` int(11) NOT NULL, `fk_bom_child` int(11) DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `qty` double(24,8) NOT NULL, - `efficiency` double(8,4) NOT NULL DEFAULT '1.0000', + `efficiency` double(8,4) NOT NULL DEFAULT 1.0000, `position` int(11) NOT NULL, - `qty_frozen` smallint(6) DEFAULT '0', - `disable_stock_change` smallint(6) DEFAULT '0', + `qty_frozen` smallint(6) DEFAULT 0, + `disable_stock_change` smallint(6) DEFAULT 0, PRIMARY KEY (`rowid`), KEY `idx_bom_bomline_rowid` (`rowid`), KEY `idx_bom_bomline_fk_product` (`fk_product`), @@ -1183,7 +1184,7 @@ DROP TABLE IF EXISTS `llx_bom_bomline_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_bom_bomline_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -1210,15 +1211,14 @@ CREATE TABLE `llx_bookmark` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_user` int(11) NOT NULL, `dateb` datetime DEFAULT NULL, - `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `url` text COLLATE utf8_unicode_ci DEFAULT NULL, `target` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `title` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `favicon` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) DEFAULT '0', - `entity` int(11) NOT NULL DEFAULT '1', + `position` int(11) DEFAULT 0, + `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_bookmark_url` (`fk_user`,`url`), - UNIQUE KEY `uk_bookmark_title` (`fk_user`,`title`) + UNIQUE KEY `uk_bookmark_title` (`fk_user`,`entity`,`title`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1244,15 +1244,15 @@ CREATE TABLE `llx_bordereau_cheque` ( `datec` datetime NOT NULL, `date_bordereau` date DEFAULT NULL, `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `amount` double(24,8) NOT NULL, `nbcheque` smallint(6) NOT NULL, `fk_bank_account` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, - `statut` smallint(6) NOT NULL DEFAULT '0', + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, + `statut` smallint(6) NOT NULL DEFAULT 0, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bordereau_cheque` (`ref`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1277,11 +1277,11 @@ DROP TABLE IF EXISTS `llx_boxes`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_boxes` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `box_id` int(11) NOT NULL, `position` smallint(6) NOT NULL, `box_order` varchar(3) COLLATE utf8_unicode_ci NOT NULL, - `fk_user` int(11) NOT NULL DEFAULT '0', + `fk_user` int(11) NOT NULL DEFAULT 0, `maxline` int(11) DEFAULT NULL, `params` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -1312,8 +1312,8 @@ DROP TABLE IF EXISTS `llx_boxes_def`; CREATE TABLE `llx_boxes_def` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `file` varchar(200) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `entity` int(11) NOT NULL DEFAULT 1, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `note` varchar(130) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_boxes_def` (`file`,`entity`,`note`) @@ -1326,7 +1326,7 @@ CREATE TABLE `llx_boxes_def` ( LOCK TABLES `llx_boxes_def` WRITE; /*!40000 ALTER TABLE `llx_boxes_def` DISABLE KEYS */; -INSERT INTO `llx_boxes_def` VALUES (188,'box_services_vendus.php',1,'2013-08-05 20:40:27',NULL),(323,'box_actions.php',2,'2015-03-13 15:29:19',NULL),(324,'box_clients.php',2,'2015-03-13 20:21:35',NULL),(325,'box_prospect.php',2,'2015-03-13 20:21:35',NULL),(326,'box_contacts.php',2,'2015-03-13 20:21:35',NULL),(327,'box_activity.php',2,'2015-03-13 20:21:35','(WarningUsingThisBoxSlowDown)'),(328,'box_propales.php',2,'2015-03-13 20:32:38',NULL),(329,'box_comptes.php',2,'2015-03-13 20:33:09',NULL),(330,'box_factures_imp.php',2,'2015-03-13 20:33:09',NULL),(331,'box_factures.php',2,'2015-03-13 20:33:09',NULL),(332,'box_produits.php',2,'2015-03-13 20:33:09',NULL),(333,'box_produits_alerte_stock.php',2,'2015-03-13 20:33:09',NULL),(347,'box_clients.php',1,'2017-11-15 22:05:57',NULL),(348,'box_prospect.php',1,'2017-11-15 22:05:57',NULL),(349,'box_contacts.php',1,'2017-11-15 22:05:57',NULL),(350,'box_activity.php',1,'2017-11-15 22:05:57','(WarningUsingThisBoxSlowDown)'),(374,'box_services_contracts.php',1,'2017-11-15 22:38:37',NULL),(377,'box_project.php',1,'2017-11-15 22:38:44',NULL),(378,'box_task.php',1,'2017-11-15 22:38:44',NULL),(388,'box_contracts.php',1,'2017-11-15 22:39:52',NULL),(389,'box_services_expired.php',1,'2017-11-15 22:39:52',NULL),(390,'box_ficheinter.php',1,'2017-11-15 22:39:56',NULL),(392,'box_graph_propales_permonth.php',1,'2017-11-15 22:41:47',NULL),(393,'box_propales.php',1,'2017-11-15 22:41:47',NULL),(396,'box_graph_product_distribution.php',1,'2017-11-15 22:41:47',NULL),(403,'box_goodcustomers.php',1,'2018-07-30 11:13:20','(WarningUsingThisBoxSlowDown)'),(404,'box_external_rss.php',1,'2018-07-30 11:15:25','1 (Dolibarr.org News)'),(409,'box_produits.php',1,'2018-07-30 13:38:11',NULL),(410,'box_produits_alerte_stock.php',1,'2018-07-30 13:38:11',NULL),(411,'box_commandes.php',1,'2018-07-30 13:38:11',NULL),(412,'box_graph_orders_permonth.php',1,'2018-07-30 13:38:11',NULL),(413,'box_graph_invoices_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL),(414,'box_graph_orders_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL),(415,'box_fournisseurs.php',1,'2018-07-30 13:38:11',NULL),(416,'box_factures_fourn_imp.php',1,'2018-07-30 13:38:11',NULL),(417,'box_factures_fourn.php',1,'2018-07-30 13:38:11',NULL),(418,'box_supplier_orders.php',1,'2018-07-30 13:38:11',NULL),(419,'box_actions.php',1,'2018-07-30 15:42:32',NULL),(424,'box_factures_imp.php',1,'2017-02-07 18:56:12',NULL),(425,'box_factures.php',1,'2017-02-07 18:56:12',NULL),(426,'box_graph_invoices_permonth.php',1,'2017-02-07 18:56:12',NULL),(427,'box_comptes.php',1,'2017-02-07 18:56:12',NULL),(429,'box_lastlogin.php',1,'2017-08-27 13:29:14',NULL),(430,'box_bookmarks.php',1,'2018-01-19 11:27:34',NULL),(431,'box_members.php',1,'2018-01-19 11:27:56',NULL),(432,'box_birthdays.php',1,'2019-06-05 08:45:40',NULL),(433,'box_last_ticket',1,'2019-06-05 09:15:29',NULL),(434,'box_last_modified_ticket',1,'2019-06-05 09:15:29',NULL),(436,'box_accountancy_last_manual_entries.php',1,'2019-11-28 11:52:58',NULL),(437,'box_accountancy_suspense_account.php',1,'2019-11-28 11:52:58',NULL),(438,'box_supplier_orders_awaiting_reception.php',1,'2019-11-28 11:52:59',NULL),(439,'box_mos.php',1,'2019-11-29 08:57:42',NULL),(445,'box_shipments.php',1,'2020-01-13 14:38:20',NULL); +INSERT INTO `llx_boxes_def` VALUES (323,'box_actions.php',2,'2015-03-13 15:29:19',NULL),(324,'box_clients.php',2,'2015-03-13 20:21:35',NULL),(325,'box_prospect.php',2,'2015-03-13 20:21:35',NULL),(326,'box_contacts.php',2,'2015-03-13 20:21:35',NULL),(327,'box_activity.php',2,'2015-03-13 20:21:35','(WarningUsingThisBoxSlowDown)'),(328,'box_propales.php',2,'2015-03-13 20:32:38',NULL),(329,'box_comptes.php',2,'2015-03-13 20:33:09',NULL),(330,'box_factures_imp.php',2,'2015-03-13 20:33:09',NULL),(331,'box_factures.php',2,'2015-03-13 20:33:09',NULL),(332,'box_produits.php',2,'2015-03-13 20:33:09',NULL),(333,'box_produits_alerte_stock.php',2,'2015-03-13 20:33:09',NULL),(347,'box_clients.php',1,'2017-11-15 22:05:57',NULL),(348,'box_prospect.php',1,'2017-11-15 22:05:57',NULL),(349,'box_contacts.php',1,'2017-11-15 22:05:57',NULL),(350,'box_activity.php',1,'2017-11-15 22:05:57','(WarningUsingThisBoxSlowDown)'),(374,'box_services_contracts.php',1,'2017-11-15 22:38:37',NULL),(377,'box_project.php',1,'2017-11-15 22:38:44',NULL),(378,'box_task.php',1,'2017-11-15 22:38:44',NULL),(388,'box_contracts.php',1,'2017-11-15 22:39:52',NULL),(389,'box_services_expired.php',1,'2017-11-15 22:39:52',NULL),(390,'box_ficheinter.php',1,'2017-11-15 22:39:56',NULL),(392,'box_graph_propales_permonth.php',1,'2017-11-15 22:41:47',NULL),(393,'box_propales.php',1,'2017-11-15 22:41:47',NULL),(396,'box_graph_product_distribution.php',1,'2017-11-15 22:41:47',NULL),(403,'box_goodcustomers.php',1,'2018-07-30 11:13:20','(WarningUsingThisBoxSlowDown)'),(404,'box_external_rss.php',1,'2018-07-30 11:15:25','1 (Dolibarr.org News)'),(409,'box_produits.php',1,'2018-07-30 13:38:11',NULL),(410,'box_produits_alerte_stock.php',1,'2018-07-30 13:38:11',NULL),(411,'box_commandes.php',1,'2018-07-30 13:38:11',NULL),(412,'box_graph_orders_permonth.php',1,'2018-07-30 13:38:11',NULL),(413,'box_graph_invoices_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL),(414,'box_graph_orders_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL),(415,'box_fournisseurs.php',1,'2018-07-30 13:38:11',NULL),(416,'box_factures_fourn_imp.php',1,'2018-07-30 13:38:11',NULL),(417,'box_factures_fourn.php',1,'2018-07-30 13:38:11',NULL),(418,'box_supplier_orders.php',1,'2018-07-30 13:38:11',NULL),(419,'box_actions.php',1,'2018-07-30 15:42:32',NULL),(424,'box_factures_imp.php',1,'2017-02-07 18:56:12',NULL),(425,'box_factures.php',1,'2017-02-07 18:56:12',NULL),(426,'box_graph_invoices_permonth.php',1,'2017-02-07 18:56:12',NULL),(427,'box_comptes.php',1,'2017-02-07 18:56:12',NULL),(429,'box_lastlogin.php',1,'2017-08-27 13:29:14',NULL),(430,'box_bookmarks.php',1,'2018-01-19 11:27:34',NULL),(431,'box_members.php',1,'2018-01-19 11:27:56',NULL),(432,'box_birthdays.php',1,'2019-06-05 08:45:40',NULL),(433,'box_last_ticket',1,'2019-06-05 09:15:29',NULL),(434,'box_last_modified_ticket',1,'2019-06-05 09:15:29',NULL),(436,'box_accountancy_last_manual_entries.php',1,'2019-11-28 11:52:58',NULL),(437,'box_accountancy_suspense_account.php',1,'2019-11-28 11:52:58',NULL),(438,'box_supplier_orders_awaiting_reception.php',1,'2019-11-28 11:52:59',NULL),(439,'box_mos.php',1,'2019-11-29 08:57:42',NULL),(445,'box_shipments.php',1,'2020-01-13 14:38:20',NULL); /*!40000 ALTER TABLE `llx_boxes_def` ENABLE KEYS */; UNLOCK TABLES; @@ -1339,14 +1339,14 @@ DROP TABLE IF EXISTS `llx_budget`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_budget` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `status` int(11) DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `date_start` date DEFAULT NULL, `date_end` date DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` int(11) DEFAULT NULL, @@ -1376,7 +1376,7 @@ CREATE TABLE `llx_budget_lines` ( `fk_project_ids` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `amount` double(24,8) NOT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` int(11) DEFAULT NULL, @@ -1404,16 +1404,16 @@ DROP TABLE IF EXISTS `llx_c_accounting_category`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_accounting_category` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `range_account` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `sens` tinyint(4) NOT NULL DEFAULT '0', - `category_type` tinyint(4) NOT NULL DEFAULT '0', + `sens` tinyint(4) NOT NULL DEFAULT 0, + `category_type` tinyint(4) NOT NULL DEFAULT 0, `formula` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `position` int(11) DEFAULT '0', + `position` int(11) DEFAULT 0, `fk_country` int(11) DEFAULT NULL, - `active` int(11) DEFAULT '1', + `active` int(11) DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_accounting_category` (`code`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1442,7 +1442,7 @@ CREATE TABLE `llx_c_action_trigger` ( `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `elementtype` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `rang` int(11) DEFAULT '0', + `rang` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_action_trigger_code` (`code`), KEY `idx_action_trigger_rang` (`rang`) @@ -1472,9 +1472,9 @@ CREATE TABLE `llx_c_actioncomm` ( `type` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'system', `libelle` varchar(48) COLLATE utf8_unicode_ci NOT NULL, `module` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `todo` tinyint(4) DEFAULT NULL, - `position` int(11) NOT NULL DEFAULT '0', + `position` int(11) NOT NULL DEFAULT 0, `color` varchar(9) COLLATE utf8_unicode_ci DEFAULT NULL, `picto` varchar(48) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), @@ -1503,7 +1503,7 @@ CREATE TABLE `llx_c_availability` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(60) COLLATE utf8_unicode_ci NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_availability` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1529,13 +1529,13 @@ DROP TABLE IF EXISTS `llx_c_barcode_type`; CREATE TABLE `llx_c_barcode_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `libelle` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `coder` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `example` varchar(16) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_barcode_type` (`code`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1558,10 +1558,10 @@ DROP TABLE IF EXISTS `llx_c_chargesociales`; CREATE TABLE `llx_c_chargesociales` ( `id` int(11) NOT NULL AUTO_INCREMENT, `libelle` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, - `deductible` smallint(6) NOT NULL DEFAULT '0', - `active` tinyint(4) NOT NULL DEFAULT '1', + `deductible` smallint(6) NOT NULL DEFAULT 0, + `active` tinyint(4) NOT NULL DEFAULT 1, `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, - `fk_pays` int(11) NOT NULL DEFAULT '1', + `fk_pays` int(11) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`) @@ -1589,7 +1589,7 @@ CREATE TABLE `llx_c_civility` ( `rowid` int(11) NOT NULL, `code` varchar(6) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_civility` (`code`) @@ -1618,8 +1618,9 @@ CREATE TABLE `llx_c_country` ( `code` varchar(2) COLLATE utf8_unicode_ci NOT NULL, `code_iso` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(50) COLLATE utf8_unicode_ci NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', - `favorite` tinyint(4) NOT NULL DEFAULT '0', + `active` tinyint(4) NOT NULL DEFAULT 1, + `favorite` tinyint(4) NOT NULL DEFAULT 0, + `eec` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_c_country_code` (`code`), UNIQUE KEY `idx_c_country_label` (`label`), @@ -1633,7 +1634,7 @@ CREATE TABLE `llx_c_country` ( LOCK TABLES `llx_c_country` WRITE; /*!40000 ALTER TABLE `llx_c_country` DISABLE KEYS */; -INSERT INTO `llx_c_country` VALUES (0,'',NULL,'-',1,1),(1,'FR','FRA','France',1,0),(2,'BE','BEL','Belgium',1,0),(3,'IT','ITA','Italy',1,0),(4,'ES','ESP','Spain',1,0),(5,'DE','DEU','Germany',1,0),(6,'CH','CHE','Switzerland',1,0),(7,'GB','GBR','United Kingdom',1,0),(8,'IE','IRL','Irland',1,0),(9,'CN','CHN','China',1,0),(10,'TN','TUN','Tunisia',1,0),(11,'US','USA','United States',1,0),(12,'MA','MAR','Maroc',1,0),(13,'DZ','DZA','Algeria',1,0),(14,'CA','CAN','Canada',1,0),(15,'TG','TGO','Togo',1,0),(16,'GA','GAB','Gabon',1,0),(17,'NL','NLD','Nerderland',1,0),(18,'HU','HUN','Hongrie',1,0),(19,'RU','RUS','Russia',1,0),(20,'SE','SWE','Sweden',1,0),(21,'CI','CIV','Côte d\'Ivoire',1,0),(22,'SN','SEN','Senegal',1,0),(23,'AR','ARG','Argentine',1,0),(24,'CM','CMR','Cameroun',1,0),(25,'PT','PRT','Portugal',1,0),(26,'SA','SAU','Saudi Arabia',1,0),(27,'MC','MCO','Monaco',1,0),(28,'AU','AUS','Australia',1,0),(29,'SG','SGP','Singapour',1,0),(30,'AF','AFG','Afghanistan',1,0),(31,'AX','ALA','Iles Aland',1,0),(32,'AL','ALB','Albanie',1,0),(33,'AS','ASM','Samoa américaines',1,0),(34,'AD','AND','Andorre',1,0),(35,'AO','AGO','Angola',1,0),(36,'AI','AIA','Anguilla',1,0),(37,'AQ','ATA','Antarctique',1,0),(38,'AG','ATG','Antigua-et-Barbuda',1,0),(39,'AM','ARM','Arménie',1,0),(40,'AW','ABW','Aruba',1,0),(41,'AT','AUT','Autriche',1,0),(42,'AZ','AZE','Azerbaïdjan',1,0),(43,'BS','BHS','Bahamas',1,0),(44,'BH','BHR','Bahreïn',1,0),(45,'BD','BGD','Bangladesh',1,0),(46,'BB','BRB','Barbade',1,0),(47,'BY','BLR','Biélorussie',1,0),(48,'BZ','BLZ','Belize',1,0),(49,'BJ','BEN','Bénin',1,0),(50,'BM','BMU','Bermudes',1,0),(51,'BT','BTN','Bhoutan',1,0),(52,'BO','BOL','Bolivie',1,0),(53,'BA','BIH','Bosnie-Herzégovine',1,0),(54,'BW','BWA','Botswana',1,0),(55,'BV','BVT','Ile Bouvet',1,0),(56,'BR','BRA','Brazil',1,0),(57,'IO','IOT','Territoire britannique de l\'Océan Indien',1,0),(58,'BN','BRN','Brunei',1,0),(59,'BG','BGR','Bulgarie',1,0),(60,'BF','BFA','Burkina Faso',1,0),(61,'BI','BDI','Burundi',1,0),(62,'KH','KHM','Cambodge',1,0),(63,'CV','CPV','Cap-Vert',1,0),(64,'KY','CYM','Iles Cayman',1,0),(65,'CF','CAF','République centrafricaine',1,0),(66,'TD','TCD','Tchad',1,0),(67,'CL','CHL','Chili',1,0),(68,'CX','CXR','Ile Christmas',1,0),(69,'CC','CCK','Iles des Cocos (Keeling)',1,0),(70,'CO','COL','Colombie',1,0),(71,'KM','COM','Comores',1,0),(72,'CG','COG','Congo',1,0),(73,'CD','COD','République démocratique du Congo',1,0),(74,'CK','COK','Iles Cook',1,0),(75,'CR','CRI','Costa Rica',1,0),(76,'HR','HRV','Croatie',1,0),(77,'CU','CUB','Cuba',1,0),(78,'CY','CYP','Chypre',1,0),(79,'CZ','CZE','République Tchèque',1,0),(80,'DK','DNK','Danemark',1,0),(81,'DJ','DJI','Djibouti',1,0),(82,'DM','DMA','Dominique',1,0),(83,'DO','DOM','République Dominicaine',1,0),(84,'EC','ECU','Equateur',1,0),(85,'EG','EGY','Egypte',1,0),(86,'SV','SLV','Salvador',1,0),(87,'GQ','GNQ','Guinée Equatoriale',1,0),(88,'ER','ERI','Erythrée',1,0),(89,'EE','EST','Estonia',1,0),(90,'ET','ETH','Ethiopie',1,0),(91,'FK','FLK','Iles Falkland',1,0),(92,'FO','FRO','Iles Féroé',1,0),(93,'FJ','FJI','Iles Fidji',1,0),(94,'FI','FIN','Finlande',1,0),(95,'GF','GUF','Guyane française',1,0),(96,'PF','PYF','Polynésie française',1,0),(97,'TF','ATF','Terres australes françaises',1,0),(98,'GM','GMB','Gambie',1,0),(99,'GE','GEO','Georgia',1,0),(100,'GH','GHA','Ghana',1,0),(101,'GI','GIB','Gibraltar',1,0),(102,'GR','GRC','Greece',1,0),(103,'GL','GRL','Groenland',1,0),(104,'GD','GRD','Grenade',1,0),(106,'GU','GUM','Guam',1,0),(107,'GT','GTM','Guatemala',1,0),(108,'GN','GIN','Guinea',1,0),(109,'GW','GNB','Guinea-Bissao',1,0),(111,'HT','HTI','Haiti',1,0),(112,'HM','HMD','Iles Heard et McDonald',1,0),(113,'VA','VAT','Saint-Siège (Vatican)',1,0),(114,'HN','HND','Honduras',1,0),(115,'HK','HKG','Hong Kong',1,0),(116,'IS','ISL','Islande',1,0),(117,'IN','IND','India',1,0),(118,'ID','IDN','Indonésie',1,0),(119,'IR','IRN','Iran',1,0),(120,'IQ','IRQ','Iraq',1,0),(121,'IL','ISR','Israel',1,0),(122,'JM','JAM','Jamaïque',1,0),(123,'JP','JPN','Japon',1,0),(124,'JO','JOR','Jordanie',1,0),(125,'KZ','KAZ','Kazakhstan',1,0),(126,'KE','KEN','Kenya',1,0),(127,'KI','KIR','Kiribati',1,0),(128,'KP','PRK','North Corea',1,0),(129,'KR','KOR','South Corea',1,0),(130,'KW','KWT','Koweït',1,0),(131,'KG','KGZ','Kirghizistan',1,0),(132,'LA','LAO','Laos',1,0),(133,'LV','LVA','Lettonie',1,0),(134,'LB','LBN','Liban',1,0),(135,'LS','LSO','Lesotho',1,0),(136,'LR','LBR','Liberia',1,0),(137,'LY','LBY','Libye',1,0),(138,'LI','LIE','Liechtenstein',1,0),(139,'LT','LTU','Lituanie',1,0),(140,'LU','LUX','Luxembourg',1,0),(141,'MO','MAC','Macao',1,0),(142,'MK','MKD','ex-République yougoslave de Macédoine',1,0),(143,'MG','MDG','Madagascar',1,0),(144,'MW','MWI','Malawi',1,0),(145,'MY','MYS','Malaisie',1,0),(146,'MV','MDV','Maldives',1,0),(147,'ML','MLI','Mali',1,0),(148,'MT','MLT','Malte',1,0),(149,'MH','MHL','Iles Marshall',1,0),(151,'MR','MRT','Mauritanie',1,0),(152,'MU','MUS','Maurice',1,0),(153,'YT','MYT','Mayotte',1,0),(154,'MX','MEX','Mexique',1,0),(155,'FM','FSM','Micronésie',1,0),(156,'MD','MDA','Moldavie',1,0),(157,'MN','MNG','Mongolie',1,0),(158,'MS','MSR','Monserrat',1,0),(159,'MZ','MOZ','Mozambique',1,0),(160,'MM','MMR','Birmanie (Myanmar)',1,0),(161,'NA','NAM','Namibie',1,0),(162,'NR','NRU','Nauru',1,0),(163,'NP','NPL','Népal',1,0),(164,'AN',NULL,'Antilles néerlandaises',1,0),(165,'NC','NCL','Nouvelle-Calédonie',1,0),(166,'NZ','NZL','Nouvelle-Zélande',1,0),(167,'NI','NIC','Nicaragua',1,0),(168,'NE','NER','Niger',1,0),(169,'NG','NGA','Nigeria',1,0),(170,'NU','NIU','Nioué',1,0),(171,'NF','NFK','Ile Norfolk',1,0),(172,'MP','MNP','Mariannes du Nord',1,0),(173,'NO','NOR','Norvège',1,0),(174,'OM','OMN','Oman',1,0),(175,'PK','PAK','Pakistan',1,0),(176,'PW','PLW','Palaos',1,0),(177,'PS','PSE','Territoire Palestinien Occupé',1,0),(178,'PA','PAN','Panama',1,0),(179,'PG','PNG','Papouasie-Nouvelle-Guinée',1,0),(180,'PY','PRY','Paraguay',1,0),(181,'PE','PER','Peru',1,0),(182,'PH','PHL','Philippines',1,0),(183,'PN','PCN','Iles Pitcairn',1,0),(184,'PL','POL','Pologne',1,0),(185,'PR','PRI','Porto Rico',1,0),(186,'QA','QAT','Qatar',1,0),(188,'RO','ROU','Roumanie',1,0),(189,'RW','RWA','Rwanda',1,0),(190,'SH','SHN','Sainte-Hélène',1,0),(191,'KN','KNA','Saint-Christophe-et-Niévès',1,0),(192,'LC','LCA','Sainte-Lucie',1,0),(193,'PM','SPM','Saint-Pierre-et-Miquelon',1,0),(194,'VC','VCT','Saint-Vincent-et-les-Grenadines',1,0),(195,'WS','WSM','Samoa',1,0),(196,'SM','SMR','Saint-Marin',1,0),(197,'ST','STP','Sao Tomé-et-Principe',1,0),(198,'RS','SRB','Serbie',1,0),(199,'SC','SYC','Seychelles',1,0),(200,'SL','SLE','Sierra Leone',1,0),(201,'SK','SVK','Slovaquie',1,0),(202,'SI','SVN','Slovénie',1,0),(203,'SB','SLB','Iles Salomon',1,0),(204,'SO','SOM','Somalie',1,0),(205,'ZA','ZAF','Afrique du Sud',1,0),(206,'GS','SGS','Iles Géorgie du Sud et Sandwich du Sud',1,0),(207,'LK','LKA','Sri Lanka',1,0),(208,'SD','SDN','Soudan',1,0),(209,'SR','SUR','Suriname',1,0),(210,'SJ','SJM','Iles Svalbard et Jan Mayen',1,0),(211,'SZ','SWZ','Swaziland',1,0),(212,'SY','SYR','Syrie',1,0),(213,'TW','TWN','Taïwan',1,0),(214,'TJ','TJK','Tadjikistan',1,0),(215,'TZ','TZA','Tanzanie',1,0),(216,'TH','THA','Thaïlande',1,0),(217,'TL','TLS','Timor Oriental',1,0),(218,'TK','TKL','Tokélaou',1,0),(219,'TO','TON','Tonga',1,0),(220,'TT','TTO','Trinité-et-Tobago',1,0),(221,'TR','TUR','Turquie',1,0),(222,'TM','TKM','Turkménistan',1,0),(223,'TC','TCA','Iles Turks-et-Caicos',1,0),(224,'TV','TUV','Tuvalu',1,0),(225,'UG','UGA','Ouganda',1,0),(226,'UA','UKR','Ukraine',1,0),(227,'xx','ARE','Émirats arabes unishh',1,0),(228,'UM','UMI','Iles mineures éloignées des États-Unis',1,0),(229,'UY','URY','Uruguay',1,0),(230,'UZ','UZB','Ouzbékistan',1,0),(231,'VU','VUT','Vanuatu',1,0),(232,'VE','VEN','Vénézuela',1,0),(233,'VN','VNM','Viêt Nam',1,0),(234,'VG','VGB','Iles Vierges britanniques',1,0),(235,'VI','VIR','Iles Vierges américaines',1,0),(236,'WF','WLF','Wallis-et-Futuna',1,0),(237,'EH','ESH','Sahara occidental',1,0),(238,'YE','YEM','Yémen',1,0),(239,'ZM','ZMB','Zambie',1,0),(240,'ZW','ZWE','Zimbabwe',1,0),(241,'GG','GGY','Guernesey',1,0),(242,'IM','IMN','Ile de Man',1,0),(243,'JE','JEY','Jersey',1,0),(244,'ME','MNE','Monténégro',1,0),(245,'BL','BLM','Saint-Barthélemy',1,0),(246,'MF','MAF','Saint-Martin',1,0),(247,'hh',NULL,'hhh',1,0); +INSERT INTO `llx_c_country` VALUES (0,'',NULL,'-',1,1,NULL),(1,'FR','FRA','France',1,0,1),(2,'BE','BEL','Belgium',1,0,1),(3,'IT','ITA','Italy',1,0,1),(4,'ES','ESP','Spain',1,0,1),(5,'DE','DEU','Germany',1,0,1),(6,'CH','CHE','Switzerland',1,0,NULL),(7,'GB','GBR','United Kingdom',1,0,1),(8,'IE','IRL','Irland',1,0,1),(9,'CN','CHN','China',1,0,NULL),(10,'TN','TUN','Tunisia',1,0,NULL),(11,'US','USA','United States',1,0,NULL),(12,'MA','MAR','Maroc',1,0,NULL),(13,'DZ','DZA','Algeria',1,0,NULL),(14,'CA','CAN','Canada',1,0,NULL),(15,'TG','TGO','Togo',1,0,NULL),(16,'GA','GAB','Gabon',1,0,NULL),(17,'NL','NLD','Nerderland',1,0,1),(18,'HU','HUN','Hongrie',1,0,1),(19,'RU','RUS','Russia',1,0,NULL),(20,'SE','SWE','Sweden',1,0,1),(21,'CI','CIV','Côte d\'Ivoire',1,0,NULL),(22,'SN','SEN','Senegal',1,0,NULL),(23,'AR','ARG','Argentine',1,0,NULL),(24,'CM','CMR','Cameroun',1,0,NULL),(25,'PT','PRT','Portugal',1,0,1),(26,'SA','SAU','Saudi Arabia',1,0,NULL),(27,'MC','MCO','Monaco',1,0,1),(28,'AU','AUS','Australia',1,0,NULL),(29,'SG','SGP','Singapour',1,0,NULL),(30,'AF','AFG','Afghanistan',1,0,NULL),(31,'AX','ALA','Iles Aland',1,0,NULL),(32,'AL','ALB','Albanie',1,0,NULL),(33,'AS','ASM','Samoa américaines',1,0,NULL),(34,'AD','AND','Andorre',1,0,NULL),(35,'AO','AGO','Angola',1,0,NULL),(36,'AI','AIA','Anguilla',1,0,NULL),(37,'AQ','ATA','Antarctique',1,0,NULL),(38,'AG','ATG','Antigua-et-Barbuda',1,0,NULL),(39,'AM','ARM','Arménie',1,0,NULL),(40,'AW','ABW','Aruba',1,0,NULL),(41,'AT','AUT','Autriche',1,0,1),(42,'AZ','AZE','Azerbaïdjan',1,0,NULL),(43,'BS','BHS','Bahamas',1,0,NULL),(44,'BH','BHR','Bahreïn',1,0,NULL),(45,'BD','BGD','Bangladesh',1,0,NULL),(46,'BB','BRB','Barbade',1,0,NULL),(47,'BY','BLR','Biélorussie',1,0,NULL),(48,'BZ','BLZ','Belize',1,0,NULL),(49,'BJ','BEN','Bénin',1,0,NULL),(50,'BM','BMU','Bermudes',1,0,NULL),(51,'BT','BTN','Bhoutan',1,0,NULL),(52,'BO','BOL','Bolivie',1,0,NULL),(53,'BA','BIH','Bosnie-Herzégovine',1,0,NULL),(54,'BW','BWA','Botswana',1,0,NULL),(55,'BV','BVT','Ile Bouvet',1,0,NULL),(56,'BR','BRA','Brazil',1,0,NULL),(57,'IO','IOT','Territoire britannique de l\'Océan Indien',1,0,NULL),(58,'BN','BRN','Brunei',1,0,NULL),(59,'BG','BGR','Bulgarie',1,0,1),(60,'BF','BFA','Burkina Faso',1,0,NULL),(61,'BI','BDI','Burundi',1,0,NULL),(62,'KH','KHM','Cambodge',1,0,NULL),(63,'CV','CPV','Cap-Vert',1,0,NULL),(64,'KY','CYM','Iles Cayman',1,0,NULL),(65,'CF','CAF','République centrafricaine',1,0,NULL),(66,'TD','TCD','Tchad',1,0,NULL),(67,'CL','CHL','Chili',1,0,NULL),(68,'CX','CXR','Ile Christmas',1,0,NULL),(69,'CC','CCK','Iles des Cocos (Keeling)',1,0,NULL),(70,'CO','COL','Colombie',1,0,NULL),(71,'KM','COM','Comores',1,0,NULL),(72,'CG','COG','Congo',1,0,NULL),(73,'CD','COD','République démocratique du Congo',1,0,NULL),(74,'CK','COK','Iles Cook',1,0,NULL),(75,'CR','CRI','Costa Rica',1,0,NULL),(76,'HR','HRV','Croatie',1,0,1),(77,'CU','CUB','Cuba',1,0,NULL),(78,'CY','CYP','Chypre',1,0,1),(79,'CZ','CZE','République Tchèque',1,0,1),(80,'DK','DNK','Danemark',1,0,1),(81,'DJ','DJI','Djibouti',1,0,NULL),(82,'DM','DMA','Dominique',1,0,NULL),(83,'DO','DOM','République Dominicaine',1,0,NULL),(84,'EC','ECU','Equateur',1,0,NULL),(85,'EG','EGY','Egypte',1,0,NULL),(86,'SV','SLV','Salvador',1,0,NULL),(87,'GQ','GNQ','Guinée Equatoriale',1,0,NULL),(88,'ER','ERI','Erythrée',1,0,NULL),(89,'EE','EST','Estonia',1,0,1),(90,'ET','ETH','Ethiopie',1,0,NULL),(91,'FK','FLK','Iles Falkland',1,0,NULL),(92,'FO','FRO','Iles Féroé',1,0,NULL),(93,'FJ','FJI','Iles Fidji',1,0,NULL),(94,'FI','FIN','Finlande',1,0,1),(95,'GF','GUF','Guyane française',1,0,NULL),(96,'PF','PYF','Polynésie française',1,0,NULL),(97,'TF','ATF','Terres australes françaises',1,0,NULL),(98,'GM','GMB','Gambie',1,0,NULL),(99,'GE','GEO','Georgia',1,0,NULL),(100,'GH','GHA','Ghana',1,0,NULL),(101,'GI','GIB','Gibraltar',1,0,NULL),(102,'GR','GRC','Greece',1,0,1),(103,'GL','GRL','Groenland',1,0,NULL),(104,'GD','GRD','Grenade',1,0,NULL),(106,'GU','GUM','Guam',1,0,NULL),(107,'GT','GTM','Guatemala',1,0,NULL),(108,'GN','GIN','Guinea',1,0,NULL),(109,'GW','GNB','Guinea-Bissao',1,0,NULL),(111,'HT','HTI','Haiti',1,0,NULL),(112,'HM','HMD','Iles Heard et McDonald',1,0,NULL),(113,'VA','VAT','Saint-Siège (Vatican)',1,0,NULL),(114,'HN','HND','Honduras',1,0,NULL),(115,'HK','HKG','Hong Kong',1,0,NULL),(116,'IS','ISL','Islande',1,0,NULL),(117,'IN','IND','India',1,0,NULL),(118,'ID','IDN','Indonésie',1,0,NULL),(119,'IR','IRN','Iran',1,0,NULL),(120,'IQ','IRQ','Iraq',1,0,NULL),(121,'IL','ISR','Israel',1,0,NULL),(122,'JM','JAM','Jamaïque',1,0,NULL),(123,'JP','JPN','Japon',1,0,NULL),(124,'JO','JOR','Jordanie',1,0,NULL),(125,'KZ','KAZ','Kazakhstan',1,0,NULL),(126,'KE','KEN','Kenya',1,0,NULL),(127,'KI','KIR','Kiribati',1,0,NULL),(128,'KP','PRK','North Corea',1,0,NULL),(129,'KR','KOR','South Corea',1,0,NULL),(130,'KW','KWT','Koweït',1,0,NULL),(131,'KG','KGZ','Kirghizistan',1,0,NULL),(132,'LA','LAO','Laos',1,0,NULL),(133,'LV','LVA','Lettonie',1,0,1),(134,'LB','LBN','Liban',1,0,NULL),(135,'LS','LSO','Lesotho',1,0,NULL),(136,'LR','LBR','Liberia',1,0,NULL),(137,'LY','LBY','Libye',1,0,NULL),(138,'LI','LIE','Liechtenstein',1,0,NULL),(139,'LT','LTU','Lituanie',1,0,1),(140,'LU','LUX','Luxembourg',1,0,1),(141,'MO','MAC','Macao',1,0,NULL),(142,'MK','MKD','ex-République yougoslave de Macédoine',1,0,NULL),(143,'MG','MDG','Madagascar',1,0,NULL),(144,'MW','MWI','Malawi',1,0,NULL),(145,'MY','MYS','Malaisie',1,0,NULL),(146,'MV','MDV','Maldives',1,0,NULL),(147,'ML','MLI','Mali',1,0,NULL),(148,'MT','MLT','Malte',1,0,1),(149,'MH','MHL','Iles Marshall',1,0,NULL),(151,'MR','MRT','Mauritanie',1,0,NULL),(152,'MU','MUS','Maurice',1,0,NULL),(153,'YT','MYT','Mayotte',1,0,NULL),(154,'MX','MEX','Mexique',1,0,NULL),(155,'FM','FSM','Micronésie',1,0,NULL),(156,'MD','MDA','Moldavie',1,0,NULL),(157,'MN','MNG','Mongolie',1,0,NULL),(158,'MS','MSR','Monserrat',1,0,NULL),(159,'MZ','MOZ','Mozambique',1,0,NULL),(160,'MM','MMR','Birmanie (Myanmar)',1,0,NULL),(161,'NA','NAM','Namibie',1,0,NULL),(162,'NR','NRU','Nauru',1,0,NULL),(163,'NP','NPL','Népal',1,0,NULL),(164,'AN',NULL,'Antilles néerlandaises',1,0,NULL),(165,'NC','NCL','Nouvelle-Calédonie',1,0,NULL),(166,'NZ','NZL','Nouvelle-Zélande',1,0,NULL),(167,'NI','NIC','Nicaragua',1,0,NULL),(168,'NE','NER','Niger',1,0,NULL),(169,'NG','NGA','Nigeria',1,0,NULL),(170,'NU','NIU','Nioué',1,0,NULL),(171,'NF','NFK','Ile Norfolk',1,0,NULL),(172,'MP','MNP','Mariannes du Nord',1,0,NULL),(173,'NO','NOR','Norvège',1,0,NULL),(174,'OM','OMN','Oman',1,0,NULL),(175,'PK','PAK','Pakistan',1,0,NULL),(176,'PW','PLW','Palaos',1,0,NULL),(177,'PS','PSE','Territoire Palestinien Occupé',1,0,NULL),(178,'PA','PAN','Panama',1,0,NULL),(179,'PG','PNG','Papouasie-Nouvelle-Guinée',1,0,NULL),(180,'PY','PRY','Paraguay',1,0,NULL),(181,'PE','PER','Peru',1,0,NULL),(182,'PH','PHL','Philippines',1,0,NULL),(183,'PN','PCN','Iles Pitcairn',1,0,NULL),(184,'PL','POL','Pologne',1,0,1),(185,'PR','PRI','Porto Rico',1,0,NULL),(186,'QA','QAT','Qatar',1,0,NULL),(188,'RO','ROU','Roumanie',1,0,1),(189,'RW','RWA','Rwanda',1,0,NULL),(190,'SH','SHN','Sainte-Hélène',1,0,NULL),(191,'KN','KNA','Saint-Christophe-et-Niévès',1,0,NULL),(192,'LC','LCA','Sainte-Lucie',1,0,NULL),(193,'PM','SPM','Saint-Pierre-et-Miquelon',1,0,NULL),(194,'VC','VCT','Saint-Vincent-et-les-Grenadines',1,0,NULL),(195,'WS','WSM','Samoa',1,0,NULL),(196,'SM','SMR','Saint-Marin',1,0,NULL),(197,'ST','STP','Sao Tomé-et-Principe',1,0,NULL),(198,'RS','SRB','Serbie',1,0,NULL),(199,'SC','SYC','Seychelles',1,0,NULL),(200,'SL','SLE','Sierra Leone',1,0,NULL),(201,'SK','SVK','Slovaquie',1,0,1),(202,'SI','SVN','Slovénie',1,0,1),(203,'SB','SLB','Iles Salomon',1,0,NULL),(204,'SO','SOM','Somalie',1,0,NULL),(205,'ZA','ZAF','Afrique du Sud',1,0,NULL),(206,'GS','SGS','Iles Géorgie du Sud et Sandwich du Sud',1,0,NULL),(207,'LK','LKA','Sri Lanka',1,0,NULL),(208,'SD','SDN','Soudan',1,0,NULL),(209,'SR','SUR','Suriname',1,0,NULL),(210,'SJ','SJM','Iles Svalbard et Jan Mayen',1,0,NULL),(211,'SZ','SWZ','Swaziland',1,0,NULL),(212,'SY','SYR','Syrie',1,0,NULL),(213,'TW','TWN','Taïwan',1,0,NULL),(214,'TJ','TJK','Tadjikistan',1,0,NULL),(215,'TZ','TZA','Tanzanie',1,0,NULL),(216,'TH','THA','Thaïlande',1,0,NULL),(217,'TL','TLS','Timor Oriental',1,0,NULL),(218,'TK','TKL','Tokélaou',1,0,NULL),(219,'TO','TON','Tonga',1,0,NULL),(220,'TT','TTO','Trinité-et-Tobago',1,0,NULL),(221,'TR','TUR','Turquie',1,0,NULL),(222,'TM','TKM','Turkménistan',1,0,NULL),(223,'TC','TCA','Iles Turks-et-Caicos',1,0,NULL),(224,'TV','TUV','Tuvalu',1,0,NULL),(225,'UG','UGA','Ouganda',1,0,NULL),(226,'UA','UKR','Ukraine',1,0,NULL),(227,'xx','ARE','Émirats arabes unishh',1,0,NULL),(228,'UM','UMI','Iles mineures éloignées des États-Unis',1,0,NULL),(229,'UY','URY','Uruguay',1,0,NULL),(230,'UZ','UZB','Ouzbékistan',1,0,NULL),(231,'VU','VUT','Vanuatu',1,0,NULL),(232,'VE','VEN','Vénézuela',1,0,NULL),(233,'VN','VNM','Viêt Nam',1,0,NULL),(234,'VG','VGB','Iles Vierges britanniques',1,0,NULL),(235,'VI','VIR','Iles Vierges américaines',1,0,NULL),(236,'WF','WLF','Wallis-et-Futuna',1,0,NULL),(237,'EH','ESH','Sahara occidental',1,0,NULL),(238,'YE','YEM','Yémen',1,0,NULL),(239,'ZM','ZMB','Zambie',1,0,NULL),(240,'ZW','ZWE','Zimbabwe',1,0,NULL),(241,'GG','GGY','Guernesey',1,0,NULL),(242,'IM','IMN','Ile de Man',1,0,1),(243,'JE','JEY','Jersey',1,0,NULL),(244,'ME','MNE','Monténégro',1,0,NULL),(245,'BL','BLM','Saint-Barthélemy',1,0,NULL),(246,'MF','MAF','Saint-Martin',1,0,NULL),(247,'hh',NULL,'hhh',1,0,NULL); /*!40000 ALTER TABLE `llx_c_country` ENABLE KEYS */; UNLOCK TABLES; @@ -1648,7 +1649,7 @@ CREATE TABLE `llx_c_currencies` ( `code_iso` varchar(3) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `unicode` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`code_iso`), UNIQUE KEY `uk_c_currencies_code_iso` (`code_iso`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1679,7 +1680,7 @@ CREATE TABLE `llx_c_departements` ( `tncc` int(11) DEFAULT NULL, `ncc` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `nom` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_departements` (`code_departement`,`fk_region`), KEY `idx_departements_fk_region` (`fk_region`), @@ -1694,7 +1695,7 @@ CREATE TABLE `llx_c_departements` ( LOCK TABLES `llx_c_departements` WRITE; /*!40000 ALTER TABLE `llx_c_departements` DISABLE KEYS */; -INSERT INTO `llx_c_departements` VALUES (1,'0',0,'0',0,'-','-',1),(2,'01',82,'01053',5,'AIN','Ain',1),(3,'02',22,'02408',5,'AISNE','Aisne',1),(4,'03',83,'03190',5,'ALLIER','Allier',1),(5,'04',93,'04070',4,'ALPES-DE-HAUTE-PROVENCE','Alpes-de-Haute-Provence',1),(6,'05',93,'05061',4,'HAUTES-ALPES','Hautes-Alpes',1),(7,'06',93,'06088',4,'ALPES-MARITIMES','Alpes-Maritimes',1),(8,'07',82,'07186',5,'ARDECHE','Ardèche',1),(9,'08',21,'08105',4,'ARDENNES','Ardennes',1),(10,'09',73,'09122',5,'ARIEGE','Ariège',1),(11,'10',21,'10387',5,'AUBE','Aube',1),(12,'11',91,'11069',5,'AUDE','Aude',1),(13,'12',73,'12202',5,'AVEYRON','Aveyron',1),(14,'13',93,'13055',4,'BOUCHES-DU-RHONE','Bouches-du-Rhône',1),(15,'14',25,'14118',2,'CALVADOS','Calvados',1),(16,'15',83,'15014',2,'CANTAL','Cantal',1),(17,'16',54,'16015',3,'CHARENTE','Charente',1),(18,'17',54,'17300',3,'CHARENTE-MARITIME','Charente-Maritime',1),(19,'18',24,'18033',2,'CHER','Cher',1),(20,'19',74,'19272',3,'CORREZE','Corrèze',1),(21,'2A',94,'2A004',3,'CORSE-DU-SUD','Corse-du-Sud',1),(22,'2B',94,'2B033',3,'HAUTE-CORSE','Haute-Corse',1),(23,'21',26,'21231',3,'COTE-D\'OR','Côte-d\'Or',1),(24,'22',53,'22278',4,'COTES-D\'ARMOR','Côtes-d\'Armor',1),(25,'23',74,'23096',3,'CREUSE','Creuse',1),(26,'24',72,'24322',3,'DORDOGNE','Dordogne',1),(27,'25',43,'25056',2,'DOUBS','Doubs',1),(28,'26',82,'26362',3,'DROME','Drôme',1),(29,'27',23,'27229',5,'EURE','Eure',1),(30,'28',24,'28085',1,'EURE-ET-LOIR','Eure-et-Loir',1),(31,'29',53,'29232',2,'FINISTERE','Finistère',1),(32,'30',91,'30189',2,'GARD','Gard',1),(33,'31',73,'31555',3,'HAUTE-GARONNE','Haute-Garonne',1),(34,'32',73,'32013',2,'GERS','Gers',1),(35,'33',72,'33063',3,'GIRONDE','Gironde',1),(36,'34',91,'34172',5,'HERAULT','Hérault',1),(37,'35',53,'35238',1,'ILLE-ET-VILAINE','Ille-et-Vilaine',1),(38,'36',24,'36044',5,'INDRE','Indre',1),(39,'37',24,'37261',1,'INDRE-ET-LOIRE','Indre-et-Loire',1),(40,'38',82,'38185',5,'ISERE','Isère',1),(41,'39',43,'39300',2,'JURA','Jura',1),(42,'40',72,'40192',4,'LANDES','Landes',1),(43,'41',24,'41018',0,'LOIR-ET-CHER','Loir-et-Cher',1),(44,'42',82,'42218',3,'LOIRE','Loire',1),(45,'43',83,'43157',3,'HAUTE-LOIRE','Haute-Loire',1),(46,'44',52,'44109',3,'LOIRE-ATLANTIQUE','Loire-Atlantique',1),(47,'45',24,'45234',2,'LOIRET','Loiret',1),(48,'46',73,'46042',2,'LOT','Lot',1),(49,'47',72,'47001',0,'LOT-ET-GARONNE','Lot-et-Garonne',1),(50,'48',91,'48095',3,'LOZERE','Lozère',1),(51,'49',52,'49007',0,'MAINE-ET-LOIRE','Maine-et-Loire',1),(52,'50',25,'50502',3,'MANCHE','Manche',1),(53,'51',21,'51108',3,'MARNE','Marne',1),(54,'52',21,'52121',3,'HAUTE-MARNE','Haute-Marne',1),(55,'53',52,'53130',3,'MAYENNE','Mayenne',1),(56,'54',41,'54395',0,'MEURTHE-ET-MOSELLE','Meurthe-et-Moselle',1),(57,'55',41,'55029',3,'MEUSE','Meuse',1),(58,'56',53,'56260',2,'MORBIHAN','Morbihan',1),(59,'57',41,'57463',3,'MOSELLE','Moselle',1),(60,'58',26,'58194',3,'NIEVRE','Nièvre',1),(61,'59',31,'59350',2,'NORD','Nord',1),(62,'60',22,'60057',5,'OISE','Oise',1),(63,'61',25,'61001',5,'ORNE','Orne',1),(64,'62',31,'62041',2,'PAS-DE-CALAIS','Pas-de-Calais',1),(65,'63',83,'63113',2,'PUY-DE-DOME','Puy-de-Dôme',1),(66,'64',72,'64445',4,'PYRENEES-ATLANTIQUES','Pyrénées-Atlantiques',1),(67,'65',73,'65440',4,'HAUTES-PYRENEES','Hautes-Pyrénées',1),(68,'66',91,'66136',4,'PYRENEES-ORIENTALES','Pyrénées-Orientales',1),(69,'67',42,'67482',2,'BAS-RHIN','Bas-Rhin',1),(70,'68',42,'68066',2,'HAUT-RHIN','Haut-Rhin',1),(71,'69',82,'69123',2,'RHONE','Rhône',1),(72,'70',43,'70550',3,'HAUTE-SAONE','Haute-Saône',1),(73,'71',26,'71270',0,'SAONE-ET-LOIRE','Saône-et-Loire',1),(74,'72',52,'72181',3,'SARTHE','Sarthe',1),(75,'73',82,'73065',3,'SAVOIE','Savoie',1),(76,'74',82,'74010',3,'HAUTE-SAVOIE','Haute-Savoie',1),(77,'75',11,'75056',0,'PARIS','Paris',1),(78,'76',23,'76540',3,'SEINE-MARITIME','Seine-Maritime',1),(79,'77',11,'77288',0,'SEINE-ET-MARNE','Seine-et-Marne',1),(80,'78',11,'78646',4,'YVELINES','Yvelines',1),(81,'79',54,'79191',4,'DEUX-SEVRES','Deux-Sèvres',1),(82,'80',22,'80021',3,'SOMME','Somme',1),(83,'81',73,'81004',2,'TARN','Tarn',1),(84,'82',73,'82121',0,'TARN-ET-GARONNE','Tarn-et-Garonne',1),(85,'83',93,'83137',2,'VAR','Var',1),(86,'84',93,'84007',0,'VAUCLUSE','Vaucluse',1),(87,'85',52,'85191',3,'VENDEE','Vendée',1),(88,'86',54,'86194',3,'VIENNE','Vienne',1),(89,'87',74,'87085',3,'HAUTE-VIENNE','Haute-Vienne',1),(90,'88',41,'88160',4,'VOSGES','Vosges',1),(91,'89',26,'89024',5,'YONNE','Yonne',1),(92,'90',43,'90010',0,'TERRITOIRE DE BELFORT','Territoire de Belfort',1),(93,'91',11,'91228',5,'ESSONNE','Essonne',1),(94,'92',11,'92050',4,'HAUTS-DE-SEINE','Hauts-de-Seine',1),(95,'93',11,'93008',3,'SEINE-SAINT-DENIS','Seine-Saint-Denis',1),(96,'94',11,'94028',2,'VAL-DE-MARNE','Val-de-Marne',1),(97,'95',11,'95500',2,'VAL-D\'OISE','Val-d\'Oise',1),(98,'971',1,'97105',3,'GUADELOUPE','Guadeloupe',1),(99,'972',2,'97209',3,'MARTINIQUE','Martinique',1),(100,'973',3,'97302',3,'GUYANE','Guyane',1),(101,'974',4,'97411',3,'REUNION','Réunion',1),(102,'01',201,'',1,'ANVERS','Anvers',1),(103,'02',203,'',3,'BRUXELLES-CAPITALE','Bruxelles-Capitale',1),(104,'03',202,'',2,'BRABANT-WALLON','Brabant-Wallon',1),(105,'04',201,'',1,'BRABANT-FLAMAND','Brabant-Flamand',1),(106,'05',201,'',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale',1),(107,'06',201,'',1,'FLANDRE-ORIENTALE','Flandre-Orientale',1),(108,'07',202,'',2,'HAINAUT','Hainaut',1),(109,'08',201,'',2,'LIEGE','Liège',1),(110,'09',202,'',1,'LIMBOURG','Limbourg',1),(111,'10',202,'',2,'LUXEMBOURG','Luxembourg',1),(112,'11',201,'',2,'NAMUR','Namur',1),(113,'NSW',2801,'',1,'','New South Wales',1),(114,'VIC',2801,'',1,'','Victoria',1),(115,'QLD',2801,'',1,'','Queensland',1),(116,'SA',2801,'',1,'','South Australia',1),(117,'ACT',2801,'',1,'','Australia Capital Territory',1),(118,'TAS',2801,'',1,'','Tasmania',1),(119,'WA',2801,'',1,'','Western Australia',1),(120,'NT',2801,'',1,'','Northern Territory',1),(121,'VI',419,'',19,'ALAVA','Álava',1),(122,'AB',404,'',4,'ALBACETE','Albacete',1),(123,'A',411,'',11,'ALICANTE','Alicante',1),(124,'AL',401,'',1,'ALMERIA','Almería',1),(125,'AV',403,'',3,'AVILA','Avila',1),(126,'BA',412,'',12,'BADAJOZ','Badajoz',1),(127,'PM',414,'',14,'ISLAS BALEARES','Islas Baleares',1),(128,'B',406,'',6,'BARCELONA','Barcelona',1),(129,'BU',403,'',8,'BURGOS','Burgos',1),(130,'CC',412,'',12,'CACERES','Cáceres',1),(131,'CA',401,'',1,'CADIz','Cádiz',1),(132,'CS',411,'',11,'CASTELLON','Castellón',1),(133,'CR',404,'',4,'CIUDAD REAL','Ciudad Real',1),(134,'CO',401,'',1,'CORDOBA','Córdoba',1),(135,'C',413,'',13,'LA CORUÑA','La Coruña',1),(136,'CU',404,'',4,'CUENCA','Cuenca',1),(137,'GI',406,'',6,'GERONA','Gerona',1),(138,'GR',401,'',1,'GRANADA','Granada',1),(139,'GU',404,'',4,'GUADALAJARA','Guadalajara',1),(140,'SS',419,'',19,'GUIPUZCOA','Guipúzcoa',1),(141,'H',401,'',1,'HUELVA','Huelva',1),(142,'HU',402,'',2,'HUESCA','Huesca',1),(143,'J',401,'',1,'JAEN','Jaén',1),(144,'LE',403,'',3,'LEON','León',1),(145,'L',406,'',6,'LERIDA','Lérida',1),(146,'LO',415,'',15,'LA RIOJA','La Rioja',1),(147,'LU',413,'',13,'LUGO','Lugo',1),(148,'M',416,'',16,'MADRID','Madrid',1),(149,'MA',401,'',1,'MALAGA','Málaga',1),(150,'MU',417,'',17,'MURCIA','Murcia',1),(151,'NA',408,'',8,'NAVARRA','Navarra',1),(152,'OR',413,'',13,'ORENSE','Orense',1),(153,'O',418,'',18,'ASTURIAS','Asturias',1),(154,'P',403,'',3,'PALENCIA','Palencia',1),(155,'GC',405,'',5,'LAS PALMAS','Las Palmas',1),(156,'PO',413,'',13,'PONTEVEDRA','Pontevedra',1),(157,'SA',403,'',3,'SALAMANCA','Salamanca',1),(158,'TF',405,'',5,'STA. CRUZ DE TENERIFE','Sta. Cruz de Tenerife',1),(159,'S',410,'',10,'CANTABRIA','Cantabria',1),(160,'SG',403,'',3,'SEGOVIA','Segovia',1),(161,'SE',401,'',1,'SEVILLA','Sevilla',1),(162,'SO',403,'',3,'SORIA','Soria',1),(163,'T',406,'',6,'TARRAGONA','Tarragona',1),(164,'TE',402,'',2,'TERUEL','Teruel',1),(165,'TO',404,'',5,'TOLEDO','Toledo',1),(166,'V',411,'',11,'VALENCIA','Valencia',1),(167,'VA',403,'',3,'VALLADOLID','Valladolid',1),(168,'BI',419,'',19,'VIZCAYA','Vizcaya',1),(169,'ZA',403,'',3,'ZAMORA','Zamora',1),(170,'Z',402,'',1,'ZARAGOZA','Zaragoza',1),(171,'CE',407,'',7,'CEUTA','Ceuta',1),(172,'ML',409,'',9,'MELILLA','Melilla',1),(174,'AG',601,NULL,NULL,'ARGOVIE','Argovie',1),(175,'AI',601,NULL,NULL,'APPENZELL RHODES INTERIEURES','Appenzell Rhodes intérieures',1),(176,'AR',601,NULL,NULL,'APPENZELL RHODES EXTERIEURES','Appenzell Rhodes extérieures',1),(177,'BE',601,NULL,NULL,'BERNE','Berne',1),(178,'BL',601,NULL,NULL,'BALE CAMPAGNE','Bâle Campagne',1),(179,'BS',601,NULL,NULL,'BALE VILLE','Bâle Ville',1),(180,'FR',601,NULL,NULL,'FRIBOURG','Fribourg',1),(181,'GE',601,NULL,NULL,'GENEVE','Genève',1),(182,'GL',601,NULL,NULL,'GLARIS','Glaris',1),(183,'GR',601,NULL,NULL,'GRISONS','Grisons',1),(184,'JU',601,NULL,NULL,'JURA','Jura',1),(185,'LU',601,NULL,NULL,'LUCERNE','Lucerne',1),(186,'NE',601,NULL,NULL,'NEUCHATEL','Neuchâtel',1),(187,'NW',601,NULL,NULL,'NIDWALD','Nidwald',1),(188,'OW',601,NULL,NULL,'OBWALD','Obwald',1),(189,'SG',601,NULL,NULL,'SAINT-GALL','Saint-Gall',1),(190,'SH',601,NULL,NULL,'SCHAFFHOUSE','Schaffhouse',1),(191,'SO',601,NULL,NULL,'SOLEURE','Soleure',1),(192,'SZ',601,NULL,NULL,'SCHWYZ','Schwyz',1),(193,'TG',601,NULL,NULL,'THURGOVIE','Thurgovie',1),(194,'TI',601,NULL,NULL,'TESSIN','Tessin',1),(195,'UR',601,NULL,NULL,'URI','Uri',1),(196,'VD',601,NULL,NULL,'VAUD','Vaud',1),(197,'VS',601,NULL,NULL,'VALAIS','Valais',1),(198,'ZG',601,NULL,NULL,'ZUG','Zug',1),(199,'ZH',601,NULL,NULL,'ZURICH','Zürich',1),(200,'AL',1101,'',0,'ALABAMA','Alabama',1),(201,'AK',1101,'',0,'ALASKA','Alaska',1),(202,'AZ',1101,'',0,'ARIZONA','Arizona',1),(203,'AR',1101,'',0,'ARKANSAS','Arkansas',1),(204,'CA',1101,'',0,'CALIFORNIA','California',1),(205,'CO',1101,'',0,'COLORADO','Colorado',1),(206,'CT',1101,'',0,'CONNECTICUT','Connecticut',1),(207,'DE',1101,'',0,'DELAWARE','Delaware',1),(208,'FL',1101,'',0,'FLORIDA','Florida',1),(209,'GA',1101,'',0,'GEORGIA','Georgia',1),(210,'HI',1101,'',0,'HAWAII','Hawaii',1),(211,'ID',1101,'',0,'IDAHO','Idaho',1),(212,'IL',1101,'',0,'ILLINOIS','Illinois',1),(213,'IN',1101,'',0,'INDIANA','Indiana',1),(214,'IA',1101,'',0,'IOWA','Iowa',1),(215,'KS',1101,'',0,'KANSAS','Kansas',1),(216,'KY',1101,'',0,'KENTUCKY','Kentucky',1),(217,'LA',1101,'',0,'LOUISIANA','Louisiana',1),(218,'ME',1101,'',0,'MAINE','Maine',1),(219,'MD',1101,'',0,'MARYLAND','Maryland',1),(220,'MA',1101,'',0,'MASSACHUSSETTS','Massachusetts',1),(221,'MI',1101,'',0,'MICHIGAN','Michigan',1),(222,'MN',1101,'',0,'MINNESOTA','Minnesota',1),(223,'MS',1101,'',0,'MISSISSIPPI','Mississippi',1),(224,'MO',1101,'',0,'MISSOURI','Missouri',1),(225,'MT',1101,'',0,'MONTANA','Montana',1),(226,'NE',1101,'',0,'NEBRASKA','Nebraska',1),(227,'NV',1101,'',0,'NEVADA','Nevada',1),(228,'NH',1101,'',0,'NEW HAMPSHIRE','New Hampshire',1),(229,'NJ',1101,'',0,'NEW JERSEY','New Jersey',1),(230,'NM',1101,'',0,'NEW MEXICO','New Mexico',1),(231,'NY',1101,'',0,'NEW YORK','New York',1),(232,'NC',1101,'',0,'NORTH CAROLINA','North Carolina',1),(233,'ND',1101,'',0,'NORTH DAKOTA','North Dakota',1),(234,'OH',1101,'',0,'OHIO','Ohio',1),(235,'OK',1101,'',0,'OKLAHOMA','Oklahoma',1),(236,'OR',1101,'',0,'OREGON','Oregon',1),(237,'PA',1101,'',0,'PENNSYLVANIA','Pennsylvania',1),(238,'RI',1101,'',0,'RHODE ISLAND','Rhode Island',1),(239,'SC',1101,'',0,'SOUTH CAROLINA','South Carolina',1),(240,'SD',1101,'',0,'SOUTH DAKOTA','South Dakota',1),(241,'TN',1101,'',0,'TENNESSEE','Tennessee',1),(242,'TX',1101,'',0,'TEXAS','Texas',1),(243,'UT',1101,'',0,'UTAH','Utah',1),(244,'VT',1101,'',0,'VERMONT','Vermont',1),(245,'VA',1101,'',0,'VIRGINIA','Virginia',1),(246,'WA',1101,'',0,'WASHINGTON','Washington',1),(247,'WV',1101,'',0,'WEST VIRGINIA','West Virginia',1),(248,'WI',1101,'',0,'WISCONSIN','Wisconsin',1),(249,'WY',1101,'',0,'WYOMING','Wyoming',1),(250,'SS',8601,NULL,NULL,NULL,'San Salvador',1),(251,'SA',8603,NULL,NULL,NULL,'Santa Ana',1),(252,'AH',8603,NULL,NULL,NULL,'Ahuachapan',1),(253,'SO',8603,NULL,NULL,NULL,'Sonsonate',1),(254,'US',8602,NULL,NULL,NULL,'Usulutan',1),(255,'SM',8602,NULL,NULL,NULL,'San Miguel',1),(256,'MO',8602,NULL,NULL,NULL,'Morazan',1),(257,'LU',8602,NULL,NULL,NULL,'La Union',1),(258,'LL',8601,NULL,NULL,NULL,'La Libertad',1),(259,'CH',8601,NULL,NULL,NULL,'Chalatenango',1),(260,'CA',8601,NULL,NULL,NULL,'Cabañas',1),(261,'LP',8601,NULL,NULL,NULL,'La Paz',1),(262,'SV',8601,NULL,NULL,NULL,'San Vicente',1),(263,'CU',8601,NULL,NULL,NULL,'Cuscatlan',1),(264,'2301',2301,'',0,'CATAMARCA','Catamarca',1),(265,'2302',2301,'',0,'JUJUY','Jujuy',1),(266,'2303',2301,'',0,'TUCAMAN','Tucamán',1),(267,'2304',2301,'',0,'SANTIAGO DEL ESTERO','Santiago del Estero',1),(268,'2305',2301,'',0,'SALTA','Salta',1),(269,'2306',2302,'',0,'CHACO','Chaco',1),(270,'2307',2302,'',0,'CORRIENTES','Corrientes',1),(271,'2308',2302,'',0,'ENTRE RIOS','Entre Ríos',1),(272,'2309',2302,'',0,'FORMOSA','Formosa',1),(273,'2310',2302,'',0,'SANTA FE','Santa Fe',1),(274,'2311',2303,'',0,'LA RIOJA','La Rioja',1),(275,'2312',2303,'',0,'MENDOZA','Mendoza',1),(276,'2313',2303,'',0,'SAN JUAN','San Juan',1),(277,'2314',2303,'',0,'SAN LUIS','San Luis',1),(278,'2315',2304,'',0,'CORDOBA','Córdoba',1),(279,'2316',2304,'',0,'BUENOS AIRES','Buenos Aires',1),(280,'2317',2304,'',0,'CABA','Caba',1),(281,'2318',2305,'',0,'LA PAMPA','La Pampa',1),(282,'2319',2305,'',0,'NEUQUEN','Neuquén',1),(283,'2320',2305,'',0,'RIO NEGRO','Río Negro',1),(284,'2321',2305,'',0,'CHUBUT','Chubut',1),(285,'2322',2305,'',0,'SANTA CRUZ','Santa Cruz',1),(286,'2323',2305,'',0,'TIERRA DEL FUEGO','Tierra del Fuego',1),(287,'2324',2305,'',0,'ISLAS MALVINAS','Islas Malvinas',1),(288,'2325',2305,'',0,'ANTARTIDA','Antártida',1),(289,'AN',11701,NULL,0,'AN','Andaman & Nicobar',1),(290,'AP',11701,NULL,0,'AP','Andhra Pradesh',1),(291,'AR',11701,NULL,0,'AR','Arunachal Pradesh',1),(292,'AS',11701,NULL,0,'AS','Assam',1),(293,'BR',11701,NULL,0,'BR','Bihar',1),(294,'CG',11701,NULL,0,'CG','Chattisgarh',1),(295,'CH',11701,NULL,0,'CH','Chandigarh',1),(296,'DD',11701,NULL,0,'DD','Daman & Diu',1),(297,'DL',11701,NULL,0,'DL','Delhi',1),(298,'DN',11701,NULL,0,'DN','Dadra and Nagar Haveli',1),(299,'GA',11701,NULL,0,'GA','Goa',1),(300,'GJ',11701,NULL,0,'GJ','Gujarat',1),(301,'HP',11701,NULL,0,'HP','Himachal Pradesh',1),(302,'HR',11701,NULL,0,'HR','Haryana',1),(303,'JH',11701,NULL,0,'JH','Jharkhand',1),(304,'JK',11701,NULL,0,'JK','Jammu & Kashmir',1),(305,'KA',11701,NULL,0,'KA','Karnataka',1),(306,'KL',11701,NULL,0,'KL','Kerala',1),(307,'LD',11701,NULL,0,'LD','Lakshadweep',1),(308,'MH',11701,NULL,0,'MH','Maharashtra',1),(309,'ML',11701,NULL,0,'ML','Meghalaya',1),(310,'MN',11701,NULL,0,'MN','Manipur',1),(311,'MP',11701,NULL,0,'MP','Madhya Pradesh',1),(312,'MZ',11701,NULL,0,'MZ','Mizoram',1),(313,'NL',11701,NULL,0,'NL','Nagaland',1),(314,'OR',11701,NULL,0,'OR','Orissa',1),(315,'PB',11701,NULL,0,'PB','Punjab',1),(316,'PY',11701,NULL,0,'PY','Puducherry',1),(317,'RJ',11701,NULL,0,'RJ','Rajasthan',1),(318,'SK',11701,NULL,0,'SK','Sikkim',1),(319,'TN',11701,NULL,0,'TN','Tamil Nadu',1),(320,'TR',11701,NULL,0,'TR','Tripura',1),(321,'UL',11701,NULL,0,'UL','Uttarakhand',1),(322,'UP',11701,NULL,0,'UP','Uttar Pradesh',1),(323,'WB',11701,NULL,0,'WB','West Bengal',1),(374,'151',6715,'',0,'151','Arica',1),(375,'152',6715,'',0,'152','Parinacota',1),(376,'011',6701,'',0,'011','Iquique',1),(377,'014',6701,'',0,'014','Tamarugal',1),(378,'021',6702,'',0,'021','Antofagasa',1),(379,'022',6702,'',0,'022','El Loa',1),(380,'023',6702,'',0,'023','Tocopilla',1),(381,'031',6703,'',0,'031','Copiapó',1),(382,'032',6703,'',0,'032','Chañaral',1),(383,'033',6703,'',0,'033','Huasco',1),(384,'041',6704,'',0,'041','Elqui',1),(385,'042',6704,'',0,'042','Choapa',1),(386,'043',6704,'',0,'043','Limarí',1),(387,'051',6705,'',0,'051','Valparaíso',1),(388,'052',6705,'',0,'052','Isla de Pascua',1),(389,'053',6705,'',0,'053','Los Andes',1),(390,'054',6705,'',0,'054','Petorca',1),(391,'055',6705,'',0,'055','Quillota',1),(392,'056',6705,'',0,'056','San Antonio',1),(393,'057',6705,'',0,'057','San Felipe de Aconcagua',1),(394,'058',6705,'',0,'058','Marga Marga',1),(395,'061',6706,'',0,'061','Cachapoal',1),(396,'062',6706,'',0,'062','Cardenal Caro',1),(397,'063',6706,'',0,'063','Colchagua',1),(398,'071',6707,'',0,'071','Talca',1),(399,'072',6707,'',0,'072','Cauquenes',1),(400,'073',6707,'',0,'073','Curicó',1),(401,'074',6707,'',0,'074','Linares',1),(402,'081',6708,'',0,'081','Concepción',1),(403,'082',6708,'',0,'082','Arauco',1),(404,'083',6708,'',0,'083','Biobío',1),(405,'084',6708,'',0,'084','Ñuble',1),(406,'091',6709,'',0,'091','Cautín',1),(407,'092',6709,'',0,'092','Malleco',1),(408,'141',6714,'',0,'141','Valdivia',1),(409,'142',6714,'',0,'142','Ranco',1),(410,'101',6710,'',0,'101','Llanquihue',1),(411,'102',6710,'',0,'102','Chiloé',1),(412,'103',6710,'',0,'103','Osorno',1),(413,'104',6710,'',0,'104','Palena',1),(414,'111',6711,'',0,'111','Coihaique',1),(415,'112',6711,'',0,'112','Aisén',1),(416,'113',6711,'',0,'113','Capitán Prat',1),(417,'114',6711,'',0,'114','General Carrera',1),(418,'121',6712,'',0,'121','Magallanes',1),(419,'122',6712,'',0,'122','Antártica Chilena',1),(420,'123',6712,'',0,'123','Tierra del Fuego',1),(421,'124',6712,'',0,'124','Última Esperanza',1),(422,'131',6713,'',0,'131','Santiago',1),(423,'132',6713,'',0,'132','Cordillera',1),(424,'133',6713,'',0,'133','Chacabuco',1),(425,'134',6713,'',0,'134','Maipo',1),(426,'135',6713,'',0,'135','Melipilla',1),(427,'136',6713,'',0,'136','Talagante',1),(428,'DIF',15401,'',0,'DIF','Distrito Federal',1),(429,'AGS',15401,'',0,'AGS','Aguascalientes',1),(430,'BCN',15401,'',0,'BCN','Baja California Norte',1),(431,'BCS',15401,'',0,'BCS','Baja California Sur',1),(432,'CAM',15401,'',0,'CAM','Campeche',1),(433,'CHP',15401,'',0,'CHP','Chiapas',1),(434,'CHI',15401,'',0,'CHI','Chihuahua',1),(435,'COA',15401,'',0,'COA','Coahuila',1),(436,'COL',15401,'',0,'COL','Colima',1),(437,'DUR',15401,'',0,'DUR','Durango',1),(438,'GTO',15401,'',0,'GTO','Guanajuato',1),(439,'GRO',15401,'',0,'GRO','Guerrero',1),(440,'HGO',15401,'',0,'HGO','Hidalgo',1),(441,'JAL',15401,'',0,'JAL','Jalisco',1),(442,'MEX',15401,'',0,'MEX','México',1),(443,'MIC',15401,'',0,'MIC','Michoacán de Ocampo',1),(444,'MOR',15401,'',0,'MOR','Morelos',1),(445,'NAY',15401,'',0,'NAY','Nayarit',1),(446,'NLE',15401,'',0,'NLE','Nuevo León',1),(447,'OAX',15401,'',0,'OAX','Oaxaca',1),(448,'PUE',15401,'',0,'PUE','Puebla',1),(449,'QRO',15401,'',0,'QRO','Querétaro',1),(451,'ROO',15401,'',0,'ROO','Quintana Roo',1),(452,'SLP',15401,'',0,'SLP','San Luis Potosí',1),(453,'SIN',15401,'',0,'SIN','Sinaloa',1),(454,'SON',15401,'',0,'SON','Sonora',1),(455,'TAB',15401,'',0,'TAB','Tabasco',1),(456,'TAM',15401,'',0,'TAM','Tamaulipas',1),(457,'TLX',15401,'',0,'TLX','Tlaxcala',1),(458,'VER',15401,'',0,'VER','Veracruz',1),(459,'YUC',15401,'',0,'YUC','Yucatán',1),(460,'ZAC',15401,'',0,'ZAC','Zacatecas',1),(461,'ANT',7001,'',0,'ANT','Antioquia',1),(462,'BOL',7001,'',0,'BOL','Bolívar',1),(463,'BOY',7001,'',0,'BOY','Boyacá',1),(464,'CAL',7001,'',0,'CAL','Caldas',1),(465,'CAU',7001,'',0,'CAU','Cauca',1),(466,'CUN',7001,'',0,'CUN','Cundinamarca',1),(467,'HUI',7001,'',0,'HUI','Huila',1),(468,'LAG',7001,'',0,'LAG','La Guajira',1),(469,'MET',7001,'',0,'MET','Meta',1),(470,'NAR',7001,'',0,'NAR','Nariño',1),(471,'NDS',7001,'',0,'NDS','Norte de Santander',1),(472,'SAN',7001,'',0,'SAN','Santander',1),(473,'SUC',7001,'',0,'SUC','Sucre',1),(474,'TOL',7001,'',0,'TOL','Tolima',1),(475,'VAC',7001,'',0,'VAC','Valle del Cauca',1),(476,'RIS',7001,'',0,'RIS','Risalda',1),(477,'ATL',7001,'',0,'ATL','Atlántico',1),(478,'COR',7001,'',0,'COR','Córdoba',1),(479,'SAP',7001,'',0,'SAP','San Andrés, Providencia y Santa Catalina',1),(480,'ARA',7001,'',0,'ARA','Arauca',1),(481,'CAS',7001,'',0,'CAS','Casanare',1),(482,'AMA',7001,'',0,'AMA','Amazonas',1),(483,'CAQ',7001,'',0,'CAQ','Caquetá',1),(484,'CHO',7001,'',0,'CHO','Chocó',1),(485,'GUA',7001,'',0,'GUA','Guainía',1),(486,'GUV',7001,'',0,'GUV','Guaviare',1),(487,'PUT',7001,'',0,'PUT','Putumayo',1),(488,'QUI',7001,'',0,'QUI','Quindío',1),(489,'VAU',7001,'',0,'VAU','Vaupés',1),(490,'BOG',7001,'',0,'BOG','Bogotá',1),(491,'VID',7001,'',0,'VID','Vichada',1),(492,'CES',7001,'',0,'CES','Cesar',1),(493,'MAG',7001,'',0,'MAG','Magdalena',1),(494,'AT',11401,'',0,'AT','Atlántida',1),(495,'CH',11401,'',0,'CH','Choluteca',1),(496,'CL',11401,'',0,'CL','Colón',1),(497,'CM',11401,'',0,'CM','Comayagua',1),(498,'CO',11401,'',0,'CO','Copán',1),(499,'CR',11401,'',0,'CR','Cortés',1),(500,'EP',11401,'',0,'EP','El Paraíso',1),(501,'FM',11401,'',0,'FM','Francisco Morazán',1),(502,'GD',11401,'',0,'GD','Gracias a Dios',1),(503,'IN',11401,'',0,'IN','Intibucá',1),(504,'IB',11401,'',0,'IB','Islas de la Bahía',1),(505,'LP',11401,'',0,'LP','La Paz',1),(506,'LM',11401,'',0,'LM','Lempira',1),(507,'OC',11401,'',0,'OC','Ocotepeque',1),(508,'OL',11401,'',0,'OL','Olancho',1),(509,'SB',11401,'',0,'SB','Santa Bárbara',1),(510,'VL',11401,'',0,'VL','Valle',1),(511,'YO',11401,'',0,'YO','Yoro',1),(512,'DC',11401,'',0,'DC','Distrito Central',1),(652,'CC',4601,'Oistins',0,'CC','Christ Church',1),(655,'SA',4601,'Greenland',0,'SA','Saint Andrew',1),(656,'SG',4601,'Bulkeley',0,'SG','Saint George',1),(657,'JA',4601,'Holetown',0,'JA','Saint James',1),(658,'SJ',4601,'Four Roads',0,'SJ','Saint John',1),(659,'SB',4601,'Bathsheba',0,'SB','Saint Joseph',1),(660,'SL',4601,'Crab Hill',0,'SL','Saint Lucy',1),(661,'SM',4601,'Bridgetown',0,'SM','Saint Michael',1),(662,'SP',4601,'Speightstown',0,'SP','Saint Peter',1),(663,'SC',4601,'Crane',0,'SC','Saint Philip',1),(664,'ST',4601,'Hillaby',0,'ST','Saint Thomas',1),(777,'AG',315,NULL,NULL,NULL,'AGRIGENTO',1),(778,'AL',312,NULL,NULL,NULL,'ALESSANDRIA',1),(779,'AN',310,NULL,NULL,NULL,'ANCONA',1),(780,'AO',319,NULL,NULL,NULL,'AOSTA',1),(781,'AR',316,NULL,NULL,NULL,'AREZZO',1),(782,'AP',310,NULL,NULL,NULL,'ASCOLI PICENO',1),(783,'AT',312,NULL,NULL,NULL,'ASTI',1),(784,'AV',304,NULL,NULL,NULL,'AVELLINO',1),(785,'BA',313,NULL,NULL,NULL,'BARI',1),(786,'BT',313,NULL,NULL,NULL,'BARLETTA-ANDRIA-TRANI',1),(787,'BL',320,NULL,NULL,NULL,'BELLUNO',1),(788,'BN',304,NULL,NULL,NULL,'BENEVENTO',1),(789,'BG',309,NULL,NULL,NULL,'BERGAMO',1),(790,'BI',312,NULL,NULL,NULL,'BIELLA',1),(791,'BO',305,NULL,NULL,NULL,'BOLOGNA',1),(792,'BZ',317,NULL,NULL,NULL,'BOLZANO',1),(793,'BS',309,NULL,NULL,NULL,'BRESCIA',1),(794,'BR',313,NULL,NULL,NULL,'BRINDISI',1),(795,'CA',314,NULL,NULL,NULL,'CAGLIARI',1),(796,'CL',315,NULL,NULL,NULL,'CALTANISSETTA',1),(797,'CB',311,NULL,NULL,NULL,'CAMPOBASSO',1),(798,'CI',314,NULL,NULL,NULL,'CARBONIA-IGLESIAS',1),(799,'CE',304,NULL,NULL,NULL,'CASERTA',1),(800,'CT',315,NULL,NULL,NULL,'CATANIA',1),(801,'CZ',303,NULL,NULL,NULL,'CATANZARO',1),(802,'CH',301,NULL,NULL,NULL,'CHIETI',1),(803,'CO',309,NULL,NULL,NULL,'COMO',1),(804,'CS',303,NULL,NULL,NULL,'COSENZA',1),(805,'CR',309,NULL,NULL,NULL,'CREMONA',1),(806,'KR',303,NULL,NULL,NULL,'CROTONE',1),(807,'CN',312,NULL,NULL,NULL,'CUNEO',1),(808,'EN',315,NULL,NULL,NULL,'ENNA',1),(809,'FM',310,NULL,NULL,NULL,'FERMO',1),(810,'FE',305,NULL,NULL,NULL,'FERRARA',1),(811,'FI',316,NULL,NULL,NULL,'FIRENZE',1),(812,'FG',313,NULL,NULL,NULL,'FOGGIA',1),(813,'FC',305,NULL,NULL,NULL,'FORLI-CESENA',1),(814,'FR',307,NULL,NULL,NULL,'FROSINONE',1),(815,'GE',308,NULL,NULL,NULL,'GENOVA',1),(816,'GO',306,NULL,NULL,NULL,'GORIZIA',1),(817,'GR',316,NULL,NULL,NULL,'GROSSETO',1),(818,'IM',308,NULL,NULL,NULL,'IMPERIA',1),(819,'IS',311,NULL,NULL,NULL,'ISERNIA',1),(820,'SP',308,NULL,NULL,NULL,'LA SPEZIA',1),(821,'AQ',301,NULL,NULL,NULL,'L AQUILA',1),(822,'LT',307,NULL,NULL,NULL,'LATINA',1),(823,'LE',313,NULL,NULL,NULL,'LECCE',1),(824,'LC',309,NULL,NULL,NULL,'LECCO',1),(825,'LI',314,NULL,NULL,NULL,'LIVORNO',1),(826,'LO',309,NULL,NULL,NULL,'LODI',1),(827,'LU',316,NULL,NULL,NULL,'LUCCA',1),(828,'MC',310,NULL,NULL,NULL,'MACERATA',1),(829,'MN',309,NULL,NULL,NULL,'MANTOVA',1),(830,'MS',316,NULL,NULL,NULL,'MASSA-CARRARA',1),(831,'MT',302,NULL,NULL,NULL,'MATERA',1),(832,'VS',314,NULL,NULL,NULL,'MEDIO CAMPIDANO',1),(833,'ME',315,NULL,NULL,NULL,'MESSINA',1),(834,'MI',309,NULL,NULL,NULL,'MILANO',1),(835,'MB',309,NULL,NULL,NULL,'MONZA e BRIANZA',1),(836,'MO',305,NULL,NULL,NULL,'MODENA',1),(837,'NA',304,NULL,NULL,NULL,'NAPOLI',1),(838,'NO',312,NULL,NULL,NULL,'NOVARA',1),(839,'NU',314,NULL,NULL,NULL,'NUORO',1),(840,'OG',314,NULL,NULL,NULL,'OGLIASTRA',1),(841,'OT',314,NULL,NULL,NULL,'OLBIA-TEMPIO',1),(842,'OR',314,NULL,NULL,NULL,'ORISTANO',1),(843,'PD',320,NULL,NULL,NULL,'PADOVA',1),(844,'PA',315,NULL,NULL,NULL,'PALERMO',1),(845,'PR',305,NULL,NULL,NULL,'PARMA',1),(846,'PV',309,NULL,NULL,NULL,'PAVIA',1),(847,'PG',318,NULL,NULL,NULL,'PERUGIA',1),(848,'PU',310,NULL,NULL,NULL,'PESARO e URBINO',1),(849,'PE',301,NULL,NULL,NULL,'PESCARA',1),(850,'PC',305,NULL,NULL,NULL,'PIACENZA',1),(851,'PI',316,NULL,NULL,NULL,'PISA',1),(852,'PT',316,NULL,NULL,NULL,'PISTOIA',1),(853,'PN',306,NULL,NULL,NULL,'PORDENONE',1),(854,'PZ',302,NULL,NULL,NULL,'POTENZA',1),(855,'PO',316,NULL,NULL,NULL,'PRATO',1),(856,'RG',315,NULL,NULL,NULL,'RAGUSA',1),(857,'RA',305,NULL,NULL,NULL,'RAVENNA',1),(858,'RC',303,NULL,NULL,NULL,'REGGIO CALABRIA',1),(859,'RE',305,NULL,NULL,NULL,'REGGIO NELL EMILIA',1),(860,'RI',307,NULL,NULL,NULL,'RIETI',1),(861,'RN',305,NULL,NULL,NULL,'RIMINI',1),(862,'RM',307,NULL,NULL,NULL,'ROMA',1),(863,'RO',320,NULL,NULL,NULL,'ROVIGO',1),(864,'SA',304,NULL,NULL,NULL,'SALERNO',1),(865,'SS',314,NULL,NULL,NULL,'SASSARI',1),(866,'SV',308,NULL,NULL,NULL,'SAVONA',1),(867,'SI',316,NULL,NULL,NULL,'SIENA',1),(868,'SR',315,NULL,NULL,NULL,'SIRACUSA',1),(869,'SO',309,NULL,NULL,NULL,'SONDRIO',1),(870,'TA',313,NULL,NULL,NULL,'TARANTO',1),(871,'TE',301,NULL,NULL,NULL,'TERAMO',1),(872,'TR',318,NULL,NULL,NULL,'TERNI',1),(873,'TO',312,NULL,NULL,NULL,'TORINO',1),(874,'TP',315,NULL,NULL,NULL,'TRAPANI',1),(875,'TN',317,NULL,NULL,NULL,'TRENTO',1),(876,'TV',320,NULL,NULL,NULL,'TREVISO',1),(877,'TS',306,NULL,NULL,NULL,'TRIESTE',1),(878,'UD',306,NULL,NULL,NULL,'UDINE',1),(879,'VA',309,NULL,NULL,NULL,'VARESE',1),(880,'VE',320,NULL,NULL,NULL,'VENEZIA',1),(881,'VB',312,NULL,NULL,NULL,'VERBANO-CUSIO-OSSOLA',1),(882,'VC',312,NULL,NULL,NULL,'VERCELLI',1),(883,'VR',320,NULL,NULL,NULL,'VERONA',1),(884,'VV',303,NULL,NULL,NULL,'VIBO VALENTIA',1),(885,'VI',320,NULL,NULL,NULL,'VICENZA',1),(886,'VT',307,NULL,NULL,NULL,'VITERBO',1),(1036,'VE-L',23201,'',0,'VE-L','Mérida',1),(1037,'VE-T',23201,'',0,'VE-T','Trujillo',1),(1038,'VE-E',23201,'',0,'VE-E','Barinas',1),(1039,'VE-M',23202,'',0,'VE-M','Miranda',1),(1040,'VE-W',23202,'',0,'VE-W','Vargas',1),(1041,'VE-A',23202,'',0,'VE-A','Distrito Capital',1),(1042,'VE-D',23203,'',0,'VE-D','Aragua',1),(1043,'VE-G',23203,'',0,'VE-G','Carabobo',1),(1044,'VE-I',23204,'',0,'VE-I','Falcón',1),(1045,'VE-K',23204,'',0,'VE-K','Lara',1),(1046,'VE-U',23204,'',0,'VE-U','Yaracuy',1),(1047,'VE-F',23205,'',0,'VE-F','Bolívar',1),(1048,'VE-X',23205,'',0,'VE-X','Amazonas',1),(1049,'VE-Y',23205,'',0,'VE-Y','Delta Amacuro',1),(1050,'VE-O',23206,'',0,'VE-O','Nueva Esparta',1),(1051,'VE-Z',23206,'',0,'VE-Z','Dependencias Federales',1),(1052,'VE-C',23207,'',0,'VE-C','Apure',1),(1053,'VE-J',23207,'',0,'VE-J','Guárico',1),(1054,'VE-H',23207,'',0,'VE-H','Cojedes',1),(1055,'VE-P',23207,'',0,'VE-P','Portuguesa',1),(1056,'VE-B',23208,'',0,'VE-B','Anzoátegui',1),(1057,'VE-N',23208,'',0,'VE-N','Monagas',1),(1058,'VE-R',23208,'',0,'VE-R','Sucre',1),(1059,'VE-V',23209,'',0,'VE-V','Zulia',1),(1060,'VE-S',23209,'',0,'VE-S','Táchira',1),(1061,'66',10201,NULL,NULL,NULL,'?????',1),(1062,'00',10205,NULL,NULL,NULL,'?????',1),(1063,'01',10205,NULL,NULL,NULL,'?????',1),(1064,'02',10205,NULL,NULL,NULL,'?????',1),(1065,'03',10205,NULL,NULL,NULL,'??????',1),(1066,'04',10205,NULL,NULL,NULL,'?????',1),(1067,'05',10205,NULL,NULL,NULL,'??????',1),(1068,'06',10203,NULL,NULL,NULL,'??????',1),(1069,'07',10203,NULL,NULL,NULL,'???????????',1),(1070,'08',10203,NULL,NULL,NULL,'??????',1),(1071,'09',10203,NULL,NULL,NULL,'?????',1),(1072,'10',10203,NULL,NULL,NULL,'??????',1),(1073,'11',10203,NULL,NULL,NULL,'??????',1),(1074,'12',10203,NULL,NULL,NULL,'?????????',1),(1075,'13',10206,NULL,NULL,NULL,'????',1),(1076,'14',10206,NULL,NULL,NULL,'?????????',1),(1077,'15',10206,NULL,NULL,NULL,'????????',1),(1078,'16',10206,NULL,NULL,NULL,'???????',1),(1079,'17',10213,NULL,NULL,NULL,'???????',1),(1080,'18',10213,NULL,NULL,NULL,'????????',1),(1081,'19',10213,NULL,NULL,NULL,'??????',1),(1082,'20',10213,NULL,NULL,NULL,'???????',1),(1083,'21',10212,NULL,NULL,NULL,'????????',1),(1084,'22',10212,NULL,NULL,NULL,'??????',1),(1085,'23',10212,NULL,NULL,NULL,'????????',1),(1086,'24',10212,NULL,NULL,NULL,'???????',1),(1087,'25',10212,NULL,NULL,NULL,'????????',1),(1088,'26',10212,NULL,NULL,NULL,'???????',1),(1089,'27',10202,NULL,NULL,NULL,'??????',1),(1090,'28',10202,NULL,NULL,NULL,'?????????',1),(1091,'29',10202,NULL,NULL,NULL,'????????',1),(1092,'30',10202,NULL,NULL,NULL,'??????',1),(1093,'31',10209,NULL,NULL,NULL,'????????',1),(1094,'32',10209,NULL,NULL,NULL,'???????',1),(1095,'33',10209,NULL,NULL,NULL,'????????',1),(1096,'34',10209,NULL,NULL,NULL,'???????',1),(1097,'35',10209,NULL,NULL,NULL,'????????',1),(1098,'36',10211,NULL,NULL,NULL,'???????????????',1),(1099,'37',10211,NULL,NULL,NULL,'?????',1),(1100,'38',10211,NULL,NULL,NULL,'?????',1),(1101,'39',10207,NULL,NULL,NULL,'????????',1),(1102,'40',10207,NULL,NULL,NULL,'???????',1),(1103,'41',10207,NULL,NULL,NULL,'??????????',1),(1104,'42',10207,NULL,NULL,NULL,'?????',1),(1105,'43',10207,NULL,NULL,NULL,'???????',1),(1106,'44',10208,NULL,NULL,NULL,'??????',1),(1107,'45',10208,NULL,NULL,NULL,'??????',1),(1108,'46',10208,NULL,NULL,NULL,'??????',1),(1109,'47',10208,NULL,NULL,NULL,'?????',1),(1110,'48',10208,NULL,NULL,NULL,'????',1),(1111,'49',10210,NULL,NULL,NULL,'??????',1),(1112,'50',10210,NULL,NULL,NULL,'????',1),(1113,'51',10210,NULL,NULL,NULL,'????????',1),(1114,'52',10210,NULL,NULL,NULL,'????????',1),(1115,'53',10210,NULL,NULL,NULL,'???-??????',1),(1116,'54',10210,NULL,NULL,NULL,'??',1),(1117,'55',10210,NULL,NULL,NULL,'?????',1),(1118,'56',10210,NULL,NULL,NULL,'???????',1),(1119,'57',10210,NULL,NULL,NULL,'?????',1),(1120,'58',10210,NULL,NULL,NULL,'?????',1),(1121,'59',10210,NULL,NULL,NULL,'?????',1),(1122,'60',10210,NULL,NULL,NULL,'?????',1),(1123,'61',10210,NULL,NULL,NULL,'?????',1),(1124,'62',10204,NULL,NULL,NULL,'????????',1),(1125,'63',10204,NULL,NULL,NULL,'??????',1),(1126,'64',10204,NULL,NULL,NULL,'???????',1),(1127,'65',10204,NULL,NULL,NULL,'?????',1),(1128,'AL01',1301,'',0,'','Wilaya d\'Adrar',1),(1129,'AL02',1301,'',0,'','Wilaya de Chlef',1),(1130,'AL03',1301,'',0,'','Wilaya de Laghouat',1),(1131,'AL04',1301,'',0,'','Wilaya d\'Oum El Bouaghi',1),(1132,'AL05',1301,'',0,'','Wilaya de Batna',1),(1133,'AL06',1301,'',0,'','Wilaya de Béjaïa',1),(1134,'AL07',1301,'',0,'','Wilaya de Biskra',1),(1135,'AL08',1301,'',0,'','Wilaya de Béchar',1),(1136,'AL09',1301,'',0,'','Wilaya de Blida',1),(1137,'AL11',1301,'',0,'','Wilaya de Bouira',1),(1138,'AL12',1301,'',0,'','Wilaya de Tamanrasset',1),(1139,'AL13',1301,'',0,'','Wilaya de Tébessa',1),(1140,'AL14',1301,'',0,'','Wilaya de Tlemcen',1),(1141,'AL15',1301,'',0,'','Wilaya de Tiaret',1),(1142,'AL16',1301,'',0,'','Wilaya de Tizi Ouzou',1),(1143,'AL17',1301,'',0,'','Wilaya d\'Alger',1),(1144,'AL18',1301,'',0,'','Wilaya de Djelfa',1),(1145,'AL19',1301,'',0,'','Wilaya de Jijel',1),(1146,'AL20',1301,'',0,'','Wilaya de Sétif ',1),(1147,'AL21',1301,'',0,'','Wilaya de Saïda',1),(1148,'AL22',1301,'',0,'','Wilaya de Skikda',1),(1149,'AL23',1301,'',0,'','Wilaya de Sidi Bel Abbès',1),(1150,'AL24',1301,'',0,'','Wilaya d\'Annaba',1),(1151,'AL25',1301,'',0,'','Wilaya de Guelma',1),(1152,'AL26',1301,'',0,'','Wilaya de Constantine',1),(1153,'AL27',1301,'',0,'','Wilaya de Médéa',1),(1154,'AL28',1301,'',0,'','Wilaya de Mostaganem',1),(1155,'AL29',1301,'',0,'','Wilaya de M\'Sila',1),(1156,'AL30',1301,'',0,'','Wilaya de Mascara',1),(1157,'AL31',1301,'',0,'','Wilaya d\'Ouargla',1),(1158,'AL32',1301,'',0,'','Wilaya d\'Oran',1),(1159,'AL33',1301,'',0,'','Wilaya d\'El Bayadh',1),(1160,'AL34',1301,'',0,'','Wilaya d\'Illizi',1),(1161,'AL35',1301,'',0,'','Wilaya de Bordj Bou Arreridj',1),(1162,'AL36',1301,'',0,'','Wilaya de Boumerdès',1),(1163,'AL37',1301,'',0,'','Wilaya d\'El Tarf',1),(1164,'AL38',1301,'',0,'','Wilaya de Tindouf',1),(1165,'AL39',1301,'',0,'','Wilaya de Tissemsilt',1),(1166,'AL40',1301,'',0,'','Wilaya d\'El Oued',1),(1167,'AL41',1301,'',0,'','Wilaya de Khenchela',1),(1168,'AL42',1301,'',0,'','Wilaya de Souk Ahras',1),(1169,'AL43',1301,'',0,'','Wilaya de Tipaza',1),(1170,'AL44',1301,'',0,'','Wilaya de Mila',1),(1171,'AL45',1301,'',0,'','Wilaya d\'Aïn Defla',1),(1172,'AL46',1301,'',0,'','Wilaya de Naâma',1),(1173,'AL47',1301,'',0,'','Wilaya d\'Aïn Témouchent',1),(1174,'AL48',1301,'',0,'','Wilaya de Ghardaia',1),(1175,'AL49',1301,'',0,'','Wilaya de Relizane',1),(1176,'MA',1209,'',0,'','Province de Benslimane',1),(1177,'MA1',1209,'',0,'','Province de Berrechid',1),(1178,'MA2',1209,'',0,'','Province de Khouribga',1),(1179,'MA3',1209,'',0,'','Province de Settat',1),(1180,'MA4',1210,'',0,'','Province d\'El Jadida',1),(1181,'MA5',1210,'',0,'','Province de Safi',1),(1182,'MA6',1210,'',0,'','Province de Sidi Bennour',1),(1183,'MA7',1210,'',0,'','Province de Youssoufia',1),(1184,'MA6B',1205,'',0,'','Préfecture de Fès',1),(1185,'MA7B',1205,'',0,'','Province de Boulemane',1),(1186,'MA8',1205,'',0,'','Province de Moulay Yacoub',1),(1187,'MA9',1205,'',0,'','Province de Sefrou',1),(1188,'MA8A',1202,'',0,'','Province de Kénitra',1),(1189,'MA9A',1202,'',0,'','Province de Sidi Kacem',1),(1190,'MA10',1202,'',0,'','Province de Sidi Slimane',1),(1191,'MA11',1208,'',0,'','Préfecture de Casablanca',1),(1192,'MA12',1208,'',0,'','Préfecture de Mohammédia',1),(1193,'MA13',1208,'',0,'','Province de Médiouna',1),(1194,'MA14',1208,'',0,'','Province de Nouaceur',1),(1195,'MA15',1214,'',0,'','Province d\'Assa-Zag',1),(1196,'MA16',1214,'',0,'','Province d\'Es-Semara',1),(1197,'MA17A',1214,'',0,'','Province de Guelmim',1),(1198,'MA18',1214,'',0,'','Province de Tata',1),(1199,'MA19',1214,'',0,'','Province de Tan-Tan',1),(1200,'MA15',1215,'',0,'','Province de Boujdour',1),(1201,'MA16',1215,'',0,'','Province de Lâayoune',1),(1202,'MA17',1215,'',0,'','Province de Tarfaya',1),(1203,'MA18',1211,'',0,'','Préfecture de Marrakech',1),(1204,'MA19',1211,'',0,'','Province d\'Al Haouz',1),(1205,'MA20',1211,'',0,'','Province de Chichaoua',1),(1206,'MA21',1211,'',0,'','Province d\'El Kelâa des Sraghna',1),(1207,'MA22',1211,'',0,'','Province d\'Essaouira',1),(1208,'MA23',1211,'',0,'','Province de Rehamna',1),(1209,'MA24',1206,'',0,'','Préfecture de Meknès',1),(1210,'MA25',1206,'',0,'','Province d’El Hajeb',1),(1211,'MA26',1206,'',0,'','Province d\'Errachidia',1),(1212,'MA27',1206,'',0,'','Province d’Ifrane',1),(1213,'MA28',1206,'',0,'','Province de Khénifra',1),(1214,'MA29',1206,'',0,'','Province de Midelt',1),(1215,'MA30',1204,'',0,'','Préfecture d\'Oujda-Angad',1),(1216,'MA31',1204,'',0,'','Province de Berkane',1),(1217,'MA32',1204,'',0,'','Province de Driouch',1),(1218,'MA33',1204,'',0,'','Province de Figuig',1),(1219,'MA34',1204,'',0,'','Province de Jerada',1),(1220,'MA35',1204,'',0,'','Province de Nadorgg',1),(1221,'MA36',1204,'',0,'','Province de Taourirt',1),(1222,'MA37',1216,'',0,'','Province d\'Aousserd',1),(1223,'MA38',1216,'',0,'','Province d\'Oued Ed-Dahab',1),(1224,'MA39',1207,'',0,'','Préfecture de Rabat',1),(1225,'MA40',1207,'',0,'','Préfecture de Skhirat-Témara',1),(1226,'MA41',1207,'',0,'','Préfecture de Salé',1),(1227,'MA42',1207,'',0,'','Province de Khémisset',1),(1228,'MA43',1213,'',0,'','Préfecture d\'Agadir Ida-Outanane',1),(1229,'MA44',1213,'',0,'','Préfecture d\'Inezgane-Aït Melloul',1),(1230,'MA45',1213,'',0,'','Province de Chtouka-Aït Baha',1),(1231,'MA46',1213,'',0,'','Province d\'Ouarzazate',1),(1232,'MA47',1213,'',0,'','Province de Sidi Ifni',1),(1233,'MA48',1213,'',0,'','Province de Taroudant',1),(1234,'MA49',1213,'',0,'','Province de Tinghir',1),(1235,'MA50',1213,'',0,'','Province de Tiznit',1),(1236,'MA51',1213,'',0,'','Province de Zagora',1),(1237,'MA52',1212,'',0,'','Province d\'Azilal',1),(1238,'MA53',1212,'',0,'','Province de Beni Mellal',1),(1239,'MA54',1212,'',0,'','Province de Fquih Ben Salah',1),(1240,'MA55',1201,'',0,'','Préfecture de M\'diq-Fnideq',1),(1241,'MA56',1201,'',0,'','Préfecture de Tanger-Asilah',1),(1242,'MA57',1201,'',0,'','Province de Chefchaouen',1),(1243,'MA58',1201,'',0,'','Province de Fahs-Anjra',1),(1244,'MA59',1201,'',0,'','Province de Larache',1),(1245,'MA60',1201,'',0,'','Province d\'Ouezzane',1),(1246,'MA61',1201,'',0,'','Province de Tétouan',1),(1247,'MA62',1203,'',0,'','Province de Guercif',1),(1248,'MA63',1203,'',0,'','Province d\'Al Hoceïma',1),(1249,'MA64',1203,'',0,'','Province de Taounate',1),(1250,'MA65',1203,'',0,'','Province de Taza',1),(1251,'MA6A',1205,'',0,'','Préfecture de Fès',1),(1252,'MA7A',1205,'',0,'','Province de Boulemane',1),(1253,'MA15A',1214,'',0,'','Province d\'Assa-Zag',1),(1254,'MA16A',1214,'',0,'','Province d\'Es-Semara',1),(1255,'MA18A',1211,'',0,'','Préfecture de Marrakech',1),(1256,'MA19A',1214,'',0,'','Province de Tan-Tan',1),(1257,'MA19B',1214,'',0,'','Province de Tan-Tan',1),(1258,'TN01',1001,'',0,'','Ariana',1),(1259,'TN02',1001,'',0,'','Béja',1),(1260,'TN03',1001,'',0,'','Ben Arous',1),(1261,'TN04',1001,'',0,'','Bizerte',1),(1262,'TN05',1001,'',0,'','Gabès',1),(1263,'TN06',1001,'',0,'','Gafsa',1),(1264,'TN07',1001,'',0,'','Jendouba',1),(1265,'TN08',1001,'',0,'','Kairouan',1),(1266,'TN09',1001,'',0,'','Kasserine',1),(1267,'TN10',1001,'',0,'','Kébili',1),(1268,'TN11',1001,'',0,'','La Manouba',1),(1269,'TN12',1001,'',0,'','Le Kef',1),(1270,'TN13',1001,'',0,'','Mahdia',1),(1271,'TN14',1001,'',0,'','Médenine',1),(1272,'TN15',1001,'',0,'','Monastir',1),(1273,'TN16',1001,'',0,'','Nabeul',1),(1274,'TN17',1001,'',0,'','Sfax',1),(1275,'TN18',1001,'',0,'','Sidi Bouzid',1),(1276,'TN19',1001,'',0,'','Siliana',1),(1277,'TN20',1001,'',0,'','Sousse',1),(1278,'TN21',1001,'',0,'','Tataouine',1),(1279,'TN22',1001,'',0,'','Tozeur',1),(1280,'TN23',1001,'',0,'','Tunis',1),(1281,'TN24',1001,'',0,'','Zaghouan',1),(1287,'976',6,'97601',3,'MAYOTTE','Mayotte',1),(1513,'ON',1401,'',1,'','Ontario',1),(1514,'QC',1401,'',1,'','Quebec',1),(1515,'NS',1401,'',1,'','Nova Scotia',1),(1516,'NB',1401,'',1,'','New Brunswick',1),(1517,'MB',1401,'',1,'','Manitoba',1),(1518,'BC',1401,'',1,'','British Columbia',1),(1519,'PE',1401,'',1,'','Prince Edward Island',1),(1520,'SK',1401,'',1,'','Saskatchewan',1),(1521,'AB',1401,'',1,'','Alberta',1),(1522,'NL',1401,'',1,'','Newfoundland and Labrador',1),(1575,'BW',501,NULL,NULL,'BADEN-WÜRTTEMBERG','Baden-Württemberg',1),(1576,'BY',501,NULL,NULL,'BAYERN','Bayern',1),(1577,'BE',501,NULL,NULL,'BERLIN','Berlin',1),(1578,'BB',501,NULL,NULL,'BRANDENBURG','Brandenburg',1),(1579,'HB',501,NULL,NULL,'BREMEN','Bremen',1),(1580,'HH',501,NULL,NULL,'HAMBURG','Hamburg',1),(1581,'HE',501,NULL,NULL,'HESSEN','Hessen',1),(1582,'MV',501,NULL,NULL,'MECKLENBURG-VORPOMMERN','Mecklenburg-Vorpommern',1),(1583,'NI',501,NULL,NULL,'NIEDERSACHSEN','Niedersachsen',1),(1584,'NW',501,NULL,NULL,'NORDRHEIN-WESTFALEN','Nordrhein-Westfalen',1),(1585,'RP',501,NULL,NULL,'RHEINLAND-PFALZ','Rheinland-Pfalz',1),(1586,'SL',501,NULL,NULL,'SAARLAND','Saarland',1),(1587,'SN',501,NULL,NULL,'SACHSEN','Sachsen',1),(1588,'ST',501,NULL,NULL,'SACHSEN-ANHALT','Sachsen-Anhalt',1),(1589,'SH',501,NULL,NULL,'SCHLESWIG-HOLSTEIN','Schleswig-Holstein',1),(1590,'TH',501,NULL,NULL,'THÜRINGEN','Thüringen',1),(1592,'67',10205,'',0,'','Δράμα',1),(1684,'701',701,NULL,0,NULL,'Bedfordshire',1),(1685,'702',701,NULL,0,NULL,'Berkshire',1),(1686,'703',701,NULL,0,NULL,'Bristol, City of',1),(1687,'704',701,NULL,0,NULL,'Buckinghamshire',1),(1688,'705',701,NULL,0,NULL,'Cambridgeshire',1),(1689,'706',701,NULL,0,NULL,'Cheshire',1),(1690,'707',701,NULL,0,NULL,'Cleveland',1),(1691,'708',701,NULL,0,NULL,'Cornwall',1),(1692,'709',701,NULL,0,NULL,'Cumberland',1),(1693,'710',701,NULL,0,NULL,'Cumbria',1),(1694,'711',701,NULL,0,NULL,'Derbyshire',1),(1695,'712',701,NULL,0,NULL,'Devon',1),(1696,'713',701,NULL,0,NULL,'Dorset',1),(1697,'714',701,NULL,0,NULL,'Co. Durham',1),(1698,'715',701,NULL,0,NULL,'East Riding of Yorkshire',1),(1699,'716',701,NULL,0,NULL,'East Sussex',1),(1700,'717',701,NULL,0,NULL,'Essex',1),(1701,'718',701,NULL,0,NULL,'Gloucestershire',1),(1702,'719',701,NULL,0,NULL,'Greater Manchester',1),(1703,'720',701,NULL,0,NULL,'Hampshire',1),(1704,'721',701,NULL,0,NULL,'Hertfordshire',1),(1705,'722',701,NULL,0,NULL,'Hereford and Worcester',1),(1706,'723',701,NULL,0,NULL,'Herefordshire',1),(1707,'724',701,NULL,0,NULL,'Huntingdonshire',1),(1708,'725',701,NULL,0,NULL,'Isle of Man',1),(1709,'726',701,NULL,0,NULL,'Isle of Wight',1),(1710,'727',701,NULL,0,NULL,'Jersey',1),(1711,'728',701,NULL,0,NULL,'Kent',1),(1712,'729',701,NULL,0,NULL,'Lancashire',1),(1713,'730',701,NULL,0,NULL,'Leicestershire',1),(1714,'731',701,NULL,0,NULL,'Lincolnshire',1),(1715,'732',701,NULL,0,NULL,'London - City of London',1),(1716,'733',701,NULL,0,NULL,'Merseyside',1),(1717,'734',701,NULL,0,NULL,'Middlesex',1),(1718,'735',701,NULL,0,NULL,'Norfolk',1),(1719,'736',701,NULL,0,NULL,'North Yorkshire',1),(1720,'737',701,NULL,0,NULL,'North Riding of Yorkshire',1),(1721,'738',701,NULL,0,NULL,'Northamptonshire',1),(1722,'739',701,NULL,0,NULL,'Northumberland',1),(1723,'740',701,NULL,0,NULL,'Nottinghamshire',1),(1724,'741',701,NULL,0,NULL,'Oxfordshire',1),(1725,'742',701,NULL,0,NULL,'Rutland',1),(1726,'743',701,NULL,0,NULL,'Shropshire',1),(1727,'744',701,NULL,0,NULL,'Somerset',1),(1728,'745',701,NULL,0,NULL,'Staffordshire',1),(1729,'746',701,NULL,0,NULL,'Suffolk',1),(1730,'747',701,NULL,0,NULL,'Surrey',1),(1731,'748',701,NULL,0,NULL,'Sussex',1),(1732,'749',701,NULL,0,NULL,'Tyne and Wear',1),(1733,'750',701,NULL,0,NULL,'Warwickshire',1),(1734,'751',701,NULL,0,NULL,'West Midlands',1),(1735,'752',701,NULL,0,NULL,'West Sussex',1),(1736,'753',701,NULL,0,NULL,'West Yorkshire',1),(1737,'754',701,NULL,0,NULL,'West Riding of Yorkshire',1),(1738,'755',701,NULL,0,NULL,'Wiltshire',1),(1739,'756',701,NULL,0,NULL,'Worcestershire',1),(1740,'757',701,NULL,0,NULL,'Yorkshire',1),(1741,'758',702,NULL,0,NULL,'Anglesey',1),(1742,'759',702,NULL,0,NULL,'Breconshire',1),(1743,'760',702,NULL,0,NULL,'Caernarvonshire',1),(1744,'761',702,NULL,0,NULL,'Cardiganshire',1),(1745,'762',702,NULL,0,NULL,'Carmarthenshire',1),(1746,'763',702,NULL,0,NULL,'Ceredigion',1),(1747,'764',702,NULL,0,NULL,'Denbighshire',1),(1748,'765',702,NULL,0,NULL,'Flintshire',1),(1749,'766',702,NULL,0,NULL,'Glamorgan',1),(1750,'767',702,NULL,0,NULL,'Gwent',1),(1751,'768',702,NULL,0,NULL,'Gwynedd',1),(1752,'769',702,NULL,0,NULL,'Merionethshire',1),(1753,'770',702,NULL,0,NULL,'Monmouthshire',1),(1754,'771',702,NULL,0,NULL,'Mid Glamorgan',1),(1755,'772',702,NULL,0,NULL,'Montgomeryshire',1),(1756,'773',702,NULL,0,NULL,'Pembrokeshire',1),(1757,'774',702,NULL,0,NULL,'Powys',1),(1758,'775',702,NULL,0,NULL,'Radnorshire',1),(1759,'776',702,NULL,0,NULL,'South Glamorgan',1),(1760,'777',703,NULL,0,NULL,'Aberdeen, City of',1),(1761,'778',703,NULL,0,NULL,'Angus',1),(1762,'779',703,NULL,0,NULL,'Argyll',1),(1763,'780',703,NULL,0,NULL,'Ayrshire',1),(1764,'781',703,NULL,0,NULL,'Banffshire',1),(1765,'782',703,NULL,0,NULL,'Berwickshire',1),(1766,'783',703,NULL,0,NULL,'Bute',1),(1767,'784',703,NULL,0,NULL,'Caithness',1),(1768,'785',703,NULL,0,NULL,'Clackmannanshire',1),(1769,'786',703,NULL,0,NULL,'Dumfriesshire',1),(1770,'787',703,NULL,0,NULL,'Dumbartonshire',1),(1771,'788',703,NULL,0,NULL,'Dundee, City of',1),(1772,'789',703,NULL,0,NULL,'East Lothian',1),(1773,'790',703,NULL,0,NULL,'Fife',1),(1774,'791',703,NULL,0,NULL,'Inverness',1),(1775,'792',703,NULL,0,NULL,'Kincardineshire',1),(1776,'793',703,NULL,0,NULL,'Kinross-shire',1),(1777,'794',703,NULL,0,NULL,'Kirkcudbrightshire',1),(1778,'795',703,NULL,0,NULL,'Lanarkshire',1),(1779,'796',703,NULL,0,NULL,'Midlothian',1),(1780,'797',703,NULL,0,NULL,'Morayshire',1),(1781,'798',703,NULL,0,NULL,'Nairnshire',1),(1782,'799',703,NULL,0,NULL,'Orkney',1),(1783,'800',703,NULL,0,NULL,'Peebleshire',1),(1784,'801',703,NULL,0,NULL,'Perthshire',1),(1785,'802',703,NULL,0,NULL,'Renfrewshire',1),(1786,'803',703,NULL,0,NULL,'Ross & Cromarty',1),(1787,'804',703,NULL,0,NULL,'Roxburghshire',1),(1788,'805',703,NULL,0,NULL,'Selkirkshire',1),(1789,'806',703,NULL,0,NULL,'Shetland',1),(1790,'807',703,NULL,0,NULL,'Stirlingshire',1),(1791,'808',703,NULL,0,NULL,'Sutherland',1),(1792,'809',703,NULL,0,NULL,'West Lothian',1),(1793,'810',703,NULL,0,NULL,'Wigtownshire',1),(1794,'811',704,NULL,0,NULL,'Antrim',1),(1795,'812',704,NULL,0,NULL,'Armagh',1),(1796,'813',704,NULL,0,NULL,'Co. Down',1),(1797,'814',704,NULL,0,NULL,'Co. Fermanagh',1),(1798,'815',704,NULL,0,NULL,'Co. Londonderry',1),(1849,'GR',1701,NULL,NULL,NULL,'Groningen',1),(1850,'FR',1701,NULL,NULL,NULL,'Friesland',1),(1851,'DR',1701,NULL,NULL,NULL,'Drenthe',1),(1852,'OV',1701,NULL,NULL,NULL,'Overijssel',1),(1853,'GD',1701,NULL,NULL,NULL,'Gelderland',1),(1854,'FL',1701,NULL,NULL,NULL,'Flevoland',1),(1855,'UT',1701,NULL,NULL,NULL,'Utrecht',1),(1856,'NH',1701,NULL,NULL,NULL,'Noord-Holland',1),(1857,'ZH',1701,NULL,NULL,NULL,'Zuid-Holland',1),(1858,'ZL',1701,NULL,NULL,NULL,'Zeeland',1),(1859,'NB',1701,NULL,NULL,NULL,'Noord-Brabant',1),(1860,'LB',1701,NULL,NULL,NULL,'Limburg',1),(1900,'AC',5601,'ACRE',0,'AC','Acre',1),(1901,'AL',5601,'ALAGOAS',0,'AL','Alagoas',1),(1902,'AP',5601,'AMAPA',0,'AP','Amapá',1),(1903,'AM',5601,'AMAZONAS',0,'AM','Amazonas',1),(1904,'BA',5601,'BAHIA',0,'BA','Bahia',1),(1905,'CE',5601,'CEARA',0,'CE','Ceará',1),(1906,'ES',5601,'ESPIRITO SANTO',0,'ES','Espirito Santo',1),(1907,'GO',5601,'GOIAS',0,'GO','Goiás',1),(1908,'MA',5601,'MARANHAO',0,'MA','Maranhão',1),(1909,'MT',5601,'MATO GROSSO',0,'MT','Mato Grosso',1),(1910,'MS',5601,'MATO GROSSO DO SUL',0,'MS','Mato Grosso do Sul',1),(1911,'MG',5601,'MINAS GERAIS',0,'MG','Minas Gerais',1),(1912,'PA',5601,'PARA',0,'PA','Pará',1),(1913,'PB',5601,'PARAIBA',0,'PB','Paraiba',1),(1914,'PR',5601,'PARANA',0,'PR','Paraná',1),(1915,'PE',5601,'PERNAMBUCO',0,'PE','Pernambuco',1),(1916,'PI',5601,'PIAUI',0,'PI','Piauí',1),(1917,'RJ',5601,'RIO DE JANEIRO',0,'RJ','Rio de Janeiro',1),(1918,'RN',5601,'RIO GRANDE DO NORTE',0,'RN','Rio Grande do Norte',1),(1919,'RS',5601,'RIO GRANDE DO SUL',0,'RS','Rio Grande do Sul',1),(1920,'RO',5601,'RONDONIA',0,'RO','Rondônia',1),(1921,'RR',5601,'RORAIMA',0,'RR','Roraima',1),(1922,'SC',5601,'SANTA CATARINA',0,'SC','Santa Catarina',1),(1923,'SE',5601,'SERGIPE',0,'SE','Sergipe',1),(1924,'SP',5601,'SAO PAULO',0,'SP','Sao Paulo',1),(1925,'TO',5601,'TOCANTINS',0,'TO','Tocantins',1),(1926,'DF',5601,'DISTRITO FEDERAL',0,'DF','Distrito Federal',1),(1927,'001',5201,'',0,'','Belisario Boeto',1),(1928,'002',5201,'',0,'','Hernando Siles',1),(1929,'003',5201,'',0,'','Jaime Zudáñez',1),(1930,'004',5201,'',0,'','Juana Azurduy de Padilla',1),(1931,'005',5201,'',0,'','Luis Calvo',1),(1932,'006',5201,'',0,'','Nor Cinti',1),(1933,'007',5201,'',0,'','Oropeza',1),(1934,'008',5201,'',0,'','Sud Cinti',1),(1935,'009',5201,'',0,'','Tomina',1),(1936,'010',5201,'',0,'','Yamparáez',1),(1937,'011',5202,'',0,'','Abel Iturralde',1),(1938,'012',5202,'',0,'','Aroma',1),(1939,'013',5202,'',0,'','Bautista Saavedra',1),(1940,'014',5202,'',0,'','Caranavi',1),(1941,'015',5202,'',0,'','Eliodoro Camacho',1),(1942,'016',5202,'',0,'','Franz Tamayo',1),(1943,'017',5202,'',0,'','Gualberto Villarroel',1),(1944,'018',5202,'',0,'','Ingaví',1),(1945,'019',5202,'',0,'','Inquisivi',1),(1946,'020',5202,'',0,'','José Ramón Loayza',1),(1947,'021',5202,'',0,'','Larecaja',1),(1948,'022',5202,'',0,'','Los Andes (Bolivia)',1),(1949,'023',5202,'',0,'','Manco Kapac',1),(1950,'024',5202,'',0,'','Muñecas',1),(1951,'025',5202,'',0,'','Nor Yungas',1),(1952,'026',5202,'',0,'','Omasuyos',1),(1953,'027',5202,'',0,'','Pacajes',1),(1954,'028',5202,'',0,'','Pedro Domingo Murillo',1),(1955,'029',5202,'',0,'','Sud Yungas',1),(1956,'030',5202,'',0,'','General José Manuel Pando',1),(1957,'031',5203,'',0,'','Arani',1),(1958,'032',5203,'',0,'','Arque',1),(1959,'033',5203,'',0,'','Ayopaya',1),(1960,'034',5203,'',0,'','Bolívar (Bolivia)',1),(1961,'035',5203,'',0,'','Campero',1),(1962,'036',5203,'',0,'','Capinota',1),(1963,'037',5203,'',0,'','Cercado (Cochabamba)',1),(1964,'038',5203,'',0,'','Esteban Arze',1),(1965,'039',5203,'',0,'','Germán Jordán',1),(1966,'040',5203,'',0,'','José Carrasco',1),(1967,'041',5203,'',0,'','Mizque',1),(1968,'042',5203,'',0,'','Punata',1),(1969,'043',5203,'',0,'','Quillacollo',1),(1970,'044',5203,'',0,'','Tapacarí',1),(1971,'045',5203,'',0,'','Tiraque',1),(1972,'046',5203,'',0,'','Chapare',1),(1973,'047',5204,'',0,'','Carangas',1),(1974,'048',5204,'',0,'','Cercado (Oruro)',1),(1975,'049',5204,'',0,'','Eduardo Avaroa',1),(1976,'050',5204,'',0,'','Ladislao Cabrera',1),(1977,'051',5204,'',0,'','Litoral de Atacama',1),(1978,'052',5204,'',0,'','Mejillones',1),(1979,'053',5204,'',0,'','Nor Carangas',1),(1980,'054',5204,'',0,'','Pantaleón Dalence',1),(1981,'055',5204,'',0,'','Poopó',1),(1982,'056',5204,'',0,'','Sabaya',1),(1983,'057',5204,'',0,'','Sajama',1),(1984,'058',5204,'',0,'','San Pedro de Totora',1),(1985,'059',5204,'',0,'','Saucarí',1),(1986,'060',5204,'',0,'','Sebastián Pagador',1),(1987,'061',5204,'',0,'','Sud Carangas',1),(1988,'062',5204,'',0,'','Tomás Barrón',1),(1989,'063',5205,'',0,'','Alonso de Ibáñez',1),(1990,'064',5205,'',0,'','Antonio Quijarro',1),(1991,'065',5205,'',0,'','Bernardino Bilbao',1),(1992,'066',5205,'',0,'','Charcas (Potosí)',1),(1993,'067',5205,'',0,'','Chayanta',1),(1994,'068',5205,'',0,'','Cornelio Saavedra',1),(1995,'069',5205,'',0,'','Daniel Campos',1),(1996,'070',5205,'',0,'','Enrique Baldivieso',1),(1997,'071',5205,'',0,'','José María Linares',1),(1998,'072',5205,'',0,'','Modesto Omiste',1),(1999,'073',5205,'',0,'','Nor Chichas',1),(2000,'074',5205,'',0,'','Nor Lípez',1),(2001,'075',5205,'',0,'','Rafael Bustillo',1),(2002,'076',5205,'',0,'','Sud Chichas',1),(2003,'077',5205,'',0,'','Sud Lípez',1),(2004,'078',5205,'',0,'','Tomás Frías',1),(2005,'079',5206,'',0,'','Aniceto Arce',1),(2006,'080',5206,'',0,'','Burdet O\'Connor',1),(2007,'081',5206,'',0,'','Cercado (Tarija)',1),(2008,'082',5206,'',0,'','Eustaquio Méndez',1),(2009,'083',5206,'',0,'','José María Avilés',1),(2010,'084',5206,'',0,'','Gran Chaco',1),(2011,'085',5207,'',0,'','Andrés Ibáñez',1),(2012,'086',5207,'',0,'','Caballero',1),(2013,'087',5207,'',0,'','Chiquitos',1),(2014,'088',5207,'',0,'','Cordillera (Bolivia)',1),(2015,'089',5207,'',0,'','Florida',1),(2016,'090',5207,'',0,'','Germán Busch',1),(2017,'091',5207,'',0,'','Guarayos',1),(2018,'092',5207,'',0,'','Ichilo',1),(2019,'093',5207,'',0,'','Obispo Santistevan',1),(2020,'094',5207,'',0,'','Sara',1),(2021,'095',5207,'',0,'','Vallegrande',1),(2022,'096',5207,'',0,'','Velasco',1),(2023,'097',5207,'',0,'','Warnes',1),(2024,'098',5207,'',0,'','Ángel Sandóval',1),(2025,'099',5207,'',0,'','Ñuflo de Chaves',1),(2026,'100',5208,'',0,'','Cercado (Beni)',1),(2027,'101',5208,'',0,'','Iténez',1),(2028,'102',5208,'',0,'','Mamoré',1),(2029,'103',5208,'',0,'','Marbán',1),(2030,'104',5208,'',0,'','Moxos',1),(2031,'105',5208,'',0,'','Vaca Díez',1),(2032,'106',5208,'',0,'','Yacuma',1),(2033,'107',5208,'',0,'','General José Ballivián Segurola',1),(2034,'108',5209,'',0,'','Abuná',1),(2035,'109',5209,'',0,'','Madre de Dios',1),(2036,'110',5209,'',0,'','Manuripi',1),(2037,'111',5209,'',0,'','Nicolás Suárez',1),(2038,'112',5209,'',0,'','General Federico Román',1),(2039,'B',4101,NULL,NULL,'BURGENLAND','Burgenland',1),(2040,'K',4101,NULL,NULL,'KAERNTEN','Kärnten',1),(2041,'N',4101,NULL,NULL,'NIEDEROESTERREICH','Niederösterreich',1),(2042,'O',4101,NULL,NULL,'OBEROESTERREICH','Oberösterreich',1),(2043,'S',4101,NULL,NULL,'SALZBURG','Salzburg',1),(2044,'ST',4101,NULL,NULL,'STEIERMARK','Steiermark',1),(2045,'T',4101,NULL,NULL,'TIROL','Tirol',1),(2046,'V',4101,NULL,NULL,'VORARLBERG','Vorarlberg',1),(2047,'W',4101,NULL,NULL,'WIEN','Wien',1),(2048,'2326',2305,'',0,'MISIONES','Misiones',1),(2049,'PA-1',17801,'',0,'','Bocas del Toro',1),(2050,'PA-2',17801,'',0,'','Coclé',1),(2051,'PA-3',17801,'',0,'','Colón',1),(2052,'PA-4',17801,'',0,'','Chiriquí',1),(2053,'PA-5',17801,'',0,'','Darién',1),(2054,'PA-6',17801,'',0,'','Herrera',1),(2055,'PA-7',17801,'',0,'','Los Santos',1),(2056,'PA-8',17801,'',0,'','Panamá',1),(2057,'PA-9',17801,'',0,'','Veraguas',1),(2058,'PA-13',17801,'',0,'','Panamá Oeste',1),(2059,'AE-1',22701,'',0,'','Abu Dhabi',1),(2060,'AE-2',22701,'',0,'','Dubai',1),(2061,'AE-3',22701,'',0,'','Ajman',1),(2062,'AE-4',22701,'',0,'','Fujairah',1),(2063,'AE-5',22701,'',0,'','Ras al-Khaimah',1),(2064,'AE-6',22701,'',0,'','Sharjah',1),(2065,'AE-7',22701,'',0,'','Umm al-Quwain',1),(2066,'BA',11801,NULL,0,'BA','Bali',1),(2067,'BB',11801,NULL,0,'BB','Bangka Belitung',1),(2068,'BT',11801,NULL,0,'BT','Banten',1),(2069,'BE',11801,NULL,0,'BA','Bengkulu',1),(2070,'YO',11801,NULL,0,'YO','DI Yogyakarta',1),(2071,'JK',11801,NULL,0,'JK','DKI Jakarta',1),(2072,'GO',11801,NULL,0,'GO','Gorontalo',1),(2073,'JA',11801,NULL,0,'JA','Jambi',1),(2074,'JB',11801,NULL,0,'JB','Jawa Barat',1),(2075,'JT',11801,NULL,0,'JT','Jawa Tengah',1),(2076,'JI',11801,NULL,0,'JI','Jawa Timur',1),(2077,'KB',11801,NULL,0,'KB','Kalimantan Barat',1),(2078,'KS',11801,NULL,0,'KS','Kalimantan Selatan',1),(2079,'KT',11801,NULL,0,'KT','Kalimantan Tengah',1),(2080,'KI',11801,NULL,0,'KI','Kalimantan Timur',1),(2081,'KU',11801,NULL,0,'KU','Kalimantan Utara',1),(2082,'KR',11801,NULL,0,'KR','Kepulauan Riau',1),(2083,'LA',11801,NULL,0,'LA','Lampung',1),(2084,'MA',11801,NULL,0,'MA','Maluku',1),(2085,'MU',11801,NULL,0,'MU','Maluku Utara',1),(2086,'AC',11801,NULL,0,'AC','Nanggroe Aceh Darussalam',1),(2087,'NB',11801,NULL,0,'NB','Nusa Tenggara Barat',1),(2088,'NT',11801,NULL,0,'NT','Nusa Tenggara Timur',1),(2089,'PA',11801,NULL,0,'PA','Papua',1),(2090,'PB',11801,NULL,0,'PB','Papua Barat',1),(2091,'RI',11801,NULL,0,'RI','Riau',1),(2092,'SR',11801,NULL,0,'SR','Sulawesi Barat',1),(2093,'SN',11801,NULL,0,'SN','Sulawesi Selatan',1),(2094,'ST',11801,NULL,0,'ST','Sulawesi Tengah',1),(2095,'SG',11801,NULL,0,'SG','Sulawesi Tenggara',1),(2096,'SA',11801,NULL,0,'SA','Sulawesi Utara',1),(2097,'SB',11801,NULL,0,'SB','Sumatera Barat',1),(2098,'SS',11801,NULL,0,'SS','Sumatera Selatan',1),(2099,'SU',11801,NULL,0,'SU','Sumatera Utara ',1); +INSERT INTO `llx_c_departements` VALUES (1,'0',0,'0',0,'-','-',1),(2,'01',84,'01053',5,'AIN','Ain',1),(3,'02',32,'02408',5,'AISNE','Aisne',1),(4,'03',84,'03190',5,'ALLIER','Allier',1),(5,'04',93,'04070',4,'ALPES-DE-HAUTE-PROVENCE','Alpes-de-Haute-Provence',1),(6,'05',93,'05061',4,'HAUTES-ALPES','Hautes-Alpes',1),(7,'06',93,'06088',4,'ALPES-MARITIMES','Alpes-Maritimes',1),(8,'07',84,'07186',5,'ARDECHE','Ardèche',1),(9,'08',44,'08105',4,'ARDENNES','Ardennes',1),(10,'09',76,'09122',5,'ARIEGE','Ariège',1),(11,'10',44,'10387',5,'AUBE','Aube',1),(12,'11',76,'11069',5,'AUDE','Aude',1),(13,'12',76,'12202',5,'AVEYRON','Aveyron',1),(14,'13',93,'13055',4,'BOUCHES-DU-RHONE','Bouches-du-Rhône',1),(15,'14',28,'14118',2,'CALVADOS','Calvados',1),(16,'15',84,'15014',2,'CANTAL','Cantal',1),(17,'16',75,'16015',3,'CHARENTE','Charente',1),(18,'17',75,'17300',3,'CHARENTE-MARITIME','Charente-Maritime',1),(19,'18',24,'18033',2,'CHER','Cher',1),(20,'19',75,'19272',3,'CORREZE','Corrèze',1),(21,'2A',94,'2A004',3,'CORSE-DU-SUD','Corse-du-Sud',1),(22,'2B',94,'2B033',3,'HAUTE-CORSE','Haute-Corse',1),(23,'21',27,'21231',3,'COTE-D\'OR','Côte-d\'Or',1),(24,'22',53,'22278',4,'COTES-D\'ARMOR','Côtes-d\'Armor',1),(25,'23',75,'23096',3,'CREUSE','Creuse',1),(26,'24',75,'24322',3,'DORDOGNE','Dordogne',1),(27,'25',27,'25056',2,'DOUBS','Doubs',1),(28,'26',84,'26362',3,'DROME','Drôme',1),(29,'27',28,'27229',5,'EURE','Eure',1),(30,'28',24,'28085',1,'EURE-ET-LOIR','Eure-et-Loir',1),(31,'29',53,'29232',2,'FINISTERE','Finistère',1),(32,'30',76,'30189',2,'GARD','Gard',1),(33,'31',76,'31555',3,'HAUTE-GARONNE','Haute-Garonne',1),(34,'32',76,'32013',2,'GERS','Gers',1),(35,'33',75,'33063',3,'GIRONDE','Gironde',1),(36,'34',76,'34172',5,'HERAULT','Hérault',1),(37,'35',53,'35238',1,'ILLE-ET-VILAINE','Ille-et-Vilaine',1),(38,'36',24,'36044',5,'INDRE','Indre',1),(39,'37',24,'37261',1,'INDRE-ET-LOIRE','Indre-et-Loire',1),(40,'38',84,'38185',5,'ISERE','Isère',1),(41,'39',27,'39300',2,'JURA','Jura',1),(42,'40',75,'40192',4,'LANDES','Landes',1),(43,'41',24,'41018',0,'LOIR-ET-CHER','Loir-et-Cher',1),(44,'42',84,'42218',3,'LOIRE','Loire',1),(45,'43',84,'43157',3,'HAUTE-LOIRE','Haute-Loire',1),(46,'44',52,'44109',3,'LOIRE-ATLANTIQUE','Loire-Atlantique',1),(47,'45',24,'45234',2,'LOIRET','Loiret',1),(48,'46',76,'46042',2,'LOT','Lot',1),(49,'47',75,'47001',0,'LOT-ET-GARONNE','Lot-et-Garonne',1),(50,'48',76,'48095',3,'LOZERE','Lozère',1),(51,'49',52,'49007',0,'MAINE-ET-LOIRE','Maine-et-Loire',1),(52,'50',28,'50502',3,'MANCHE','Manche',1),(53,'51',44,'51108',3,'MARNE','Marne',1),(54,'52',44,'52121',3,'HAUTE-MARNE','Haute-Marne',1),(55,'53',52,'53130',3,'MAYENNE','Mayenne',1),(56,'54',44,'54395',0,'MEURTHE-ET-MOSELLE','Meurthe-et-Moselle',1),(57,'55',44,'55029',3,'MEUSE','Meuse',1),(58,'56',53,'56260',2,'MORBIHAN','Morbihan',1),(59,'57',44,'57463',3,'MOSELLE','Moselle',1),(60,'58',27,'58194',3,'NIEVRE','Nièvre',1),(61,'59',32,'59350',2,'NORD','Nord',1),(62,'60',32,'60057',5,'OISE','Oise',1),(63,'61',28,'61001',5,'ORNE','Orne',1),(64,'62',32,'62041',2,'PAS-DE-CALAIS','Pas-de-Calais',1),(65,'63',84,'63113',2,'PUY-DE-DOME','Puy-de-Dôme',1),(66,'64',75,'64445',4,'PYRENEES-ATLANTIQUES','Pyrénées-Atlantiques',1),(67,'65',76,'65440',4,'HAUTES-PYRENEES','Hautes-Pyrénées',1),(68,'66',76,'66136',4,'PYRENEES-ORIENTALES','Pyrénées-Orientales',1),(69,'67',44,'67482',2,'BAS-RHIN','Bas-Rhin',1),(70,'68',44,'68066',2,'HAUT-RHIN','Haut-Rhin',1),(71,'69',84,'69123',2,'RHONE','Rhône',1),(72,'70',27,'70550',3,'HAUTE-SAONE','Haute-Saône',1),(73,'71',27,'71270',0,'SAONE-ET-LOIRE','Saône-et-Loire',1),(74,'72',52,'72181',3,'SARTHE','Sarthe',1),(75,'73',84,'73065',3,'SAVOIE','Savoie',1),(76,'74',84,'74010',3,'HAUTE-SAVOIE','Haute-Savoie',1),(77,'75',11,'75056',0,'PARIS','Paris',1),(78,'76',28,'76540',3,'SEINE-MARITIME','Seine-Maritime',1),(79,'77',11,'77288',0,'SEINE-ET-MARNE','Seine-et-Marne',1),(80,'78',11,'78646',4,'YVELINES','Yvelines',1),(81,'79',75,'79191',4,'DEUX-SEVRES','Deux-Sèvres',1),(82,'80',32,'80021',3,'SOMME','Somme',1),(83,'81',76,'81004',2,'TARN','Tarn',1),(84,'82',76,'82121',0,'TARN-ET-GARONNE','Tarn-et-Garonne',1),(85,'83',93,'83137',2,'VAR','Var',1),(86,'84',93,'84007',0,'VAUCLUSE','Vaucluse',1),(87,'85',52,'85191',3,'VENDEE','Vendée',1),(88,'86',75,'86194',3,'VIENNE','Vienne',1),(89,'87',75,'87085',3,'HAUTE-VIENNE','Haute-Vienne',1),(90,'88',44,'88160',4,'VOSGES','Vosges',1),(91,'89',27,'89024',5,'YONNE','Yonne',1),(92,'90',27,'90010',0,'TERRITOIRE DE BELFORT','Territoire de Belfort',1),(93,'91',11,'91228',5,'ESSONNE','Essonne',1),(94,'92',11,'92050',4,'HAUTS-DE-SEINE','Hauts-de-Seine',1),(95,'93',11,'93008',3,'SEINE-SAINT-DENIS','Seine-Saint-Denis',1),(96,'94',11,'94028',2,'VAL-DE-MARNE','Val-de-Marne',1),(97,'95',11,'95500',2,'VAL-D\'OISE','Val-d\'Oise',1),(98,'971',1,'97105',3,'GUADELOUPE','Guadeloupe',1),(99,'972',2,'97209',3,'MARTINIQUE','Martinique',1),(100,'973',3,'97302',3,'GUYANE','Guyane',1),(101,'974',4,'97411',3,'REUNION','Réunion',1),(102,'01',201,'',1,'ANVERS','Anvers',1),(103,'02',203,'',3,'BRUXELLES-CAPITALE','Bruxelles-Capitale',1),(104,'03',202,'',2,'BRABANT-WALLON','Brabant-Wallon',1),(105,'04',201,'',1,'BRABANT-FLAMAND','Brabant-Flamand',1),(106,'05',201,'',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale',1),(107,'06',201,'',1,'FLANDRE-ORIENTALE','Flandre-Orientale',1),(108,'07',202,'',2,'HAINAUT','Hainaut',1),(109,'08',201,'',2,'LIEGE','Liège',1),(110,'09',202,'',1,'LIMBOURG','Limbourg',1),(111,'10',202,'',2,'LUXEMBOURG','Luxembourg',1),(112,'11',201,'',2,'NAMUR','Namur',1),(113,'NSW',2801,'',1,'','New South Wales',1),(114,'VIC',2801,'',1,'','Victoria',1),(115,'QLD',2801,'',1,'','Queensland',1),(116,'SA',2801,'',1,'','South Australia',1),(117,'ACT',2801,'',1,'','Australia Capital Territory',1),(118,'TAS',2801,'',1,'','Tasmania',1),(119,'WA',2801,'',1,'','Western Australia',1),(120,'NT',2801,'',1,'','Northern Territory',1),(121,'VI',419,'',19,'ALAVA','Álava',1),(122,'AB',404,'',4,'ALBACETE','Albacete',1),(123,'A',411,'',11,'ALICANTE','Alicante',1),(124,'AL',401,'',1,'ALMERIA','Almería',1),(125,'AV',403,'',3,'AVILA','Avila',1),(126,'BA',412,'',12,'BADAJOZ','Badajoz',1),(127,'PM',414,'',14,'ISLAS BALEARES','Islas Baleares',1),(128,'B',406,'',6,'BARCELONA','Barcelona',1),(129,'BU',403,'',8,'BURGOS','Burgos',1),(130,'CC',412,'',12,'CACERES','Cáceres',1),(131,'CA',401,'',1,'CADIz','Cádiz',1),(132,'CS',411,'',11,'CASTELLON','Castellón',1),(133,'CR',404,'',4,'CIUDAD REAL','Ciudad Real',1),(134,'CO',401,'',1,'CORDOBA','Córdoba',1),(135,'C',413,'',13,'LA CORUÑA','La Coruña',1),(136,'CU',404,'',4,'CUENCA','Cuenca',1),(137,'GI',406,'',6,'GERONA','Gerona',1),(138,'GR',401,'',1,'GRANADA','Granada',1),(139,'GU',404,'',4,'GUADALAJARA','Guadalajara',1),(140,'SS',419,'',19,'GUIPUZCOA','Guipúzcoa',1),(141,'H',401,'',1,'HUELVA','Huelva',1),(142,'HU',402,'',2,'HUESCA','Huesca',1),(143,'J',401,'',1,'JAEN','Jaén',1),(144,'LE',403,'',3,'LEON','León',1),(145,'L',406,'',6,'LERIDA','Lérida',1),(146,'LO',415,'',15,'LA RIOJA','La Rioja',1),(147,'LU',413,'',13,'LUGO','Lugo',1),(148,'M',416,'',16,'MADRID','Madrid',1),(149,'MA',401,'',1,'MALAGA','Málaga',1),(150,'MU',417,'',17,'MURCIA','Murcia',1),(151,'NA',408,'',8,'NAVARRA','Navarra',1),(152,'OR',413,'',13,'ORENSE','Orense',1),(153,'O',418,'',18,'ASTURIAS','Asturias',1),(154,'P',403,'',3,'PALENCIA','Palencia',1),(155,'GC',405,'',5,'LAS PALMAS','Las Palmas',1),(156,'PO',413,'',13,'PONTEVEDRA','Pontevedra',1),(157,'SA',403,'',3,'SALAMANCA','Salamanca',1),(158,'TF',405,'',5,'STA. CRUZ DE TENERIFE','Sta. Cruz de Tenerife',1),(159,'S',410,'',10,'CANTABRIA','Cantabria',1),(160,'SG',403,'',3,'SEGOVIA','Segovia',1),(161,'SE',401,'',1,'SEVILLA','Sevilla',1),(162,'SO',403,'',3,'SORIA','Soria',1),(163,'T',406,'',6,'TARRAGONA','Tarragona',1),(164,'TE',402,'',2,'TERUEL','Teruel',1),(165,'TO',404,'',5,'TOLEDO','Toledo',1),(166,'V',411,'',11,'VALENCIA','Valencia',1),(167,'VA',403,'',3,'VALLADOLID','Valladolid',1),(168,'BI',419,'',19,'VIZCAYA','Vizcaya',1),(169,'ZA',403,'',3,'ZAMORA','Zamora',1),(170,'Z',402,'',1,'ZARAGOZA','Zaragoza',1),(171,'CE',407,'',7,'CEUTA','Ceuta',1),(172,'ML',409,'',9,'MELILLA','Melilla',1),(174,'AG',601,NULL,NULL,'ARGOVIE','Argovie',1),(175,'AI',601,NULL,NULL,'APPENZELL RHODES INTERIEURES','Appenzell Rhodes intérieures',1),(176,'AR',601,NULL,NULL,'APPENZELL RHODES EXTERIEURES','Appenzell Rhodes extérieures',1),(177,'BE',601,NULL,NULL,'BERNE','Berne',1),(178,'BL',601,NULL,NULL,'BALE CAMPAGNE','Bâle Campagne',1),(179,'BS',601,NULL,NULL,'BALE VILLE','Bâle Ville',1),(180,'FR',601,NULL,NULL,'FRIBOURG','Fribourg',1),(181,'GE',601,NULL,NULL,'GENEVE','Genève',1),(182,'GL',601,NULL,NULL,'GLARIS','Glaris',1),(183,'GR',601,NULL,NULL,'GRISONS','Grisons',1),(184,'JU',601,NULL,NULL,'JURA','Jura',1),(185,'LU',601,NULL,NULL,'LUCERNE','Lucerne',1),(186,'NE',601,NULL,NULL,'NEUCHATEL','Neuchâtel',1),(187,'NW',601,NULL,NULL,'NIDWALD','Nidwald',1),(188,'OW',601,NULL,NULL,'OBWALD','Obwald',1),(189,'SG',601,NULL,NULL,'SAINT-GALL','Saint-Gall',1),(190,'SH',601,NULL,NULL,'SCHAFFHOUSE','Schaffhouse',1),(191,'SO',601,NULL,NULL,'SOLEURE','Soleure',1),(192,'SZ',601,NULL,NULL,'SCHWYZ','Schwyz',1),(193,'TG',601,NULL,NULL,'THURGOVIE','Thurgovie',1),(194,'TI',601,NULL,NULL,'TESSIN','Tessin',1),(195,'UR',601,NULL,NULL,'URI','Uri',1),(196,'VD',601,NULL,NULL,'VAUD','Vaud',1),(197,'VS',601,NULL,NULL,'VALAIS','Valais',1),(198,'ZG',601,NULL,NULL,'ZUG','Zug',1),(199,'ZH',601,NULL,NULL,'ZURICH','Zürich',1),(200,'AL',1101,'',0,'ALABAMA','Alabama',1),(201,'AK',1101,'',0,'ALASKA','Alaska',1),(202,'AZ',1101,'',0,'ARIZONA','Arizona',1),(203,'AR',1101,'',0,'ARKANSAS','Arkansas',1),(204,'CA',1101,'',0,'CALIFORNIA','California',1),(205,'CO',1101,'',0,'COLORADO','Colorado',1),(206,'CT',1101,'',0,'CONNECTICUT','Connecticut',1),(207,'DE',1101,'',0,'DELAWARE','Delaware',1),(208,'FL',1101,'',0,'FLORIDA','Florida',1),(209,'GA',1101,'',0,'GEORGIA','Georgia',1),(210,'HI',1101,'',0,'HAWAII','Hawaii',1),(211,'ID',1101,'',0,'IDAHO','Idaho',1),(212,'IL',1101,'',0,'ILLINOIS','Illinois',1),(213,'IN',1101,'',0,'INDIANA','Indiana',1),(214,'IA',1101,'',0,'IOWA','Iowa',1),(215,'KS',1101,'',0,'KANSAS','Kansas',1),(216,'KY',1101,'',0,'KENTUCKY','Kentucky',1),(217,'LA',1101,'',0,'LOUISIANA','Louisiana',1),(218,'ME',1101,'',0,'MAINE','Maine',1),(219,'MD',1101,'',0,'MARYLAND','Maryland',1),(220,'MA',1101,'',0,'MASSACHUSSETTS','Massachusetts',1),(221,'MI',1101,'',0,'MICHIGAN','Michigan',1),(222,'MN',1101,'',0,'MINNESOTA','Minnesota',1),(223,'MS',1101,'',0,'MISSISSIPPI','Mississippi',1),(224,'MO',1101,'',0,'MISSOURI','Missouri',1),(225,'MT',1101,'',0,'MONTANA','Montana',1),(226,'NE',1101,'',0,'NEBRASKA','Nebraska',1),(227,'NV',1101,'',0,'NEVADA','Nevada',1),(228,'NH',1101,'',0,'NEW HAMPSHIRE','New Hampshire',1),(229,'NJ',1101,'',0,'NEW JERSEY','New Jersey',1),(230,'NM',1101,'',0,'NEW MEXICO','New Mexico',1),(231,'NY',1101,'',0,'NEW YORK','New York',1),(232,'NC',1101,'',0,'NORTH CAROLINA','North Carolina',1),(233,'ND',1101,'',0,'NORTH DAKOTA','North Dakota',1),(234,'OH',1101,'',0,'OHIO','Ohio',1),(235,'OK',1101,'',0,'OKLAHOMA','Oklahoma',1),(236,'OR',1101,'',0,'OREGON','Oregon',1),(237,'PA',1101,'',0,'PENNSYLVANIA','Pennsylvania',1),(238,'RI',1101,'',0,'RHODE ISLAND','Rhode Island',1),(239,'SC',1101,'',0,'SOUTH CAROLINA','South Carolina',1),(240,'SD',1101,'',0,'SOUTH DAKOTA','South Dakota',1),(241,'TN',1101,'',0,'TENNESSEE','Tennessee',1),(242,'TX',1101,'',0,'TEXAS','Texas',1),(243,'UT',1101,'',0,'UTAH','Utah',1),(244,'VT',1101,'',0,'VERMONT','Vermont',1),(245,'VA',1101,'',0,'VIRGINIA','Virginia',1),(246,'WA',1101,'',0,'WASHINGTON','Washington',1),(247,'WV',1101,'',0,'WEST VIRGINIA','West Virginia',1),(248,'WI',1101,'',0,'WISCONSIN','Wisconsin',1),(249,'WY',1101,'',0,'WYOMING','Wyoming',1),(250,'SS',8601,NULL,NULL,NULL,'San Salvador',1),(251,'SA',8603,NULL,NULL,NULL,'Santa Ana',1),(252,'AH',8603,NULL,NULL,NULL,'Ahuachapan',1),(253,'SO',8603,NULL,NULL,NULL,'Sonsonate',1),(254,'US',8602,NULL,NULL,NULL,'Usulutan',1),(255,'SM',8602,NULL,NULL,NULL,'San Miguel',1),(256,'MO',8602,NULL,NULL,NULL,'Morazan',1),(257,'LU',8602,NULL,NULL,NULL,'La Union',1),(258,'LL',8601,NULL,NULL,NULL,'La Libertad',1),(259,'CH',8601,NULL,NULL,NULL,'Chalatenango',1),(260,'CA',8601,NULL,NULL,NULL,'Cabañas',1),(261,'LP',8601,NULL,NULL,NULL,'La Paz',1),(262,'SV',8601,NULL,NULL,NULL,'San Vicente',1),(263,'CU',8601,NULL,NULL,NULL,'Cuscatlan',1),(264,'2301',2301,'',0,'CATAMARCA','Catamarca',1),(265,'2302',2301,'',0,'JUJUY','Jujuy',1),(266,'2303',2301,'',0,'TUCAMAN','Tucamán',1),(267,'2304',2301,'',0,'SANTIAGO DEL ESTERO','Santiago del Estero',1),(268,'2305',2301,'',0,'SALTA','Salta',1),(269,'2306',2302,'',0,'CHACO','Chaco',1),(270,'2307',2302,'',0,'CORRIENTES','Corrientes',1),(271,'2308',2302,'',0,'ENTRE RIOS','Entre Ríos',1),(272,'2309',2302,'',0,'FORMOSA','Formosa',1),(273,'2310',2302,'',0,'SANTA FE','Santa Fe',1),(274,'2311',2303,'',0,'LA RIOJA','La Rioja',1),(275,'2312',2303,'',0,'MENDOZA','Mendoza',1),(276,'2313',2303,'',0,'SAN JUAN','San Juan',1),(277,'2314',2303,'',0,'SAN LUIS','San Luis',1),(278,'2315',2304,'',0,'CORDOBA','Córdoba',1),(279,'2316',2304,'',0,'BUENOS AIRES','Buenos Aires',1),(280,'2317',2304,'',0,'CABA','Caba',1),(281,'2318',2305,'',0,'LA PAMPA','La Pampa',1),(282,'2319',2305,'',0,'NEUQUEN','Neuquén',1),(283,'2320',2305,'',0,'RIO NEGRO','Río Negro',1),(284,'2321',2305,'',0,'CHUBUT','Chubut',1),(285,'2322',2305,'',0,'SANTA CRUZ','Santa Cruz',1),(286,'2323',2305,'',0,'TIERRA DEL FUEGO','Tierra del Fuego',1),(287,'2324',2305,'',0,'ISLAS MALVINAS','Islas Malvinas',1),(288,'2325',2305,'',0,'ANTARTIDA','Antártida',1),(289,'AN',11701,NULL,0,'AN','Andaman & Nicobar',1),(290,'AP',11701,NULL,0,'AP','Andhra Pradesh',1),(291,'AR',11701,NULL,0,'AR','Arunachal Pradesh',1),(292,'AS',11701,NULL,0,'AS','Assam',1),(293,'BR',11701,NULL,0,'BR','Bihar',1),(294,'CG',11701,NULL,0,'CG','Chattisgarh',1),(295,'CH',11701,NULL,0,'CH','Chandigarh',1),(296,'DD',11701,NULL,0,'DD','Daman & Diu',1),(297,'DL',11701,NULL,0,'DL','Delhi',1),(298,'DN',11701,NULL,0,'DN','Dadra and Nagar Haveli',1),(299,'GA',11701,NULL,0,'GA','Goa',1),(300,'GJ',11701,NULL,0,'GJ','Gujarat',1),(301,'HP',11701,NULL,0,'HP','Himachal Pradesh',1),(302,'HR',11701,NULL,0,'HR','Haryana',1),(303,'JH',11701,NULL,0,'JH','Jharkhand',1),(304,'JK',11701,NULL,0,'JK','Jammu & Kashmir',1),(305,'KA',11701,NULL,0,'KA','Karnataka',1),(306,'KL',11701,NULL,0,'KL','Kerala',1),(307,'LD',11701,NULL,0,'LD','Lakshadweep',1),(308,'MH',11701,NULL,0,'MH','Maharashtra',1),(309,'ML',11701,NULL,0,'ML','Meghalaya',1),(310,'MN',11701,NULL,0,'MN','Manipur',1),(311,'MP',11701,NULL,0,'MP','Madhya Pradesh',1),(312,'MZ',11701,NULL,0,'MZ','Mizoram',1),(313,'NL',11701,NULL,0,'NL','Nagaland',1),(314,'OR',11701,NULL,0,'OR','Orissa',1),(315,'PB',11701,NULL,0,'PB','Punjab',1),(316,'PY',11701,NULL,0,'PY','Puducherry',1),(317,'RJ',11701,NULL,0,'RJ','Rajasthan',1),(318,'SK',11701,NULL,0,'SK','Sikkim',1),(319,'TN',11701,NULL,0,'TN','Tamil Nadu',1),(320,'TR',11701,NULL,0,'TR','Tripura',1),(321,'UL',11701,NULL,0,'UL','Uttarakhand',1),(322,'UP',11701,NULL,0,'UP','Uttar Pradesh',1),(323,'WB',11701,NULL,0,'WB','West Bengal',1),(374,'151',6715,'',0,'151','Arica',1),(375,'152',6715,'',0,'152','Parinacota',1),(376,'011',6701,'',0,'011','Iquique',1),(377,'014',6701,'',0,'014','Tamarugal',1),(378,'021',6702,'',0,'021','Antofagasa',1),(379,'022',6702,'',0,'022','El Loa',1),(380,'023',6702,'',0,'023','Tocopilla',1),(381,'031',6703,'',0,'031','Copiapó',1),(382,'032',6703,'',0,'032','Chañaral',1),(383,'033',6703,'',0,'033','Huasco',1),(384,'041',6704,'',0,'041','Elqui',1),(385,'042',6704,'',0,'042','Choapa',1),(386,'043',6704,'',0,'043','Limarí',1),(387,'051',6705,'',0,'051','Valparaíso',1),(388,'052',6705,'',0,'052','Isla de Pascua',1),(389,'053',6705,'',0,'053','Los Andes',1),(390,'054',6705,'',0,'054','Petorca',1),(391,'055',6705,'',0,'055','Quillota',1),(392,'056',6705,'',0,'056','San Antonio',1),(393,'057',6705,'',0,'057','San Felipe de Aconcagua',1),(394,'058',6705,'',0,'058','Marga Marga',1),(395,'061',6706,'',0,'061','Cachapoal',1),(396,'062',6706,'',0,'062','Cardenal Caro',1),(397,'063',6706,'',0,'063','Colchagua',1),(398,'071',6707,'',0,'071','Talca',1),(399,'072',6707,'',0,'072','Cauquenes',1),(400,'073',6707,'',0,'073','Curicó',1),(401,'074',6707,'',0,'074','Linares',1),(402,'081',6708,'',0,'081','Concepción',1),(403,'082',6708,'',0,'082','Arauco',1),(404,'083',6708,'',0,'083','Biobío',1),(405,'084',6708,'',0,'084','Ñuble',1),(406,'091',6709,'',0,'091','Cautín',1),(407,'092',6709,'',0,'092','Malleco',1),(408,'141',6714,'',0,'141','Valdivia',1),(409,'142',6714,'',0,'142','Ranco',1),(410,'101',6710,'',0,'101','Llanquihue',1),(411,'102',6710,'',0,'102','Chiloé',1),(412,'103',6710,'',0,'103','Osorno',1),(413,'104',6710,'',0,'104','Palena',1),(414,'111',6711,'',0,'111','Coihaique',1),(415,'112',6711,'',0,'112','Aisén',1),(416,'113',6711,'',0,'113','Capitán Prat',1),(417,'114',6711,'',0,'114','General Carrera',1),(418,'121',6712,'',0,'121','Magallanes',1),(419,'122',6712,'',0,'122','Antártica Chilena',1),(420,'123',6712,'',0,'123','Tierra del Fuego',1),(421,'124',6712,'',0,'124','Última Esperanza',1),(422,'131',6713,'',0,'131','Santiago',1),(423,'132',6713,'',0,'132','Cordillera',1),(424,'133',6713,'',0,'133','Chacabuco',1),(425,'134',6713,'',0,'134','Maipo',1),(426,'135',6713,'',0,'135','Melipilla',1),(427,'136',6713,'',0,'136','Talagante',1),(428,'DIF',15401,'',0,'DIF','Distrito Federal',1),(429,'AGS',15401,'',0,'AGS','Aguascalientes',1),(430,'BCN',15401,'',0,'BCN','Baja California Norte',1),(431,'BCS',15401,'',0,'BCS','Baja California Sur',1),(432,'CAM',15401,'',0,'CAM','Campeche',1),(433,'CHP',15401,'',0,'CHP','Chiapas',1),(434,'CHI',15401,'',0,'CHI','Chihuahua',1),(435,'COA',15401,'',0,'COA','Coahuila',1),(436,'COL',15401,'',0,'COL','Colima',1),(437,'DUR',15401,'',0,'DUR','Durango',1),(438,'GTO',15401,'',0,'GTO','Guanajuato',1),(439,'GRO',15401,'',0,'GRO','Guerrero',1),(440,'HGO',15401,'',0,'HGO','Hidalgo',1),(441,'JAL',15401,'',0,'JAL','Jalisco',1),(442,'MEX',15401,'',0,'MEX','México',1),(443,'MIC',15401,'',0,'MIC','Michoacán de Ocampo',1),(444,'MOR',15401,'',0,'MOR','Morelos',1),(445,'NAY',15401,'',0,'NAY','Nayarit',1),(446,'NLE',15401,'',0,'NLE','Nuevo León',1),(447,'OAX',15401,'',0,'OAX','Oaxaca',1),(448,'PUE',15401,'',0,'PUE','Puebla',1),(449,'QRO',15401,'',0,'QRO','Querétaro',1),(451,'ROO',15401,'',0,'ROO','Quintana Roo',1),(452,'SLP',15401,'',0,'SLP','San Luis Potosí',1),(453,'SIN',15401,'',0,'SIN','Sinaloa',1),(454,'SON',15401,'',0,'SON','Sonora',1),(455,'TAB',15401,'',0,'TAB','Tabasco',1),(456,'TAM',15401,'',0,'TAM','Tamaulipas',1),(457,'TLX',15401,'',0,'TLX','Tlaxcala',1),(458,'VER',15401,'',0,'VER','Veracruz',1),(459,'YUC',15401,'',0,'YUC','Yucatán',1),(460,'ZAC',15401,'',0,'ZAC','Zacatecas',1),(461,'ANT',7001,'',0,'ANT','Antioquia',1),(462,'BOL',7001,'',0,'BOL','Bolívar',1),(463,'BOY',7001,'',0,'BOY','Boyacá',1),(464,'CAL',7001,'',0,'CAL','Caldas',1),(465,'CAU',7001,'',0,'CAU','Cauca',1),(466,'CUN',7001,'',0,'CUN','Cundinamarca',1),(467,'HUI',7001,'',0,'HUI','Huila',1),(468,'LAG',7001,'',0,'LAG','La Guajira',1),(469,'MET',7001,'',0,'MET','Meta',1),(470,'NAR',7001,'',0,'NAR','Nariño',1),(471,'NDS',7001,'',0,'NDS','Norte de Santander',1),(472,'SAN',7001,'',0,'SAN','Santander',1),(473,'SUC',7001,'',0,'SUC','Sucre',1),(474,'TOL',7001,'',0,'TOL','Tolima',1),(475,'VAC',7001,'',0,'VAC','Valle del Cauca',1),(476,'RIS',7001,'',0,'RIS','Risalda',1),(477,'ATL',7001,'',0,'ATL','Atlántico',1),(478,'COR',7001,'',0,'COR','Córdoba',1),(479,'SAP',7001,'',0,'SAP','San Andrés, Providencia y Santa Catalina',1),(480,'ARA',7001,'',0,'ARA','Arauca',1),(481,'CAS',7001,'',0,'CAS','Casanare',1),(482,'AMA',7001,'',0,'AMA','Amazonas',1),(483,'CAQ',7001,'',0,'CAQ','Caquetá',1),(484,'CHO',7001,'',0,'CHO','Chocó',1),(485,'GUA',7001,'',0,'GUA','Guainía',1),(486,'GUV',7001,'',0,'GUV','Guaviare',1),(487,'PUT',7001,'',0,'PUT','Putumayo',1),(488,'QUI',7001,'',0,'QUI','Quindío',1),(489,'VAU',7001,'',0,'VAU','Vaupés',1),(490,'BOG',7001,'',0,'BOG','Bogotá',1),(491,'VID',7001,'',0,'VID','Vichada',1),(492,'CES',7001,'',0,'CES','Cesar',1),(493,'MAG',7001,'',0,'MAG','Magdalena',1),(494,'AT',11401,'',0,'AT','Atlántida',1),(495,'CH',11401,'',0,'CH','Choluteca',1),(496,'CL',11401,'',0,'CL','Colón',1),(497,'CM',11401,'',0,'CM','Comayagua',1),(498,'CO',11401,'',0,'CO','Copán',1),(499,'CR',11401,'',0,'CR','Cortés',1),(500,'EP',11401,'',0,'EP','El Paraíso',1),(501,'FM',11401,'',0,'FM','Francisco Morazán',1),(502,'GD',11401,'',0,'GD','Gracias a Dios',1),(503,'IN',11401,'',0,'IN','Intibucá',1),(504,'IB',11401,'',0,'IB','Islas de la Bahía',1),(505,'LP',11401,'',0,'LP','La Paz',1),(506,'LM',11401,'',0,'LM','Lempira',1),(507,'OC',11401,'',0,'OC','Ocotepeque',1),(508,'OL',11401,'',0,'OL','Olancho',1),(509,'SB',11401,'',0,'SB','Santa Bárbara',1),(510,'VL',11401,'',0,'VL','Valle',1),(511,'YO',11401,'',0,'YO','Yoro',1),(512,'DC',11401,'',0,'DC','Distrito Central',1),(652,'CC',4601,'Oistins',0,'CC','Christ Church',1),(655,'SA',4601,'Greenland',0,'SA','Saint Andrew',1),(656,'SG',4601,'Bulkeley',0,'SG','Saint George',1),(657,'JA',4601,'Holetown',0,'JA','Saint James',1),(658,'SJ',4601,'Four Roads',0,'SJ','Saint John',1),(659,'SB',4601,'Bathsheba',0,'SB','Saint Joseph',1),(660,'SL',4601,'Crab Hill',0,'SL','Saint Lucy',1),(661,'SM',4601,'Bridgetown',0,'SM','Saint Michael',1),(662,'SP',4601,'Speightstown',0,'SP','Saint Peter',1),(663,'SC',4601,'Crane',0,'SC','Saint Philip',1),(664,'ST',4601,'Hillaby',0,'ST','Saint Thomas',1),(777,'AG',315,NULL,NULL,NULL,'AGRIGENTO',1),(778,'AL',312,NULL,NULL,NULL,'ALESSANDRIA',1),(779,'AN',310,NULL,NULL,NULL,'ANCONA',1),(780,'AO',319,NULL,NULL,NULL,'AOSTA',1),(781,'AR',316,NULL,NULL,NULL,'AREZZO',1),(782,'AP',310,NULL,NULL,NULL,'ASCOLI PICENO',1),(783,'AT',312,NULL,NULL,NULL,'ASTI',1),(784,'AV',304,NULL,NULL,NULL,'AVELLINO',1),(785,'BA',313,NULL,NULL,NULL,'BARI',1),(786,'BT',313,NULL,NULL,NULL,'BARLETTA-ANDRIA-TRANI',1),(787,'BL',320,NULL,NULL,NULL,'BELLUNO',1),(788,'BN',304,NULL,NULL,NULL,'BENEVENTO',1),(789,'BG',309,NULL,NULL,NULL,'BERGAMO',1),(790,'BI',312,NULL,NULL,NULL,'BIELLA',1),(791,'BO',305,NULL,NULL,NULL,'BOLOGNA',1),(792,'BZ',317,NULL,NULL,NULL,'BOLZANO',1),(793,'BS',309,NULL,NULL,NULL,'BRESCIA',1),(794,'BR',313,NULL,NULL,NULL,'BRINDISI',1),(795,'CA',314,NULL,NULL,NULL,'CAGLIARI',1),(796,'CL',315,NULL,NULL,NULL,'CALTANISSETTA',1),(797,'CB',311,NULL,NULL,NULL,'CAMPOBASSO',1),(798,'CI',314,NULL,NULL,NULL,'CARBONIA-IGLESIAS',1),(799,'CE',304,NULL,NULL,NULL,'CASERTA',1),(800,'CT',315,NULL,NULL,NULL,'CATANIA',1),(801,'CZ',303,NULL,NULL,NULL,'CATANZARO',1),(802,'CH',301,NULL,NULL,NULL,'CHIETI',1),(803,'CO',309,NULL,NULL,NULL,'COMO',1),(804,'CS',303,NULL,NULL,NULL,'COSENZA',1),(805,'CR',309,NULL,NULL,NULL,'CREMONA',1),(806,'KR',303,NULL,NULL,NULL,'CROTONE',1),(807,'CN',312,NULL,NULL,NULL,'CUNEO',1),(808,'EN',315,NULL,NULL,NULL,'ENNA',1),(809,'FM',310,NULL,NULL,NULL,'FERMO',1),(810,'FE',305,NULL,NULL,NULL,'FERRARA',1),(811,'FI',316,NULL,NULL,NULL,'FIRENZE',1),(812,'FG',313,NULL,NULL,NULL,'FOGGIA',1),(813,'FC',305,NULL,NULL,NULL,'FORLI-CESENA',1),(814,'FR',307,NULL,NULL,NULL,'FROSINONE',1),(815,'GE',308,NULL,NULL,NULL,'GENOVA',1),(816,'GO',306,NULL,NULL,NULL,'GORIZIA',1),(817,'GR',316,NULL,NULL,NULL,'GROSSETO',1),(818,'IM',308,NULL,NULL,NULL,'IMPERIA',1),(819,'IS',311,NULL,NULL,NULL,'ISERNIA',1),(820,'SP',308,NULL,NULL,NULL,'LA SPEZIA',1),(821,'AQ',301,NULL,NULL,NULL,'L AQUILA',1),(822,'LT',307,NULL,NULL,NULL,'LATINA',1),(823,'LE',313,NULL,NULL,NULL,'LECCE',1),(824,'LC',309,NULL,NULL,NULL,'LECCO',1),(825,'LI',314,NULL,NULL,NULL,'LIVORNO',1),(826,'LO',309,NULL,NULL,NULL,'LODI',1),(827,'LU',316,NULL,NULL,NULL,'LUCCA',1),(828,'MC',310,NULL,NULL,NULL,'MACERATA',1),(829,'MN',309,NULL,NULL,NULL,'MANTOVA',1),(830,'MS',316,NULL,NULL,NULL,'MASSA-CARRARA',1),(831,'MT',302,NULL,NULL,NULL,'MATERA',1),(832,'VS',314,NULL,NULL,NULL,'MEDIO CAMPIDANO',1),(833,'ME',315,NULL,NULL,NULL,'MESSINA',1),(834,'MI',309,NULL,NULL,NULL,'MILANO',1),(835,'MB',309,NULL,NULL,NULL,'MONZA e BRIANZA',1),(836,'MO',305,NULL,NULL,NULL,'MODENA',1),(837,'NA',304,NULL,NULL,NULL,'NAPOLI',1),(838,'NO',312,NULL,NULL,NULL,'NOVARA',1),(839,'NU',314,NULL,NULL,NULL,'NUORO',1),(840,'OG',314,NULL,NULL,NULL,'OGLIASTRA',1),(841,'OT',314,NULL,NULL,NULL,'OLBIA-TEMPIO',1),(842,'OR',314,NULL,NULL,NULL,'ORISTANO',1),(843,'PD',320,NULL,NULL,NULL,'PADOVA',1),(844,'PA',315,NULL,NULL,NULL,'PALERMO',1),(845,'PR',305,NULL,NULL,NULL,'PARMA',1),(846,'PV',309,NULL,NULL,NULL,'PAVIA',1),(847,'PG',318,NULL,NULL,NULL,'PERUGIA',1),(848,'PU',310,NULL,NULL,NULL,'PESARO e URBINO',1),(849,'PE',301,NULL,NULL,NULL,'PESCARA',1),(850,'PC',305,NULL,NULL,NULL,'PIACENZA',1),(851,'PI',316,NULL,NULL,NULL,'PISA',1),(852,'PT',316,NULL,NULL,NULL,'PISTOIA',1),(853,'PN',306,NULL,NULL,NULL,'PORDENONE',1),(854,'PZ',302,NULL,NULL,NULL,'POTENZA',1),(855,'PO',316,NULL,NULL,NULL,'PRATO',1),(856,'RG',315,NULL,NULL,NULL,'RAGUSA',1),(857,'RA',305,NULL,NULL,NULL,'RAVENNA',1),(858,'RC',303,NULL,NULL,NULL,'REGGIO CALABRIA',1),(859,'RE',305,NULL,NULL,NULL,'REGGIO NELL EMILIA',1),(860,'RI',307,NULL,NULL,NULL,'RIETI',1),(861,'RN',305,NULL,NULL,NULL,'RIMINI',1),(862,'RM',307,NULL,NULL,NULL,'ROMA',1),(863,'RO',320,NULL,NULL,NULL,'ROVIGO',1),(864,'SA',304,NULL,NULL,NULL,'SALERNO',1),(865,'SS',314,NULL,NULL,NULL,'SASSARI',1),(866,'SV',308,NULL,NULL,NULL,'SAVONA',1),(867,'SI',316,NULL,NULL,NULL,'SIENA',1),(868,'SR',315,NULL,NULL,NULL,'SIRACUSA',1),(869,'SO',309,NULL,NULL,NULL,'SONDRIO',1),(870,'TA',313,NULL,NULL,NULL,'TARANTO',1),(871,'TE',301,NULL,NULL,NULL,'TERAMO',1),(872,'TR',318,NULL,NULL,NULL,'TERNI',1),(873,'TO',312,NULL,NULL,NULL,'TORINO',1),(874,'TP',315,NULL,NULL,NULL,'TRAPANI',1),(875,'TN',317,NULL,NULL,NULL,'TRENTO',1),(876,'TV',320,NULL,NULL,NULL,'TREVISO',1),(877,'TS',306,NULL,NULL,NULL,'TRIESTE',1),(878,'UD',306,NULL,NULL,NULL,'UDINE',1),(879,'VA',309,NULL,NULL,NULL,'VARESE',1),(880,'VE',320,NULL,NULL,NULL,'VENEZIA',1),(881,'VB',312,NULL,NULL,NULL,'VERBANO-CUSIO-OSSOLA',1),(882,'VC',312,NULL,NULL,NULL,'VERCELLI',1),(883,'VR',320,NULL,NULL,NULL,'VERONA',1),(884,'VV',303,NULL,NULL,NULL,'VIBO VALENTIA',1),(885,'VI',320,NULL,NULL,NULL,'VICENZA',1),(886,'VT',307,NULL,NULL,NULL,'VITERBO',1),(1036,'VE-L',23201,'',0,'VE-L','Mérida',1),(1037,'VE-T',23201,'',0,'VE-T','Trujillo',1),(1038,'VE-E',23201,'',0,'VE-E','Barinas',1),(1039,'VE-M',23202,'',0,'VE-M','Miranda',1),(1040,'VE-W',23202,'',0,'VE-W','Vargas',1),(1041,'VE-A',23202,'',0,'VE-A','Distrito Capital',1),(1042,'VE-D',23203,'',0,'VE-D','Aragua',1),(1043,'VE-G',23203,'',0,'VE-G','Carabobo',1),(1044,'VE-I',23204,'',0,'VE-I','Falcón',1),(1045,'VE-K',23204,'',0,'VE-K','Lara',1),(1046,'VE-U',23204,'',0,'VE-U','Yaracuy',1),(1047,'VE-F',23205,'',0,'VE-F','Bolívar',1),(1048,'VE-X',23205,'',0,'VE-X','Amazonas',1),(1049,'VE-Y',23205,'',0,'VE-Y','Delta Amacuro',1),(1050,'VE-O',23206,'',0,'VE-O','Nueva Esparta',1),(1051,'VE-Z',23206,'',0,'VE-Z','Dependencias Federales',1),(1052,'VE-C',23207,'',0,'VE-C','Apure',1),(1053,'VE-J',23207,'',0,'VE-J','Guárico',1),(1054,'VE-H',23207,'',0,'VE-H','Cojedes',1),(1055,'VE-P',23207,'',0,'VE-P','Portuguesa',1),(1056,'VE-B',23208,'',0,'VE-B','Anzoátegui',1),(1057,'VE-N',23208,'',0,'VE-N','Monagas',1),(1058,'VE-R',23208,'',0,'VE-R','Sucre',1),(1059,'VE-V',23209,'',0,'VE-V','Zulia',1),(1060,'VE-S',23209,'',0,'VE-S','Táchira',1),(1061,'66',10201,NULL,NULL,NULL,'?????',1),(1062,'00',10205,NULL,NULL,NULL,'?????',1),(1063,'01',10205,NULL,NULL,NULL,'?????',1),(1064,'02',10205,NULL,NULL,NULL,'?????',1),(1065,'03',10205,NULL,NULL,NULL,'??????',1),(1066,'04',10205,NULL,NULL,NULL,'?????',1),(1067,'05',10205,NULL,NULL,NULL,'??????',1),(1068,'06',10203,NULL,NULL,NULL,'??????',1),(1069,'07',10203,NULL,NULL,NULL,'???????????',1),(1070,'08',10203,NULL,NULL,NULL,'??????',1),(1071,'09',10203,NULL,NULL,NULL,'?????',1),(1072,'10',10203,NULL,NULL,NULL,'??????',1),(1073,'11',10203,NULL,NULL,NULL,'??????',1),(1074,'12',10203,NULL,NULL,NULL,'?????????',1),(1075,'13',10206,NULL,NULL,NULL,'????',1),(1076,'14',10206,NULL,NULL,NULL,'?????????',1),(1077,'15',10206,NULL,NULL,NULL,'????????',1),(1078,'16',10206,NULL,NULL,NULL,'???????',1),(1079,'17',10213,NULL,NULL,NULL,'???????',1),(1080,'18',10213,NULL,NULL,NULL,'????????',1),(1081,'19',10213,NULL,NULL,NULL,'??????',1),(1082,'20',10213,NULL,NULL,NULL,'???????',1),(1083,'21',10212,NULL,NULL,NULL,'????????',1),(1084,'22',10212,NULL,NULL,NULL,'??????',1),(1085,'23',10212,NULL,NULL,NULL,'????????',1),(1086,'24',10212,NULL,NULL,NULL,'???????',1),(1087,'25',10212,NULL,NULL,NULL,'????????',1),(1088,'26',10212,NULL,NULL,NULL,'???????',1),(1089,'27',10202,NULL,NULL,NULL,'??????',1),(1090,'28',10202,NULL,NULL,NULL,'?????????',1),(1091,'29',10202,NULL,NULL,NULL,'????????',1),(1092,'30',10202,NULL,NULL,NULL,'??????',1),(1093,'31',10209,NULL,NULL,NULL,'????????',1),(1094,'32',10209,NULL,NULL,NULL,'???????',1),(1095,'33',10209,NULL,NULL,NULL,'????????',1),(1096,'34',10209,NULL,NULL,NULL,'???????',1),(1097,'35',10209,NULL,NULL,NULL,'????????',1),(1098,'36',10211,NULL,NULL,NULL,'???????????????',1),(1099,'37',10211,NULL,NULL,NULL,'?????',1),(1100,'38',10211,NULL,NULL,NULL,'?????',1),(1101,'39',10207,NULL,NULL,NULL,'????????',1),(1102,'40',10207,NULL,NULL,NULL,'???????',1),(1103,'41',10207,NULL,NULL,NULL,'??????????',1),(1104,'42',10207,NULL,NULL,NULL,'?????',1),(1105,'43',10207,NULL,NULL,NULL,'???????',1),(1106,'44',10208,NULL,NULL,NULL,'??????',1),(1107,'45',10208,NULL,NULL,NULL,'??????',1),(1108,'46',10208,NULL,NULL,NULL,'??????',1),(1109,'47',10208,NULL,NULL,NULL,'?????',1),(1110,'48',10208,NULL,NULL,NULL,'????',1),(1111,'49',10210,NULL,NULL,NULL,'??????',1),(1112,'50',10210,NULL,NULL,NULL,'????',1),(1113,'51',10210,NULL,NULL,NULL,'????????',1),(1114,'52',10210,NULL,NULL,NULL,'????????',1),(1115,'53',10210,NULL,NULL,NULL,'???-??????',1),(1116,'54',10210,NULL,NULL,NULL,'??',1),(1117,'55',10210,NULL,NULL,NULL,'?????',1),(1118,'56',10210,NULL,NULL,NULL,'???????',1),(1119,'57',10210,NULL,NULL,NULL,'?????',1),(1120,'58',10210,NULL,NULL,NULL,'?????',1),(1121,'59',10210,NULL,NULL,NULL,'?????',1),(1122,'60',10210,NULL,NULL,NULL,'?????',1),(1123,'61',10210,NULL,NULL,NULL,'?????',1),(1124,'62',10204,NULL,NULL,NULL,'????????',1),(1125,'63',10204,NULL,NULL,NULL,'??????',1),(1126,'64',10204,NULL,NULL,NULL,'???????',1),(1127,'65',10204,NULL,NULL,NULL,'?????',1),(1128,'AL01',1301,'',0,'','Wilaya d\'Adrar',1),(1129,'AL02',1301,'',0,'','Wilaya de Chlef',1),(1130,'AL03',1301,'',0,'','Wilaya de Laghouat',1),(1131,'AL04',1301,'',0,'','Wilaya d\'Oum El Bouaghi',1),(1132,'AL05',1301,'',0,'','Wilaya de Batna',1),(1133,'AL06',1301,'',0,'','Wilaya de Béjaïa',1),(1134,'AL07',1301,'',0,'','Wilaya de Biskra',1),(1135,'AL08',1301,'',0,'','Wilaya de Béchar',1),(1136,'AL09',1301,'',0,'','Wilaya de Blida',1),(1137,'AL11',1301,'',0,'','Wilaya de Bouira',1),(1138,'AL12',1301,'',0,'','Wilaya de Tamanrasset',1),(1139,'AL13',1301,'',0,'','Wilaya de Tébessa',1),(1140,'AL14',1301,'',0,'','Wilaya de Tlemcen',1),(1141,'AL15',1301,'',0,'','Wilaya de Tiaret',1),(1142,'AL16',1301,'',0,'','Wilaya de Tizi Ouzou',1),(1143,'AL17',1301,'',0,'','Wilaya d\'Alger',1),(1144,'AL18',1301,'',0,'','Wilaya de Djelfa',1),(1145,'AL19',1301,'',0,'','Wilaya de Jijel',1),(1146,'AL20',1301,'',0,'','Wilaya de Sétif ',1),(1147,'AL21',1301,'',0,'','Wilaya de Saïda',1),(1148,'AL22',1301,'',0,'','Wilaya de Skikda',1),(1149,'AL23',1301,'',0,'','Wilaya de Sidi Bel Abbès',1),(1150,'AL24',1301,'',0,'','Wilaya d\'Annaba',1),(1151,'AL25',1301,'',0,'','Wilaya de Guelma',1),(1152,'AL26',1301,'',0,'','Wilaya de Constantine',1),(1153,'AL27',1301,'',0,'','Wilaya de Médéa',1),(1154,'AL28',1301,'',0,'','Wilaya de Mostaganem',1),(1155,'AL29',1301,'',0,'','Wilaya de M\'Sila',1),(1156,'AL30',1301,'',0,'','Wilaya de Mascara',1),(1157,'AL31',1301,'',0,'','Wilaya d\'Ouargla',1),(1158,'AL32',1301,'',0,'','Wilaya d\'Oran',1),(1159,'AL33',1301,'',0,'','Wilaya d\'El Bayadh',1),(1160,'AL34',1301,'',0,'','Wilaya d\'Illizi',1),(1161,'AL35',1301,'',0,'','Wilaya de Bordj Bou Arreridj',1),(1162,'AL36',1301,'',0,'','Wilaya de Boumerdès',1),(1163,'AL37',1301,'',0,'','Wilaya d\'El Tarf',1),(1164,'AL38',1301,'',0,'','Wilaya de Tindouf',1),(1165,'AL39',1301,'',0,'','Wilaya de Tissemsilt',1),(1166,'AL40',1301,'',0,'','Wilaya d\'El Oued',1),(1167,'AL41',1301,'',0,'','Wilaya de Khenchela',1),(1168,'AL42',1301,'',0,'','Wilaya de Souk Ahras',1),(1169,'AL43',1301,'',0,'','Wilaya de Tipaza',1),(1170,'AL44',1301,'',0,'','Wilaya de Mila',1),(1171,'AL45',1301,'',0,'','Wilaya d\'Aïn Defla',1),(1172,'AL46',1301,'',0,'','Wilaya de Naâma',1),(1173,'AL47',1301,'',0,'','Wilaya d\'Aïn Témouchent',1),(1174,'AL48',1301,'',0,'','Wilaya de Ghardaia',1),(1175,'AL49',1301,'',0,'','Wilaya de Relizane',1),(1176,'MA',1209,'',0,'','Province de Benslimane',1),(1177,'MA1',1209,'',0,'','Province de Berrechid',1),(1178,'MA2',1209,'',0,'','Province de Khouribga',1),(1179,'MA3',1209,'',0,'','Province de Settat',1),(1180,'MA4',1210,'',0,'','Province d\'El Jadida',1),(1181,'MA5',1210,'',0,'','Province de Safi',1),(1182,'MA6',1210,'',0,'','Province de Sidi Bennour',1),(1183,'MA7',1210,'',0,'','Province de Youssoufia',1),(1184,'MA6B',1205,'',0,'','Préfecture de Fès',1),(1185,'MA7B',1205,'',0,'','Province de Boulemane',1),(1186,'MA8',1205,'',0,'','Province de Moulay Yacoub',1),(1187,'MA9',1205,'',0,'','Province de Sefrou',1),(1188,'MA8A',1202,'',0,'','Province de Kénitra',1),(1189,'MA9A',1202,'',0,'','Province de Sidi Kacem',1),(1190,'MA10',1202,'',0,'','Province de Sidi Slimane',1),(1191,'MA11',1208,'',0,'','Préfecture de Casablanca',1),(1192,'MA12',1208,'',0,'','Préfecture de Mohammédia',1),(1193,'MA13',1208,'',0,'','Province de Médiouna',1),(1194,'MA14',1208,'',0,'','Province de Nouaceur',1),(1195,'MA15',1214,'',0,'','Province d\'Assa-Zag',1),(1196,'MA16',1214,'',0,'','Province d\'Es-Semara',1),(1197,'MA17A',1214,'',0,'','Province de Guelmim',1),(1198,'MA18',1214,'',0,'','Province de Tata',1),(1199,'MA19',1214,'',0,'','Province de Tan-Tan',1),(1200,'MA15',1215,'',0,'','Province de Boujdour',1),(1201,'MA16',1215,'',0,'','Province de Lâayoune',1),(1202,'MA17',1215,'',0,'','Province de Tarfaya',1),(1203,'MA18',1211,'',0,'','Préfecture de Marrakech',1),(1204,'MA19',1211,'',0,'','Province d\'Al Haouz',1),(1205,'MA20',1211,'',0,'','Province de Chichaoua',1),(1206,'MA21',1211,'',0,'','Province d\'El Kelâa des Sraghna',1),(1207,'MA22',1211,'',0,'','Province d\'Essaouira',1),(1208,'MA23',1211,'',0,'','Province de Rehamna',1),(1209,'MA24',1206,'',0,'','Préfecture de Meknès',1),(1210,'MA25',1206,'',0,'','Province d’El Hajeb',1),(1211,'MA26',1206,'',0,'','Province d\'Errachidia',1),(1212,'MA27',1206,'',0,'','Province d’Ifrane',1),(1213,'MA28',1206,'',0,'','Province de Khénifra',1),(1214,'MA29',1206,'',0,'','Province de Midelt',1),(1215,'MA30',1204,'',0,'','Préfecture d\'Oujda-Angad',1),(1216,'MA31',1204,'',0,'','Province de Berkane',1),(1217,'MA32',1204,'',0,'','Province de Driouch',1),(1218,'MA33',1204,'',0,'','Province de Figuig',1),(1219,'MA34',1204,'',0,'','Province de Jerada',1),(1220,'MA35',1204,'',0,'','Province de Nadorgg',1),(1221,'MA36',1204,'',0,'','Province de Taourirt',1),(1222,'MA37',1216,'',0,'','Province d\'Aousserd',1),(1223,'MA38',1216,'',0,'','Province d\'Oued Ed-Dahab',1),(1224,'MA39',1207,'',0,'','Préfecture de Rabat',1),(1225,'MA40',1207,'',0,'','Préfecture de Skhirat-Témara',1),(1226,'MA41',1207,'',0,'','Préfecture de Salé',1),(1227,'MA42',1207,'',0,'','Province de Khémisset',1),(1228,'MA43',1213,'',0,'','Préfecture d\'Agadir Ida-Outanane',1),(1229,'MA44',1213,'',0,'','Préfecture d\'Inezgane-Aït Melloul',1),(1230,'MA45',1213,'',0,'','Province de Chtouka-Aït Baha',1),(1231,'MA46',1213,'',0,'','Province d\'Ouarzazate',1),(1232,'MA47',1213,'',0,'','Province de Sidi Ifni',1),(1233,'MA48',1213,'',0,'','Province de Taroudant',1),(1234,'MA49',1213,'',0,'','Province de Tinghir',1),(1235,'MA50',1213,'',0,'','Province de Tiznit',1),(1236,'MA51',1213,'',0,'','Province de Zagora',1),(1237,'MA52',1212,'',0,'','Province d\'Azilal',1),(1238,'MA53',1212,'',0,'','Province de Beni Mellal',1),(1239,'MA54',1212,'',0,'','Province de Fquih Ben Salah',1),(1240,'MA55',1201,'',0,'','Préfecture de M\'diq-Fnideq',1),(1241,'MA56',1201,'',0,'','Préfecture de Tanger-Asilah',1),(1242,'MA57',1201,'',0,'','Province de Chefchaouen',1),(1243,'MA58',1201,'',0,'','Province de Fahs-Anjra',1),(1244,'MA59',1201,'',0,'','Province de Larache',1),(1245,'MA60',1201,'',0,'','Province d\'Ouezzane',1),(1246,'MA61',1201,'',0,'','Province de Tétouan',1),(1247,'MA62',1203,'',0,'','Province de Guercif',1),(1248,'MA63',1203,'',0,'','Province d\'Al Hoceïma',1),(1249,'MA64',1203,'',0,'','Province de Taounate',1),(1250,'MA65',1203,'',0,'','Province de Taza',1),(1251,'MA6A',1205,'',0,'','Préfecture de Fès',1),(1252,'MA7A',1205,'',0,'','Province de Boulemane',1),(1253,'MA15A',1214,'',0,'','Province d\'Assa-Zag',1),(1254,'MA16A',1214,'',0,'','Province d\'Es-Semara',1),(1255,'MA18A',1211,'',0,'','Préfecture de Marrakech',1),(1256,'MA19A',1214,'',0,'','Province de Tan-Tan',1),(1257,'MA19B',1214,'',0,'','Province de Tan-Tan',1),(1258,'TN01',1001,'',0,'','Ariana',1),(1259,'TN02',1001,'',0,'','Béja',1),(1260,'TN03',1001,'',0,'','Ben Arous',1),(1261,'TN04',1001,'',0,'','Bizerte',1),(1262,'TN05',1001,'',0,'','Gabès',1),(1263,'TN06',1001,'',0,'','Gafsa',1),(1264,'TN07',1001,'',0,'','Jendouba',1),(1265,'TN08',1001,'',0,'','Kairouan',1),(1266,'TN09',1001,'',0,'','Kasserine',1),(1267,'TN10',1001,'',0,'','Kébili',1),(1268,'TN11',1001,'',0,'','La Manouba',1),(1269,'TN12',1001,'',0,'','Le Kef',1),(1270,'TN13',1001,'',0,'','Mahdia',1),(1271,'TN14',1001,'',0,'','Médenine',1),(1272,'TN15',1001,'',0,'','Monastir',1),(1273,'TN16',1001,'',0,'','Nabeul',1),(1274,'TN17',1001,'',0,'','Sfax',1),(1275,'TN18',1001,'',0,'','Sidi Bouzid',1),(1276,'TN19',1001,'',0,'','Siliana',1),(1277,'TN20',1001,'',0,'','Sousse',1),(1278,'TN21',1001,'',0,'','Tataouine',1),(1279,'TN22',1001,'',0,'','Tozeur',1),(1280,'TN23',1001,'',0,'','Tunis',1),(1281,'TN24',1001,'',0,'','Zaghouan',1),(1287,'976',6,'97601',3,'MAYOTTE','Mayotte',1),(1513,'ON',1401,'',1,'','Ontario',1),(1514,'QC',1401,'',1,'','Quebec',1),(1515,'NS',1401,'',1,'','Nova Scotia',1),(1516,'NB',1401,'',1,'','New Brunswick',1),(1517,'MB',1401,'',1,'','Manitoba',1),(1518,'BC',1401,'',1,'','British Columbia',1),(1519,'PE',1401,'',1,'','Prince Edward Island',1),(1520,'SK',1401,'',1,'','Saskatchewan',1),(1521,'AB',1401,'',1,'','Alberta',1),(1522,'NL',1401,'',1,'','Newfoundland and Labrador',1),(1575,'BW',501,NULL,NULL,'BADEN-WÜRTTEMBERG','Baden-Württemberg',1),(1576,'BY',501,NULL,NULL,'BAYERN','Bayern',1),(1577,'BE',501,NULL,NULL,'BERLIN','Berlin',1),(1578,'BB',501,NULL,NULL,'BRANDENBURG','Brandenburg',1),(1579,'HB',501,NULL,NULL,'BREMEN','Bremen',1),(1580,'HH',501,NULL,NULL,'HAMBURG','Hamburg',1),(1581,'HE',501,NULL,NULL,'HESSEN','Hessen',1),(1582,'MV',501,NULL,NULL,'MECKLENBURG-VORPOMMERN','Mecklenburg-Vorpommern',1),(1583,'NI',501,NULL,NULL,'NIEDERSACHSEN','Niedersachsen',1),(1584,'NW',501,NULL,NULL,'NORDRHEIN-WESTFALEN','Nordrhein-Westfalen',1),(1585,'RP',501,NULL,NULL,'RHEINLAND-PFALZ','Rheinland-Pfalz',1),(1586,'SL',501,NULL,NULL,'SAARLAND','Saarland',1),(1587,'SN',501,NULL,NULL,'SACHSEN','Sachsen',1),(1588,'ST',501,NULL,NULL,'SACHSEN-ANHALT','Sachsen-Anhalt',1),(1589,'SH',501,NULL,NULL,'SCHLESWIG-HOLSTEIN','Schleswig-Holstein',1),(1590,'TH',501,NULL,NULL,'THÜRINGEN','Thüringen',1),(1592,'67',10205,'',0,'','Δράμα',1),(1684,'701',701,NULL,0,NULL,'Bedfordshire',1),(1685,'702',701,NULL,0,NULL,'Berkshire',1),(1686,'703',701,NULL,0,NULL,'Bristol, City of',1),(1687,'704',701,NULL,0,NULL,'Buckinghamshire',1),(1688,'705',701,NULL,0,NULL,'Cambridgeshire',1),(1689,'706',701,NULL,0,NULL,'Cheshire',1),(1690,'707',701,NULL,0,NULL,'Cleveland',1),(1691,'708',701,NULL,0,NULL,'Cornwall',1),(1692,'709',701,NULL,0,NULL,'Cumberland',1),(1693,'710',701,NULL,0,NULL,'Cumbria',1),(1694,'711',701,NULL,0,NULL,'Derbyshire',1),(1695,'712',701,NULL,0,NULL,'Devon',1),(1696,'713',701,NULL,0,NULL,'Dorset',1),(1697,'714',701,NULL,0,NULL,'Co. Durham',1),(1698,'715',701,NULL,0,NULL,'East Riding of Yorkshire',1),(1699,'716',701,NULL,0,NULL,'East Sussex',1),(1700,'717',701,NULL,0,NULL,'Essex',1),(1701,'718',701,NULL,0,NULL,'Gloucestershire',1),(1702,'719',701,NULL,0,NULL,'Greater Manchester',1),(1703,'720',701,NULL,0,NULL,'Hampshire',1),(1704,'721',701,NULL,0,NULL,'Hertfordshire',1),(1705,'722',701,NULL,0,NULL,'Hereford and Worcester',1),(1706,'723',701,NULL,0,NULL,'Herefordshire',1),(1707,'724',701,NULL,0,NULL,'Huntingdonshire',1),(1708,'725',701,NULL,0,NULL,'Isle of Man',1),(1709,'726',701,NULL,0,NULL,'Isle of Wight',1),(1710,'727',701,NULL,0,NULL,'Jersey',1),(1711,'728',701,NULL,0,NULL,'Kent',1),(1712,'729',701,NULL,0,NULL,'Lancashire',1),(1713,'730',701,NULL,0,NULL,'Leicestershire',1),(1714,'731',701,NULL,0,NULL,'Lincolnshire',1),(1715,'732',701,NULL,0,NULL,'London - City of London',1),(1716,'733',701,NULL,0,NULL,'Merseyside',1),(1717,'734',701,NULL,0,NULL,'Middlesex',1),(1718,'735',701,NULL,0,NULL,'Norfolk',1),(1719,'736',701,NULL,0,NULL,'North Yorkshire',1),(1720,'737',701,NULL,0,NULL,'North Riding of Yorkshire',1),(1721,'738',701,NULL,0,NULL,'Northamptonshire',1),(1722,'739',701,NULL,0,NULL,'Northumberland',1),(1723,'740',701,NULL,0,NULL,'Nottinghamshire',1),(1724,'741',701,NULL,0,NULL,'Oxfordshire',1),(1725,'742',701,NULL,0,NULL,'Rutland',1),(1726,'743',701,NULL,0,NULL,'Shropshire',1),(1727,'744',701,NULL,0,NULL,'Somerset',1),(1728,'745',701,NULL,0,NULL,'Staffordshire',1),(1729,'746',701,NULL,0,NULL,'Suffolk',1),(1730,'747',701,NULL,0,NULL,'Surrey',1),(1731,'748',701,NULL,0,NULL,'Sussex',1),(1732,'749',701,NULL,0,NULL,'Tyne and Wear',1),(1733,'750',701,NULL,0,NULL,'Warwickshire',1),(1734,'751',701,NULL,0,NULL,'West Midlands',1),(1735,'752',701,NULL,0,NULL,'West Sussex',1),(1736,'753',701,NULL,0,NULL,'West Yorkshire',1),(1737,'754',701,NULL,0,NULL,'West Riding of Yorkshire',1),(1738,'755',701,NULL,0,NULL,'Wiltshire',1),(1739,'756',701,NULL,0,NULL,'Worcestershire',1),(1740,'757',701,NULL,0,NULL,'Yorkshire',1),(1741,'758',702,NULL,0,NULL,'Anglesey',1),(1742,'759',702,NULL,0,NULL,'Breconshire',1),(1743,'760',702,NULL,0,NULL,'Caernarvonshire',1),(1744,'761',702,NULL,0,NULL,'Cardiganshire',1),(1745,'762',702,NULL,0,NULL,'Carmarthenshire',1),(1746,'763',702,NULL,0,NULL,'Ceredigion',1),(1747,'764',702,NULL,0,NULL,'Denbighshire',1),(1748,'765',702,NULL,0,NULL,'Flintshire',1),(1749,'766',702,NULL,0,NULL,'Glamorgan',1),(1750,'767',702,NULL,0,NULL,'Gwent',1),(1751,'768',702,NULL,0,NULL,'Gwynedd',1),(1752,'769',702,NULL,0,NULL,'Merionethshire',1),(1753,'770',702,NULL,0,NULL,'Monmouthshire',1),(1754,'771',702,NULL,0,NULL,'Mid Glamorgan',1),(1755,'772',702,NULL,0,NULL,'Montgomeryshire',1),(1756,'773',702,NULL,0,NULL,'Pembrokeshire',1),(1757,'774',702,NULL,0,NULL,'Powys',1),(1758,'775',702,NULL,0,NULL,'Radnorshire',1),(1759,'776',702,NULL,0,NULL,'South Glamorgan',1),(1760,'777',703,NULL,0,NULL,'Aberdeen, City of',1),(1761,'778',703,NULL,0,NULL,'Angus',1),(1762,'779',703,NULL,0,NULL,'Argyll',1),(1763,'780',703,NULL,0,NULL,'Ayrshire',1),(1764,'781',703,NULL,0,NULL,'Banffshire',1),(1765,'782',703,NULL,0,NULL,'Berwickshire',1),(1766,'783',703,NULL,0,NULL,'Bute',1),(1767,'784',703,NULL,0,NULL,'Caithness',1),(1768,'785',703,NULL,0,NULL,'Clackmannanshire',1),(1769,'786',703,NULL,0,NULL,'Dumfriesshire',1),(1770,'787',703,NULL,0,NULL,'Dumbartonshire',1),(1771,'788',703,NULL,0,NULL,'Dundee, City of',1),(1772,'789',703,NULL,0,NULL,'East Lothian',1),(1773,'790',703,NULL,0,NULL,'Fife',1),(1774,'791',703,NULL,0,NULL,'Inverness',1),(1775,'792',703,NULL,0,NULL,'Kincardineshire',1),(1776,'793',703,NULL,0,NULL,'Kinross-shire',1),(1777,'794',703,NULL,0,NULL,'Kirkcudbrightshire',1),(1778,'795',703,NULL,0,NULL,'Lanarkshire',1),(1779,'796',703,NULL,0,NULL,'Midlothian',1),(1780,'797',703,NULL,0,NULL,'Morayshire',1),(1781,'798',703,NULL,0,NULL,'Nairnshire',1),(1782,'799',703,NULL,0,NULL,'Orkney',1),(1783,'800',703,NULL,0,NULL,'Peebleshire',1),(1784,'801',703,NULL,0,NULL,'Perthshire',1),(1785,'802',703,NULL,0,NULL,'Renfrewshire',1),(1786,'803',703,NULL,0,NULL,'Ross & Cromarty',1),(1787,'804',703,NULL,0,NULL,'Roxburghshire',1),(1788,'805',703,NULL,0,NULL,'Selkirkshire',1),(1789,'806',703,NULL,0,NULL,'Shetland',1),(1790,'807',703,NULL,0,NULL,'Stirlingshire',1),(1791,'808',703,NULL,0,NULL,'Sutherland',1),(1792,'809',703,NULL,0,NULL,'West Lothian',1),(1793,'810',703,NULL,0,NULL,'Wigtownshire',1),(1794,'811',704,NULL,0,NULL,'Antrim',1),(1795,'812',704,NULL,0,NULL,'Armagh',1),(1796,'813',704,NULL,0,NULL,'Co. Down',1),(1797,'814',704,NULL,0,NULL,'Co. Fermanagh',1),(1798,'815',704,NULL,0,NULL,'Co. Londonderry',1),(1849,'GR',1701,NULL,NULL,NULL,'Groningen',1),(1850,'FR',1701,NULL,NULL,NULL,'Friesland',1),(1851,'DR',1701,NULL,NULL,NULL,'Drenthe',1),(1852,'OV',1701,NULL,NULL,NULL,'Overijssel',1),(1853,'GD',1701,NULL,NULL,NULL,'Gelderland',1),(1854,'FL',1701,NULL,NULL,NULL,'Flevoland',1),(1855,'UT',1701,NULL,NULL,NULL,'Utrecht',1),(1856,'NH',1701,NULL,NULL,NULL,'Noord-Holland',1),(1857,'ZH',1701,NULL,NULL,NULL,'Zuid-Holland',1),(1858,'ZL',1701,NULL,NULL,NULL,'Zeeland',1),(1859,'NB',1701,NULL,NULL,NULL,'Noord-Brabant',1),(1860,'LB',1701,NULL,NULL,NULL,'Limburg',1),(1900,'AC',5601,'ACRE',0,'AC','Acre',1),(1901,'AL',5601,'ALAGOAS',0,'AL','Alagoas',1),(1902,'AP',5601,'AMAPA',0,'AP','Amapá',1),(1903,'AM',5601,'AMAZONAS',0,'AM','Amazonas',1),(1904,'BA',5601,'BAHIA',0,'BA','Bahia',1),(1905,'CE',5601,'CEARA',0,'CE','Ceará',1),(1906,'ES',5601,'ESPIRITO SANTO',0,'ES','Espirito Santo',1),(1907,'GO',5601,'GOIAS',0,'GO','Goiás',1),(1908,'MA',5601,'MARANHAO',0,'MA','Maranhão',1),(1909,'MT',5601,'MATO GROSSO',0,'MT','Mato Grosso',1),(1910,'MS',5601,'MATO GROSSO DO SUL',0,'MS','Mato Grosso do Sul',1),(1911,'MG',5601,'MINAS GERAIS',0,'MG','Minas Gerais',1),(1912,'PA',5601,'PARA',0,'PA','Pará',1),(1913,'PB',5601,'PARAIBA',0,'PB','Paraiba',1),(1914,'PR',5601,'PARANA',0,'PR','Paraná',1),(1915,'PE',5601,'PERNAMBUCO',0,'PE','Pernambuco',1),(1916,'PI',5601,'PIAUI',0,'PI','Piauí',1),(1917,'RJ',5601,'RIO DE JANEIRO',0,'RJ','Rio de Janeiro',1),(1918,'RN',5601,'RIO GRANDE DO NORTE',0,'RN','Rio Grande do Norte',1),(1919,'RS',5601,'RIO GRANDE DO SUL',0,'RS','Rio Grande do Sul',1),(1920,'RO',5601,'RONDONIA',0,'RO','Rondônia',1),(1921,'RR',5601,'RORAIMA',0,'RR','Roraima',1),(1922,'SC',5601,'SANTA CATARINA',0,'SC','Santa Catarina',1),(1923,'SE',5601,'SERGIPE',0,'SE','Sergipe',1),(1924,'SP',5601,'SAO PAULO',0,'SP','Sao Paulo',1),(1925,'TO',5601,'TOCANTINS',0,'TO','Tocantins',1),(1926,'DF',5601,'DISTRITO FEDERAL',0,'DF','Distrito Federal',1),(1927,'001',5201,'',0,'','Belisario Boeto',1),(1928,'002',5201,'',0,'','Hernando Siles',1),(1929,'003',5201,'',0,'','Jaime Zudáñez',1),(1930,'004',5201,'',0,'','Juana Azurduy de Padilla',1),(1931,'005',5201,'',0,'','Luis Calvo',1),(1932,'006',5201,'',0,'','Nor Cinti',1),(1933,'007',5201,'',0,'','Oropeza',1),(1934,'008',5201,'',0,'','Sud Cinti',1),(1935,'009',5201,'',0,'','Tomina',1),(1936,'010',5201,'',0,'','Yamparáez',1),(1937,'011',5202,'',0,'','Abel Iturralde',1),(1938,'012',5202,'',0,'','Aroma',1),(1939,'013',5202,'',0,'','Bautista Saavedra',1),(1940,'014',5202,'',0,'','Caranavi',1),(1941,'015',5202,'',0,'','Eliodoro Camacho',1),(1942,'016',5202,'',0,'','Franz Tamayo',1),(1943,'017',5202,'',0,'','Gualberto Villarroel',1),(1944,'018',5202,'',0,'','Ingaví',1),(1945,'019',5202,'',0,'','Inquisivi',1),(1946,'020',5202,'',0,'','José Ramón Loayza',1),(1947,'021',5202,'',0,'','Larecaja',1),(1948,'022',5202,'',0,'','Los Andes (Bolivia)',1),(1949,'023',5202,'',0,'','Manco Kapac',1),(1950,'024',5202,'',0,'','Muñecas',1),(1951,'025',5202,'',0,'','Nor Yungas',1),(1952,'026',5202,'',0,'','Omasuyos',1),(1953,'027',5202,'',0,'','Pacajes',1),(1954,'028',5202,'',0,'','Pedro Domingo Murillo',1),(1955,'029',5202,'',0,'','Sud Yungas',1),(1956,'030',5202,'',0,'','General José Manuel Pando',1),(1957,'031',5203,'',0,'','Arani',1),(1958,'032',5203,'',0,'','Arque',1),(1959,'033',5203,'',0,'','Ayopaya',1),(1960,'034',5203,'',0,'','Bolívar (Bolivia)',1),(1961,'035',5203,'',0,'','Campero',1),(1962,'036',5203,'',0,'','Capinota',1),(1963,'037',5203,'',0,'','Cercado (Cochabamba)',1),(1964,'038',5203,'',0,'','Esteban Arze',1),(1965,'039',5203,'',0,'','Germán Jordán',1),(1966,'040',5203,'',0,'','José Carrasco',1),(1967,'041',5203,'',0,'','Mizque',1),(1968,'042',5203,'',0,'','Punata',1),(1969,'043',5203,'',0,'','Quillacollo',1),(1970,'044',5203,'',0,'','Tapacarí',1),(1971,'045',5203,'',0,'','Tiraque',1),(1972,'046',5203,'',0,'','Chapare',1),(1973,'047',5204,'',0,'','Carangas',1),(1974,'048',5204,'',0,'','Cercado (Oruro)',1),(1975,'049',5204,'',0,'','Eduardo Avaroa',1),(1976,'050',5204,'',0,'','Ladislao Cabrera',1),(1977,'051',5204,'',0,'','Litoral de Atacama',1),(1978,'052',5204,'',0,'','Mejillones',1),(1979,'053',5204,'',0,'','Nor Carangas',1),(1980,'054',5204,'',0,'','Pantaleón Dalence',1),(1981,'055',5204,'',0,'','Poopó',1),(1982,'056',5204,'',0,'','Sabaya',1),(1983,'057',5204,'',0,'','Sajama',1),(1984,'058',5204,'',0,'','San Pedro de Totora',1),(1985,'059',5204,'',0,'','Saucarí',1),(1986,'060',5204,'',0,'','Sebastián Pagador',1),(1987,'061',5204,'',0,'','Sud Carangas',1),(1988,'062',5204,'',0,'','Tomás Barrón',1),(1989,'063',5205,'',0,'','Alonso de Ibáñez',1),(1990,'064',5205,'',0,'','Antonio Quijarro',1),(1991,'065',5205,'',0,'','Bernardino Bilbao',1),(1992,'066',5205,'',0,'','Charcas (Potosí)',1),(1993,'067',5205,'',0,'','Chayanta',1),(1994,'068',5205,'',0,'','Cornelio Saavedra',1),(1995,'069',5205,'',0,'','Daniel Campos',1),(1996,'070',5205,'',0,'','Enrique Baldivieso',1),(1997,'071',5205,'',0,'','José María Linares',1),(1998,'072',5205,'',0,'','Modesto Omiste',1),(1999,'073',5205,'',0,'','Nor Chichas',1),(2000,'074',5205,'',0,'','Nor Lípez',1),(2001,'075',5205,'',0,'','Rafael Bustillo',1),(2002,'076',5205,'',0,'','Sud Chichas',1),(2003,'077',5205,'',0,'','Sud Lípez',1),(2004,'078',5205,'',0,'','Tomás Frías',1),(2005,'079',5206,'',0,'','Aniceto Arce',1),(2006,'080',5206,'',0,'','Burdet O\'Connor',1),(2007,'081',5206,'',0,'','Cercado (Tarija)',1),(2008,'082',5206,'',0,'','Eustaquio Méndez',1),(2009,'083',5206,'',0,'','José María Avilés',1),(2010,'084',5206,'',0,'','Gran Chaco',1),(2011,'085',5207,'',0,'','Andrés Ibáñez',1),(2012,'086',5207,'',0,'','Caballero',1),(2013,'087',5207,'',0,'','Chiquitos',1),(2014,'088',5207,'',0,'','Cordillera (Bolivia)',1),(2015,'089',5207,'',0,'','Florida',1),(2016,'090',5207,'',0,'','Germán Busch',1),(2017,'091',5207,'',0,'','Guarayos',1),(2018,'092',5207,'',0,'','Ichilo',1),(2019,'093',5207,'',0,'','Obispo Santistevan',1),(2020,'094',5207,'',0,'','Sara',1),(2021,'095',5207,'',0,'','Vallegrande',1),(2022,'096',5207,'',0,'','Velasco',1),(2023,'097',5207,'',0,'','Warnes',1),(2024,'098',5207,'',0,'','Ángel Sandóval',1),(2025,'099',5207,'',0,'','Ñuflo de Chaves',1),(2026,'100',5208,'',0,'','Cercado (Beni)',1),(2027,'101',5208,'',0,'','Iténez',1),(2028,'102',5208,'',0,'','Mamoré',1),(2029,'103',5208,'',0,'','Marbán',1),(2030,'104',5208,'',0,'','Moxos',1),(2031,'105',5208,'',0,'','Vaca Díez',1),(2032,'106',5208,'',0,'','Yacuma',1),(2033,'107',5208,'',0,'','General José Ballivián Segurola',1),(2034,'108',5209,'',0,'','Abuná',1),(2035,'109',5209,'',0,'','Madre de Dios',1),(2036,'110',5209,'',0,'','Manuripi',1),(2037,'111',5209,'',0,'','Nicolás Suárez',1),(2038,'112',5209,'',0,'','General Federico Román',1),(2039,'B',4101,NULL,NULL,'BURGENLAND','Burgenland',1),(2040,'K',4101,NULL,NULL,'KAERNTEN','Kärnten',1),(2041,'N',4101,NULL,NULL,'NIEDEROESTERREICH','Niederösterreich',1),(2042,'O',4101,NULL,NULL,'OBEROESTERREICH','Oberösterreich',1),(2043,'S',4101,NULL,NULL,'SALZBURG','Salzburg',1),(2044,'ST',4101,NULL,NULL,'STEIERMARK','Steiermark',1),(2045,'T',4101,NULL,NULL,'TIROL','Tirol',1),(2046,'V',4101,NULL,NULL,'VORARLBERG','Vorarlberg',1),(2047,'W',4101,NULL,NULL,'WIEN','Wien',1),(2048,'2326',2305,'',0,'MISIONES','Misiones',1),(2049,'PA-1',17801,'',0,'','Bocas del Toro',1),(2050,'PA-2',17801,'',0,'','Coclé',1),(2051,'PA-3',17801,'',0,'','Colón',1),(2052,'PA-4',17801,'',0,'','Chiriquí',1),(2053,'PA-5',17801,'',0,'','Darién',1),(2054,'PA-6',17801,'',0,'','Herrera',1),(2055,'PA-7',17801,'',0,'','Los Santos',1),(2056,'PA-8',17801,'',0,'','Panamá',1),(2057,'PA-9',17801,'',0,'','Veraguas',1),(2058,'PA-13',17801,'',0,'','Panamá Oeste',1),(2059,'AE-1',22701,'',0,'','Abu Dhabi',1),(2060,'AE-2',22701,'',0,'','Dubai',1),(2061,'AE-3',22701,'',0,'','Ajman',1),(2062,'AE-4',22701,'',0,'','Fujairah',1),(2063,'AE-5',22701,'',0,'','Ras al-Khaimah',1),(2064,'AE-6',22701,'',0,'','Sharjah',1),(2065,'AE-7',22701,'',0,'','Umm al-Quwain',1),(2066,'BA',11801,NULL,0,'BA','Bali',1),(2067,'BB',11801,NULL,0,'BB','Bangka Belitung',1),(2068,'BT',11801,NULL,0,'BT','Banten',1),(2069,'BE',11801,NULL,0,'BA','Bengkulu',1),(2070,'YO',11801,NULL,0,'YO','DI Yogyakarta',1),(2071,'JK',11801,NULL,0,'JK','DKI Jakarta',1),(2072,'GO',11801,NULL,0,'GO','Gorontalo',1),(2073,'JA',11801,NULL,0,'JA','Jambi',1),(2074,'JB',11801,NULL,0,'JB','Jawa Barat',1),(2075,'JT',11801,NULL,0,'JT','Jawa Tengah',1),(2076,'JI',11801,NULL,0,'JI','Jawa Timur',1),(2077,'KB',11801,NULL,0,'KB','Kalimantan Barat',1),(2078,'KS',11801,NULL,0,'KS','Kalimantan Selatan',1),(2079,'KT',11801,NULL,0,'KT','Kalimantan Tengah',1),(2080,'KI',11801,NULL,0,'KI','Kalimantan Timur',1),(2081,'KU',11801,NULL,0,'KU','Kalimantan Utara',1),(2082,'KR',11801,NULL,0,'KR','Kepulauan Riau',1),(2083,'LA',11801,NULL,0,'LA','Lampung',1),(2084,'MA',11801,NULL,0,'MA','Maluku',1),(2085,'MU',11801,NULL,0,'MU','Maluku Utara',1),(2086,'AC',11801,NULL,0,'AC','Nanggroe Aceh Darussalam',1),(2087,'NB',11801,NULL,0,'NB','Nusa Tenggara Barat',1),(2088,'NT',11801,NULL,0,'NT','Nusa Tenggara Timur',1),(2089,'PA',11801,NULL,0,'PA','Papua',1),(2090,'PB',11801,NULL,0,'PB','Papua Barat',1),(2091,'RI',11801,NULL,0,'RI','Riau',1),(2092,'SR',11801,NULL,0,'SR','Sulawesi Barat',1),(2093,'SN',11801,NULL,0,'SN','Sulawesi Selatan',1),(2094,'ST',11801,NULL,0,'ST','Sulawesi Tengah',1),(2095,'SG',11801,NULL,0,'SG','Sulawesi Tenggara',1),(2096,'SA',11801,NULL,0,'SA','Sulawesi Utara',1),(2097,'SB',11801,NULL,0,'SB','Sumatera Barat',1),(2098,'SS',11801,NULL,0,'SS','Sumatera Selatan',1),(2099,'SU',11801,NULL,0,'SU','Sumatera Utara ',1); /*!40000 ALTER TABLE `llx_c_departements` ENABLE KEYS */; UNLOCK TABLES; @@ -1712,7 +1713,7 @@ CREATE TABLE `llx_c_ecotaxe` ( `price` double(24,8) DEFAULT NULL, `organization` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_pays` int(11) NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_ecotaxe` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1739,7 +1740,7 @@ CREATE TABLE `llx_c_effectif` ( `id` int(11) NOT NULL, `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `libelle` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_effectif` (`code`) @@ -1765,15 +1766,15 @@ DROP TABLE IF EXISTS `llx_c_email_senderprofile`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_email_senderprofile` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', - `private` smallint(6) NOT NULL DEFAULT '0', + `entity` int(11) NOT NULL DEFAULT 1, + `private` smallint(6) NOT NULL DEFAULT 0, `date_creation` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `signature` text COLLATE utf8_unicode_ci, - `position` smallint(6) DEFAULT '0', - `active` tinyint(4) NOT NULL DEFAULT '1', + `signature` text COLLATE utf8_unicode_ci DEFAULT NULL, + `position` smallint(6) DEFAULT 0, + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_email_senderprofile` (`entity`,`label`,`email`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1797,20 +1798,20 @@ DROP TABLE IF EXISTS `llx_c_email_templates`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_email_templates` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `type_template` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, - `private` smallint(6) NOT NULL DEFAULT '0', + `private` smallint(6) NOT NULL DEFAULT 0, `fk_user` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `position` smallint(6) DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', - `topic` text COLLATE utf8_unicode_ci, - `content` mediumtext COLLATE utf8_unicode_ci, - `content_lines` text COLLATE utf8_unicode_ci, + `active` tinyint(4) NOT NULL DEFAULT 1, + `topic` text COLLATE utf8_unicode_ci DEFAULT NULL, + `content` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, + `content_lines` text COLLATE utf8_unicode_ci DEFAULT NULL, `enabled` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', `joinfiles` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', PRIMARY KEY (`rowid`), @@ -1839,8 +1840,8 @@ DROP TABLE IF EXISTS `llx_c_exp_tax_cat`; CREATE TABLE `llx_c_exp_tax_cat` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `label` varchar(48) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `active` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, + `active` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1864,10 +1865,10 @@ DROP TABLE IF EXISTS `llx_c_exp_tax_range`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_exp_tax_range` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_c_exp_tax_cat` int(11) NOT NULL DEFAULT '1', - `range_ik` double NOT NULL DEFAULT '0', - `entity` int(11) NOT NULL DEFAULT '1', - `active` int(11) NOT NULL DEFAULT '1', + `fk_c_exp_tax_cat` int(11) NOT NULL DEFAULT 1, + `range_ik` double NOT NULL DEFAULT 0, + `entity` int(11) NOT NULL DEFAULT 1, + `active` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1891,18 +1892,18 @@ DROP TABLE IF EXISTS `llx_c_field_list`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_field_list` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `element` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `alias` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `title` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `align` varchar(6) COLLATE utf8_unicode_ci DEFAULT 'left', - `sort` tinyint(4) NOT NULL DEFAULT '1', - `search` tinyint(4) NOT NULL DEFAULT '0', - `visible` tinyint(4) NOT NULL DEFAULT '1', + `sort` tinyint(4) NOT NULL DEFAULT 1, + `search` tinyint(4) NOT NULL DEFAULT 0, + `visible` tinyint(4) NOT NULL DEFAULT 1, `enabled` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', - `rang` int(11) DEFAULT '0', + `rang` int(11) DEFAULT 0, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1969,10 +1970,10 @@ CREATE TABLE `llx_c_forme_juridique` ( `code` int(11) NOT NULL, `fk_pays` int(11) NOT NULL, `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `isvatexempted` tinyint(4) NOT NULL DEFAULT '0', - `active` tinyint(4) NOT NULL DEFAULT '1', + `isvatexempted` tinyint(4) NOT NULL DEFAULT 0, + `active` tinyint(4) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) NOT NULL DEFAULT '0', + `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_forme_juridique` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=100230 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1984,7 +1985,7 @@ CREATE TABLE `llx_c_forme_juridique` ( LOCK TABLES `llx_c_forme_juridique` WRITE; /*!40000 ALTER TABLE `llx_c_forme_juridique` DISABLE KEYS */; -INSERT INTO `llx_c_forme_juridique` VALUES (100001,100001,1,'Etudiant',0,0,'cabinetmed',0),(100002,100002,1,'Retraité',0,0,'cabinetmed',0),(100003,100003,1,'Artisan',0,0,'cabinetmed',0),(100004,100004,1,'Femme de ménage',0,0,'cabinetmed',0),(100005,100005,1,'Professeur',0,0,'cabinetmed',0),(100006,100006,1,'Profession libérale',0,0,'cabinetmed',0),(100007,100007,1,'Informaticien',0,0,'cabinetmed',0),(100009,0,0,'-',0,1,NULL,0),(100010,2301,23,'Monotributista',0,1,NULL,0),(100011,2302,23,'Sociedad Civil',0,1,NULL,0),(100012,2303,23,'Sociedades Comerciales',0,1,NULL,0),(100013,2304,23,'Sociedades de Hecho',0,1,NULL,0),(100014,2305,23,'Sociedades Irregulares',0,1,NULL,0),(100015,2306,23,'Sociedad Colectiva',0,1,NULL,0),(100016,2307,23,'Sociedad en Comandita Simple',0,1,NULL,0),(100017,2308,23,'Sociedad de Capital e Industria',0,1,NULL,0),(100018,2309,23,'Sociedad Accidental o en participación',0,1,NULL,0),(100019,2310,23,'Sociedad de Responsabilidad Limitada',0,1,NULL,0),(100020,2311,23,'Sociedad Anónima',0,1,NULL,0),(100021,2312,23,'Sociedad Anónima con Participación Estatal Mayoritaria',0,1,NULL,0),(100022,2313,23,'Sociedad en Comandita por Acciones (arts. 315 a 324, LSC)',0,1,NULL,0),(100023,11,1,'Artisan Commerçant (EI)',0,1,NULL,0),(100024,12,1,'Commerçant (EI)',0,1,NULL,0),(100025,13,1,'Artisan (EI)',0,1,NULL,0),(100026,14,1,'Officier public ou ministériel',0,1,NULL,0),(100027,15,1,'Profession libérale (EI)',0,1,NULL,0),(100028,16,1,'Exploitant agricole',0,1,NULL,0),(100029,17,1,'Agent commercial',0,1,NULL,0),(100030,18,1,'Associé Gérant de société',0,1,NULL,0),(100031,19,1,'Personne physique',0,1,NULL,0),(100032,21,1,'Indivision',0,1,NULL,0),(100033,22,1,'Société créée de fait',0,1,NULL,0),(100034,23,1,'Société en participation',0,1,NULL,0),(100035,27,1,'Paroisse hors zone concordataire',0,1,NULL,0),(100036,29,1,'Groupement de droit privé non doté de la personnalité morale',0,1,NULL,0),(100037,31,1,'Personne morale de droit étranger, immatriculée au RCS',0,1,NULL,0),(100038,32,1,'Personne morale de droit étranger, non immatriculée au RCS',0,1,NULL,0),(100039,35,1,'Régime auto-entrepreneur',0,1,NULL,0),(100040,41,1,'Etablissement public ou régie à caractère industriel ou commercial',0,1,NULL,0),(100041,51,1,'Société coopérative commerciale particulière',0,1,NULL,0),(100042,52,1,'Société en nom collectif',0,1,NULL,0),(100043,53,1,'Société en commandite',0,1,NULL,0),(100044,54,1,'Société à responsabilité limitée (SARL)',0,1,NULL,0),(100045,55,1,'Société anonyme à conseil d administration',0,1,NULL,0),(100046,56,1,'Société anonyme à directoire',0,1,NULL,0),(100047,57,1,'Société par actions simplifiée (SAS)',0,1,NULL,0),(100048,58,1,'Entreprise Unipersonnelle à Responsabilité Limitée (EURL)',0,1,NULL,0),(100049,59,1,'Société par actions simplifiée unipersonnelle (SASU)',0,1,NULL,0),(100050,60,1,'Entreprise Individuelle à Responsabilité Limitée (EIRL)',0,1,NULL,0),(100051,61,1,'Caisse d\'épargne et de prévoyance',0,1,NULL,0),(100052,62,1,'Groupement d\'intérêt économique (GIE)',0,1,NULL,0),(100053,63,1,'Société coopérative agricole',0,1,NULL,0),(100054,64,1,'Société non commerciale d assurances',0,1,NULL,0),(100055,65,1,'Société civile',0,1,NULL,0),(100056,69,1,'Personnes de droit privé inscrites au RCS',0,1,NULL,0),(100057,71,1,'Administration de l état',0,1,NULL,0),(100058,72,1,'Collectivité territoriale',0,1,NULL,0),(100059,73,1,'Etablissement public administratif',0,1,NULL,0),(100060,74,1,'Personne morale de droit public administratif',0,1,NULL,0),(100061,81,1,'Organisme gérant régime de protection social à adhésion obligatoire',0,1,NULL,0),(100062,82,1,'Organisme mutualiste',0,1,NULL,0),(100063,83,1,'Comité d entreprise',0,1,NULL,0),(100064,84,1,'Organisme professionnel',0,1,NULL,0),(100065,85,1,'Organisme de retraite à adhésion non obligatoire',0,1,NULL,0),(100066,91,1,'Syndicat de propriétaires',0,1,NULL,0),(100067,92,1,'Association loi 1901 ou assimilé',0,1,NULL,0),(100068,93,1,'Fondation',0,1,NULL,0),(100069,99,1,'Personne morale de droit privé',0,1,NULL,0),(100070,200,2,'Indépendant',0,1,NULL,0),(100071,201,2,'SPRL - Société à responsabilité limitée',0,1,NULL,0),(100072,202,2,'SA - Société Anonyme',0,1,NULL,0),(100073,203,2,'SCRL - Société coopérative à responsabilité limitée',0,1,NULL,0),(100074,204,2,'ASBL - Association sans but Lucratif',0,1,NULL,0),(100075,205,2,'SCRI - Société coopérative à responsabilité illimitée',0,1,NULL,0),(100076,206,2,'SCS - Société en commandite simple',0,1,NULL,0),(100077,207,2,'SCA - Société en commandite par action',0,1,NULL,0),(100078,208,2,'SNC - Société en nom collectif',0,1,NULL,0),(100079,209,2,'GIE - Groupement d intérêt économique',0,1,NULL,0),(100080,210,2,'GEIE - Groupement européen d intérêt économique',0,1,NULL,0),(100081,220,2,'Eenmanszaak',0,1,NULL,0),(100082,221,2,'BVBA - Besloten vennootschap met beperkte aansprakelijkheid',0,1,NULL,0),(100083,222,2,'NV - Naamloze Vennootschap',0,1,NULL,0),(100084,223,2,'CVBA - Coöperatieve vennootschap met beperkte aansprakelijkheid',0,1,NULL,0),(100085,224,2,'VZW - Vereniging zonder winstoogmerk',0,1,NULL,0),(100086,225,2,'CVOA - Coöperatieve vennootschap met onbeperkte aansprakelijkheid ',0,1,NULL,0),(100087,226,2,'GCV - Gewone commanditaire vennootschap',0,1,NULL,0),(100088,227,2,'Comm.VA - Commanditaire vennootschap op aandelen',0,1,NULL,0),(100089,228,2,'VOF - Vennootschap onder firma',0,1,NULL,0),(100090,229,2,'VS0 - Vennootschap met sociaal oogmerk',0,1,NULL,0),(100091,500,5,'GmbH - Gesellschaft mit beschränkter Haftung',0,1,NULL,0),(100092,501,5,'AG - Aktiengesellschaft ',0,1,NULL,0),(100093,502,5,'GmbH&Co. KG - Gesellschaft mit beschränkter Haftung & Compagnie Kommanditgesellschaft',0,1,NULL,0),(100094,503,5,'Gewerbe - Personengesellschaft',0,1,NULL,0),(100095,504,5,'UG - Unternehmergesellschaft -haftungsbeschränkt-',0,1,NULL,0),(100096,505,5,'GbR - Gesellschaft des bürgerlichen Rechts',0,1,NULL,0),(100097,506,5,'KG - Kommanditgesellschaft',0,1,NULL,0),(100098,507,5,'Ltd. - Limited Company',0,1,NULL,0),(100099,508,5,'OHG - Offene Handelsgesellschaft',0,1,NULL,0),(100100,10201,102,'Ατομική επιχείρηση',0,1,NULL,0),(100101,10202,102,'Εταιρική επιχείρηση',0,1,NULL,0),(100102,10203,102,'Ομόρρυθμη Εταιρεία Ο.Ε',0,1,NULL,0),(100103,10204,102,'Ετερόρρυθμη Εταιρεία Ε.Ε',0,1,NULL,0),(100104,10205,102,'Εταιρεία Περιορισμένης Ευθύνης Ε.Π.Ε',0,1,NULL,0),(100105,10206,102,'Ανώνυμη Εταιρεία Α.Ε',0,1,NULL,0),(100106,10207,102,'Ανώνυμη ναυτιλιακή εταιρεία Α.Ν.Ε',0,1,NULL,0),(100107,10208,102,'Συνεταιρισμός',0,1,NULL,0),(100108,10209,102,'Συμπλοιοκτησία',0,1,NULL,0),(100109,301,3,'Società semplice',0,1,NULL,0),(100110,302,3,'Società in nome collettivo s.n.c.',0,1,NULL,0),(100111,303,3,'Società in accomandita semplice s.a.s.',0,1,NULL,0),(100112,304,3,'Società per azioni s.p.a.',0,1,NULL,0),(100113,305,3,'Società a responsabilità limitata s.r.l.',0,1,NULL,0),(100114,306,3,'Società in accomandita per azioni s.a.p.a.',0,1,NULL,0),(100115,307,3,'Società cooperativa a r.l.',0,1,NULL,0),(100116,308,3,'Società consortile',0,1,NULL,0),(100117,309,3,'Società europea',0,1,NULL,0),(100118,310,3,'Società cooperativa europea',0,1,NULL,0),(100119,311,3,'Società unipersonale',0,1,NULL,0),(100120,312,3,'Società di professionisti',0,1,NULL,0),(100121,313,3,'Società di fatto',0,1,NULL,0),(100122,315,3,'Società apparente',0,1,NULL,0),(100123,316,3,'Impresa individuale ',0,1,NULL,0),(100124,317,3,'Impresa coniugale',0,1,NULL,0),(100125,318,3,'Impresa familiare',0,1,NULL,0),(100126,319,3,'Consorzio cooperativo',0,1,NULL,0),(100127,320,3,'Società cooperativa sociale',0,1,NULL,0),(100128,321,3,'Società cooperativa di consumo',0,1,NULL,0),(100129,322,3,'Società cooperativa agricola',0,1,NULL,0),(100130,323,3,'A.T.I. Associazione temporanea di imprese',0,1,NULL,0),(100131,324,3,'R.T.I. Raggruppamento temporaneo di imprese',0,1,NULL,0),(100132,325,3,'Studio associato',0,1,NULL,0),(100133,600,6,'Raison Individuelle',0,1,NULL,0),(100134,601,6,'Société Simple',0,1,NULL,0),(100135,602,6,'Société en nom collectif',0,1,NULL,0),(100136,603,6,'Société en commandite',0,1,NULL,0),(100137,604,6,'Société anonyme (SA)',0,1,NULL,0),(100138,605,6,'Société en commandite par actions',0,1,NULL,0),(100139,606,6,'Société à responsabilité limitée (SARL)',0,1,NULL,0),(100140,607,6,'Société coopérative',0,1,NULL,0),(100141,608,6,'Association',0,1,NULL,0),(100142,609,6,'Fondation',0,1,NULL,0),(100143,700,7,'Sole Trader',0,1,NULL,0),(100144,701,7,'Partnership',0,1,NULL,0),(100145,702,7,'Private Limited Company by shares (LTD)',0,1,NULL,0),(100146,703,7,'Public Limited Company',0,1,NULL,0),(100147,704,7,'Workers Cooperative',0,1,NULL,0),(100148,705,7,'Limited Liability Partnership',0,1,NULL,0),(100149,706,7,'Franchise',0,1,NULL,0),(100150,1000,10,'Société à responsabilité limitée (SARL)',0,1,NULL,0),(100151,1001,10,'Société en Nom Collectif (SNC)',0,1,NULL,0),(100152,1002,10,'Société en Commandite Simple (SCS)',0,1,NULL,0),(100153,1003,10,'société en participation',0,1,NULL,0),(100154,1004,10,'Société Anonyme (SA)',0,1,NULL,0),(100155,1005,10,'Société Unipersonnelle à Responsabilité Limitée (SUARL)',0,1,NULL,0),(100156,1006,10,'Groupement d\'intérêt économique (GEI)',0,1,NULL,0),(100157,1007,10,'Groupe de sociétés',0,1,NULL,0),(100158,1701,17,'Eenmanszaak',0,1,NULL,0),(100159,1702,17,'Maatschap',0,1,NULL,0),(100160,1703,17,'Vennootschap onder firma',0,1,NULL,0),(100161,1704,17,'Commanditaire vennootschap',0,1,NULL,0),(100162,1705,17,'Besloten vennootschap (BV)',0,1,NULL,0),(100163,1706,17,'Naamloze Vennootschap (NV)',0,1,NULL,0),(100164,1707,17,'Vereniging',0,1,NULL,0),(100165,1708,17,'Stichting',0,1,NULL,0),(100166,1709,17,'Coöperatie met beperkte aansprakelijkheid (BA)',0,1,NULL,0),(100167,1710,17,'Coöperatie met uitgesloten aansprakelijkheid (UA)',0,1,NULL,0),(100168,1711,17,'Coöperatie met wettelijke aansprakelijkheid (WA)',0,1,NULL,0),(100169,1712,17,'Onderlinge waarborgmaatschappij',0,1,NULL,0),(100170,401,4,'Empresario Individual',0,1,NULL,0),(100171,402,4,'Comunidad de Bienes',0,1,NULL,0),(100172,403,4,'Sociedad Civil',0,1,NULL,0),(100173,404,4,'Sociedad Colectiva',0,1,NULL,0),(100174,405,4,'Sociedad Limitada',0,1,NULL,0),(100175,406,4,'Sociedad Anónima',0,1,NULL,0),(100176,407,4,'Sociedad Comanditaria por Acciones',0,1,NULL,0),(100177,408,4,'Sociedad Comanditaria Simple',0,1,NULL,0),(100178,409,4,'Sociedad Laboral',0,1,NULL,0),(100179,410,4,'Sociedad Cooperativa',0,1,NULL,0),(100180,411,4,'Sociedad de Garantía Recíproca',0,1,NULL,0),(100181,412,4,'Entidad de Capital-Riesgo',0,1,NULL,0),(100182,413,4,'Agrupación de Interés Económico',0,1,NULL,0),(100183,414,4,'Sociedad de Inversión Mobiliaria',0,1,NULL,0),(100184,415,4,'Agrupación sin Ánimo de Lucro',0,1,NULL,0),(100185,15201,152,'Mauritius Private Company Limited By Shares',0,1,NULL,0),(100186,15202,152,'Mauritius Company Limited By Guarantee',0,1,NULL,0),(100187,15203,152,'Mauritius Public Company Limited By Shares',0,1,NULL,0),(100188,15204,152,'Mauritius Foreign Company',0,1,NULL,0),(100189,15205,152,'Mauritius GBC1 (Offshore Company)',0,1,NULL,0),(100190,15206,152,'Mauritius GBC2 (International Company)',0,1,NULL,0),(100191,15207,152,'Mauritius General Partnership',0,1,NULL,0),(100192,15208,152,'Mauritius Limited Partnership',0,1,NULL,0),(100193,15209,152,'Mauritius Sole Proprietorship',0,1,NULL,0),(100194,15210,152,'Mauritius Trusts',0,1,NULL,0),(100195,15401,154,'Sociedad en nombre colectivo',0,1,NULL,0),(100196,15402,154,'Sociedad en comandita simple',0,1,NULL,0),(100197,15403,154,'Sociedad de responsabilidad limitada',0,1,NULL,0),(100198,15404,154,'Sociedad anónima',0,1,NULL,0),(100199,15405,154,'Sociedad en comandita por acciones',0,1,NULL,0),(100200,15406,154,'Sociedad cooperativa',0,1,NULL,0),(100201,4100,41,'GmbH - Gesellschaft mit beschränkter Haftung',0,1,NULL,0),(100202,4101,41,'GesmbH - Gesellschaft mit beschränkter Haftung',0,1,NULL,0),(100203,4102,41,'AG - Aktiengesellschaft',0,1,NULL,0),(100204,4103,41,'EWIV - Europäische wirtschaftliche Interessenvereinigung',0,1,NULL,0),(100205,4104,41,'KEG - Kommanditerwerbsgesellschaft',0,1,NULL,0),(100206,4105,41,'OEG - Offene Erwerbsgesellschaft',0,1,NULL,0),(100207,4106,41,'OHG - Offene Handelsgesellschaft',0,1,NULL,0),(100208,4107,41,'AG & Co KG - Kommanditgesellschaft',0,1,NULL,0),(100209,4108,41,'GmbH & Co KG - Kommanditgesellschaft',0,1,NULL,0),(100210,4109,41,'KG - Kommanditgesellschaft',0,1,NULL,0),(100211,4110,41,'OG - Offene Gesellschaft',0,1,NULL,0),(100212,4111,41,'GbR - Gesellschaft nach bürgerlichem Recht',0,1,NULL,0),(100213,4112,41,'GesbR - Gesellschaft nach bürgerlichem Recht',0,1,NULL,0),(100214,4113,41,'GesnbR - Gesellschaft nach bürgerlichem Recht',0,1,NULL,0),(100215,4114,41,'e.U. - eingetragener Einzelunternehmer',0,1,NULL,0),(100216,17801,178,'Empresa individual',0,1,NULL,0),(100217,17802,178,'Asociación General',0,1,NULL,0),(100218,17803,178,'Sociedad de Responsabilidad Limitada',0,1,NULL,0),(100219,17804,178,'Sociedad Civil',0,1,NULL,0),(100220,17805,178,'Sociedad Anónima',0,1,NULL,0),(100221,8001,80,'Aktieselvskab A/S',0,1,NULL,0),(100222,8002,80,'Anparts Selvskab ApS',0,1,NULL,0),(100223,8003,80,'Personlig ejet selvskab',0,1,NULL,0),(100224,8004,80,'Iværksætterselvskab IVS',0,1,NULL,0),(100225,8005,80,'Interessentskab I/S',0,1,NULL,0),(100226,8006,80,'Holdingselskab',0,1,NULL,0),(100227,8007,80,'Selskab Med Begrænset Hæftelse SMBA',0,1,NULL,0),(100228,8008,80,'Kommanditselskab K/S',0,1,NULL,0),(100229,8009,80,'SPE-selskab',0,1,NULL,0); +INSERT INTO `llx_c_forme_juridique` VALUES (100001,100001,1,'Etudiant',0,0,'cabinetmed',0),(100002,100002,1,'Retraité',0,0,'cabinetmed',0),(100003,100003,1,'Artisan',0,0,'cabinetmed',0),(100004,100004,1,'Femme de ménage',0,0,'cabinetmed',0),(100005,100005,1,'Professeur',0,0,'cabinetmed',0),(100006,100006,1,'Profession libérale',0,0,'cabinetmed',0),(100007,100007,1,'Informaticien',0,0,'cabinetmed',0),(100009,0,0,'-',0,1,NULL,0),(100010,2301,23,'Monotributista',0,1,NULL,0),(100011,2302,23,'Sociedad Civil',0,1,NULL,0),(100012,2303,23,'Sociedades Comerciales',0,1,NULL,0),(100013,2304,23,'Sociedades de Hecho',0,1,NULL,0),(100014,2305,23,'Sociedades Irregulares',0,1,NULL,0),(100015,2306,23,'Sociedad Colectiva',0,1,NULL,0),(100016,2307,23,'Sociedad en Comandita Simple',0,1,NULL,0),(100017,2308,23,'Sociedad de Capital e Industria',0,1,NULL,0),(100018,2309,23,'Sociedad Accidental o en participación',0,1,NULL,0),(100019,2310,23,'Sociedad de Responsabilidad Limitada',0,1,NULL,0),(100020,2311,23,'Sociedad Anónima',0,1,NULL,0),(100021,2312,23,'Sociedad Anónima con Participación Estatal Mayoritaria',0,1,NULL,0),(100022,2313,23,'Sociedad en Comandita por Acciones (arts. 315 a 324, LSC)',0,1,NULL,0),(100023,11,1,'Artisan Commerçant (EI)',0,1,NULL,0),(100024,12,1,'Commerçant (EI)',0,1,NULL,0),(100025,13,1,'Artisan (EI)',0,1,NULL,0),(100026,14,1,'Officier public ou ministériel',0,1,NULL,0),(100027,15,1,'Profession libérale (EI)',0,1,NULL,0),(100028,16,1,'Exploitant agricole',0,1,NULL,0),(100029,17,1,'Agent commercial',0,1,NULL,0),(100030,18,1,'Associé Gérant de société',0,1,NULL,0),(100031,19,1,'Personne physique',0,1,NULL,0),(100032,21,1,'Indivision',0,1,NULL,0),(100033,22,1,'Société créée de fait',0,1,NULL,0),(100034,23,1,'Société en participation',0,1,NULL,0),(100035,27,1,'Paroisse hors zone concordataire',0,1,NULL,0),(100036,29,1,'Groupement de droit privé non doté de la personnalité morale',0,1,NULL,0),(100037,31,1,'Personne morale de droit étranger, immatriculée au RCS',0,1,NULL,0),(100038,32,1,'Personne morale de droit étranger, non immatriculée au RCS',0,1,NULL,0),(100039,35,1,'Régime auto-entrepreneur',0,1,NULL,0),(100040,41,1,'Etablissement public ou régie à caractère industriel ou commercial',0,1,NULL,0),(100041,51,1,'Société coopérative commerciale particulière',0,1,NULL,0),(100042,52,1,'Société en nom collectif',0,1,NULL,0),(100043,53,1,'Société en commandite',0,1,NULL,0),(100044,54,1,'Société à responsabilité limitée (SARL)',0,1,NULL,0),(100045,55,1,'Société anonyme à conseil d administration',0,1,NULL,0),(100046,56,1,'Société anonyme à directoire',0,1,NULL,0),(100047,57,1,'Société par actions simplifiée (SAS)',0,1,NULL,0),(100048,58,1,'Entreprise Unipersonnelle à Responsabilité Limitée (EURL)',0,1,NULL,0),(100049,59,1,'Société par actions simplifiée unipersonnelle (SASU)',0,1,NULL,0),(100050,60,1,'Entreprise Individuelle à Responsabilité Limitée (EIRL)',0,1,NULL,0),(100051,61,1,'Caisse d\'épargne et de prévoyance',0,1,NULL,0),(100052,62,1,'Groupement d\'intérêt économique (GIE)',0,1,NULL,0),(100053,63,1,'Société coopérative agricole',0,1,NULL,0),(100054,64,1,'Société non commerciale d assurances',0,1,NULL,0),(100055,65,1,'Société civile',0,1,NULL,0),(100056,69,1,'Personnes de droit privé inscrites au RCS',0,1,NULL,0),(100057,71,1,'Administration de l état',0,1,NULL,0),(100058,72,1,'Collectivité territoriale',0,1,NULL,0),(100059,73,1,'Etablissement public administratif',0,1,NULL,0),(100060,74,1,'Personne morale de droit public administratif',0,1,NULL,0),(100061,81,1,'Organisme gérant régime de protection social à adhésion obligatoire',0,1,NULL,0),(100062,82,1,'Organisme mutualiste',0,1,NULL,0),(100063,83,1,'Comité d entreprise',0,1,NULL,0),(100064,84,1,'Organisme professionnel',0,1,NULL,0),(100065,85,1,'Organisme de retraite à adhésion non obligatoire',0,1,NULL,0),(100066,91,1,'Syndicat de propriétaires',0,1,NULL,0),(100067,92,1,'Association loi 1901 ou assimilé',0,1,NULL,0),(100068,93,1,'Fondation',0,1,NULL,0),(100069,99,1,'Personne morale de droit privé',0,1,NULL,0),(100070,200,2,'Indépendant',0,1,NULL,0),(100071,201,2,'SRL - Société à responsabilité limitée',0,1,NULL,0),(100072,202,2,'SA - Société Anonyme',0,1,NULL,0),(100073,203,2,'SCRL - Société coopérative à responsabilité limitée',0,1,NULL,0),(100074,204,2,'ASBL - Association sans but Lucratif',0,1,NULL,0),(100075,205,2,'SCRI - Société coopérative à responsabilité illimitée',0,1,NULL,0),(100076,206,2,'SCS - Société en commandite simple',0,1,NULL,0),(100077,207,2,'SCA - Société en commandite par action',0,1,NULL,0),(100078,208,2,'SNC - Société en nom collectif',0,1,NULL,0),(100079,209,2,'GIE - Groupement d intérêt économique',0,1,NULL,0),(100080,210,2,'GEIE - Groupement européen d intérêt économique',0,1,NULL,0),(100081,220,2,'Eenmanszaak',0,1,NULL,0),(100082,221,2,'BVBA - Besloten vennootschap met beperkte aansprakelijkheid',0,1,NULL,0),(100083,222,2,'NV - Naamloze Vennootschap',0,1,NULL,0),(100084,223,2,'CVBA - Coöperatieve vennootschap met beperkte aansprakelijkheid',0,1,NULL,0),(100085,224,2,'VZW - Vereniging zonder winstoogmerk',0,1,NULL,0),(100086,225,2,'CVOA - Coöperatieve vennootschap met onbeperkte aansprakelijkheid ',0,1,NULL,0),(100087,226,2,'GCV - Gewone commanditaire vennootschap',0,1,NULL,0),(100088,227,2,'Comm.VA - Commanditaire vennootschap op aandelen',0,1,NULL,0),(100089,228,2,'VOF - Vennootschap onder firma',0,1,NULL,0),(100090,229,2,'VS0 - Vennootschap met sociaal oogmerk',0,1,NULL,0),(100091,500,5,'GmbH - Gesellschaft mit beschränkter Haftung',0,1,NULL,0),(100092,501,5,'AG - Aktiengesellschaft ',0,1,NULL,0),(100093,502,5,'GmbH&Co. KG - Gesellschaft mit beschränkter Haftung & Compagnie Kommanditgesellschaft',0,1,NULL,0),(100094,503,5,'Gewerbe - Personengesellschaft',0,1,NULL,0),(100095,504,5,'UG - Unternehmergesellschaft -haftungsbeschränkt-',0,1,NULL,0),(100096,505,5,'GbR - Gesellschaft des bürgerlichen Rechts',0,1,NULL,0),(100097,506,5,'KG - Kommanditgesellschaft',0,1,NULL,0),(100098,507,5,'Ltd. - Limited Company',0,1,NULL,0),(100099,508,5,'OHG - Offene Handelsgesellschaft',0,1,NULL,0),(100100,10201,102,'Ατομική επιχείρηση',0,1,NULL,0),(100101,10202,102,'Εταιρική επιχείρηση',0,1,NULL,0),(100102,10203,102,'Ομόρρυθμη Εταιρεία Ο.Ε',0,1,NULL,0),(100103,10204,102,'Ετερόρρυθμη Εταιρεία Ε.Ε',0,1,NULL,0),(100104,10205,102,'Εταιρεία Περιορισμένης Ευθύνης Ε.Π.Ε',0,1,NULL,0),(100105,10206,102,'Ανώνυμη Εταιρεία Α.Ε',0,1,NULL,0),(100106,10207,102,'Ανώνυμη ναυτιλιακή εταιρεία Α.Ν.Ε',0,1,NULL,0),(100107,10208,102,'Συνεταιρισμός',0,1,NULL,0),(100108,10209,102,'Συμπλοιοκτησία',0,1,NULL,0),(100109,301,3,'Società semplice',0,1,NULL,0),(100110,302,3,'Società in nome collettivo s.n.c.',0,1,NULL,0),(100111,303,3,'Società in accomandita semplice s.a.s.',0,1,NULL,0),(100112,304,3,'Società per azioni s.p.a.',0,1,NULL,0),(100113,305,3,'Società a responsabilità limitata s.r.l.',0,1,NULL,0),(100114,306,3,'Società in accomandita per azioni s.a.p.a.',0,1,NULL,0),(100115,307,3,'Società cooperativa a r.l.',0,1,NULL,0),(100116,308,3,'Società consortile',0,1,NULL,0),(100117,309,3,'Società europea',0,1,NULL,0),(100118,310,3,'Società cooperativa europea',0,1,NULL,0),(100119,311,3,'Società unipersonale',0,1,NULL,0),(100120,312,3,'Società di professionisti',0,1,NULL,0),(100121,313,3,'Società di fatto',0,1,NULL,0),(100122,315,3,'Società apparente',0,1,NULL,0),(100123,316,3,'Impresa individuale ',0,1,NULL,0),(100124,317,3,'Impresa coniugale',0,1,NULL,0),(100125,318,3,'Impresa familiare',0,1,NULL,0),(100126,319,3,'Consorzio cooperativo',0,1,NULL,0),(100127,320,3,'Società cooperativa sociale',0,1,NULL,0),(100128,321,3,'Società cooperativa di consumo',0,1,NULL,0),(100129,322,3,'Società cooperativa agricola',0,1,NULL,0),(100130,323,3,'A.T.I. Associazione temporanea di imprese',0,1,NULL,0),(100131,324,3,'R.T.I. Raggruppamento temporaneo di imprese',0,1,NULL,0),(100132,325,3,'Studio associato',0,1,NULL,0),(100133,600,6,'Raison Individuelle',0,1,NULL,0),(100134,601,6,'Société Simple',0,1,NULL,0),(100135,602,6,'Société en nom collectif',0,1,NULL,0),(100136,603,6,'Société en commandite',0,1,NULL,0),(100137,604,6,'Société anonyme (SA)',0,1,NULL,0),(100138,605,6,'Société en commandite par actions',0,1,NULL,0),(100139,606,6,'Société à responsabilité limitée (SARL)',0,1,NULL,0),(100140,607,6,'Société coopérative',0,1,NULL,0),(100141,608,6,'Association',0,1,NULL,0),(100142,609,6,'Fondation',0,1,NULL,0),(100143,700,7,'Sole Trader',0,1,NULL,0),(100144,701,7,'Partnership',0,1,NULL,0),(100145,702,7,'Private Limited Company by shares (LTD)',0,1,NULL,0),(100146,703,7,'Public Limited Company',0,1,NULL,0),(100147,704,7,'Workers Cooperative',0,1,NULL,0),(100148,705,7,'Limited Liability Partnership',0,1,NULL,0),(100149,706,7,'Franchise',0,1,NULL,0),(100150,1000,10,'Société à responsabilité limitée (SARL)',0,1,NULL,0),(100151,1001,10,'Société en Nom Collectif (SNC)',0,1,NULL,0),(100152,1002,10,'Société en Commandite Simple (SCS)',0,1,NULL,0),(100153,1003,10,'société en participation',0,1,NULL,0),(100154,1004,10,'Société Anonyme (SA)',0,1,NULL,0),(100155,1005,10,'Société Unipersonnelle à Responsabilité Limitée (SUARL)',0,1,NULL,0),(100156,1006,10,'Groupement d\'intérêt économique (GEI)',0,1,NULL,0),(100157,1007,10,'Groupe de sociétés',0,1,NULL,0),(100158,1701,17,'Eenmanszaak',0,1,NULL,0),(100159,1702,17,'Maatschap',0,1,NULL,0),(100160,1703,17,'Vennootschap onder firma',0,1,NULL,0),(100161,1704,17,'Commanditaire vennootschap',0,1,NULL,0),(100162,1705,17,'Besloten vennootschap (BV)',0,1,NULL,0),(100163,1706,17,'Naamloze Vennootschap (NV)',0,1,NULL,0),(100164,1707,17,'Vereniging',0,1,NULL,0),(100165,1708,17,'Stichting',0,1,NULL,0),(100166,1709,17,'Coöperatie met beperkte aansprakelijkheid (BA)',0,1,NULL,0),(100167,1710,17,'Coöperatie met uitgesloten aansprakelijkheid (UA)',0,1,NULL,0),(100168,1711,17,'Coöperatie met wettelijke aansprakelijkheid (WA)',0,1,NULL,0),(100169,1712,17,'Onderlinge waarborgmaatschappij',0,1,NULL,0),(100170,401,4,'Empresario Individual',0,1,NULL,0),(100171,402,4,'Comunidad de Bienes',0,1,NULL,0),(100172,403,4,'Sociedad Civil',0,1,NULL,0),(100173,404,4,'Sociedad Colectiva',0,1,NULL,0),(100174,405,4,'Sociedad Limitada',0,1,NULL,0),(100175,406,4,'Sociedad Anónima',0,1,NULL,0),(100176,407,4,'Sociedad Comanditaria por Acciones',0,1,NULL,0),(100177,408,4,'Sociedad Comanditaria Simple',0,1,NULL,0),(100178,409,4,'Sociedad Laboral',0,1,NULL,0),(100179,410,4,'Sociedad Cooperativa',0,1,NULL,0),(100180,411,4,'Sociedad de Garantía Recíproca',0,1,NULL,0),(100181,412,4,'Entidad de Capital-Riesgo',0,1,NULL,0),(100182,413,4,'Agrupación de Interés Económico',0,1,NULL,0),(100183,414,4,'Sociedad de Inversión Mobiliaria',0,1,NULL,0),(100184,415,4,'Agrupación sin Ánimo de Lucro',0,1,NULL,0),(100185,15201,152,'Mauritius Private Company Limited By Shares',0,1,NULL,0),(100186,15202,152,'Mauritius Company Limited By Guarantee',0,1,NULL,0),(100187,15203,152,'Mauritius Public Company Limited By Shares',0,1,NULL,0),(100188,15204,152,'Mauritius Foreign Company',0,1,NULL,0),(100189,15205,152,'Mauritius GBC1 (Offshore Company)',0,1,NULL,0),(100190,15206,152,'Mauritius GBC2 (International Company)',0,1,NULL,0),(100191,15207,152,'Mauritius General Partnership',0,1,NULL,0),(100192,15208,152,'Mauritius Limited Partnership',0,1,NULL,0),(100193,15209,152,'Mauritius Sole Proprietorship',0,1,NULL,0),(100194,15210,152,'Mauritius Trusts',0,1,NULL,0),(100195,15401,154,'Sociedad en nombre colectivo',0,1,NULL,0),(100196,15402,154,'Sociedad en comandita simple',0,1,NULL,0),(100197,15403,154,'Sociedad de responsabilidad limitada',0,1,NULL,0),(100198,15404,154,'Sociedad anónima',0,1,NULL,0),(100199,15405,154,'Sociedad en comandita por acciones',0,1,NULL,0),(100200,15406,154,'Sociedad cooperativa',0,1,NULL,0),(100201,4100,41,'GmbH - Gesellschaft mit beschränkter Haftung',0,1,NULL,0),(100202,4101,41,'GesmbH - Gesellschaft mit beschränkter Haftung',0,1,NULL,0),(100203,4102,41,'AG - Aktiengesellschaft',0,1,NULL,0),(100204,4103,41,'EWIV - Europäische wirtschaftliche Interessenvereinigung',0,1,NULL,0),(100205,4104,41,'KEG - Kommanditerwerbsgesellschaft',0,1,NULL,0),(100206,4105,41,'OEG - Offene Erwerbsgesellschaft',0,1,NULL,0),(100207,4106,41,'OHG - Offene Handelsgesellschaft',0,1,NULL,0),(100208,4107,41,'AG & Co KG - Kommanditgesellschaft',0,1,NULL,0),(100209,4108,41,'GmbH & Co KG - Kommanditgesellschaft',0,1,NULL,0),(100210,4109,41,'KG - Kommanditgesellschaft',0,1,NULL,0),(100211,4110,41,'OG - Offene Gesellschaft',0,1,NULL,0),(100212,4111,41,'GbR - Gesellschaft nach bürgerlichem Recht',0,1,NULL,0),(100213,4112,41,'GesbR - Gesellschaft nach bürgerlichem Recht',0,1,NULL,0),(100214,4113,41,'GesnbR - Gesellschaft nach bürgerlichem Recht',0,1,NULL,0),(100215,4114,41,'e.U. - eingetragener Einzelunternehmer',0,1,NULL,0),(100216,17801,178,'Empresa individual',0,1,NULL,0),(100217,17802,178,'Asociación General',0,1,NULL,0),(100218,17803,178,'Sociedad de Responsabilidad Limitada',0,1,NULL,0),(100219,17804,178,'Sociedad Civil',0,1,NULL,0),(100220,17805,178,'Sociedad Anónima',0,1,NULL,0),(100221,8001,80,'Aktieselvskab A/S',0,1,NULL,0),(100222,8002,80,'Anparts Selvskab ApS',0,1,NULL,0),(100223,8003,80,'Personlig ejet selvskab',0,1,NULL,0),(100224,8004,80,'Iværksætterselvskab IVS',0,1,NULL,0),(100225,8005,80,'Interessentskab I/S',0,1,NULL,0),(100226,8006,80,'Holdingselskab',0,1,NULL,0),(100227,8007,80,'Selskab Med Begrænset Hæftelse SMBA',0,1,NULL,0),(100228,8008,80,'Kommanditselskab K/S',0,1,NULL,0),(100229,8009,80,'SPE-selskab',0,1,NULL,0); /*!40000 ALTER TABLE `llx_c_forme_juridique` ENABLE KEYS */; UNLOCK TABLES; @@ -2001,9 +2002,9 @@ CREATE TABLE `llx_c_holiday_types` ( `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `affect` int(11) NOT NULL, `delay` int(11) NOT NULL, - `newByMonth` double(8,5) NOT NULL DEFAULT '0.00000', + `newByMonth` double(8,5) NOT NULL DEFAULT 0.00000, `fk_country` int(11) DEFAULT NULL, - `active` int(11) DEFAULT '1', + `active` int(11) DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_holiday_types` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2028,10 +2029,10 @@ DROP TABLE IF EXISTS `llx_c_hrm_department`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_hrm_department` ( `rowid` int(11) NOT NULL, - `pos` tinyint(4) NOT NULL DEFAULT '0', + `pos` tinyint(4) NOT NULL DEFAULT 0, `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2055,11 +2056,11 @@ DROP TABLE IF EXISTS `llx_c_hrm_function`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_hrm_function` ( `rowid` int(11) NOT NULL, - `pos` tinyint(4) NOT NULL DEFAULT '0', + `pos` tinyint(4) NOT NULL DEFAULT 0, `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `c_level` tinyint(4) NOT NULL DEFAULT '0', - `active` tinyint(4) NOT NULL DEFAULT '1', + `c_level` tinyint(4) NOT NULL DEFAULT 0, + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2083,14 +2084,14 @@ DROP TABLE IF EXISTS `llx_c_hrm_public_holiday`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_hrm_public_holiday` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '0', + `entity` int(11) NOT NULL DEFAULT 0, `fk_country` int(11) DEFAULT NULL, `code` varchar(62) COLLATE utf8_unicode_ci DEFAULT NULL, `dayrule` varchar(64) COLLATE utf8_unicode_ci DEFAULT '', `day` int(11) DEFAULT NULL, `month` int(11) DEFAULT NULL, `year` int(11) DEFAULT NULL, - `active` int(11) DEFAULT '1', + `active` int(11) DEFAULT 1, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_hrm_public_holiday` (`entity`,`code`), @@ -2119,7 +2120,7 @@ CREATE TABLE `llx_c_incoterms` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(3) COLLATE utf8_unicode_ci NOT NULL, `libelle` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_incoterms` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2146,7 +2147,7 @@ CREATE TABLE `llx_c_input_method` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `libelle` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_methode_commande_fournisseur` (`code`), @@ -2175,7 +2176,7 @@ CREATE TABLE `llx_c_input_reason` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(60) COLLATE utf8_unicode_ci NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_input_reason` (`code`) @@ -2192,6 +2193,34 @@ INSERT INTO `llx_c_input_reason` VALUES (1,'SRC_INTE','Web site',1,NULL),(2,'SRC /*!40000 ALTER TABLE `llx_c_input_reason` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_c_justificative_type` +-- + +DROP TABLE IF EXISTS `llx_c_justificative_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_justificative_type` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(24) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT 1, + `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_c_justificative_type` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_justificative_type` +-- + +LOCK TABLES `llx_c_justificative_type` WRITE; +/*!40000 ALTER TABLE `llx_c_justificative_type` DISABLE KEYS */; +INSERT INTO `llx_c_justificative_type` VALUES (1,'TRAINSUBSCRIPTION','Train subscrption-',1,NULL),(2,'HIGHWAYSUBSCRIPTION','Highway subscription',1,NULL); +/*!40000 ALTER TABLE `llx_c_justificative_type` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_c_lead_status` -- @@ -2205,7 +2234,7 @@ CREATE TABLE `llx_c_lead_status` ( `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) DEFAULT NULL, `percent` double(5,2) DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_lead_status_code` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2232,7 +2261,7 @@ CREATE TABLE `llx_c_lead_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `code` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2259,7 +2288,7 @@ CREATE TABLE `llx_c_methode_commande_fournisseur` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `libelle` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_methode_commande_fournisseur` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2284,14 +2313,14 @@ DROP TABLE IF EXISTS `llx_c_paiement`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_paiement` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `code` varchar(6) COLLATE utf8_unicode_ci NOT NULL, `libelle` varchar(62) COLLATE utf8_unicode_ci DEFAULT NULL, `type` smallint(6) DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) NOT NULL DEFAULT '0', + `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_paiement_code` (`entity`,`code`) ) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2316,14 +2345,14 @@ DROP TABLE IF EXISTS `llx_c_paiement_temp`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_paiement_temp` ( `id` int(11) NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `code` varchar(6) COLLATE utf8_unicode_ci NOT NULL, `libelle` varchar(62) COLLATE utf8_unicode_ci DEFAULT NULL, `type` smallint(6) DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) NOT NULL DEFAULT '0' + `position` int(11) NOT NULL DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2348,10 +2377,10 @@ CREATE TABLE `llx_c_paper_format` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(50) COLLATE utf8_unicode_ci NOT NULL, - `width` float(6,2) DEFAULT '0.00', - `height` float(6,2) DEFAULT '0.00', + `width` float(6,2) DEFAULT 0.00, + `height` float(6,2) DEFAULT 0.00, `unit` varchar(5) COLLATE utf8_unicode_ci NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=226 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2376,17 +2405,17 @@ DROP TABLE IF EXISTS `llx_c_payment_term`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_payment_term` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `code` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `sortorder` smallint(6) DEFAULT NULL, - `active` tinyint(4) DEFAULT '1', + `active` tinyint(4) DEFAULT 1, `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `libelle_facture` text COLLATE utf8_unicode_ci, + `libelle_facture` text COLLATE utf8_unicode_ci DEFAULT NULL, `type_cdr` tinyint(4) DEFAULT NULL, `nbjour` smallint(6) DEFAULT NULL, `decalage` smallint(6) DEFAULT NULL, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) NOT NULL DEFAULT '0', + `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_payment_term_code` (`entity`,`code`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2436,8 +2465,8 @@ DROP TABLE IF EXISTS `llx_c_price_global_variable`; CREATE TABLE `llx_c_price_global_variable` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(20) COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci, - `value` double(24,8) DEFAULT '0.00000000', + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `value` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2461,12 +2490,12 @@ DROP TABLE IF EXISTS `llx_c_price_global_variable_updater`; CREATE TABLE `llx_c_price_global_variable_updater` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `type` int(11) NOT NULL, - `description` text COLLATE utf8_unicode_ci, - `parameters` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `parameters` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_variable` int(11) NOT NULL, - `update_interval` int(11) DEFAULT '0', - `next_update` int(11) DEFAULT '0', - `last_status` text COLLATE utf8_unicode_ci, + `update_interval` int(11) DEFAULT 0, + `next_update` int(11) DEFAULT 0, + `last_status` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2491,7 +2520,7 @@ CREATE TABLE `llx_c_propalst` ( `id` smallint(6) NOT NULL, `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_propalst` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2518,7 +2547,7 @@ CREATE TABLE `llx_c_prospectlevel` ( `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `sortorder` smallint(6) DEFAULT NULL, - `active` smallint(6) NOT NULL DEFAULT '1', + `active` smallint(6) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2548,12 +2577,12 @@ CREATE TABLE `llx_c_regions` ( `cheflieu` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `tncc` int(11) DEFAULT NULL, `nom` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `code_region` (`code_region`), UNIQUE KEY `uk_code_region` (`code_region`), KEY `idx_c_regions_fk_pays` (`fk_pays`) -) ENGINE=InnoDB AUTO_INCREMENT=23347 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=23354 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2562,7 +2591,7 @@ CREATE TABLE `llx_c_regions` ( LOCK TABLES `llx_c_regions` WRITE; /*!40000 ALTER TABLE `llx_c_regions` DISABLE KEYS */; -INSERT INTO `llx_c_regions` VALUES (1,0,0,'0',0,'-',1),(101,1,1,'97105',3,'Guadeloupe',1),(102,2,1,'97209',3,'Martinique',1),(103,3,1,'97302',3,'Guyane',1),(104,4,1,'97411',3,'Réunion',1),(105,11,1,'75056',1,'Île-de-France',1),(106,21,1,'51108',0,'Champagne-Ardenne',1),(107,22,1,'80021',0,'Picardie',1),(108,23,1,'76540',0,'Haute-Normandie',1),(109,24,1,'45234',2,'Centre',1),(110,25,1,'14118',0,'Basse-Normandie',1),(111,26,1,'21231',0,'Bourgogne',1),(112,31,1,'59350',2,'Nord-Pas-de-Calais',1),(113,41,1,'57463',0,'Lorraine',1),(114,42,1,'67482',1,'Alsace',1),(115,43,1,'25056',0,'Franche-Comté',1),(116,52,1,'44109',4,'Pays de la Loire',1),(117,53,1,'35238',0,'Bretagne',1),(118,54,1,'86194',2,'Poitou-Charentes',1),(119,72,1,'33063',1,'Aquitaine',1),(120,73,1,'31555',0,'Midi-Pyrénées',1),(121,74,1,'87085',2,'Limousin',1),(122,82,1,'69123',2,'Rhône-Alpes',1),(123,83,1,'63113',1,'Auvergne',1),(124,91,1,'34172',2,'Languedoc-Roussillon',1),(125,93,1,'13055',0,'Provence-Alpes-Côte d\'Azur',1),(126,94,1,'2A004',0,'Corse',1),(201,201,2,'',1,'Flandre',1),(202,202,2,'',2,'Wallonie',1),(203,203,2,'',3,'Bruxelles-Capitale',1),(301,301,3,NULL,1,'Abruzzo',1),(302,302,3,NULL,1,'Basilicata',1),(303,303,3,NULL,1,'Calabria',1),(304,304,3,NULL,1,'Campania',1),(305,305,3,NULL,1,'Emilia-Romagna',1),(306,306,3,NULL,1,'Friuli-Venezia Giulia',1),(307,307,3,NULL,1,'Lazio',1),(308,308,3,NULL,1,'Liguria',1),(309,309,3,NULL,1,'Lombardia',1),(310,310,3,NULL,1,'Marche',1),(311,311,3,NULL,1,'Molise',1),(312,312,3,NULL,1,'Piemonte',1),(313,313,3,NULL,1,'Puglia',1),(314,314,3,NULL,1,'Sardegna',1),(315,315,3,NULL,1,'Sicilia',1),(316,316,3,NULL,1,'Toscana',1),(317,317,3,NULL,1,'Trentino-Alto Adige',1),(318,318,3,NULL,1,'Umbria',1),(319,319,3,NULL,1,'Valle d Aosta',1),(320,320,3,NULL,1,'Veneto',1),(401,401,4,'',0,'Andalucia',1),(402,402,4,'',0,'Aragón',1),(403,403,4,'',0,'Castilla y León',1),(404,404,4,'',0,'Castilla la Mancha',1),(405,405,4,'',0,'Canarias',1),(406,406,4,'',0,'Cataluña',1),(407,407,4,'',0,'Comunidad de Ceuta',1),(408,408,4,'',0,'Comunidad Foral de Navarra',1),(409,409,4,'',0,'Comunidad de Melilla',1),(410,410,4,'',0,'Cantabria',1),(411,411,4,'',0,'Comunidad Valenciana',1),(412,412,4,'',0,'Extemadura',1),(413,413,4,'',0,'Galicia',1),(414,414,4,'',0,'Islas Baleares',1),(415,415,4,'',0,'La Rioja',1),(416,416,4,'',0,'Comunidad de Madrid',1),(417,417,4,'',0,'Región de Murcia',1),(418,418,4,'',0,'Principado de Asturias',1),(419,419,4,'',0,'Pais Vasco',1),(601,601,6,'',1,'Cantons',1),(1001,1001,10,'',0,'Ariana',1),(1002,1002,10,'',0,'Béja',1),(1003,1003,10,'',0,'Ben Arous',1),(1004,1004,10,'',0,'Bizerte',1),(1005,1005,10,'',0,'Gabès',1),(1006,1006,10,'',0,'Gafsa',1),(1007,1007,10,'',0,'Jendouba',1),(1008,1008,10,'',0,'Kairouan',1),(1009,1009,10,'',0,'Kasserine',1),(1010,1010,10,'',0,'Kébili',1),(1011,1011,10,'',0,'La Manouba',1),(1012,1012,10,'',0,'Le Kef',1),(1013,1013,10,'',0,'Mahdia',1),(1014,1014,10,'',0,'Médenine',1),(1015,1015,10,'',0,'Monastir',1),(1016,1016,10,'',0,'Nabeul',1),(1017,1017,10,'',0,'Sfax',1),(1018,1018,10,'',0,'Sidi Bouzid',1),(1019,1019,10,'',0,'Siliana',1),(1020,1020,10,'',0,'Sousse',1),(1021,1021,10,'',0,'Tataouine',1),(1022,1022,10,'',0,'Tozeur',1),(1023,1023,10,'',0,'Tunis',1),(1024,1024,10,'',0,'Zaghouan',1),(1101,1101,11,'',0,'United-States',1),(1201,1201,12,'',0,'Tanger-Tétouan',1),(1202,1202,12,'',0,'Gharb-Chrarda-Beni Hssen',1),(1203,1203,12,'',0,'Taza-Al Hoceima-Taounate',1),(1204,1204,12,'',0,'L\'Oriental',1),(1205,1205,12,'',0,'Fès-Boulemane',1),(1206,1206,12,'',0,'Meknès-Tafialet',1),(1207,1207,12,'',0,'Rabat-Salé-Zemour-Zaër',1),(1208,1208,12,'',0,'Grand Cassablanca',1),(1209,1209,12,'',0,'Chaouia-Ouardigha',1),(1210,1210,12,'',0,'Doukahla-Adba',1),(1211,1211,12,'',0,'Marrakech-Tensift-Al Haouz',1),(1212,1212,12,'',0,'Tadla-Azilal',1),(1213,1213,12,'',0,'Sous-Massa-Drâa',1),(1214,1214,12,'',0,'Guelmim-Es Smara',1),(1215,1215,12,'',0,'Laâyoune-Boujdour-Sakia el Hamra',1),(1216,1216,12,'',0,'Oued Ed-Dahab Lagouira',1),(1301,1301,13,'',0,'Algerie',1),(2301,2301,23,'',0,'Norte',1),(2302,2302,23,'',0,'Litoral',1),(2303,2303,23,'',0,'Cuyana',1),(2304,2304,23,'',0,'Central',1),(2305,2305,23,'',0,'Patagonia',1),(2801,2801,28,'',0,'Australia',1),(4601,4601,46,'',0,'Barbados',1),(6701,6701,67,NULL,NULL,'Tarapacá',1),(6702,6702,67,NULL,NULL,'Antofagasta',1),(6703,6703,67,NULL,NULL,'Atacama',1),(6704,6704,67,NULL,NULL,'Coquimbo',1),(6705,6705,67,NULL,NULL,'Valparaíso',1),(6706,6706,67,NULL,NULL,'General Bernardo O Higgins',1),(6707,6707,67,NULL,NULL,'Maule',1),(6708,6708,67,NULL,NULL,'Biobío',1),(6709,6709,67,NULL,NULL,'Raucanía',1),(6710,6710,67,NULL,NULL,'Los Lagos',1),(6711,6711,67,NULL,NULL,'Aysén General Carlos Ibáñez del Campo',1),(6712,6712,67,NULL,NULL,'Magallanes y Antártica Chilena',1),(6713,6713,67,NULL,NULL,'Santiago',1),(6714,6714,67,NULL,NULL,'Los Ríos',1),(6715,6715,67,NULL,NULL,'Arica y Parinacota',1),(7001,7001,70,'',0,'Colombie',1),(8601,8601,86,NULL,NULL,'Central',1),(8602,8602,86,NULL,NULL,'Oriental',1),(8603,8603,86,NULL,NULL,'Occidental',1),(10201,10201,102,NULL,NULL,'??????',1),(10202,10202,102,NULL,NULL,'?????? ??????',1),(10203,10203,102,NULL,NULL,'???????? ?????????',1),(10204,10204,102,NULL,NULL,'?????',1),(10205,10205,102,NULL,NULL,'????????? ????????? ??? ?????',1),(10206,10206,102,NULL,NULL,'???????',1),(10207,10207,102,NULL,NULL,'????? ?????',1),(10208,10208,102,NULL,NULL,'?????? ??????',1),(10209,10209,102,NULL,NULL,'????????????',1),(10210,10210,102,NULL,NULL,'????? ??????',1),(10211,10211,102,NULL,NULL,'?????? ??????',1),(10212,10212,102,NULL,NULL,'????????',1),(10213,10213,102,NULL,NULL,'?????? ?????????',1),(11401,11401,114,'',0,'Honduras',1),(11701,11701,117,'',0,'India',1),(15201,15201,152,'',0,'Rivière Noire',1),(15202,15202,152,'',0,'Flacq',1),(15203,15203,152,'',0,'Grand Port',1),(15204,15204,152,'',0,'Moka',1),(15205,15205,152,'',0,'Pamplemousses',1),(15206,15206,152,'',0,'Plaines Wilhems',1),(15207,15207,152,'',0,'Port-Louis',1),(15208,15208,152,'',0,'Rivière du Rempart',1),(15209,15209,152,'',0,'Savanne',1),(15210,15210,152,'',0,'Rodrigues',1),(15211,15211,152,'',0,'Les îles Agaléga',1),(15212,15212,152,'',0,'Les écueils des Cargados Carajos',1),(15401,15401,154,'',0,'Mexique',1),(23201,23201,232,'',0,'Los Andes',1),(23202,23202,232,'',0,'Capital',1),(23203,23203,232,'',0,'Central',1),(23204,23204,232,'',0,'Cento Occidental',1),(23205,23205,232,'',0,'Guayana',1),(23206,23206,232,'',0,'Insular',1),(23207,23207,232,'',0,'Los Llanos',1),(23208,23208,232,'',0,'Nor-Oriental',1),(23209,23209,232,'',0,'Zuliana',1),(23215,6,1,'97601',3,'Mayotte',1),(23280,420,4,'',0,'Otros',1),(23281,501,5,'',0,'Deutschland',1),(23296,701,7,'',0,'England',1),(23297,702,7,'',0,'Wales',1),(23298,703,7,'',0,'Scotland',1),(23299,704,7,'',0,'Northern Ireland',1),(23325,1401,14,'',0,'Canada',1),(23326,1701,17,'',0,'Provincies van Nederland ',1),(23333,5601,56,'',0,'Brasil',1),(23334,5201,52,'',0,'Chuquisaca',1),(23335,5202,52,'',0,'La Paz',1),(23336,5203,52,'',0,'Cochabamba',1),(23337,5204,52,'',0,'Oruro',1),(23338,5205,52,'',0,'Potosí',1),(23339,5206,52,'',0,'Tarija',1),(23340,5207,52,'',0,'Santa Cruz',1),(23341,5208,52,'',0,'El Beni',1),(23342,5209,52,'',0,'Pando',1),(23343,4101,41,'',0,'Österreich',1),(23344,17801,178,'',0,'Panama',1),(23345,22701,227,'',0,'United Arab Emirates',1),(23346,11801,118,'',0,'Indonesia',1); +INSERT INTO `llx_c_regions` VALUES (1,0,0,'0',0,'-',1),(101,1,1,'97105',3,'Guadeloupe',1),(102,2,1,'97209',3,'Martinique',1),(103,3,1,'97302',3,'Guyane',1),(104,4,1,'97411',3,'Réunion',1),(105,11,1,'75056',1,'Île-de-France',1),(109,24,1,'45234',2,'Centre-Val de Loire',1),(116,52,1,'44109',4,'Pays de la Loire',1),(117,53,1,'35238',0,'Bretagne',1),(125,93,1,'13055',0,'Provence-Alpes-Côte d\'Azur',1),(126,94,1,'2A004',0,'Corse',1),(201,201,2,'',1,'Flandre',1),(202,202,2,'',2,'Wallonie',1),(203,203,2,'',3,'Bruxelles-Capitale',1),(301,301,3,NULL,1,'Abruzzo',1),(302,302,3,NULL,1,'Basilicata',1),(303,303,3,NULL,1,'Calabria',1),(304,304,3,NULL,1,'Campania',1),(305,305,3,NULL,1,'Emilia-Romagna',1),(306,306,3,NULL,1,'Friuli-Venezia Giulia',1),(307,307,3,NULL,1,'Lazio',1),(308,308,3,NULL,1,'Liguria',1),(309,309,3,NULL,1,'Lombardia',1),(310,310,3,NULL,1,'Marche',1),(311,311,3,NULL,1,'Molise',1),(312,312,3,NULL,1,'Piemonte',1),(313,313,3,NULL,1,'Puglia',1),(314,314,3,NULL,1,'Sardegna',1),(315,315,3,NULL,1,'Sicilia',1),(316,316,3,NULL,1,'Toscana',1),(317,317,3,NULL,1,'Trentino-Alto Adige',1),(318,318,3,NULL,1,'Umbria',1),(319,319,3,NULL,1,'Valle d Aosta',1),(320,320,3,NULL,1,'Veneto',1),(401,401,4,'',0,'Andalucia',1),(402,402,4,'',0,'Aragón',1),(403,403,4,'',0,'Castilla y León',1),(404,404,4,'',0,'Castilla la Mancha',1),(405,405,4,'',0,'Canarias',1),(406,406,4,'',0,'Cataluña',1),(407,407,4,'',0,'Comunidad de Ceuta',1),(408,408,4,'',0,'Comunidad Foral de Navarra',1),(409,409,4,'',0,'Comunidad de Melilla',1),(410,410,4,'',0,'Cantabria',1),(411,411,4,'',0,'Comunidad Valenciana',1),(412,412,4,'',0,'Extemadura',1),(413,413,4,'',0,'Galicia',1),(414,414,4,'',0,'Islas Baleares',1),(415,415,4,'',0,'La Rioja',1),(416,416,4,'',0,'Comunidad de Madrid',1),(417,417,4,'',0,'Región de Murcia',1),(418,418,4,'',0,'Principado de Asturias',1),(419,419,4,'',0,'Pais Vasco',1),(601,601,6,'',1,'Cantons',1),(1001,1001,10,'',0,'Ariana',1),(1002,1002,10,'',0,'Béja',1),(1003,1003,10,'',0,'Ben Arous',1),(1004,1004,10,'',0,'Bizerte',1),(1005,1005,10,'',0,'Gabès',1),(1006,1006,10,'',0,'Gafsa',1),(1007,1007,10,'',0,'Jendouba',1),(1008,1008,10,'',0,'Kairouan',1),(1009,1009,10,'',0,'Kasserine',1),(1010,1010,10,'',0,'Kébili',1),(1011,1011,10,'',0,'La Manouba',1),(1012,1012,10,'',0,'Le Kef',1),(1013,1013,10,'',0,'Mahdia',1),(1014,1014,10,'',0,'Médenine',1),(1015,1015,10,'',0,'Monastir',1),(1016,1016,10,'',0,'Nabeul',1),(1017,1017,10,'',0,'Sfax',1),(1018,1018,10,'',0,'Sidi Bouzid',1),(1019,1019,10,'',0,'Siliana',1),(1020,1020,10,'',0,'Sousse',1),(1021,1021,10,'',0,'Tataouine',1),(1022,1022,10,'',0,'Tozeur',1),(1023,1023,10,'',0,'Tunis',1),(1024,1024,10,'',0,'Zaghouan',1),(1101,1101,11,'',0,'United-States',1),(1201,1201,12,'',0,'Tanger-Tétouan',1),(1202,1202,12,'',0,'Gharb-Chrarda-Beni Hssen',1),(1203,1203,12,'',0,'Taza-Al Hoceima-Taounate',1),(1204,1204,12,'',0,'L\'Oriental',1),(1205,1205,12,'',0,'Fès-Boulemane',1),(1206,1206,12,'',0,'Meknès-Tafialet',1),(1207,1207,12,'',0,'Rabat-Salé-Zemour-Zaër',1),(1208,1208,12,'',0,'Grand Cassablanca',1),(1209,1209,12,'',0,'Chaouia-Ouardigha',1),(1210,1210,12,'',0,'Doukahla-Adba',1),(1211,1211,12,'',0,'Marrakech-Tensift-Al Haouz',1),(1212,1212,12,'',0,'Tadla-Azilal',1),(1213,1213,12,'',0,'Sous-Massa-Drâa',1),(1214,1214,12,'',0,'Guelmim-Es Smara',1),(1215,1215,12,'',0,'Laâyoune-Boujdour-Sakia el Hamra',1),(1216,1216,12,'',0,'Oued Ed-Dahab Lagouira',1),(1301,1301,13,'',0,'Algerie',1),(2301,2301,23,'',0,'Norte',1),(2302,2302,23,'',0,'Litoral',1),(2303,2303,23,'',0,'Cuyana',1),(2304,2304,23,'',0,'Central',1),(2305,2305,23,'',0,'Patagonia',1),(2801,2801,28,'',0,'Australia',1),(4601,4601,46,'',0,'Barbados',1),(6701,6701,67,NULL,NULL,'Tarapacá',1),(6702,6702,67,NULL,NULL,'Antofagasta',1),(6703,6703,67,NULL,NULL,'Atacama',1),(6704,6704,67,NULL,NULL,'Coquimbo',1),(6705,6705,67,NULL,NULL,'Valparaíso',1),(6706,6706,67,NULL,NULL,'General Bernardo O Higgins',1),(6707,6707,67,NULL,NULL,'Maule',1),(6708,6708,67,NULL,NULL,'Biobío',1),(6709,6709,67,NULL,NULL,'Raucanía',1),(6710,6710,67,NULL,NULL,'Los Lagos',1),(6711,6711,67,NULL,NULL,'Aysén General Carlos Ibáñez del Campo',1),(6712,6712,67,NULL,NULL,'Magallanes y Antártica Chilena',1),(6713,6713,67,NULL,NULL,'Santiago',1),(6714,6714,67,NULL,NULL,'Los Ríos',1),(6715,6715,67,NULL,NULL,'Arica y Parinacota',1),(7001,7001,70,'',0,'Colombie',1),(8601,8601,86,NULL,NULL,'Central',1),(8602,8602,86,NULL,NULL,'Oriental',1),(8603,8603,86,NULL,NULL,'Occidental',1),(10201,10201,102,NULL,NULL,'??????',1),(10202,10202,102,NULL,NULL,'?????? ??????',1),(10203,10203,102,NULL,NULL,'???????? ?????????',1),(10204,10204,102,NULL,NULL,'?????',1),(10205,10205,102,NULL,NULL,'????????? ????????? ??? ?????',1),(10206,10206,102,NULL,NULL,'???????',1),(10207,10207,102,NULL,NULL,'????? ?????',1),(10208,10208,102,NULL,NULL,'?????? ??????',1),(10209,10209,102,NULL,NULL,'????????????',1),(10210,10210,102,NULL,NULL,'????? ??????',1),(10211,10211,102,NULL,NULL,'?????? ??????',1),(10212,10212,102,NULL,NULL,'????????',1),(10213,10213,102,NULL,NULL,'?????? ?????????',1),(11401,11401,114,'',0,'Honduras',1),(11701,11701,117,'',0,'India',1),(15201,15201,152,'',0,'Rivière Noire',1),(15202,15202,152,'',0,'Flacq',1),(15203,15203,152,'',0,'Grand Port',1),(15204,15204,152,'',0,'Moka',1),(15205,15205,152,'',0,'Pamplemousses',1),(15206,15206,152,'',0,'Plaines Wilhems',1),(15207,15207,152,'',0,'Port-Louis',1),(15208,15208,152,'',0,'Rivière du Rempart',1),(15209,15209,152,'',0,'Savanne',1),(15210,15210,152,'',0,'Rodrigues',1),(15211,15211,152,'',0,'Les îles Agaléga',1),(15212,15212,152,'',0,'Les écueils des Cargados Carajos',1),(15401,15401,154,'',0,'Mexique',1),(23201,23201,232,'',0,'Los Andes',1),(23202,23202,232,'',0,'Capital',1),(23203,23203,232,'',0,'Central',1),(23204,23204,232,'',0,'Cento Occidental',1),(23205,23205,232,'',0,'Guayana',1),(23206,23206,232,'',0,'Insular',1),(23207,23207,232,'',0,'Los Llanos',1),(23208,23208,232,'',0,'Nor-Oriental',1),(23209,23209,232,'',0,'Zuliana',1),(23215,6,1,'97601',3,'Mayotte',1),(23280,420,4,'',0,'Otros',1),(23281,501,5,'',0,'Deutschland',1),(23296,701,7,'',0,'England',1),(23297,702,7,'',0,'Wales',1),(23298,703,7,'',0,'Scotland',1),(23299,704,7,'',0,'Northern Ireland',1),(23325,1401,14,'',0,'Canada',1),(23326,1701,17,'',0,'Provincies van Nederland ',1),(23333,5601,56,'',0,'Brasil',1),(23334,5201,52,'',0,'Chuquisaca',1),(23335,5202,52,'',0,'La Paz',1),(23336,5203,52,'',0,'Cochabamba',1),(23337,5204,52,'',0,'Oruro',1),(23338,5205,52,'',0,'Potosí',1),(23339,5206,52,'',0,'Tarija',1),(23340,5207,52,'',0,'Santa Cruz',1),(23341,5208,52,'',0,'El Beni',1),(23342,5209,52,'',0,'Pando',1),(23343,4101,41,'',0,'Österreich',1),(23344,17801,178,'',0,'Panama',1),(23345,22701,227,'',0,'United Arab Emirates',1),(23346,11801,118,'',0,'Indonesia',1),(23347,27,1,'21231',0,'Bourgogne-Franche-Comté',1),(23348,28,1,'76540',0,'Normandie',1),(23349,32,1,'59350',4,'Hauts-de-France',1),(23350,44,1,'67482',2,'Grand Est',1),(23351,75,1,'33063',0,'Nouvelle-Aquitaine',1),(23352,76,1,'31355',1,'Occitanie',1),(23353,84,1,'69123',1,'Auvergne-Rhône-Alpes',1); /*!40000 ALTER TABLE `llx_c_regions` ENABLE KEYS */; UNLOCK TABLES; @@ -2578,7 +2607,7 @@ CREATE TABLE `llx_c_revenuestamp` ( `fk_pays` int(11) NOT NULL, `taux` double NOT NULL, `note` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `accountancy_code_sell` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code_buy` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `revenuestamp_type` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'fixed', @@ -2605,14 +2634,14 @@ DROP TABLE IF EXISTS `llx_c_shipment_mode`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_shipment_mode` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `libelle` varchar(50) COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `tracking` varchar(256) COLLATE utf8_unicode_ci NOT NULL, - `active` tinyint(4) DEFAULT '0', + `active` tinyint(4) DEFAULT 0, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_shipment_mode` (`code`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2639,8 +2668,8 @@ CREATE TABLE `llx_c_shipment_package_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `label` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` int(11) NOT NULL DEFAULT '1', - `entity` int(11) NOT NULL DEFAULT '1', + `active` int(11) NOT NULL DEFAULT 1, + `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2663,12 +2692,12 @@ DROP TABLE IF EXISTS `llx_c_socialnetworks`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_socialnetworks` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `code` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL, - `url` text COLLATE utf8_unicode_ci, + `url` text COLLATE utf8_unicode_ci DEFAULT NULL, `icon` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_c_socialnetworks_code` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2695,7 +2724,7 @@ CREATE TABLE `llx_c_stcomm` ( `id` int(11) NOT NULL, `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `libelle` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `picto` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_stcomm` (`code`) @@ -2722,9 +2751,9 @@ DROP TABLE IF EXISTS `llx_c_subtotal_free_text`; CREATE TABLE `llx_c_subtotal_free_text` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `content` text COLLATE utf8_unicode_ci, - `active` tinyint(4) NOT NULL DEFAULT '1', - `entity` int(11) NOT NULL DEFAULT '1', + `content` text COLLATE utf8_unicode_ci DEFAULT NULL, + `active` tinyint(4) NOT NULL DEFAULT 1, + `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2747,12 +2776,12 @@ DROP TABLE IF EXISTS `llx_c_ticket_category`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_ticket_category` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) DEFAULT '1', + `entity` int(11) DEFAULT 1, `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `pos` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, - `active` int(11) DEFAULT '1', - `use_default` int(11) DEFAULT '1', + `active` int(11) DEFAULT 1, + `use_default` int(11) DEFAULT 1, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_code` (`code`,`entity`) @@ -2769,6 +2798,37 @@ INSERT INTO `llx_c_ticket_category` VALUES (1,1,'OTHER','10','Other',1,1,NULL); /*!40000 ALTER TABLE `llx_c_ticket_category` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_c_ticket_resolution` +-- + +DROP TABLE IF EXISTS `llx_c_ticket_resolution`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_c_ticket_resolution` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `entity` int(11) DEFAULT 1, + `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `pos` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, + `active` int(11) DEFAULT 1, + `use_default` int(11) DEFAULT 1, + `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_code` (`code`,`entity`) +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_c_ticket_resolution` +-- + +LOCK TABLES `llx_c_ticket_resolution` WRITE; +/*!40000 ALTER TABLE `llx_c_ticket_resolution` DISABLE KEYS */; +INSERT INTO `llx_c_ticket_resolution` VALUES (1,1,'SOLVED','10','Solved',1,0,NULL),(2,1,'CANCELED','50','Canceled',1,0,NULL),(3,1,'OTHER','90','Other',1,0,NULL); +/*!40000 ALTER TABLE `llx_c_ticket_resolution` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_c_ticket_severity` -- @@ -2778,13 +2838,13 @@ DROP TABLE IF EXISTS `llx_c_ticket_severity`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_ticket_severity` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) DEFAULT '1', + `entity` int(11) DEFAULT 1, `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `pos` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `color` varchar(10) COLLATE utf8_unicode_ci NOT NULL, - `active` int(11) DEFAULT '1', - `use_default` int(11) DEFAULT '1', + `active` int(11) DEFAULT 1, + `use_default` int(11) DEFAULT 1, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_code` (`code`,`entity`) @@ -2810,12 +2870,12 @@ DROP TABLE IF EXISTS `llx_c_ticket_type`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_ticket_type` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) DEFAULT '1', + `entity` int(11) DEFAULT 1, `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `pos` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, - `active` int(11) DEFAULT '1', - `use_default` int(11) DEFAULT '1', + `active` int(11) DEFAULT 1, + `use_default` int(11) DEFAULT 1, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_code` (`code`,`entity`) @@ -2848,9 +2908,9 @@ CREATE TABLE `llx_c_tva` ( `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `localtax2` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `recuperableonly` int(11) NOT NULL DEFAULT '0', + `recuperableonly` int(11) NOT NULL DEFAULT 0, `note` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `accountancy_code_sell` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code_buy` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -2881,9 +2941,9 @@ CREATE TABLE `llx_c_type_contact` ( `source` varchar(8) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'external', `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `libelle` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) NOT NULL DEFAULT '0', + `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_type_contact_id` (`element`,`source`,`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2909,9 +2969,9 @@ DROP TABLE IF EXISTS `llx_c_type_container`; CREATE TABLE `llx_c_type_container` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_type_container_id` (`code`,`entity`) @@ -2940,10 +3000,10 @@ CREATE TABLE `llx_c_type_fees` ( `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) NOT NULL DEFAULT '0', - `type` int(11) DEFAULT '0', + `position` int(11) NOT NULL DEFAULT 0, + `type` int(11) DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_type_fees` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2970,7 +3030,7 @@ CREATE TABLE `llx_c_type_resource` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_type_resource_id` (`label`,`code`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2998,9 +3058,9 @@ CREATE TABLE `llx_c_typent` ( `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `libelle` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_country` int(11) DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `module` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) NOT NULL DEFAULT '0', + `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `uk_c_typent` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -3028,7 +3088,7 @@ CREATE TABLE `llx_c_units` ( `code` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `short_label` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `scale` int(11) DEFAULT NULL, `unit_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -3042,7 +3102,7 @@ CREATE TABLE `llx_c_units` ( LOCK TABLES `llx_c_units` WRITE; /*!40000 ALTER TABLE `llx_c_units` DISABLE KEYS */; -INSERT INTO `llx_c_units` VALUES (1,'P','piece','p',1,NULL,NULL),(2,'SET','set','se',1,NULL,NULL),(3,'S','second','s',1,NULL,'time'),(4,'H','hour','h',1,NULL,'time'),(5,'D','day','d',1,NULL,'time'),(6,'KG','kilogram','kg',1,0,'weight'),(7,'G','gram','g',1,-3,'weight'),(8,'M','SizeUnitm','m',1,0,'size'),(9,'LM','linear meter','lm',0,0,'size'),(10,'M2','SurfaceUnitm2','m2',1,0,'surface'),(11,'M3','VolumeUnitm3','m3',1,0,'volume'),(12,'L','liter','l',0,-3,'volume'),(13,'T','WeightUnitton','T',1,3,'weight'),(16,'MG','WeightUnitmg','mg',1,-6,'weight'),(17,'OZ','WeightUnitounce','Oz',1,98,'weight'),(18,'LB','WeightUnitpound','lb',1,99,'weight'),(20,'DM','SizeUnitdm','dm',1,-1,'size'),(21,'CM','SizeUnitcm','cm',1,-2,'size'),(22,'MM','SizeUnitmm','mm',1,-3,'size'),(23,'FT','SizeUnitfoot','ft',1,98,'size'),(24,'IN','SizeUnitinch','in',1,99,'size'),(26,'DM2','SurfaceUnitdm2','dm2',1,-2,'surface'),(27,'CM2','SurfaceUnitcm2','cm2',1,-4,'surface'),(28,'MM2','SurfaceUnitmm2','mm2',1,-6,'surface'),(29,'FT2','SurfaceUnitfoot2','ft2',1,98,'surface'),(30,'IN2','SurfaceUnitinch2','in2',1,99,'surface'),(32,'DM3','VolumeUnitdm3','dm3',1,-3,'volume'),(33,'CM3','VolumeUnitcm3','cm3',1,-6,'volume'),(34,'MM3','VolumeUnitmm3','mm3',1,-9,'volume'),(35,'FT3','VolumeUnitfoot3','ft3',1,88,'volume'),(36,'IN3','VolumeUnitinch3','in3',1,89,'volume'),(37,'OZ3','VolumeUnitounce','Oz',1,97,'volume'),(39,'GAL','VolumeUnitgallon','gal',1,99,'volume'),(43,'MI','minute','i',1,60,'time'),(46,'W','week','w',1,604800,'time'),(47,'MO','month','m',1,2629800,'time'),(48,'Y','year','y',1,31557600,'time'); +INSERT INTO `llx_c_units` VALUES (1,'P','piece','p',1,NULL,NULL),(2,'SET','set','se',1,NULL,NULL),(3,'S','second','s',1,NULL,'time'),(4,'H','hour','h',1,3600,'time'),(5,'D','day','d',1,86400,'time'),(6,'KG','kilogram','kg',1,0,'weight'),(7,'G','gram','g',1,-3,'weight'),(8,'M','SizeUnitm','m',1,0,'size'),(9,'LM','linear meter','lm',0,0,'size'),(10,'M2','SurfaceUnitm2','m2',1,0,'surface'),(11,'M3','VolumeUnitm3','m3',1,0,'volume'),(12,'L','liter','l',0,-3,'volume'),(13,'T','WeightUnitton','T',1,3,'weight'),(16,'MG','WeightUnitmg','mg',1,-6,'weight'),(17,'OZ','WeightUnitounce','Oz',1,98,'weight'),(18,'LB','WeightUnitpound','lb',1,99,'weight'),(20,'DM','SizeUnitdm','dm',1,-1,'size'),(21,'CM','SizeUnitcm','cm',1,-2,'size'),(22,'MM','SizeUnitmm','mm',1,-3,'size'),(23,'FT','SizeUnitfoot','ft',1,98,'size'),(24,'IN','SizeUnitinch','in',1,99,'size'),(26,'DM2','SurfaceUnitdm2','dm2',1,-2,'surface'),(27,'CM2','SurfaceUnitcm2','cm2',1,-4,'surface'),(28,'MM2','SurfaceUnitmm2','mm2',1,-6,'surface'),(29,'FT2','SurfaceUnitfoot2','ft2',1,98,'surface'),(30,'IN2','SurfaceUnitinch2','in2',1,99,'surface'),(32,'DM3','VolumeUnitdm3','dm3',1,-3,'volume'),(33,'CM3','VolumeUnitcm3','cm3',1,-6,'volume'),(34,'MM3','VolumeUnitmm3','mm3',1,-9,'volume'),(35,'FT3','VolumeUnitfoot3','ft3',1,88,'volume'),(36,'IN3','VolumeUnitinch3','in3',1,89,'volume'),(37,'OZ3','VolumeUnitounce','Oz',1,97,'volume'),(39,'GAL','VolumeUnitgallon','gal',1,99,'volume'),(43,'MI','minute','i',1,60,'time'),(46,'W','week','w',1,604800,'time'),(47,'MO','month','m',1,2629800,'time'),(48,'Y','year','y',1,31557600,'time'); /*!40000 ALTER TABLE `llx_c_units` ENABLE KEYS */; UNLOCK TABLES; @@ -3057,10 +3117,10 @@ CREATE TABLE `llx_c_ziptown` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_county` int(11) DEFAULT NULL, - `fk_pays` int(11) NOT NULL DEFAULT '0', + `fk_pays` int(11) NOT NULL DEFAULT 0, `zip` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `town` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ziptown_fk_pays` (`zip`,`town`,`fk_pays`), KEY `idx_c_ziptown_fk_county` (`fk_county`), @@ -3094,7 +3154,7 @@ CREATE TABLE `llx_cabinetmed_c_banques` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(8) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `active` smallint(6) NOT NULL DEFAULT '1', + `active` smallint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -3119,8 +3179,8 @@ CREATE TABLE `llx_cabinetmed_c_examconclusion` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(8) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `position` int(11) DEFAULT '10', - `active` smallint(6) NOT NULL DEFAULT '1', + `position` int(11) DEFAULT 10, + `active` smallint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -3149,13 +3209,13 @@ CREATE TABLE `llx_cabinetmed_cons` ( `typepriseencharge` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, `motifconsprinc` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `diaglesprinc` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, - `motifconssec` text COLLATE utf8_unicode_ci, - `diaglessec` text COLLATE utf8_unicode_ci, - `hdm` text COLLATE utf8_unicode_ci, - `examenclinique` text COLLATE utf8_unicode_ci, - `examenprescrit` text COLLATE utf8_unicode_ci, - `traitementprescrit` text COLLATE utf8_unicode_ci, - `comment` text COLLATE utf8_unicode_ci, + `motifconssec` text COLLATE utf8_unicode_ci DEFAULT NULL, + `diaglessec` text COLLATE utf8_unicode_ci DEFAULT NULL, + `hdm` text COLLATE utf8_unicode_ci DEFAULT NULL, + `examenclinique` text COLLATE utf8_unicode_ci DEFAULT NULL, + `examenprescrit` text COLLATE utf8_unicode_ci DEFAULT NULL, + `traitementprescrit` text COLLATE utf8_unicode_ci DEFAULT NULL, + `comment` text COLLATE utf8_unicode_ci DEFAULT NULL, `typevisit` varchar(8) COLLATE utf8_unicode_ci NOT NULL, `infiltration` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `codageccam` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -3165,7 +3225,7 @@ CREATE TABLE `llx_cabinetmed_cons` ( `montant_tiers` double(24,8) DEFAULT NULL, `banque` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `date_c` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user` int(11) DEFAULT NULL, `fk_user_creation` int(11) DEFAULT NULL, `fk_user_m` int(11) DEFAULT NULL, @@ -3196,7 +3256,7 @@ DROP TABLE IF EXISTS `llx_cabinetmed_cons_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_cabinetmed_cons_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `aaa` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -3226,9 +3286,9 @@ CREATE TABLE `llx_cabinetmed_diaglec` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(8) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `active` smallint(6) NOT NULL DEFAULT '1', + `active` smallint(6) NOT NULL DEFAULT 1, `icd` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) DEFAULT '10', + `position` int(11) DEFAULT 10, `lang` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -3257,10 +3317,10 @@ CREATE TABLE `llx_cabinetmed_examaut` ( `fk_user` int(11) DEFAULT NULL, `dateexam` date NOT NULL, `examprinc` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, - `examsec` text COLLATE utf8_unicode_ci, + `examsec` text COLLATE utf8_unicode_ci DEFAULT NULL, `concprinc` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, - `concsec` text COLLATE utf8_unicode_ci, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `concsec` text COLLATE utf8_unicode_ci DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -3287,9 +3347,9 @@ CREATE TABLE `llx_cabinetmed_exambio` ( `fk_soc` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `dateexam` date NOT NULL, - `resultat` text COLLATE utf8_unicode_ci, - `conclusion` text COLLATE utf8_unicode_ci, - `comment` text COLLATE utf8_unicode_ci, + `resultat` text COLLATE utf8_unicode_ci DEFAULT NULL, + `conclusion` text COLLATE utf8_unicode_ci DEFAULT NULL, + `comment` text COLLATE utf8_unicode_ci DEFAULT NULL, `suivipr_ad` int(11) DEFAULT NULL, `suivipr_ag` int(11) DEFAULT NULL, `suivipr_vs` int(11) DEFAULT NULL, @@ -3303,7 +3363,7 @@ CREATE TABLE `llx_cabinetmed_exambio` ( `suivisa_rno` int(11) DEFAULT NULL, `suivisa_dma` int(11) DEFAULT NULL, `suivisa_basdai` double DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -3329,8 +3389,8 @@ CREATE TABLE `llx_cabinetmed_examenprescrit` ( `code` varchar(8) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `biorad` varchar(8) COLLATE utf8_unicode_ci NOT NULL, - `position` int(11) DEFAULT '10', - `active` smallint(6) NOT NULL DEFAULT '1', + `position` int(11) DEFAULT 10, + `active` smallint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -3356,8 +3416,8 @@ CREATE TABLE `llx_cabinetmed_motifcons` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(8) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `position` int(11) DEFAULT '10', - `active` smallint(6) NOT NULL DEFAULT '1', + `position` int(11) DEFAULT 10, + `active` smallint(6) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -3381,15 +3441,15 @@ DROP TABLE IF EXISTS `llx_cabinetmed_patient`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_cabinetmed_patient` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `note_antemed` text COLLATE utf8_unicode_ci, - `note_antechirgen` text COLLATE utf8_unicode_ci, - `note_antechirortho` text COLLATE utf8_unicode_ci, - `note_anterhum` text COLLATE utf8_unicode_ci, - `note_other` text COLLATE utf8_unicode_ci, - `note_traitclass` text COLLATE utf8_unicode_ci, - `note_traitallergie` text COLLATE utf8_unicode_ci, - `note_traitintol` text COLLATE utf8_unicode_ci, - `note_traitspec` text COLLATE utf8_unicode_ci, + `note_antemed` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_antechirgen` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_antechirortho` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_anterhum` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_other` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_traitclass` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_traitallergie` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_traitintol` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_traitspec` text COLLATE utf8_unicode_ci DEFAULT NULL, `alert_antemed` smallint(6) DEFAULT NULL, `alert_antechirgen` smallint(6) DEFAULT NULL, `alert_antechirortho` smallint(6) DEFAULT NULL, @@ -3424,15 +3484,15 @@ DROP TABLE IF EXISTS `llx_cabinetmed_societe`; CREATE TABLE `llx_cabinetmed_societe` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `nom` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_int` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `statut` smallint(6) DEFAULT '0', + `statut` smallint(6) DEFAULT 0, `parent` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `datea` datetime DEFAULT NULL, - `status` smallint(6) DEFAULT '1', + `status` smallint(6) DEFAULT 1, `code_client` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, `code_fournisseur` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, `code_compta` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -3440,16 +3500,16 @@ CREATE TABLE `llx_cabinetmed_societe` ( `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cp` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `ville` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_departement` int(11) DEFAULT '0', - `fk_pays` int(11) DEFAULT '0', + `fk_departement` int(11) DEFAULT 0, + `fk_pays` int(11) DEFAULT 0, `tel` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `fax` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_effectif` int(11) DEFAULT '0', - `fk_typent` int(11) DEFAULT '0', - `fk_forme_juridique` int(11) DEFAULT '0', - `fk_currency` int(11) DEFAULT '0', + `fk_effectif` int(11) DEFAULT 0, + `fk_typent` int(11) DEFAULT 0, + `fk_forme_juridique` int(11) DEFAULT 0, + `fk_currency` int(11) DEFAULT 0, `siren` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `siret` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `ape` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -3458,26 +3518,26 @@ CREATE TABLE `llx_cabinetmed_societe` ( `idprof6` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `tva_intra` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `capital` double DEFAULT NULL, - `fk_stcomm` int(11) NOT NULL DEFAULT '0', - `note` text COLLATE utf8_unicode_ci, + `fk_stcomm` int(11) NOT NULL DEFAULT 0, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `prefix_comm` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, - `client` smallint(6) DEFAULT '0', - `fournisseur` smallint(6) DEFAULT '0', + `client` smallint(6) DEFAULT 0, + `fournisseur` smallint(6) DEFAULT 0, `supplier_account` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_prospectlevel` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, - `customer_bad` smallint(6) DEFAULT '0', - `customer_rate` double DEFAULT '0', - `supplier_rate` double DEFAULT '0', + `customer_bad` smallint(6) DEFAULT 0, + `customer_rate` double DEFAULT 0, + `supplier_rate` double DEFAULT 0, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `remise_client` double DEFAULT '0', + `remise_client` double DEFAULT 0, `mode_reglement` smallint(6) DEFAULT NULL, `cond_reglement` smallint(6) DEFAULT NULL, - `tva_assuj` smallint(6) DEFAULT '1', - `localtax1_assuj` smallint(6) DEFAULT '0', - `localtax2_assuj` smallint(6) DEFAULT '0', + `tva_assuj` smallint(6) DEFAULT 1, + `localtax1_assuj` smallint(6) DEFAULT 0, + `localtax2_assuj` smallint(6) DEFAULT 0, `barcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_barcode_type` int(11) DEFAULT '0', + `fk_barcode_type` int(11) DEFAULT 0, `price_level` int(11) DEFAULT NULL, `default_lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `logo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -3505,16 +3565,16 @@ DROP TABLE IF EXISTS `llx_captureserver_captureserver`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_captureserver_captureserver` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `type` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `content` text COLLATE utf8_unicode_ci, + `content` text COLLATE utf8_unicode_ci DEFAULT NULL, `qty` int(11) DEFAULT NULL, `ip` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `comment` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -3544,21 +3604,25 @@ DROP TABLE IF EXISTS `llx_categorie`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_categorie` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_parent` int(11) NOT NULL DEFAULT '0', + `fk_parent` int(11) NOT NULL DEFAULT 0, `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `type` tinyint(4) NOT NULL DEFAULT '1', - `entity` int(11) NOT NULL DEFAULT '1', - `description` text COLLATE utf8_unicode_ci, + `type` int(11) NOT NULL DEFAULT 1, + `entity` int(11) NOT NULL DEFAULT 1, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, - `visible` tinyint(4) NOT NULL DEFAULT '1', + `visible` tinyint(4) NOT NULL DEFAULT 1, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `color` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `date_creation` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_categorie_ref` (`entity`,`fk_parent`,`label`,`type`), KEY `idx_categorie_type` (`type`), KEY `idx_categorie_label` (`label`) -) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3567,7 +3631,7 @@ CREATE TABLE `llx_categorie` ( LOCK TABLES `llx_categorie` WRITE; /*!40000 ALTER TABLE `llx_categorie` DISABLE KEYS */; -INSERT INTO `llx_categorie` VALUES (1,0,'Preferred Partners',1,1,'This category is used to tag suppliers that are Prefered Partners',NULL,0,NULL,'005fbf',NULL),(2,0,'MyCategory',1,1,'This is description of MyCategory for customer and prospects
',NULL,0,NULL,NULL,NULL),(3,7,'Hot products',1,1,'This is description of hot products
',NULL,0,NULL,NULL,NULL),(4,0,'Merchant',1,1,'Category dedicated to merchant third parties',NULL,0,NULL,'bf5f00',NULL),(5,7,'Bio Fairtrade',0,1,'',NULL,0,NULL,NULL,NULL),(6,7,'Bio AB',0,1,'',NULL,0,NULL,NULL,NULL),(7,9,'Bio',0,1,'This product is a BIO product',NULL,0,NULL,NULL,NULL),(8,7,'Bio Dynamic',0,1,'',NULL,0,NULL,NULL,NULL),(9,0,'High Quality Product',0,1,'Label dedicated for High quality products',NULL,0,NULL,'7f7f00',NULL),(10,0,'Reserved for VIP',0,1,'Product of thi category are reserved to VIP customers',NULL,0,NULL,'7f0000',NULL),(11,9,'ISO',0,1,'Product of this category has an ISO label',NULL,0,NULL,NULL,NULL),(12,0,'VIP',2,1,'',NULL,0,NULL,'bf5f00',NULL),(13,0,'Region North',2,1,'Customer of North Region',NULL,0,NULL,'7f007f',NULL),(14,0,'Regular customer',2,1,'',NULL,0,NULL,'5fbf00',NULL),(15,13,'Region North A',2,1,'',NULL,0,NULL,'bf00bf',NULL),(17,0,'MyTag1',4,1,'',NULL,0,NULL,NULL,NULL),(18,0,'Met during meeting',4,1,'',NULL,0,NULL,'ff7f00',NULL),(19,17,'MySubTag1',4,1,'',NULL,0,NULL,NULL,NULL),(20,13,'Region North B',2,1,'',NULL,0,NULL,'bf005f',NULL),(21,0,'Region South',2,1,'',NULL,0,NULL,NULL,NULL),(22,21,'Region South A',2,1,'',NULL,0,NULL,NULL,NULL),(23,21,'Region South B',2,1,'',NULL,0,NULL,NULL,NULL),(24,0,'Limited Edition',0,1,'This is a limited edition',NULL,0,NULL,'ff7f00',NULL),(25,0,'Imported products',0,1,'For product we have to import from another country',NULL,0,NULL,NULL,NULL),(26,28,'Friends',4,1,'Category of friends contact',NULL,0,NULL,'00bf00',NULL),(27,28,'Family',4,1,'Category of family contacts',NULL,0,NULL,'007f3f',NULL),(28,0,'Personal contacts',4,1,'For personal contacts',NULL,0,NULL,'007f3f',NULL),(29,0,'Online only merchant',1,1,'',NULL,0,NULL,'aaaaff',NULL),(30,0,'Important',6,1,'Tag for important project',NULL,0,NULL,'7f003f',''),(31,0,'POS Products',0,1,'All products available in store (POS)',NULL,0,NULL,'5f00bf',''),(32,31,'Fruits',0,1,'',NULL,0,NULL,'aa56ff',''),(33,31,'Vegetables',0,1,'',NULL,0,NULL,'aa56ff',''),(34,31,'Pies',0,1,'Categories for Pies available on POS',NULL,0,NULL,'aa56ff',NULL),(35,31,'Other',0,1,'',NULL,0,NULL,'aa56ff',NULL),(36,0,'VIP',3,1,'VIP member',NULL,0,NULL,'007f00',''),(37,0,'Board members',3,1,'',NULL,0,NULL,'bf00bf',''); +INSERT INTO `llx_categorie` VALUES (1,0,'Preferred Partners',1,1,'This category is used to tag suppliers that are Prefered Partners',NULL,0,NULL,'005fbf',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(2,0,'MyCategory',1,1,'This is description of MyCategory for customer and prospects
',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(3,7,'Hot products',1,1,'This is description of hot products
',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(4,0,'Merchant',1,1,'Category dedicated to merchant third parties',NULL,0,NULL,'bf5f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(5,7,'Bio Fairtrade',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(6,7,'Bio AB',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(7,9,'Bio',0,1,'This product is a BIO product',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(8,7,'Bio Dynamic',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(9,0,'High Quality Product',0,1,'Label dedicated for High quality products',NULL,0,NULL,'7f7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(10,0,'Reserved for VIP',0,1,'Product of thi category are reserved to VIP customers',NULL,0,NULL,'7f0000',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(11,9,'ISO',0,1,'Product of this category has an ISO label',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(12,0,'VIP',2,1,'',NULL,0,NULL,'bf5f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(13,0,'Region North',2,1,'Customer of North Region',NULL,0,NULL,'7f007f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(14,0,'Regular customer',2,1,'',NULL,0,NULL,'5fbf00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(15,13,'Region North A',2,1,'',NULL,0,NULL,'bf00bf',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(17,0,'MyTag1',4,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(18,0,'Met during meeting',4,1,'',NULL,0,NULL,'ff7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(19,17,'MySubTag1',4,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(20,13,'Region North B',2,1,'',NULL,0,NULL,'bf005f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(21,0,'Region South',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(22,21,'Region South A',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(23,21,'Region South B',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(24,0,'Limited Edition',0,1,'This is a limited edition',NULL,0,NULL,'ff7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(25,0,'Imported products',0,1,'For product we have to import from another country',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(26,28,'Friends',4,1,'Category of friends contact',NULL,0,NULL,'00bf00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(27,28,'Family',4,1,'Category of family contacts',NULL,0,NULL,'007f3f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(28,0,'Personal contacts',4,1,'For personal contacts',NULL,0,NULL,'007f3f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(29,0,'Online only merchant',1,1,'',NULL,0,NULL,'aaaaff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(30,0,'Important',6,1,'Tag for important project',NULL,0,NULL,'7f003f','',NULL,'2020-06-12 17:12:24',NULL,NULL),(31,0,'POS Products',0,1,'All products available in store (POS)',NULL,0,NULL,'5f00bf','',NULL,'2020-06-12 17:12:24',NULL,NULL),(32,31,'Fruits',0,1,'',NULL,0,NULL,'aa56ff','',NULL,'2020-06-12 17:12:24',NULL,NULL),(33,31,'Vegetables',0,1,'',NULL,0,NULL,'aa56ff','',NULL,'2020-06-12 17:12:24',NULL,NULL),(34,31,'Pies',0,1,'Categories for Pies available on POS',NULL,0,NULL,'aa56ff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(35,31,'Other',0,1,'',NULL,0,NULL,'aa56ff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(36,0,'VIP',3,1,'VIP member',NULL,0,NULL,'007f00','',NULL,'2020-06-12 17:12:24',NULL,NULL),(37,0,'Board members',3,1,'',NULL,0,NULL,'bf00bf','',NULL,'2020-06-12 17:12:24',NULL,NULL),(38,0,'Main center',9,1,'',NULL,0,NULL,'bf5f00',NULL,'2020-06-12 19:17:30','2020-06-12 17:17:30',12,NULL),(39,0,'Center B',9,1,'Center B',NULL,0,NULL,'ff7f00',NULL,'2020-06-12 19:17:55','2020-06-12 17:17:55',12,NULL); /*!40000 ALTER TABLE `llx_categorie` ENABLE KEYS */; UNLOCK TABLES; @@ -3599,6 +3663,34 @@ LOCK TABLES `llx_categorie_account` WRITE; /*!40000 ALTER TABLE `llx_categorie_account` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_categorie_actioncomm` +-- + +DROP TABLE IF EXISTS `llx_categorie_actioncomm`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_categorie_actioncomm` ( + `fk_categorie` int(11) NOT NULL, + `fk_actioncomm` int(11) NOT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`fk_categorie`,`fk_actioncomm`), + KEY `idx_categorie_actioncomm_fk_categorie` (`fk_categorie`), + KEY `idx_categorie_actioncomm_fk_actioncomm` (`fk_actioncomm`), + CONSTRAINT `fk_categorie_actioncomm_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), + CONSTRAINT `fk_categorie_actioncomm_fk_actioncomm` FOREIGN KEY (`fk_actioncomm`) REFERENCES `llx_actioncomm` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_categorie_actioncomm` +-- + +LOCK TABLES `llx_categorie_actioncomm` WRITE; +/*!40000 ALTER TABLE `llx_categorie_actioncomm` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_categorie_actioncomm` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_categorie_association` -- @@ -3691,10 +3783,10 @@ DROP TABLE IF EXISTS `llx_categorie_lang`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_categorie_lang` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_category` int(11) NOT NULL DEFAULT '0', + `fk_category` int(11) NOT NULL DEFAULT 0, `lang` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_category_lang` (`fk_category`,`lang`), CONSTRAINT `fk_category_lang_fk_category` FOREIGN KEY (`fk_category`) REFERENCES `llx_categorie` (`rowid`) @@ -3879,9 +3971,40 @@ CREATE TABLE `llx_categorie_warehouse` ( LOCK TABLES `llx_categorie_warehouse` WRITE; /*!40000 ALTER TABLE `llx_categorie_warehouse` DISABLE KEYS */; +INSERT INTO `llx_categorie_warehouse` VALUES (38,1,NULL),(38,2,NULL),(38,18,NULL),(38,19,NULL),(39,3,NULL),(39,20,NULL); /*!40000 ALTER TABLE `llx_categorie_warehouse` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_categorie_website_page` +-- + +DROP TABLE IF EXISTS `llx_categorie_website_page`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_categorie_website_page` ( + `fk_categorie` int(11) NOT NULL, + `fk_website_page` int(11) NOT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`fk_categorie`,`fk_website_page`), + KEY `idx_categorie_website_page_fk_categorie` (`fk_categorie`), + KEY `idx_categorie_website_page_fk_website_page` (`fk_website_page`), + CONSTRAINT `fk_categorie_website_page_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), + CONSTRAINT `fk_categorie_website_page_website_page_rowid` FOREIGN KEY (`fk_website_page`) REFERENCES `llx_website_page` (`rowid`), + CONSTRAINT `fk_categorie_websitepage_categorie_rowid` FOREIGN KEY (`fk_categorie`) REFERENCES `llx_categorie` (`rowid`), + CONSTRAINT `fk_categorie_websitepage_website_page_rowid` FOREIGN KEY (`fk_website_page`) REFERENCES `llx_website_page` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_categorie_website_page` +-- + +LOCK TABLES `llx_categorie_website_page` WRITE; +/*!40000 ALTER TABLE `llx_categorie_website_page` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_categorie_website_page` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_categories_extrafields` -- @@ -3891,7 +4014,7 @@ DROP TABLE IF EXISTS `llx_categories_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_categories_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -3919,14 +4042,14 @@ CREATE TABLE `llx_chargesociales` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `date_ech` datetime NOT NULL, `libelle` varchar(80) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_type` int(11) NOT NULL, `fk_account` int(11) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, - `paye` smallint(6) NOT NULL DEFAULT '0', + `paye` smallint(6) NOT NULL DEFAULT 0, `periode` date DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `date_creation` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -3958,11 +4081,11 @@ DROP TABLE IF EXISTS `llx_commande`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_commande` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_soc` int(11) NOT NULL, `fk_projet` int(11) DEFAULT NULL, `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_int` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_client` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -3975,20 +4098,20 @@ CREATE TABLE `llx_commande` ( `fk_user_valid` int(11) DEFAULT NULL, `fk_user_cloture` int(11) DEFAULT NULL, `source` smallint(6) DEFAULT NULL, - `fk_statut` smallint(6) DEFAULT '0', + `fk_statut` smallint(6) DEFAULT 0, `amount_ht` double(24,8) DEFAULT NULL, - `remise_percent` double DEFAULT '0', - `remise_absolue` double DEFAULT '0', - `remise` double DEFAULT '0', - `tva` double(24,8) DEFAULT '0.00000000', - `localtax1` double(24,8) DEFAULT '0.00000000', - `localtax2` double(24,8) DEFAULT '0.00000000', - `total_ht` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `remise_percent` double DEFAULT 0, + `remise_absolue` double DEFAULT 0, + `remise` double DEFAULT 0, + `tva` double(24,8) DEFAULT 0.00000000, + `localtax1` double(24,8) DEFAULT 0.00000000, + `localtax2` double(24,8) DEFAULT 0.00000000, + `total_ht` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `facture` tinyint(4) DEFAULT '0', + `facture` tinyint(4) DEFAULT 0, `fk_account` int(11) DEFAULT NULL, `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, @@ -4005,10 +4128,10 @@ CREATE TABLE `llx_commande` ( `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `module_source` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `pos_source` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -4035,7 +4158,7 @@ CREATE TABLE `llx_commande` ( LOCK TABLES `llx_commande` WRITE; /*!40000 ALTER TABLE `llx_commande` DISABLE KEYS */; -INSERT INTO `llx_commande` VALUES (1,'2018-07-30 15:13:20',1,NULL,'CO1107-0002',1,NULL,NULL,'','2013-07-20 15:23:12','2018-08-08 13:59:09',NULL,'2018-07-20',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,1,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,'2018-07-30 15:13:20',1,NULL,'CO1107-0003',1,NULL,NULL,'','2013-07-20 23:20:12','2018-02-12 17:06:51',NULL,'2018-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,'2018-07-30 15:13:20',1,NULL,'CO1107-0004',1,NULL,NULL,'','2013-07-20 23:22:53','2018-02-17 18:27:56',NULL,'2018-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,30.00000000,30.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(5,'2018-07-30 15:12:32',1,NULL,'CO1108-0001',1,NULL,NULL,'','2013-08-08 03:04:11','2017-08-08 03:04:21',NULL,'2017-08-08',1,NULL,1,NULL,NULL,2,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(6,'2019-09-27 16:04:37',19,NULL,'(PROV6)',1,NULL,NULL,'','2015-02-17 16:22:14',NULL,NULL,'2018-02-17',1,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV6)/(PROV6).pdf',NULL,NULL),(17,'2017-02-15 22:50:34',4,NULL,'CO7001-0005',1,NULL,NULL,NULL,'2017-02-15 23:50:34','2017-02-15 23:50:34',NULL,'2018-05-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,509.00000000,509.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,509.00000000,0.00000000,509.00000000,NULL,NULL,NULL),(18,'2017-02-15 23:08:58',7,4,'CO7001-0006',1,NULL,NULL,NULL,'2017-02-15 23:51:23','2017-02-15 23:51:23',NULL,'2017-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,900.00000000,900.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL,NULL,NULL),(20,'2017-02-15 23:09:04',4,NULL,'CO7001-0007',1,NULL,NULL,NULL,'2017-02-15 23:55:52','2017-02-15 23:55:52',NULL,'2018-04-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,330.00000000,330.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,330.00000000,0.00000000,330.00000000,NULL,NULL,NULL),(29,'2017-02-15 23:08:42',4,NULL,'CO7001-0008',1,NULL,NULL,NULL,'2017-02-16 00:03:44','2017-02-16 00:03:44',NULL,'2017-02-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,457.00000000,457.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,457.00000000,0.00000000,457.00000000,NULL,NULL,NULL),(34,'2017-02-15 23:08:47',11,NULL,'CO7001-0009',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2017-02-16 00:05:01',NULL,'2017-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,124.00000000,124.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,124.00000000,0.00000000,124.00000000,NULL,NULL,NULL),(38,'2017-02-15 23:08:50',3,NULL,'CO7001-0010',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2017-02-16 00:05:01',NULL,'2017-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL,NULL,NULL),(40,'2017-02-15 23:08:53',11,NULL,'CO7001-0011',1,NULL,NULL,NULL,'2017-02-16 00:05:10','2017-02-16 00:05:11',NULL,'2017-01-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1210.00000000,1210.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1210.00000000,0.00000000,1210.00000000,NULL,NULL,NULL),(43,'2017-02-15 23:05:11',10,NULL,'CO7001-0012',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2017-02-16 00:05:11',NULL,'2017-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,478.00000000,478.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,478.00000000,0.00000000,478.00000000,NULL,NULL,NULL),(47,'2017-02-15 23:09:10',1,NULL,'CO7001-0013',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2017-02-16 00:05:11',NULL,'2018-11-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,55.00000000,55.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,55.00000000,0.00000000,55.00000000,NULL,NULL,NULL),(48,'2017-02-15 23:09:07',4,NULL,'CO7001-0014',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2017-02-16 00:05:11',NULL,'2018-07-30',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,540.00000000,540.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,540.00000000,0.00000000,540.00000000,NULL,NULL,NULL),(50,'2017-02-15 23:05:26',1,NULL,'CO7001-0015',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2017-02-16 00:05:26',NULL,'2017-12-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,118.00000000,118.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,118.00000000,0.00000000,118.00000000,NULL,NULL,NULL),(54,'2019-12-20 16:48:45',12,NULL,'CO7001-0016',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2017-02-16 00:05:26','2017-02-16 03:05:56','2018-06-03',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,220.00000000,220.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,220.00000000,0.00000000,220.00000000,NULL,NULL,NULL),(58,'2017-02-15 23:09:13',1,NULL,'CO7001-0017',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2017-02-16 00:05:26',NULL,'2018-07-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,436.00000000,436.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,436.00000000,0.00000000,436.00000000,NULL,NULL,NULL),(62,'2019-12-20 16:48:55',19,NULL,'CO7001-0018',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2017-02-16 00:05:35','2019-12-20 20:48:55','2018-02-23',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL),(68,'2017-02-15 23:09:19',3,NULL,'CO7001-0019',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2017-02-16 00:05:35',NULL,'2018-05-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,45.00000000,45.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,45.00000000,0.00000000,45.00000000,NULL,NULL,NULL),(72,'2020-01-16 01:42:56',6,NULL,'CO7001-0020',1,NULL,NULL,NULL,'2017-02-16 00:05:36','2017-02-16 00:05:36','2020-01-16 02:42:56','2018-11-13',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,610.00000000,610.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,610.00000000,0.00000000,610.00000000,NULL,NULL,NULL),(75,'2017-02-16 00:14:20',4,NULL,'CO7001-0021',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2017-02-16 04:14:20',NULL,'2018-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,25.00000000,49.88000000,0.00000000,1200.00000000,1274.88000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,25.00000000,1274.88000000,NULL,NULL,NULL),(78,'2017-02-15 23:05:37',12,NULL,'CO7001-0022',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2017-02-16 00:05:37',NULL,'2018-10-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,928.00000000,928.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,928.00000000,0.00000000,928.00000000,NULL,NULL,NULL),(81,'2017-02-15 23:09:30',11,NULL,'CO7001-0023',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-07-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,725.00000000,725.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,725.00000000,0.00000000,725.00000000,NULL,NULL,NULL),(83,'2017-02-15 23:10:24',26,NULL,'CO7001-0024',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-04-03',12,NULL,12,NULL,1,-1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,105.00000000,105.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,105.00000000,0.00000000,105.00000000,NULL,NULL,NULL),(84,'2017-02-15 23:05:38',2,NULL,'CO7001-0025',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-06-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,510.00000000,510.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,510.00000000,0.00000000,510.00000000,NULL,NULL,NULL),(85,'2017-02-15 23:05:38',1,NULL,'CO7001-0026',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2017-02-16 00:05:38',NULL,'2018-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,47.00000000,47.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,47.00000000,0.00000000,47.00000000,NULL,NULL,NULL),(88,'2020-01-15 18:41:17',10,NULL,'CO7001-0027',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2019-12-20 20:42:42',NULL,'2019-12-23',12,12,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,'This is a private note','This is a public note','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,'commande/CO7001-0027/CO7001-0027.pdf',NULL,NULL),(90,'2017-02-16 00:46:31',19,NULL,'(PROV90)',1,NULL,NULL,NULL,'2017-02-16 04:46:31',NULL,NULL,'2017-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,440.00000000,440.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL,NULL,NULL),(91,'2017-02-16 00:46:37',1,NULL,'(PROV91)',1,NULL,NULL,NULL,'2017-02-16 04:46:37',NULL,NULL,'2017-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(92,'2017-02-16 00:47:25',3,NULL,'(PROV92)',1,NULL,NULL,NULL,'2017-02-16 04:47:25',NULL,NULL,'2017-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1018.00000000,1018.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL,NULL,NULL),(93,'2019-09-27 17:33:29',10,NULL,'(PROV93)',1,NULL,NULL,NULL,'2019-09-27 19:32:53',NULL,NULL,'2019-09-27',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV93)/(PROV93).pdf',NULL,NULL),(94,'2019-12-20 16:49:54',1,NULL,'(PROV94)',1,NULL,NULL,NULL,'2019-12-20 20:49:54',NULL,NULL,'2019-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(95,'2019-12-20 16:50:23',1,NULL,'(PROV95)',1,NULL,NULL,NULL,'2019-12-20 20:50:23',NULL,NULL,'2019-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(96,'2020-01-07 19:39:09',10,6,'(PROV96)',1,NULL,NULL,NULL,'2020-01-07 23:39:09',NULL,NULL,'2020-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(97,'2020-01-07 19:43:06',10,6,'(PROV97)',1,NULL,NULL,NULL,'2020-01-07 23:43:06',NULL,NULL,'2020-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(98,'2020-01-19 13:22:34',1,NULL,'(PROV98)',1,NULL,NULL,NULL,'2020-01-19 14:22:34',NULL,NULL,'2020-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.45000000,0.45000000,3.00000000,3.90000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,3.00000000,0.00000000,3.90000000,NULL,NULL,NULL),(99,'2020-01-19 13:24:27',1,NULL,'(PROV99)',1,NULL,NULL,NULL,'2020-01-19 14:24:27',NULL,NULL,'2020-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.24000000,0.00000000,0.00000000,4.00000000,4.24000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,NULL,NULL,NULL); +INSERT INTO `llx_commande` VALUES (1,'2020-06-12 17:12:08',1,NULL,'CO1107-0002',1,NULL,NULL,'','2013-07-20 15:23:12','2019-08-08 13:59:09',NULL,'2019-07-20',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,1,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,'2020-06-12 17:12:08',1,NULL,'CO1107-0003',1,NULL,NULL,'','2013-07-20 23:20:12','2020-02-12 17:06:51',NULL,'2019-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,'2020-06-12 17:12:08',1,NULL,'CO1107-0004',1,NULL,NULL,'','2013-07-20 23:22:53','2020-02-17 18:27:56',NULL,'2019-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,30.00000000,30.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(5,'2020-06-12 17:12:08',1,NULL,'CO1108-0001',1,NULL,NULL,'','2013-08-08 03:04:11','2019-08-08 03:04:21',NULL,'2019-08-08',1,NULL,1,NULL,NULL,2,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(6,'2020-06-12 17:12:08',19,NULL,'(PROV6)',1,NULL,NULL,'','2015-02-17 16:22:14',NULL,NULL,'2020-02-17',1,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV6)/(PROV6).pdf',NULL,NULL),(17,'2020-06-12 17:12:08',4,NULL,'CO7001-0005',1,NULL,NULL,NULL,'2017-02-15 23:50:34','2019-02-15 23:50:34',NULL,'2020-05-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,509.00000000,509.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,509.00000000,0.00000000,509.00000000,NULL,NULL,NULL),(18,'2020-06-12 17:12:08',7,4,'CO7001-0006',1,NULL,NULL,NULL,'2017-02-15 23:51:23','2020-02-15 23:51:23',NULL,'2020-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,900.00000000,900.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL,NULL,NULL),(20,'2020-06-12 17:12:08',4,NULL,'CO7001-0007',1,NULL,NULL,NULL,'2017-02-15 23:55:52','2019-02-15 23:55:52',NULL,'2020-04-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,330.00000000,330.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,330.00000000,0.00000000,330.00000000,NULL,NULL,NULL),(29,'2020-06-12 17:12:08',4,NULL,'CO7001-0008',1,NULL,NULL,NULL,'2017-02-16 00:03:44','2020-02-16 00:03:44',NULL,'2020-02-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,457.00000000,457.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,457.00000000,0.00000000,457.00000000,NULL,NULL,NULL),(34,'2020-06-12 17:12:08',11,NULL,'CO7001-0009',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2020-02-16 00:05:01',NULL,'2020-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,124.00000000,124.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,124.00000000,0.00000000,124.00000000,NULL,NULL,NULL),(38,'2020-06-12 17:12:08',3,NULL,'CO7001-0010',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2020-02-16 00:05:01',NULL,'2020-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL,NULL,NULL),(40,'2020-06-12 17:12:08',11,NULL,'CO7001-0011',1,NULL,NULL,NULL,'2017-02-16 00:05:10','2020-02-16 00:05:11',NULL,'2020-01-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1210.00000000,1210.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1210.00000000,0.00000000,1210.00000000,NULL,NULL,NULL),(43,'2020-06-12 17:12:08',10,NULL,'CO7001-0012',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2020-02-16 00:05:11',NULL,'2020-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,478.00000000,478.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,478.00000000,0.00000000,478.00000000,NULL,NULL,NULL),(47,'2020-06-12 17:12:08',1,NULL,'CO7001-0013',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2019-02-16 00:05:11',NULL,'2019-11-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,55.00000000,55.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,55.00000000,0.00000000,55.00000000,NULL,NULL,NULL),(48,'2020-06-12 17:12:08',4,NULL,'CO7001-0014',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2019-02-16 00:05:11',NULL,'2019-07-30',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,540.00000000,540.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,540.00000000,0.00000000,540.00000000,NULL,NULL,NULL),(50,'2020-06-12 17:12:08',1,NULL,'CO7001-0015',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2020-02-16 00:05:26',NULL,'2019-12-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,118.00000000,118.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,118.00000000,0.00000000,118.00000000,NULL,NULL,NULL),(54,'2020-06-12 17:12:08',12,NULL,'CO7001-0016',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2019-02-16 00:05:26','2019-02-16 03:05:56','2020-06-03',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,220.00000000,220.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,220.00000000,0.00000000,220.00000000,NULL,NULL,NULL),(58,'2020-06-12 17:12:08',1,NULL,'CO7001-0017',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2019-02-16 00:05:26',NULL,'2019-07-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,436.00000000,436.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,436.00000000,0.00000000,436.00000000,NULL,NULL,NULL),(62,'2020-06-12 17:12:08',19,NULL,'CO7001-0018',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2019-02-16 00:05:35','2020-12-20 20:48:55','2020-02-23',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL),(68,'2020-06-12 17:12:08',3,NULL,'CO7001-0019',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2019-02-16 00:05:35',NULL,'2020-05-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,45.00000000,45.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,45.00000000,0.00000000,45.00000000,NULL,NULL,NULL),(72,'2020-06-12 17:12:08',6,NULL,'CO7001-0020',1,NULL,NULL,NULL,'2017-02-16 00:05:36','2019-02-16 00:05:36','2021-01-16 02:42:56','2019-11-13',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,610.00000000,610.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,610.00000000,0.00000000,610.00000000,NULL,NULL,NULL),(75,'2020-06-12 17:12:08',4,NULL,'CO7001-0021',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2019-02-16 04:14:20',NULL,'2020-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,25.00000000,49.88000000,0.00000000,1200.00000000,1274.88000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,25.00000000,1274.88000000,NULL,NULL,NULL),(78,'2020-06-12 17:12:08',12,NULL,'CO7001-0022',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2019-02-16 00:05:37',NULL,'2019-10-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,928.00000000,928.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,928.00000000,0.00000000,928.00000000,NULL,NULL,NULL),(81,'2020-06-12 17:12:08',11,NULL,'CO7001-0023',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2019-02-16 00:05:38',NULL,'2019-07-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,725.00000000,725.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,725.00000000,0.00000000,725.00000000,NULL,NULL,NULL),(83,'2020-06-12 17:12:08',26,NULL,'CO7001-0024',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2019-02-16 00:05:38',NULL,'2020-04-03',12,NULL,12,NULL,1,-1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,105.00000000,105.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,105.00000000,0.00000000,105.00000000,NULL,NULL,NULL),(84,'2020-06-12 17:12:08',2,NULL,'CO7001-0025',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2019-02-16 00:05:38',NULL,'2019-06-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,510.00000000,510.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,510.00000000,0.00000000,510.00000000,NULL,NULL,NULL),(85,'2020-06-12 17:12:08',1,NULL,'CO7001-0026',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2019-02-16 00:05:38',NULL,'2020-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,47.00000000,47.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,47.00000000,0.00000000,47.00000000,NULL,NULL,NULL),(88,'2020-01-15 18:41:17',10,NULL,'CO7001-0027',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2019-12-20 20:42:42',NULL,'2019-12-23',12,12,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,'This is a private note','This is a public note','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,'commande/CO7001-0027/CO7001-0027.pdf',NULL,NULL),(90,'2020-06-12 17:12:08',19,NULL,'(PROV90)',1,NULL,NULL,NULL,'2017-02-16 04:46:31',NULL,NULL,'2020-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,440.00000000,440.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL,NULL,NULL),(91,'2020-06-12 17:12:08',1,NULL,'(PROV91)',1,NULL,NULL,NULL,'2017-02-16 04:46:37',NULL,NULL,'2020-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(92,'2020-06-12 17:12:08',3,NULL,'(PROV92)',1,NULL,NULL,NULL,'2017-02-16 04:47:25',NULL,NULL,'2020-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1018.00000000,1018.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL,NULL,NULL),(93,'2019-09-27 17:33:29',10,NULL,'(PROV93)',1,NULL,NULL,NULL,'2019-09-27 19:32:53',NULL,NULL,'2019-09-27',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV93)/(PROV93).pdf',NULL,NULL),(94,'2019-12-20 16:49:54',1,NULL,'(PROV94)',1,NULL,NULL,NULL,'2019-12-20 20:49:54',NULL,NULL,'2019-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(95,'2019-12-20 16:50:23',1,NULL,'(PROV95)',1,NULL,NULL,NULL,'2019-12-20 20:50:23',NULL,NULL,'2019-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(96,'2020-01-07 19:39:09',10,6,'(PROV96)',1,NULL,NULL,NULL,'2020-01-07 23:39:09',NULL,NULL,'2020-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(97,'2020-01-07 19:43:06',10,6,'(PROV97)',1,NULL,NULL,NULL,'2020-01-07 23:43:06',NULL,NULL,'2020-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(98,'2020-01-19 13:22:34',1,NULL,'(PROV98)',1,NULL,NULL,NULL,'2020-01-19 14:22:34',NULL,NULL,'2020-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.45000000,0.45000000,3.00000000,3.90000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,3.00000000,0.00000000,3.90000000,NULL,NULL,NULL),(99,'2020-01-19 13:24:27',1,NULL,'(PROV99)',1,NULL,NULL,NULL,'2020-01-19 14:24:27',NULL,NULL,'2020-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.24000000,0.00000000,0.00000000,4.00000000,4.24000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_commande` ENABLE KEYS */; UNLOCK TABLES; @@ -4048,7 +4171,7 @@ DROP TABLE IF EXISTS `llx_commande_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_commande_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `custom1` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -4075,13 +4198,13 @@ DROP TABLE IF EXISTS `llx_commande_fournisseur`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_commande_fournisseur` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_soc` int(11) NOT NULL, `ref` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_supplier` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_projet` int(11) DEFAULT '0', + `fk_projet` int(11) DEFAULT 0, `date_creation` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, `date_approve` datetime DEFAULT NULL, @@ -4093,22 +4216,22 @@ CREATE TABLE `llx_commande_fournisseur` ( `fk_user_approve` int(11) DEFAULT NULL, `fk_user_approve2` int(11) DEFAULT NULL, `source` smallint(6) NOT NULL, - `fk_statut` smallint(6) DEFAULT '0', - `billed` smallint(6) DEFAULT '0', + `fk_statut` smallint(6) DEFAULT 0, + `billed` smallint(6) DEFAULT 0, `amount_ht` double(24,8) DEFAULT NULL, - `remise_percent` double DEFAULT '0', - `remise` double DEFAULT '0', - `tva` double(24,8) DEFAULT '0.00000000', - `localtax1` double(24,8) DEFAULT '0.00000000', - `localtax2` double(24,8) DEFAULT '0.00000000', - `total_ht` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `remise_percent` double DEFAULT 0, + `remise` double DEFAULT 0, + `tva` double(24,8) DEFAULT 0.00000000, + `localtax1` double(24,8) DEFAULT 0.00000000, + `localtax2` double(24,8) DEFAULT 0.00000000, + `total_ht` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_input_method` int(11) DEFAULT '0', - `fk_cond_reglement` int(11) DEFAULT '0', - `fk_mode_reglement` int(11) DEFAULT '0', + `fk_input_method` int(11) DEFAULT 0, + `fk_cond_reglement` int(11) DEFAULT 0, + `fk_mode_reglement` int(11) DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_livraison` datetime DEFAULT NULL, @@ -4117,10 +4240,10 @@ CREATE TABLE `llx_commande_fournisseur` ( `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_commande_fournisseur_ref` (`ref`,`fk_soc`,`entity`), @@ -4136,7 +4259,7 @@ CREATE TABLE `llx_commande_fournisseur` ( LOCK TABLES `llx_commande_fournisseur` WRITE; /*!40000 ALTER TABLE `llx_commande_fournisseur` DISABLE KEYS */; -INSERT INTO `llx_commande_fournisseur` VALUES (1,'2019-12-20 16:47:02',13,'CF1007-0001',1,NULL,NULL,NULL,'2018-07-11 17:13:40','2017-02-01 18:51:42','2017-02-01 18:52:04',NULL,'2017-02-01',1,NULL,12,12,NULL,0,5,0,0.00000000,0,0,39.20000000,0.00000000,0.00000000,200.00000000,239.20000000,NULL,NULL,'muscadet',2,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,'2018-07-30 16:11:52',1,'CF1007-0002',1,NULL,NULL,NULL,'2018-07-11 18:46:28','2018-07-11 18:47:33',NULL,NULL,'2018-07-11',1,NULL,1,NULL,NULL,0,3,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,NULL,NULL,'muscadet',4,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,'2020-01-20 11:22:53',17,'(PROV3)',1,NULL,NULL,NULL,'2013-08-04 23:00:52',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,1079.17000000,1079.17000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',1.20000000,1295.00000000,0.00000000,1295.00000000,NULL),(4,'2020-01-20 11:19:49',17,'(PROV4)',1,NULL,NULL,NULL,'2013-08-04 23:19:32',NULL,NULL,NULL,NULL,1,12,NULL,NULL,NULL,0,0,0,0.00000000,0,0,11.88000000,0.00000000,0.00000000,174.17000000,186.05000000,'Private note','Public note','muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'EUR',1.00000000,174.17000000,11.88000000,186.05000000,NULL),(13,'2017-02-01 13:35:27',1,'CF1303-0004',1,NULL,NULL,NULL,'2018-03-09 19:39:18','2018-03-09 19:39:27','2018-03-09 19:39:32',NULL,'2018-03-09',1,NULL,1,1,NULL,0,2,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,NULL,NULL,'muscadet',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(14,'2020-01-20 11:20:11',1,'(PROV14)',1,NULL,'',NULL,'2020-01-20 12:20:11',NULL,NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,0,NULL,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','muscadet',0,1,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL); +INSERT INTO `llx_commande_fournisseur` VALUES (1,'2020-06-12 17:12:08',13,'CF1007-0001',1,NULL,NULL,NULL,'2020-07-11 17:13:40','2020-02-01 18:51:42','2020-02-01 18:52:04',NULL,'2020-02-01',1,NULL,12,12,NULL,0,5,0,0.00000000,0,0,39.20000000,0.00000000,0.00000000,200.00000000,239.20000000,NULL,NULL,'muscadet',2,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,'2020-06-12 17:12:09',1,'CF1007-0002',1,NULL,NULL,NULL,'2019-07-11 18:46:28','2019-07-11 18:47:33',NULL,NULL,'2019-07-11',1,NULL,1,NULL,NULL,0,3,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,NULL,NULL,'muscadet',4,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,'2020-01-20 11:22:53',17,'(PROV3)',1,NULL,NULL,NULL,'2013-08-04 23:00:52',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,1079.17000000,1079.17000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',1.20000000,1295.00000000,0.00000000,1295.00000000,NULL),(4,'2020-01-20 11:19:49',17,'(PROV4)',1,NULL,NULL,NULL,'2013-08-04 23:19:32',NULL,NULL,NULL,NULL,1,12,NULL,NULL,NULL,0,0,0,0.00000000,0,0,11.88000000,0.00000000,0.00000000,174.17000000,186.05000000,'Private note','Public note','muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'EUR',1.00000000,174.17000000,11.88000000,186.05000000,NULL),(13,'2020-06-12 17:12:09',1,'CF1303-0004',1,NULL,NULL,NULL,'2020-03-09 19:39:18','2020-03-09 19:39:27','2020-03-09 19:39:32',NULL,'2020-03-09',1,NULL,1,1,NULL,0,2,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,NULL,NULL,'muscadet',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(14,'2020-01-20 11:20:11',1,'(PROV14)',1,NULL,'',NULL,'2020-01-20 12:20:11',NULL,NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,0,NULL,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','muscadet',0,1,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL); /*!40000 ALTER TABLE `llx_commande_fournisseur` ENABLE KEYS */; UNLOCK TABLES; @@ -4151,15 +4274,15 @@ CREATE TABLE `llx_commande_fournisseur_dispatch` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_commande` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `fk_commandefourndet` int(11) NOT NULL DEFAULT '0', + `fk_commandefourndet` int(11) NOT NULL DEFAULT 0, `qty` float DEFAULT NULL, `fk_entrepot` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, `comment` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `batch` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, @@ -4187,7 +4310,7 @@ DROP TABLE IF EXISTS `llx_commande_fournisseur_dispatch_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_commande_fournisseur_dispatch_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -4213,7 +4336,7 @@ DROP TABLE IF EXISTS `llx_commande_fournisseur_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_commande_fournisseur_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -4239,7 +4362,7 @@ DROP TABLE IF EXISTS `llx_commande_fournisseur_log`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_commande_fournisseur_log` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datelog` datetime NOT NULL, `fk_commande` int(11) NOT NULL, `fk_statut` smallint(6) NOT NULL, @@ -4273,36 +4396,36 @@ CREATE TABLE `llx_commande_fournisseurdet` ( `fk_product` int(11) DEFAULT NULL, `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, - `tva_tx` double(6,3) DEFAULT '0.000', + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `tva_tx` double(6,3) DEFAULT 0.000, `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, - `remise_percent` double DEFAULT '0', - `remise` double DEFAULT '0', - `subprice` double(24,8) DEFAULT '0.00000000', - `total_ht` double(24,8) DEFAULT '0.00000000', - `total_tva` double(24,8) DEFAULT '0.00000000', - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', - `product_type` int(11) DEFAULT '0', + `remise_percent` double DEFAULT 0, + `remise` double DEFAULT 0, + `subprice` double(24,8) DEFAULT 0.00000000, + `total_ht` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, + `total_localtax1` double(24,8) DEFAULT 0.00000000, + `total_localtax2` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, + `product_type` int(11) DEFAULT 0, `date_start` datetime DEFAULT NULL, `date_end` datetime DEFAULT NULL, - `info_bits` int(11) DEFAULT '0', + `info_bits` int(11) DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `special_code` int(11) DEFAULT '0', - `rang` int(11) DEFAULT '0', + `special_code` int(11) DEFAULT 0, + `rang` int(11) DEFAULT 0, `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_subprice` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`), KEY `fk_commande_fournisseurdet_fk_unit` (`fk_unit`), CONSTRAINT `fk_commande_fournisseurdet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) @@ -4328,7 +4451,7 @@ DROP TABLE IF EXISTS `llx_commande_fournisseurdet_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_commande_fournisseurdet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -4358,7 +4481,7 @@ CREATE TABLE `llx_commandedet` ( `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', `localtax1_tx` double(6,3) DEFAULT NULL, @@ -4366,38 +4489,40 @@ CREATE TABLE `llx_commandedet` ( `localtax2_tx` double(6,3) DEFAULT NULL, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, - `remise_percent` double DEFAULT '0', - `remise` double DEFAULT '0', + `remise_percent` double DEFAULT 0, + `remise` double DEFAULT 0, `fk_remise_except` int(11) DEFAULT NULL, `price` double DEFAULT NULL, - `subprice` double(24,8) DEFAULT '0.00000000', - `total_ht` double(24,8) DEFAULT '0.00000000', - `total_tva` double(24,8) DEFAULT '0.00000000', - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', - `product_type` int(11) DEFAULT '0', + `subprice` double(24,8) DEFAULT 0.00000000, + `total_ht` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, + `total_localtax1` double(24,8) DEFAULT 0.00000000, + `total_localtax2` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, + `product_type` int(11) DEFAULT 0, `date_start` datetime DEFAULT NULL, `date_end` datetime DEFAULT NULL, - `info_bits` int(11) DEFAULT '0', + `info_bits` int(11) DEFAULT 0, `fk_product_fournisseur_price` int(11) DEFAULT NULL, - `buy_price_ht` double(24,8) DEFAULT '0.00000000', - `special_code` int(10) unsigned DEFAULT '0', - `rang` int(11) DEFAULT '0', + `buy_price_ht` double(24,8) DEFAULT 0.00000000, + `special_code` int(10) unsigned DEFAULT 0, + `rang` int(11) DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_commandefourndet` int(11) DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_subprice` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`), KEY `idx_commandedet_fk_commande` (`fk_commande`), KEY `idx_commandedet_fk_product` (`fk_product`), KEY `fk_commandedet_fk_unit` (`fk_unit`), + KEY `fk_commandedet_fk_commandefourndet` (`fk_commandefourndet`), CONSTRAINT `fk_commandedet_fk_commande` FOREIGN KEY (`fk_commande`) REFERENCES `llx_commande` (`rowid`), + CONSTRAINT `fk_commandedet_fk_commandefourndet` FOREIGN KEY (`fk_commandefourndet`) REFERENCES `llx_commande_fournisseurdet` (`rowid`), CONSTRAINT `fk_commandedet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=308 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -4421,7 +4546,7 @@ DROP TABLE IF EXISTS `llx_commandedet_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_commandedet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -4448,12 +4573,12 @@ DROP TABLE IF EXISTS `llx_comment`; CREATE TABLE `llx_comment` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `description` text COLLATE utf8_unicode_ci NOT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_element` int(11) DEFAULT NULL, `element_type` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) DEFAULT '1', + `entity` int(11) DEFAULT 1, `import_key` varchar(125) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -4480,9 +4605,9 @@ CREATE TABLE `llx_cond_reglement` ( `rowid` int(11) NOT NULL, `code` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `sortorder` smallint(6) DEFAULT NULL, - `active` tinyint(4) DEFAULT '1', + `active` tinyint(4) DEFAULT 1, `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `libelle_facture` text COLLATE utf8_unicode_ci, + `libelle_facture` text COLLATE utf8_unicode_ci DEFAULT NULL, `fdm` tinyint(4) DEFAULT NULL, `nbjour` smallint(6) DEFAULT NULL, `decalage` smallint(6) DEFAULT NULL, @@ -4510,15 +4635,15 @@ DROP TABLE IF EXISTS `llx_const`; CREATE TABLE `llx_const` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `value` text COLLATE utf8_unicode_ci NOT NULL, `type` varchar(64) COLLATE utf8_unicode_ci DEFAULT 'string', - `visible` tinyint(4) NOT NULL DEFAULT '1', - `note` text COLLATE utf8_unicode_ci, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `visible` tinyint(4) NOT NULL DEFAULT 1, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `uk_const` (`name`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=8508 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=8577 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4527,7 +4652,7 @@ CREATE TABLE `llx_const` ( LOCK TABLES `llx_const` WRITE; /*!40000 ALTER TABLE `llx_const` DISABLE KEYS */; -INSERT INTO `llx_const` VALUES (8,'MAIN_UPLOAD_DOC',0,'2048','chaine',0,'Max size for file upload (0 means no upload allowed)','2012-07-08 11:17:57'),(9,'MAIN_SEARCHFORM_SOCIETE',0,'1','yesno',0,'Show form for quick company search','2012-07-08 11:17:57'),(10,'MAIN_SEARCHFORM_CONTACT',0,'1','yesno',0,'Show form for quick contact search','2012-07-08 11:17:57'),(11,'MAIN_SEARCHFORM_PRODUITSERVICE',0,'1','yesno',0,'Show form for quick product search','2012-07-08 11:17:58'),(12,'MAIN_SEARCHFORM_ADHERENT',0,'1','yesno',0,'Show form for quick member search','2012-07-08 11:17:58'),(16,'MAIN_SIZE_LISTE_LIMIT',0,'25','chaine',0,'Longueur maximum des listes','2012-07-08 11:17:58'),(29,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',1,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2012-07-08 11:17:58'),(33,'SOCIETE_NOLIST_COURRIER',0,'1','yesno',0,'Liste les fichiers du repertoire courrier','2012-07-08 11:17:58'),(36,'ADHERENT_MAIL_REQUIRED',1,'1','yesno',0,'EMail required to create a new member','2012-07-08 11:17:58'),(37,'ADHERENT_MAIL_FROM',1,'adherents@domain.com','chaine',0,'Sender EMail for automatic emails','2012-07-08 11:17:58'),(38,'ADHERENT_MAIL_RESIL',1,'Your subscription has been resiliated.\r\nWe hope to see you soon again','html',0,'Mail resiliation','2018-11-23 11:56:07'),(39,'ADHERENT_MAIL_VALID',1,'Your subscription has been validated.\r\nThis is a remind of your personal information :\r\n\r\n%INFOS%\r\n\r\n','html',0,'Mail de validation','2018-11-23 11:56:07'),(40,'ADHERENT_MAIL_COTIS',1,'Hello %PRENOM%,\r\nThanks for your subscription.\r\nThis email confirms that your subscription has been received and processed.\r\n\r\n','html',0,'Mail de validation de cotisation','2018-11-23 11:56:07'),(41,'ADHERENT_MAIL_VALID_SUBJECT',1,'Your subscription has been validated','chaine',0,'Sujet du mail de validation','2012-07-08 11:17:59'),(42,'ADHERENT_MAIL_RESIL_SUBJECT',1,'Resiliating your subscription','chaine',0,'Sujet du mail de resiliation','2012-07-08 11:17:59'),(43,'ADHERENT_MAIL_COTIS_SUBJECT',1,'Receipt of your subscription','chaine',0,'Sujet du mail de validation de cotisation','2012-07-08 11:17:59'),(44,'MAILING_EMAIL_FROM',1,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-07-08 11:17:59'),(45,'ADHERENT_USE_MAILMAN',1,'0','yesno',0,'Utilisation de Mailman','2012-07-08 11:17:59'),(46,'ADHERENT_MAILMAN_UNSUB_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%','chaine',0,'Url de desinscription aux listes mailman','2012-07-08 11:17:59'),(47,'ADHERENT_MAILMAN_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine',0,'Url pour les inscriptions mailman','2012-07-08 11:17:59'),(48,'ADHERENT_MAILMAN_LISTS',1,'test-test,test-test2','chaine',0,'Listes auxquelles inscrire les nouveaux adherents','2012-07-08 11:17:59'),(49,'ADHERENT_MAILMAN_ADMINPW',1,'','chaine',0,'Mot de passe Admin des liste mailman','2012-07-08 11:17:59'),(50,'ADHERENT_MAILMAN_SERVER',1,'lists.domain.com','chaine',0,'Serveur hebergeant les interfaces d Admin des listes mailman','2012-07-08 11:17:59'),(51,'ADHERENT_MAILMAN_LISTS_COTISANT',1,'','chaine',0,'Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement','2012-07-08 11:17:59'),(52,'ADHERENT_USE_SPIP',1,'0','yesno',0,'Utilisation de SPIP ?','2012-07-08 11:17:59'),(53,'ADHERENT_USE_SPIP_AUTO',1,'0','yesno',0,'Utilisation de SPIP automatiquement','2012-07-08 11:17:59'),(54,'ADHERENT_SPIP_USER',1,'user','chaine',0,'user spip','2012-07-08 11:17:59'),(55,'ADHERENT_SPIP_PASS',1,'pass','chaine',0,'Pass de connection','2012-07-08 11:17:59'),(56,'ADHERENT_SPIP_SERVEUR',1,'localhost','chaine',0,'serveur spip','2012-07-08 11:17:59'),(57,'ADHERENT_SPIP_DB',1,'spip','chaine',0,'db spip','2012-07-08 11:17:59'),(58,'ADHERENT_CARD_HEADER_TEXT',1,'%ANNEE%','chaine',0,'Texte imprime sur le haut de la carte adherent','2012-07-08 11:17:59'),(59,'ADHERENT_CARD_FOOTER_TEXT',1,'Association AZERTY','chaine',0,'Texte imprime sur le bas de la carte adherent','2012-07-08 11:17:59'),(61,'FCKEDITOR_ENABLE_USER',1,'1','yesno',0,'Activation fckeditor sur notes utilisateurs','2012-07-08 11:17:59'),(62,'FCKEDITOR_ENABLE_SOCIETE',1,'1','yesno',0,'Activation fckeditor sur notes societe','2012-07-08 11:17:59'),(63,'FCKEDITOR_ENABLE_PRODUCTDESC',1,'1','yesno',0,'Activation fckeditor sur notes produits','2012-07-08 11:17:59'),(64,'FCKEDITOR_ENABLE_MEMBER',1,'1','yesno',0,'Activation fckeditor sur notes adherent','2012-07-08 11:17:59'),(65,'FCKEDITOR_ENABLE_MAILING',1,'1','yesno',0,'Activation fckeditor sur emailing','2012-07-08 11:17:59'),(67,'DON_ADDON_MODEL',1,'html_cerfafr','chaine',0,'','2012-07-08 11:18:00'),(68,'PROPALE_ADDON',1,'mod_propale_marbre','chaine',0,'','2012-07-08 11:18:00'),(69,'PROPALE_ADDON_PDF',1,'azur','chaine',0,'','2012-07-08 11:18:00'),(70,'COMMANDE_ADDON',1,'mod_commande_marbre','chaine',0,'','2012-07-08 11:18:00'),(71,'COMMANDE_ADDON_PDF',1,'einstein','chaine',0,'','2012-07-08 11:18:00'),(72,'COMMANDE_SUPPLIER_ADDON',1,'mod_commande_fournisseur_muguet','chaine',0,'','2012-07-08 11:18:00'),(73,'COMMANDE_SUPPLIER_ADDON_PDF',1,'muscadet','chaine',0,'','2012-07-08 11:18:00'),(74,'EXPEDITION_ADDON',1,'enlevement','chaine',0,'','2012-07-08 11:18:00'),(76,'FICHEINTER_ADDON',1,'pacific','chaine',0,'','2012-07-08 11:18:00'),(77,'FICHEINTER_ADDON_PDF',1,'soleil','chaine',0,'','2012-07-08 11:18:00'),(79,'FACTURE_ADDON_PDF',1,'crabe','chaine',0,'','2012-07-08 11:18:00'),(80,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'Durée de validitée des propales','2012-07-08 11:18:00'),(230,'COMPANY_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2012-07-08 11:26:20'),(238,'LIVRAISON_ADDON_PDF',1,'typhon','chaine',0,'Nom du gestionnaire de generation des commandes en PDF','2012-07-08 11:26:27'),(239,'LIVRAISON_ADDON_NUMBER',1,'mod_livraison_jade','chaine',0,'Nom du gestionnaire de numerotation des bons de livraison','2015-03-20 13:17:36'),(245,'FACTURE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2012-07-08 11:28:53'),(249,'DON_FORM',1,'html_cerfafr','chaine',0,'Nom du gestionnaire de formulaire de dons','2017-09-06 16:12:22'),(254,'ADHERENT_BANK_ACCOUNT',1,'','chaine',0,'ID du Compte banquaire utilise','2012-07-08 11:29:05'),(255,'ADHERENT_BANK_CATEGORIE',1,'','chaine',0,'ID de la categorie banquaire des cotisations','2012-07-08 11:29:05'),(256,'ADHERENT_ETIQUETTE_TYPE',1,'L7163','chaine',0,'Type d etiquette (pour impression de planche d etiquette)','2012-07-08 11:29:05'),(269,'PROJECT_ADDON_PDF',1,'baleine','chaine',0,'Nom du gestionnaire de generation des projets en PDF','2012-07-08 11:29:33'),(270,'PROJECT_ADDON',1,'mod_project_simple','chaine',0,'Nom du gestionnaire de numerotation des projets','2012-07-08 11:29:33'),(369,'EXPEDITION_ADDON_PDF',1,'merou','chaine',0,'','2012-07-08 22:58:07'),(377,'FACTURE_ADDON',1,'mod_facture_terre','chaine',0,'','2012-07-08 23:08:12'),(380,'ADHERENT_CARD_TEXT',1,'%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','',0,'Texte imprime sur la carte adherent','2012-07-08 23:14:46'),(381,'ADHERENT_CARD_TEXT_RIGHT',1,'aaa','',0,'','2012-07-08 23:14:55'),(386,'STOCK_CALCULATE_ON_SHIPMENT',1,'1','chaine',0,'','2012-07-08 23:23:21'),(387,'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER',1,'1','chaine',0,'','2012-07-08 23:23:26'),(392,'MAIN_AGENDA_XCAL_EXPORTKEY',1,'dolibarr','chaine',0,'','2012-07-08 23:27:50'),(393,'MAIN_AGENDA_EXPORT_PAST_DELAY',1,'100','chaine',0,'','2012-07-08 23:27:50'),(610,'CASHDESK_ID_THIRDPARTY',1,'7','chaine',0,'','2012-07-11 17:08:18'),(611,'CASHDESK_ID_BANKACCOUNT_CASH',1,'3','chaine',0,'','2012-07-11 17:08:18'),(612,'CASHDESK_ID_BANKACCOUNT_CHEQUE',1,'1','chaine',0,'','2012-07-11 17:08:18'),(613,'CASHDESK_ID_BANKACCOUNT_CB',1,'1','chaine',0,'','2012-07-11 17:08:18'),(614,'CASHDESK_ID_WAREHOUSE',1,'2','chaine',0,'','2012-07-11 17:08:18'),(660,'LDAP_USER_DN',1,'ou=users,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(661,'LDAP_GROUP_DN',1,'ou=groups,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(662,'LDAP_FILTER_CONNECTION',1,'&(objectClass=user)(objectCategory=person)','chaine',0,NULL,'2012-07-18 10:25:27'),(663,'LDAP_FIELD_LOGIN',1,'uid','chaine',0,NULL,'2012-07-18 10:25:27'),(664,'LDAP_FIELD_FULLNAME',1,'cn','chaine',0,NULL,'2012-07-18 10:25:27'),(665,'LDAP_FIELD_NAME',1,'sn','chaine',0,NULL,'2012-07-18 10:25:27'),(666,'LDAP_FIELD_FIRSTNAME',1,'givenname','chaine',0,NULL,'2012-07-18 10:25:27'),(667,'LDAP_FIELD_MAIL',1,'mail','chaine',0,NULL,'2012-07-18 10:25:27'),(668,'LDAP_FIELD_PHONE',1,'telephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(669,'LDAP_FIELD_FAX',1,'facsimiletelephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(670,'LDAP_FIELD_MOBILE',1,'mobile','chaine',0,NULL,'2012-07-18 10:25:27'),(671,'LDAP_SERVER_TYPE',1,'openldap','chaine',0,'','2012-07-18 10:25:46'),(672,'LDAP_SERVER_PROTOCOLVERSION',1,'3','chaine',0,'','2012-07-18 10:25:47'),(673,'LDAP_SERVER_HOST',1,'localhost','chaine',0,'','2012-07-18 10:25:47'),(674,'LDAP_SERVER_PORT',1,'389','chaine',0,'','2012-07-18 10:25:47'),(675,'LDAP_SERVER_USE_TLS',1,'0','chaine',0,'','2012-07-18 10:25:47'),(676,'LDAP_SYNCHRO_ACTIVE',1,'dolibarr2ldap','chaine',0,'','2012-07-18 10:25:47'),(677,'LDAP_CONTACT_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(678,'LDAP_MEMBER_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(974,'MAIN_MODULE_WORKFLOW_TRIGGERS',1,'1','chaine',0,NULL,'2013-07-18 18:02:20'),(975,'WORKFLOW_PROPAL_AUTOCREATE_ORDER',1,'1','chaine',0,'','2013-07-18 18:02:24'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','chaine',0,'','2013-07-18 18:05:50'),(983,'FACTURE_RIB_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(984,'FACTURE_CHQ_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(1016,'GOOGLE_DUPLICATE_INTO_GCAL',1,'1','chaine',0,'','2013-07-18 21:40:20'),(1152,'SOCIETE_CODECLIENT_ADDON',1,'mod_codeclient_monkey','chaine',0,'','2013-07-29 20:50:02'),(1240,'MAIN_LOGEVENTS_USER_LOGIN',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1241,'MAIN_LOGEVENTS_USER_LOGIN_FAILED',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1242,'MAIN_LOGEVENTS_USER_LOGOUT',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1243,'MAIN_LOGEVENTS_USER_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1244,'MAIN_LOGEVENTS_USER_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1245,'MAIN_LOGEVENTS_USER_NEW_PASSWORD',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1246,'MAIN_LOGEVENTS_USER_ENABLEDISABLE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1247,'MAIN_LOGEVENTS_USER_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1248,'MAIN_LOGEVENTS_GROUP_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1249,'MAIN_LOGEVENTS_GROUP_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1250,'MAIN_LOGEVENTS_GROUP_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1251,'MAIN_BOXES_MAXLINES',1,'5','',0,'','2013-07-29 21:05:42'),(1482,'EXPEDITION_ADDON_NUMBER',1,'mod_expedition_safor','chaine',0,'Nom du gestionnaire de numerotation des expeditions','2013-08-05 17:53:11'),(1490,'CONTRACT_ADDON',1,'mod_contract_serpis','chaine',0,'Nom du gestionnaire de numerotation des contrats','2013-08-05 18:11:58'),(1677,'COMMANDE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/orders','chaine',0,NULL,'2014-12-08 13:11:02'),(1724,'PROPALE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2014-12-08 13:17:14'),(1730,'OPENSTREETMAP_ENABLE_MAPS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1731,'OPENSTREETMAP_ENABLE_MAPS_CONTACTS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1732,'OPENSTREETMAP_ENABLE_MAPS_MEMBERS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1733,'OPENSTREETMAP_MAPS_ZOOM_LEVEL',1,'15','chaine',0,'','2014-12-08 13:22:47'),(1742,'MAIN_MAIL_EMAIL_FROM',2,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-12-08 14:08:14'),(1743,'MAIN_MENU_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2015-02-11 19:43:54'),(1744,'MAIN_MENUFRONT_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2015-02-11 19:43:54'),(1745,'MAIN_MENU_SMARTPHONE',2,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2014-12-08 14:08:14'),(1746,'MAIN_MENUFRONT_SMARTPHONE',2,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2014-12-08 14:08:14'),(1747,'MAIN_THEME',2,'eldy','chaine',0,'Default theme','2014-12-08 14:08:14'),(1748,'MAIN_DELAY_ACTIONS_TODO',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2014-12-08 14:08:14'),(1749,'MAIN_DELAY_ORDERS_TO_PROCESS',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2014-12-08 14:08:14'),(1750,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2014-12-08 14:08:14'),(1751,'MAIN_DELAY_PROPALS_TO_CLOSE',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2014-12-08 14:08:14'),(1752,'MAIN_DELAY_PROPALS_TO_BILL',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2014-12-08 14:08:14'),(1753,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2014-12-08 14:08:14'),(1754,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2014-12-08 14:08:14'),(1755,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2014-12-08 14:08:14'),(1756,'MAIN_DELAY_RUNNING_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2014-12-08 14:08:14'),(1757,'MAIN_DELAY_MEMBERS',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2014-12-08 14:08:14'),(1758,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',2,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2014-12-08 14:08:14'),(1759,'MAILING_EMAIL_FROM',2,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:14'),(1760,'MAIN_INFO_SOCIETE_COUNTRY',3,'1:FR:France','chaine',0,'','2015-02-26 21:56:28'),(1761,'MAIN_INFO_SOCIETE_NOM',3,'bbb','chaine',0,'','2014-12-08 14:08:20'),(1762,'MAIN_INFO_SOCIETE_STATE',3,'0','chaine',0,'','2015-02-27 14:20:27'),(1763,'MAIN_MONNAIE',3,'EUR','chaine',0,'','2014-12-08 14:08:20'),(1764,'MAIN_LANG_DEFAULT',3,'auto','chaine',0,'','2014-12-08 14:08:20'),(1765,'MAIN_MAIL_EMAIL_FROM',3,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-12-08 14:08:20'),(1766,'MAIN_MENU_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2015-02-11 19:43:54'),(1767,'MAIN_MENUFRONT_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2015-02-11 19:43:54'),(1768,'MAIN_MENU_SMARTPHONE',3,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2014-12-08 14:08:20'),(1769,'MAIN_MENUFRONT_SMARTPHONE',3,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2014-12-08 14:08:20'),(1770,'MAIN_THEME',3,'eldy','chaine',0,'Default theme','2014-12-08 14:08:20'),(1771,'MAIN_DELAY_ACTIONS_TODO',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2014-12-08 14:08:20'),(1772,'MAIN_DELAY_ORDERS_TO_PROCESS',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2014-12-08 14:08:20'),(1773,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2014-12-08 14:08:20'),(1774,'MAIN_DELAY_PROPALS_TO_CLOSE',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2014-12-08 14:08:20'),(1775,'MAIN_DELAY_PROPALS_TO_BILL',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2014-12-08 14:08:20'),(1776,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2014-12-08 14:08:20'),(1777,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2014-12-08 14:08:20'),(1778,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2014-12-08 14:08:20'),(1779,'MAIN_DELAY_RUNNING_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2014-12-08 14:08:20'),(1780,'MAIN_DELAY_MEMBERS',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2014-12-08 14:08:20'),(1781,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',3,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2014-12-08 14:08:20'),(1782,'MAILING_EMAIL_FROM',3,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:20'),(1803,'SYSLOG_FILE',1,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2014-12-08 14:15:08'),(1804,'SYSLOG_HANDLERS',1,'[\"mod_syslog_file\"]','chaine',0,'','2014-12-08 14:15:08'),(1805,'MAIN_MODULE_SKINCOLOREDITOR',3,'1',NULL,0,NULL,'2014-12-08 14:35:40'),(1922,'PAYPAL_API_SANDBOX',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1923,'PAYPAL_API_USER',1,'seller_1355312017_biz_api1.mydomain.com','chaine',0,'','2014-12-12 12:11:05'),(1924,'PAYPAL_API_PASSWORD',1,'1355312040','chaine',0,'','2014-12-12 12:11:05'),(1925,'PAYPAL_API_SIGNATURE',1,'ABCDEFWBzvfn0q5iNmbuiDv1y.3EAXIMWyl4C5KvDReR9HDwwAd6dQ4Q','chaine',0,'','2014-12-12 12:11:05'),(1926,'PAYPAL_API_INTEGRAL_OR_PAYPALONLY',1,'integral','chaine',0,'','2014-12-12 12:11:05'),(1927,'PAYPAL_SECURITY_TOKEN',1,'50c82fab36bb3b6aa83e2a50691803b2','chaine',0,'','2014-12-12 12:11:05'),(1928,'PAYPAL_SECURITY_TOKEN_UNIQUE',1,'0','chaine',0,'','2014-12-12 12:11:05'),(1929,'PAYPAL_ADD_PAYMENT_URL',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1980,'MAIN_PDF_FORMAT',1,'EUA4','chaine',0,'','2014-12-12 19:58:05'),(1981,'MAIN_PROFID1_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1982,'MAIN_PROFID2_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1983,'MAIN_PROFID3_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1984,'MAIN_PROFID4_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1985,'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',1,'0','chaine',0,'','2014-12-12 19:58:05'),(2835,'MAIN_USE_CONNECT_TIMEOUT',1,'10','chaine',0,'','2015-01-16 19:28:50'),(2836,'MAIN_USE_RESPONSE_TIMEOUT',1,'30','chaine',0,'','2015-01-16 19:28:50'),(2837,'MAIN_PROXY_USE',1,'0','chaine',0,'','2015-01-16 19:28:50'),(2838,'MAIN_PROXY_HOST',1,'localhost','chaine',0,'','2015-01-16 19:28:50'),(2839,'MAIN_PROXY_PORT',1,'8080','chaine',0,'','2015-01-16 19:28:50'),(2840,'MAIN_PROXY_USER',1,'aaa','chaine',0,'','2015-01-16 19:28:50'),(2841,'MAIN_PROXY_PASS',1,'bbb','chaine',0,'','2015-01-16 19:28:50'),(2848,'OVHSMS_NICK',1,'BN196-OVH','chaine',0,'','2015-01-16 19:32:36'),(2849,'OVHSMS_PASS',1,'bigone-10','chaine',0,'','2015-01-16 19:32:36'),(2850,'OVHSMS_SOAPURL',1,'https://www.ovh.com/soapi/soapi-re-1.55.wsdl','chaine',0,'','2015-01-16 19:32:36'),(2854,'THEME_ELDY_RGB',1,'bfbf00','chaine',0,'','2015-01-18 10:02:53'),(2855,'THEME_ELDY_ENABLE_PERSONALIZED',1,'0','chaine',0,'','2015-01-18 10:02:55'),(2858,'MAIN_SESSION_TIMEOUT',1,'2000','chaine',0,'','2015-01-19 17:01:53'),(2867,'FACSIM_ADDON',1,'mod_facsim_alcoy','chaine',0,'','2015-01-19 17:16:25'),(2868,'POS_SERVICES',1,'0','chaine',0,'','2015-01-19 17:16:51'),(2869,'POS_USE_TICKETS',1,'1','chaine',0,'','2015-01-19 17:16:51'),(2870,'POS_MAX_TTC',1,'100','chaine',0,'','2015-01-19 17:16:51'),(3190,'MAIN_MODULE_HOLIDAY',2,'1',NULL,0,NULL,'2015-02-01 08:52:34'),(3195,'INVOICE_SUPPLIER_ADDON_PDF',1,'canelle','chaine',0,'','2015-02-10 19:50:27'),(3199,'MAIN_FORCE_RELOAD_PAGE',1,'1','chaine',0,NULL,'2015-02-12 16:22:55'),(3223,'OVH_THIRDPARTY_IMPORT',1,'2','chaine',0,'','2015-02-13 16:20:18'),(3409,'AGENDA_USE_EVENT_TYPE',1,'1','chaine',0,'','2015-02-27 18:12:24'),(3886,'MAIN_REMOVE_INSTALL_WARNING',1,'1','chaine',1,'','2015-03-02 18:32:50'),(4013,'MAIN_DELAY_ACTIONS_TODO',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4014,'MAIN_DELAY_PROPALS_TO_CLOSE',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4015,'MAIN_DELAY_PROPALS_TO_BILL',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4016,'MAIN_DELAY_ORDERS_TO_PROCESS',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4017,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4018,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4019,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4020,'MAIN_DELAY_RUNNING_SERVICES',1,'-15','chaine',0,'','2015-03-06 08:59:12'),(4021,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',1,'62','chaine',0,'','2015-03-06 08:59:13'),(4022,'MAIN_DELAY_MEMBERS',1,'31','chaine',0,'','2015-03-06 08:59:13'),(4023,'MAIN_DISABLE_METEO',1,'0','chaine',0,'','2015-03-06 08:59:13'),(4044,'ADHERENT_VAT_FOR_SUBSCRIPTIONS',1,'0','',0,'','2015-03-06 16:06:38'),(4047,'ADHERENT_BANK_USE',1,'bankviainvoice','',0,'','2015-03-06 16:12:30'),(4049,'PHPSANE_SCANIMAGE',1,'/usr/bin/scanimage','chaine',0,'','2015-03-06 21:54:13'),(4050,'PHPSANE_PNMTOJPEG',1,'/usr/bin/pnmtojpeg','chaine',0,'','2015-03-06 21:54:13'),(4051,'PHPSANE_PNMTOTIFF',1,'/usr/bin/pnmtotiff','chaine',0,'','2015-03-06 21:54:13'),(4052,'PHPSANE_OCR',1,'/usr/bin/gocr','chaine',0,'','2015-03-06 21:54:13'),(4548,'ECM_AUTO_TREE_ENABLED',1,'1','chaine',0,'','2015-03-10 15:57:21'),(4579,'MAIN_MODULE_AGENDA',2,'1',NULL,0,NULL,'2015-03-13 15:29:19'),(4580,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4581,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4582,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4583,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4584,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4585,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4586,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4587,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4588,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4589,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4590,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4591,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4592,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4593,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4594,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4688,'GOOGLE_ENABLE_AGENDA',2,'1','chaine',0,'','2015-03-13 15:36:29'),(4689,'GOOGLE_AGENDA_NAME1',2,'eldy','chaine',0,'','2015-03-13 15:36:29'),(4690,'GOOGLE_AGENDA_SRC1',2,'eldy10@mail.com','chaine',0,'','2015-03-13 15:36:29'),(4691,'GOOGLE_AGENDA_COLOR1',2,'BE6D00','chaine',0,'','2015-03-13 15:36:29'),(4692,'GOOGLE_AGENDA_COLOR2',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4693,'GOOGLE_AGENDA_COLOR3',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4694,'GOOGLE_AGENDA_COLOR4',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4695,'GOOGLE_AGENDA_COLOR5',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4696,'GOOGLE_AGENDA_TIMEZONE',2,'Europe/Paris','chaine',0,'','2015-03-13 15:36:29'),(4697,'GOOGLE_AGENDA_NB',2,'5','chaine',0,'','2015-03-13 15:36:29'),(4725,'SOCIETE_CODECLIENT_ADDON',2,'mod_codeclient_leopard','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4726,'SOCIETE_CODECOMPTA_ADDON',2,'mod_codecompta_panicum','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4727,'SOCIETE_FISCAL_MONTH_START',2,'','chaine',0,'Mettre le numero du mois du debut d\\\'annee fiscale, ex: 9 pour septembre','2015-03-13 20:21:35'),(4728,'MAIN_SEARCHFORM_SOCIETE',2,'1','yesno',0,'Show form for quick company search','2015-03-13 20:21:35'),(4729,'MAIN_SEARCHFORM_CONTACT',2,'1','yesno',0,'Show form for quick contact search','2015-03-13 20:21:35'),(4730,'COMPANY_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2015-03-13 20:21:35'),(4743,'MAIN_MODULE_CLICKTODIAL',2,'1',NULL,0,NULL,'2015-03-13 20:30:28'),(4744,'MAIN_MODULE_NOTIFICATION',2,'1',NULL,0,NULL,'2015-03-13 20:30:34'),(4745,'MAIN_MODULE_WEBSERVICES',2,'1',NULL,0,NULL,'2015-03-13 20:30:41'),(4746,'MAIN_MODULE_PROPALE',2,'1',NULL,0,NULL,'2015-03-13 20:32:38'),(4747,'PROPALE_ADDON_PDF',2,'azur','chaine',0,'Nom du gestionnaire de generation des propales en PDF','2015-03-13 20:32:38'),(4748,'PROPALE_ADDON',2,'mod_propale_marbre','chaine',0,'Nom du gestionnaire de numerotation des propales','2015-03-13 20:32:38'),(4749,'PROPALE_VALIDITY_DURATION',2,'15','chaine',0,'Duration of validity of business proposals','2015-03-13 20:32:38'),(4750,'PROPALE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2015-03-13 20:32:38'),(4752,'MAIN_MODULE_TAX',2,'1',NULL,0,NULL,'2015-03-13 20:32:47'),(4753,'MAIN_MODULE_DON',2,'1',NULL,0,NULL,'2015-03-13 20:32:54'),(4754,'DON_ADDON_MODEL',2,'html_cerfafr','chaine',0,'Nom du gestionnaire de generation de recu de dons','2015-03-13 20:32:54'),(4755,'POS_USE_TICKETS',2,'1','chaine',0,'','2015-03-13 20:33:09'),(4756,'POS_MAX_TTC',2,'100','chaine',0,'','2015-03-13 20:33:09'),(4757,'MAIN_MODULE_POS',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4758,'TICKET_ADDON',2,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2015-03-13 20:33:09'),(4759,'MAIN_MODULE_BANQUE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4760,'MAIN_MODULE_FACTURE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4761,'FACTURE_ADDON_PDF',2,'crabe','chaine',0,'Name of PDF model of invoice','2015-03-13 20:33:09'),(4762,'FACTURE_ADDON',2,'mod_facture_terre','chaine',0,'Name of numbering numerotation rules of invoice','2015-03-13 20:33:09'),(4763,'FACTURE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2015-03-13 20:33:09'),(4764,'MAIN_MODULE_SOCIETE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4765,'MAIN_MODULE_PRODUCT',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4766,'PRODUCT_CODEPRODUCT_ADDON',2,'mod_codeproduct_leopard','chaine',0,'Module to control product codes','2015-03-13 20:33:09'),(4767,'MAIN_SEARCHFORM_PRODUITSERVICE',2,'1','yesno',0,'Show form for quick product search','2015-03-13 20:33:09'),(4772,'FACSIM_ADDON',2,'mod_facsim_alcoy','chaine',0,'','2015-03-13 20:33:32'),(4773,'MAIN_MODULE_MAILING',2,'1',NULL,0,NULL,'2015-03-13 20:33:37'),(4774,'MAIN_MODULE_OPENSURVEY',2,'1',NULL,0,NULL,'2015-03-13 20:33:42'),(4782,'AGENDA_USE_EVENT_TYPE',2,'1','chaine',0,'','2015-03-13 20:53:36'),(4884,'AGENDA_DISABLE_EXT',2,'1','chaine',0,'','2015-03-13 22:03:40'),(4928,'COMMANDE_SUPPLIER_ADDON_NUMBER',1,'mod_commande_fournisseur_muguet','chaine',0,'Nom du gestionnaire de numerotation des commandes fournisseur','2015-03-22 09:24:29'),(4929,'INVOICE_SUPPLIER_ADDON_NUMBER',1,'mod_facture_fournisseur_cactus','chaine',0,'Nom du gestionnaire de numerotation des factures fournisseur','2015-03-22 09:24:29'),(5001,'MAIN_CRON_KEY',0,'bc54582fe30d5d4a830c6f582ec28810','chaine',0,'','2015-03-23 17:54:53'),(5009,'CRON_KEY',0,'2c2e755c20be2014098f629865598006','chaine',0,'','2015-03-23 18:06:24'),(5139,'SOCIETE_ADD_REF_IN_LIST',1,'','yesno',0,'Display customer ref into select list','2015-09-08 23:06:08'),(5150,'PROJECT_TASK_ADDON_PDF',1,'','chaine',0,'Name of PDF/ODT tasks manager class','2015-09-08 23:06:14'),(5151,'PROJECT_TASK_ADDON',1,'mod_task_simple','chaine',0,'Name of Numbering Rule task manager class','2015-09-08 23:06:14'),(5152,'PROJECT_TASK_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/tasks','chaine',0,'','2015-09-08 23:06:14'),(5239,'BOOKMARKS_SHOW_IN_MENU',1,'10','chaine',0,'','2016-03-02 15:42:26'),(5271,'DONATION_ART200',1,'','yesno',0,'Option Française - Eligibilité Art200 du CGI','2016-12-21 12:51:28'),(5272,'DONATION_ART238',1,'','yesno',0,'Option Française - Eligibilité Art238 bis du CGI','2016-12-21 12:51:28'),(5273,'DONATION_ART885',1,'','yesno',0,'Option Française - Eligibilité Art885-0 V bis du CGI','2016-12-21 12:51:28'),(5274,'DONATION_MESSAGE',1,'Thank you','chaine',0,'Message affiché sur le récépissé de versements ou dons','2016-12-21 12:51:28'),(5349,'MAIN_SEARCHFORM_CONTACT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5351,'MAIN_SEARCHFORM_PRODUITSERVICE',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5352,'MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5353,'MAIN_SEARCHFORM_ADHERENT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5354,'MAIN_SEARCHFORM_PROJECT',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5394,'FCKEDITOR_ENABLE_DETAILS',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5395,'FCKEDITOR_ENABLE_USERSIGN',1,'1','yesno',0,'WYSIWIG for user signature','2017-11-04 15:27:44'),(5396,'FCKEDITOR_ENABLE_MAIL',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5398,'CATEGORIE_RECURSIV_ADD',1,'','yesno',0,'Affect parent categories','2017-11-04 15:27:46'),(5404,'MAIN_MODULE_CATEGORIE',1,'1',NULL,0,NULL,'2017-11-04 15:41:43'),(5415,'EXPEDITION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/shipment','chaine',0,NULL,'2017-11-15 22:38:28'),(5416,'LIVRAISON_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/delivery','chaine',0,NULL,'2017-11-15 22:38:28'),(5426,'MAIN_MODULE_PROJET',1,'1',NULL,0,NULL,'2017-11-15 22:38:44'),(5427,'PROJECT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/projects','chaine',0,NULL,'2017-11-15 22:38:44'),(5428,'PROJECT_USE_OPPORTUNIES',1,'1','chaine',0,NULL,'2017-11-15 22:38:44'),(5430,'MAIN_MODULE_EXPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:56'),(5431,'MAIN_MODULE_IMPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:58'),(5432,'MAIN_MODULE_MAILING',1,'1',NULL,0,NULL,'2017-11-15 22:39:00'),(5434,'EXPENSEREPORT_ADDON_PDF',1,'standard','chaine',0,'Name of manager to build PDF expense reports documents','2017-11-15 22:39:05'),(5437,'SALARIES_ACCOUNTING_ACCOUNT_CHARGE',1,'641','chaine',0,NULL,'2017-11-15 22:39:08'),(5441,'ADHERENT_ETIQUETTE_TEXT',1,'%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%','text',0,'Text to print on member address sheets','2018-11-23 11:56:07'),(5443,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2017-11-15 22:39:33'),(5453,'MAIN_MODULE_CONTRAT',1,'1',NULL,0,NULL,'2017-11-15 22:39:52'),(5455,'MAIN_MODULE_FICHEINTER',1,'1',NULL,0,NULL,'2017-11-15 22:39:56'),(5459,'MAIN_MODULE_PAYPAL',1,'1',NULL,0,NULL,'2017-11-15 22:41:02'),(5463,'MAIN_MODULE_PROPALE',1,'1',NULL,0,NULL,'2017-11-15 22:41:47'),(5483,'GENBARCODE_BARCODETYPE_THIRDPARTY',1,'6','chaine',0,'','2018-01-16 15:49:43'),(5484,'PRODUIT_DEFAULT_BARCODE_TYPE',1,'2','chaine',0,'','2018-01-16 15:49:46'),(5586,'MAIN_DELAY_EXPENSEREPORTS_TO_PAY',1,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur les notes de frais impayées','2018-01-22 17:28:18'),(5587,'MAIN_FIX_FOR_BUGGED_MTA',1,'1','chaine',1,'Set constant to fix email ending from PHP with some linux ike system','2018-01-22 17:28:18'),(5590,'MAIN_VERSION_LAST_INSTALL',0,'3.8.3','chaine',0,'Dolibarr version when install','2018-01-22 17:28:42'),(5604,'MAIN_INFO_SOCIETE_LOGO',1,'mybigcompany.png','chaine',0,'','2018-01-22 17:33:49'),(5605,'MAIN_INFO_SOCIETE_LOGO_SMALL',1,'mybigcompany_small.png','chaine',0,'','2018-01-22 17:33:49'),(5606,'MAIN_INFO_SOCIETE_LOGO_MINI',1,'mybigcompany_mini.png','chaine',0,'','2018-01-22 17:33:49'),(5614,'MAIN_SIZE_SHORTLISTE_LIMIT',1,'4','chaine',0,'Longueur maximum des listes courtes (fiche client)','2018-03-13 10:54:46'),(5627,'SUPPLIER_PROPOSAL_ADDON_PDF',1,'aurore','chaine',0,'Name of submodule to generate PDF for supplier quotation request','2018-07-30 11:13:20'),(5628,'SUPPLIER_PROPOSAL_ADDON',1,'mod_supplier_proposal_marbre','chaine',0,'Name of submodule to number supplier quotation request','2018-07-30 11:13:20'),(5629,'SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/supplier_proposal','chaine',0,NULL,'2018-07-30 11:13:20'),(5633,'MAIN_MODULE_API',1,'1',NULL,0,NULL,'2018-07-30 11:13:54'),(5634,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2018-07-30 11:13:56'),(5635,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2018-07-30 11:14:04'),(5638,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2018-07-30 11:15:04'),(5642,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_aquarium','chaine',0,'','2018-07-30 11:16:42'),(5707,'CASHDESK_NO_DECREASE_STOCK',1,'1','chaine',0,'','2018-07-30 13:38:11'),(5708,'MAIN_MODULE_PRODUCTBATCH',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5710,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5711,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5808,'MARGIN_TYPE',1,'costprice','chaine',0,'','2018-07-30 16:32:18'),(5809,'DISPLAY_MARGIN_RATES',1,'1','chaine',0,'','2018-07-30 16:32:20'),(5814,'MAIN_MODULE_EXPENSEREPORT',1,'1',NULL,0,NULL,'2018-07-31 21:14:32'),(5833,'ACCOUNTING_EXPORT_SEPARATORCSV',1,',','string',0,NULL,'2017-01-29 15:11:56'),(5840,'CHARTOFACCOUNTS',1,'2','chaine',0,NULL,'2017-01-29 15:11:56'),(5841,'ACCOUNTING_EXPORT_MODELCSV',1,'1','chaine',0,NULL,'2017-01-29 15:11:56'),(5842,'ACCOUNTING_LENGTH_GACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5843,'ACCOUNTING_LENGTH_AACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5844,'ACCOUNTING_LIST_SORT_VENTILATION_TODO',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5845,'ACCOUNTING_LIST_SORT_VENTILATION_DONE',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5846,'ACCOUNTING_EXPORT_DATE',1,'%d%m%Y','chaine',0,NULL,'2017-01-29 15:11:56'),(5848,'ACCOUNTING_EXPORT_FORMAT',1,'csv','chaine',0,NULL,'2017-01-29 15:11:56'),(5853,'MAIN_MODULE_WORKFLOW',1,'1',NULL,0,NULL,'2017-01-29 15:12:12'),(5854,'MAIN_MODULE_NOTIFICATION',1,'1',NULL,0,NULL,'2017-01-29 15:12:35'),(5855,'MAIN_MODULE_OAUTH',1,'1',NULL,0,NULL,'2017-01-29 15:12:41'),(5883,'MAILING_LIMIT_SENDBYWEB',0,'15','chaine',1,'Number of targets to defined packet size when sending mass email','2017-01-29 17:36:33'),(5884,'MAIN_MAIL_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5885,'MAIN_SOAP_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5925,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5931,'DATABASE_PWD_ENCRYPTED',1,'1','chaine',0,'','2017-02-01 15:06:04'),(5932,'MAIN_DISABLE_ALL_MAILS',1,'0','chaine',0,'','2017-02-01 15:09:09'),(5933,'MAIN_MAIL_SENDMODE',1,'mail','chaine',0,'','2017-02-01 15:09:09'),(5934,'MAIN_MAIL_SMTP_PORT',1,'465','chaine',0,'','2017-02-01 15:09:09'),(5935,'MAIN_MAIL_SMTP_SERVER',1,'smtp.mail.com','chaine',0,'','2017-02-01 15:09:09'),(5936,'MAIN_MAIL_SMTPS_ID',1,'eldy10@mail.com','chaine',0,'','2017-02-01 15:09:09'),(5937,'MAIN_MAIL_SMTPS_PW',1,'bidonge','chaine',0,'','2017-02-01 15:09:09'),(5938,'MAIN_MAIL_EMAIL_FROM',1,'robot@example.com','chaine',0,'','2017-02-01 15:09:09'),(5939,'MAIN_MAIL_DEFAULT_FROMTYPE',1,'user','chaine',0,'','2017-02-01 15:09:09'),(5940,'PRELEVEMENT_ID_BANKACCOUNT',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5941,'PRELEVEMENT_ICS',1,'ICS123456','chaine',0,'','2017-02-06 04:04:47'),(5942,'PRELEVEMENT_USER',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5943,'BANKADDON_PDF',1,'sepamandate','chaine',0,'','2017-02-06 04:13:52'),(5947,'CHEQUERECEIPTS_THYME_MASK',1,'CHK{yy}{mm}-{0000@1}','chaine',0,'','2017-02-06 04:16:27'),(5948,'MAIN_MODULE_LOAN',1,'1',NULL,0,NULL,'2017-02-06 19:19:05'),(5954,'MAIN_SUBMODULE_EXPEDITION',1,'1','chaine',0,'','2017-02-06 23:57:37'),(5963,'MAIN_MODULE_BANQUE',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(5964,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(6019,'MAIN_INFO_SOCIETE_COUNTRY',2,'1:FR:France','chaine',0,'','2017-02-15 17:18:22'),(6020,'MAIN_INFO_SOCIETE_NOM',2,'MySecondCompany','chaine',0,'','2017-02-15 17:18:22'),(6021,'MAIN_INFO_SOCIETE_STATE',2,'0','chaine',0,'','2017-02-15 17:18:22'),(6022,'MAIN_MONNAIE',2,'EUR','chaine',0,'','2017-02-15 17:18:22'),(6023,'MAIN_LANG_DEFAULT',2,'auto','chaine',0,'','2017-02-15 17:18:22'),(6032,'MAIN_MODULE_MULTICURRENCY',1,'1',NULL,0,NULL,'2017-02-15 17:29:59'),(6048,'SYSLOG_FACILITY',0,'LOG_USER','chaine',0,'','2017-02-15 22:37:01'),(6049,'SYSLOG_FIREPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/firephp/firephp-core/lib/','chaine',0,'','2017-02-15 22:37:01'),(6050,'SYSLOG_FILE',0,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2017-02-15 22:37:01'),(6051,'SYSLOG_CHROMEPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/ccampbell/chromephp/','chaine',0,'','2017-02-15 22:37:01'),(6052,'SYSLOG_HANDLERS',0,'[\"mod_syslog_file\"]','chaine',0,'','2017-02-15 22:37:01'),(6054,'SYSLOG_LEVEL',0,'7','chaine',0,'','2017-02-15 22:37:21'),(6092,'MAIN_SIZE_SHORTLIST_LIMIT',0,'3','chaine',0,'Max length for small lists (tabs)','2017-05-12 09:02:38'),(6099,'MAIN_MODULE_SKYPE',1,'1',NULL,0,NULL,'2017-05-12 09:03:51'),(6100,'MAIN_MODULE_GRAVATAR',1,'1',NULL,0,NULL,'2017-05-12 09:03:54'),(6102,'PRODUCT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/products','chaine',0,'','2017-08-27 13:29:07'),(6103,'CONTRACT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/contracts','chaine',0,'','2017-08-27 13:29:07'),(6104,'USERGROUP_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/usergroups','chaine',0,'','2017-08-27 13:29:07'),(6105,'USER_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/users','chaine',0,'','2017-08-27 13:29:07'),(6106,'MAIN_ENABLE_OVERWRITE_TRANSLATION',1,'1','chaine',0,'Enable overwrote of translation','2017-08-27 13:29:07'),(6377,'COMMANDE_SAPHIR_MASK',1,'{yy}{mm}{000}{ttt}','chaine',0,'','2017-09-06 07:56:25'),(6518,'GOOGLE_DUPLICATE_INTO_THIRDPARTIES',1,'1','chaine',0,'','2017-09-06 19:43:57'),(6519,'GOOGLE_DUPLICATE_INTO_CONTACTS',1,'0','chaine',0,'','2017-09-06 19:43:57'),(6520,'GOOGLE_TAG_PREFIX',1,'Dolibarr (Thirdparties)','chaine',0,'','2017-09-06 19:43:57'),(6521,'GOOGLE_TAG_PREFIX_CONTACTS',1,'Dolibarr (Contacts/Addresses)','chaine',0,'','2017-09-06 19:43:57'),(6522,'GOOGLE_ENABLE_AGENDA',1,'1','chaine',0,'','2017-09-06 19:44:12'),(6523,'GOOGLE_AGENDA_COLOR1',1,'1B887A','chaine',0,'','2017-09-06 19:44:12'),(6524,'GOOGLE_AGENDA_COLOR2',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6525,'GOOGLE_AGENDA_COLOR3',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6526,'GOOGLE_AGENDA_COLOR4',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6527,'GOOGLE_AGENDA_COLOR5',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6528,'GOOGLE_AGENDA_TIMEZONE',1,'Europe/Paris','chaine',0,'','2017-09-06 19:44:12'),(6529,'GOOGLE_AGENDA_NB',1,'5','chaine',0,'','2017-09-06 19:44:12'),(6543,'MAIN_SMS_DEBUG',0,'1','chaine',1,'This is to enable OVH SMS debug','2017-09-06 19:44:34'),(6562,'BLOCKEDLOG_ENTITY_FINGERPRINT',1,'b63e359ffca54d5c2bab869916eaf23d4a736703028ccbf77ce1167c5f830e7b','chaine',0,'Numeric Unique Fingerprint','2018-01-19 11:27:15'),(6564,'BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY',1,'FR','chaine',0,'This is list of country code where the module may be mandatory','2018-01-19 11:27:15'),(6565,'MAIN_MODULE_BOOKMARK',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:34'),(6566,'MAIN_MODULE_ADHERENT',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:56'),(6567,'ADHERENT_ADDON_PDF',1,'standard','chaine',0,'Name of PDF model of member','2018-01-19 11:27:56'),(6569,'MAIN_MODULE_STRIPE',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:28:17'),(6632,'MAIN_MODULE_TICKET',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:15:29'),(6635,'MAIN_MODULE_TICKET_TRIGGERS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6636,'MAIN_MODULE_TICKET_MODELS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6638,'MAIN_MODULE_TAKEPOS',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:15:58'),(6639,'MAIN_MODULE_TAKEPOS_TRIGGERS',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6640,'MAIN_MODULE_TAKEPOS_LOGIN',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6641,'MAIN_MODULE_TAKEPOS_SUBSTITUTIONS',1,'1','chaine',0,NULL,'2019-06-05 09:15:58'),(6642,'MAIN_MODULE_TAKEPOS_MENUS',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6643,'MAIN_MODULE_TAKEPOS_THEME',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6644,'MAIN_MODULE_TAKEPOS_TPL',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6645,'MAIN_MODULE_TAKEPOS_BARCODE',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6646,'MAIN_MODULE_TAKEPOS_MODELS',1,'0','chaine',0,NULL,'2019-06-05 09:15:58'),(6647,'MAIN_MODULE_SOCIALNETWORKS',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:16:49'),(6795,'TICKET_ADDON',1,'mod_ticket_simple','chaine',0,'','2019-09-26 12:07:59'),(6796,'PRODUCT_CODEPRODUCT_ADDON',1,'mod_codeproduct_elephant','chaine',0,'','2019-09-26 12:59:00'),(6800,'CASHDESK_ID_THIRDPARTY1',1,'7','chaine',0,'','2019-09-26 15:30:09'),(6801,'CASHDESK_ID_BANKACCOUNT_CASH1',1,'3','chaine',0,'','2019-09-26 15:30:09'),(6802,'CASHDESK_ID_BANKACCOUNT_CHEQUE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6803,'CASHDESK_ID_BANKACCOUNT_CB1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6804,'CASHDESK_ID_BANKACCOUNT_PRE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6805,'CASHDESK_ID_BANKACCOUNT_VIR1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6806,'CASHDESK_NO_DECREASE_STOCK1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6811,'FORCEPROJECT_ON_PROPOSAL',1,'1','chaine',0,'','2019-09-27 14:52:57'),(6813,'PROJECT_USE_OPPORTUNITIES',1,'1','chaine',0,'','2019-10-01 11:48:09'),(6814,'PACKTHEMEACTIVATEDTHEME',0,'modOwnTheme','chaine',0,'','2019-10-02 11:41:58'),(6815,'OWNTHEME_COL1',0,'#6a89cc','chaine',0,'','2019-10-02 11:41:58'),(6816,'OWNTHEME_COL2',0,'#60a3bc','chaine',0,'','2019-10-02 11:41:58'),(6817,'DOL_VERSION',0,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:41:58'),(6823,'OWNTHEME_COL_BODY_BCKGRD',0,'#E9E9E9','chaine',0,'','2019-10-02 11:41:58'),(6824,'OWNTHEME_COL_LOGO_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6825,'OWNTHEME_COL_TXT_MENU',0,'#b8c6e5','chaine',0,'','2019-10-02 11:41:58'),(6826,'OWNTHEME_COL_HEADER_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6827,'OWNTHEME_CUSTOM_CSS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6828,'OWNTHEME_CUSTOM_JS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6829,'OWNTHEME_FIXED_MENU',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6830,'OWNTHEME_D_HEADER_FONT_SIZE',0,'1.7rem','chaine',0,'','2019-10-02 11:41:58'),(6831,'OWNTHEME_S_HEADER_FONT_SIZE',0,'1.6rem','chaine',0,'','2019-10-02 11:41:58'),(6832,'OWNTHEME_D_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6833,'OWNTHEME_S_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6844,'MAIN_THEME',0,'eldy','chaine',0,'','2019-10-02 11:46:02'),(6845,'MAIN_MENU_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6846,'MAIN_MENUFRONT_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6847,'MAIN_MENU_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6848,'MAIN_MENUFRONT_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6849,'MAIN_UPLOAD_DOC',1,'20000','chaine',0,'','2019-10-02 11:46:54'),(6850,'MAIN_UMASK',1,'0664','chaine',0,'','2019-10-02 11:46:54'),(6851,'BECREATIVE_COL1',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6852,'BECREATIVE_COL2',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6853,'DOL_VERSION',1,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:47:10'),(6859,'BECREATIVE_COL_BODY_BCKGRD',1,'#e6eaef','chaine',0,'','2019-10-02 11:47:10'),(6860,'BECREATIVE_COL_LOGO_BCKGRD',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6861,'BECREATIVE_COL_TXT_MENU',1,'#b8c6e5','chaine',0,'','2019-10-02 11:47:10'),(6862,'BECREATIVE_COL_HEADER_BCKGRD',1,'#26a69a','chaine',0,'','2019-10-02 11:47:10'),(6863,'BECREATIVE_CUSTOM_CSS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6864,'BECREATIVE_CUSTOM_JS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6865,'BECREATIVE_FIXED_MENU',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6866,'BECREATIVE_D_HEADER_FONT_SIZE',1,'1.7rem','chaine',0,'','2019-10-02 11:47:10'),(6867,'BECREATIVE_S_HEADER_FONT_SIZE',1,'1.6rem','chaine',0,'','2019-10-02 11:47:10'),(6868,'BECREATIVE_D_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6869,'BECREATIVE_S_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6881,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6882,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6883,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6884,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6885,'ACCOUNTING_ACCOUNT_CUSTOMER',1,'411','chaine',0,'','2019-10-04 08:15:44'),(6886,'ACCOUNTING_ACCOUNT_SUPPLIER',1,'401','chaine',0,'','2019-10-04 08:15:44'),(6887,'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',1,'421','chaine',0,'','2019-10-04 08:15:44'),(6888,'ACCOUNTING_PRODUCT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6889,'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6890,'ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6891,'ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6892,'ACCOUNTING_SERVICE_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6893,'ACCOUNTING_SERVICE_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6894,'ACCOUNTING_VAT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6895,'ACCOUNTING_VAT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6896,'ACCOUNTING_VAT_PAY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6897,'ACCOUNTING_ACCOUNT_SUSPENSE',1,'471','chaine',0,'','2019-10-04 08:15:44'),(6898,'ACCOUNTING_ACCOUNT_TRANSFER_CASH',1,'58','chaine',0,'','2019-10-04 08:15:44'),(6899,'DONATION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6900,'ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6901,'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',1,'164','chaine',0,'','2019-10-04 08:15:44'),(6902,'LOAN_ACCOUNTING_ACCOUNT_INTEREST',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6903,'LOAN_ACCOUNTING_ACCOUNT_INSURANCE',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6912,'TICKET_ENABLE_PUBLIC_INTERFACE',1,'1','chaine',0,'','2019-10-04 11:44:33'),(6934,'TICKET_NOTIFICATION_EMAIL_FROM',1,'fff','chaine',0,'','2019-10-04 12:03:51'),(6935,'TICKET_NOTIFICATION_EMAIL_TO',1,'ff','chaine',0,'','2019-10-04 12:03:51'),(6936,'TICKET_MESSAGE_MAIL_INTRO',1,'Hello,
\r\nA new response was sent on a ticket that you contact. Here is the message:\"\"','chaine',0,'','2019-10-04 12:03:51'),(6937,'TICKET_MESSAGE_MAIL_SIGNATURE',1,'

Sincerely,

\r\n\r\n

--\"\"

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

Sincerely,

\r\n\r\n

--\"\"

\r\n','chaine',0,'','2019-10-04 12:03:51'),(7027,'USER_PASSWORD_GENERATED',1,'Perso','chaine',0,'','2019-10-07 10:52:46'),(7028,'USER_PASSWORD_PATTERN',1,'8;1;0;1;0;1','chaine',0,'','2019-10-07 10:57:03'),(7032,'MAIN_MODULE_BOM',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:49:41'),(7034,'BOM_ADDON',1,'mod_bom_standard','chaine',0,'Name of numbering rules of BOM','2019-10-08 18:49:41'),(7035,'BOM_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/boms','chaine',0,NULL,'2019-10-08 18:49:41'),(7036,'MAIN_MODULE_GEOIPMAXMIND',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:51:54'),(7037,'MAIN_MODULE_DAV',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:54:07'),(7122,'BOM_ADDON_PDF',1,'generic_bom_odt','chaine',0,'','2019-11-28 14:00:58'),(7195,'MAIN_AGENDA_ACTIONAUTO_MO_VALIDATE',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7196,'MAIN_AGENDA_ACTIONAUTO_MO_PRODUCED',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7197,'MAIN_AGENDA_ACTIONAUTO_MO_DELETE',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7198,'MAIN_AGENDA_ACTIONAUTO_MO_CANCEL',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7201,'TICKET_PUBLIC_INTERFACE_TOPIC',1,'MyBigCompany public interface for Ticket','chaine',0,'','2019-11-29 08:49:36'),(7202,'TICKET_PUBLIC_TEXT_HOME',1,'You can create a support ticket or view existing from its identifier tracking ticket.','chaine',0,'','2019-11-29 08:49:36'),(7203,'TICKET_PUBLIC_TEXT_HELP_MESSAGE',1,'Please accurately describe the problem. Provide the most information possible to allow us to correctly identify your request.','chaine',0,'','2019-11-29 08:49:36'),(7204,'TICKET_MESSAGE_MAIL_NEW',1,'TicketMessageMailNewText','chaine',0,'','2019-11-29 08:49:36'),(7209,'MAIN_MODULE_MRP',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-11-29 08:57:42'),(7210,'MAIN_MODULE_MRP_TRIGGERS',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7211,'MAIN_MODULE_MRP_LOGIN',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7212,'MAIN_MODULE_MRP_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7213,'MAIN_MODULE_MRP_MENUS',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7214,'MAIN_MODULE_MRP_TPL',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7215,'MAIN_MODULE_MRP_BARCODE',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7216,'MAIN_MODULE_MRP_MODELS',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7217,'MAIN_MODULE_MRP_THEME',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7218,'MAIN_MODULE_MRP_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7220,'MRP_MO_ADDON',1,'mod_mo_standard','chaine',0,'Name of numbering rules of MO','2019-11-29 08:57:42'),(7221,'MRP_MO_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/mrps','chaine',0,NULL,'2019-11-29 08:57:42'),(7222,'MRP_MO_ADDON_PDF',1,'generic_mo_odt','chaine',0,'','2019-11-29 08:57:47'),(7254,'MAIN_INFO_OPENINGHOURS_MONDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7255,'MAIN_INFO_OPENINGHOURS_TUESDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7256,'MAIN_INFO_OPENINGHOURS_WEDNESDAY',1,'8-13','chaine',0,'','2019-12-19 11:14:21'),(7257,'MAIN_INFO_OPENINGHOURS_THURSDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7258,'MAIN_INFO_OPENINGHOURS_FRIDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7264,'MAIN_INFO_ACCOUNTANT_NAME',1,'Bob Bookkeeper','chaine',0,'','2019-12-19 11:14:54'),(7265,'MAIN_INFO_ACCOUNTANT_TOWN',1,'Berlin','chaine',0,'','2019-12-19 11:14:54'),(7266,'MAIN_INFO_ACCOUNTANT_STATE',1,'0','chaine',0,'','2019-12-19 11:14:54'),(7267,'MAIN_INFO_ACCOUNTANT_COUNTRY',1,'5','chaine',0,'','2019-12-19 11:14:54'),(7268,'MAIN_INFO_ACCOUNTANT_MAIL',1,'mybookkeeper@example.com','chaine',0,'','2019-12-19 11:14:54'),(7313,'MODULEBUILDER_ASCIIDOCTOR',1,'asciidoctor','chaine',0,'','2019-12-20 10:57:21'),(7314,'MODULEBUILDER_ASCIIDOCTORPDF',1,'asciidoctor-pdf','chaine',0,'','2019-12-20 10:57:21'),(7337,'EXTERNAL_RSS_TITLE_1',1,'Dolibarr.org News','chaine',0,'','2019-12-20 12:10:38'),(7338,'EXTERNAL_RSS_URLRSS_1',1,'https://www.dolibarr.org/rss','chaine',0,'','2019-12-20 12:10:38'),(7339,'EXPENSEREPORT_ADDON',1,'mod_expensereport_jade','chaine',0,'','2019-12-20 16:33:46'),(7378,'COMPANY_USE_SEARCH_TO_SELECT',1,'0','chaine',0,'','2019-12-21 15:54:22'),(7420,'CASHDESK_SERVICES',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7421,'TAKEPOS_ROOT_CATEGORY_ID',1,'31','chaine',0,'','2019-12-23 12:15:06'),(7422,'TAKEPOSCONNECTOR',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7423,'TAKEPOS_BAR_RESTAURANT',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7424,'TAKEPOS_TICKET_VAT_GROUPPED',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7425,'TAKEPOS_AUTO_PRINT_TICKETS',1,'0','int',0,'','2019-12-23 12:15:06'),(7426,'TAKEPOS_NUMPAD',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7427,'TAKEPOS_NUM_TERMINALS',1,'1','chaine',0,'','2019-12-23 12:15:06'),(7428,'TAKEPOS_DIRECT_PAYMENT',1,'0','int',0,'','2019-12-23 12:15:06'),(7429,'TAKEPOS_CUSTOM_RECEIPT',1,'0','int',0,'','2019-12-23 12:15:06'),(7430,'TAKEPOS_EMAIL_TEMPLATE_INVOICE',1,'-1','chaine',0,'','2019-12-23 12:15:06'),(7452,'MEMBER_ENABLE_PUBLIC',1,'1','chaine',0,'','2020-01-01 10:31:46'),(7453,'MEMBER_NEWFORM_AMOUNT',1,'20','chaine',0,'','2020-01-01 10:31:46'),(7454,'MEMBER_NEWFORM_EDITAMOUNT',1,'0','chaine',0,'','2020-01-01 10:31:46'),(7455,'MEMBER_NEWFORM_PAYONLINE',1,'all','chaine',0,'','2020-01-01 10:31:46'),(7456,'MEMBER_NEWFORM_FORCETYPE',1,'1','chaine',0,'','2020-01-01 10:31:46'),(7470,'STRIPE_TEST_PUBLISHABLE_KEY',1,'pk_test_123456789','chaine',0,'','2020-01-01 11:43:44'),(7471,'STRIPE_TEST_SECRET_KEY',1,'sk_test_123456','chaine',0,'','2020-01-01 11:43:44'),(7472,'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS',1,'4','chaine',0,'','2020-01-01 11:43:44'),(7473,'STRIPE_USER_ACCOUNT_FOR_ACTIONS',1,'1','chaine',0,'','2020-01-01 11:43:44'),(7489,'CAPTURESERVER_SECURITY_KEY',1,'securitykey123','chaine',0,'','2020-01-01 12:00:49'),(7720,'SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED',1,'1','chaine',1,'','2020-01-01 17:19:12'),(8063,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8064,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8065,'MAIN_AGENDA_ACTIONAUTO_COMPANY_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8066,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_REFUSED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8067,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLASSIFY_BILLED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8068,'MAIN_AGENDA_ACTIONAUTO_PROPAL_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8069,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_SIGNED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8070,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8071,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8072,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8073,'MAIN_AGENDA_ACTIONAUTO_ORDER_CANCEL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8074,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLOSE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8075,'MAIN_AGENDA_ACTIONAUTO_ORDER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8076,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLASSIFY_BILLED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8077,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8078,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8079,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8080,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8081,'MAIN_AGENDA_ACTIONAUTO_BILL_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8082,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8083,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8084,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8085,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8086,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_CLOSE_SIGNED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8087,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_CLOSE_REFUSED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8088,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8089,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8090,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8091,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_RECEIVE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8092,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SUBMIT',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8093,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_APPROVE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8094,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_REFUSE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8095,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CLASSIFY_BILLED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8096,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8097,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8098,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8099,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8100,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_PAYED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8101,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8102,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8103,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_CANCELED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8104,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8105,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8106,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8107,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8108,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_REOPEN',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8109,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8110,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8111,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8112,'MAIN_AGENDA_ACTIONAUTO_MEMBER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8113,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8114,'MAIN_AGENDA_ACTIONAUTO_MEMBER_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8115,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8116,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8117,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8118,'MAIN_AGENDA_ACTIONAUTO_MEMBER_RESILIATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8119,'MAIN_AGENDA_ACTIONAUTO_MEMBER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8120,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8121,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8122,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8123,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8124,'MAIN_AGENDA_ACTIONAUTO_TASK_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8125,'MAIN_AGENDA_ACTIONAUTO_TASK_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8126,'MAIN_AGENDA_ACTIONAUTO_TASK_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8127,'MAIN_AGENDA_ACTIONAUTO_PROJECT_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8128,'MAIN_AGENDA_ACTIONAUTO_PROJECT_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8129,'MAIN_AGENDA_ACTIONAUTO_PROJECT_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8130,'MAIN_AGENDA_ACTIONAUTO_TICKET_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8131,'MAIN_AGENDA_ACTIONAUTO_TICKET_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8132,'MAIN_AGENDA_ACTIONAUTO_TICKET_ASSIGNED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8133,'MAIN_AGENDA_ACTIONAUTO_TICKET_CLOSE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8134,'MAIN_AGENDA_ACTIONAUTO_TICKET_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8135,'MAIN_AGENDA_ACTIONAUTO_TICKET_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8136,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8137,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8138,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8139,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_APPROVE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8140,'MAIN_AGENDA_ACTIONAUTO_USER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8141,'MAIN_AGENDA_ACTIONAUTO_BOM_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8142,'MAIN_AGENDA_ACTIONAUTO_BOM_UNVALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8143,'MAIN_AGENDA_ACTIONAUTO_BOM_CLOSE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8144,'MAIN_AGENDA_ACTIONAUTO_BOM_REOPEN',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8145,'MAIN_AGENDA_ACTIONAUTO_BOM_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8146,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8147,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_PRODUCED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8148,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8149,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_CANCEL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8169,'CABINETMED_DELAY_TO_LOCK_RECORD',1,'0','chaine',1,'Number of days before locking edit of consultation','2020-01-05 20:37:19'),(8190,'ACCOUNTING_PRODUCT_MODE',1,'ACCOUNTANCY_SELL_EXPORT','chaine',0,'','2020-01-06 01:23:30'),(8191,'MAIN_ENABLE_DEFAULT_VALUES',1,'1','chaine',0,'','2020-01-06 16:09:52'),(8210,'CABINETMED_RHEUMATOLOGY_ON',1,'0','texte',0,'','2020-01-06 16:51:43'),(8213,'MAIN_SEARCHFORM_SOCIETE',1,'1','texte',0,'','2020-01-06 16:51:43'),(8214,'CABINETMED_BANK_PATIENT_REQUIRED',1,'0','texte',0,'','2020-01-06 16:51:43'),(8215,'DIAGNOSTIC_IS_NOT_MANDATORY',1,'1','texte',0,'','2020-01-06 16:51:43'),(8216,'USER_ADDON_PDF_ODT',1,'generic_user_odt','chaine',0,'','2020-01-07 13:45:19'),(8217,'USERGROUP_ADDON_PDF_ODT',1,'generic_usergroup_odt','chaine',0,'','2020-01-07 13:45:23'),(8230,'MAIN_MODULE_EMAILCOLLECTOR',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-12 20:13:55'),(8232,'MAIN_MODULE_SUPPLIERPROPOSAL',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-13 14:37:09'),(8233,'MAIN_MODULE_EXPEDITION',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-13 14:38:20'),(8252,'SYSTEMTOOLS_MYSQLDUMP',1,'/usr/bin/mysqldump','chaine',0,'','2020-01-15 15:42:41'),(8256,'WEBSITE_EDITINLINE',1,'0','chaine',0,'','2020-01-17 11:07:44'),(8258,'WEBSITE_SUBCONTAINERSINLINE',1,'1','chaine',0,'','2020-01-17 12:52:48'),(8259,'ACCOUNTING_REEXPORT',1,'1','yesno',0,'','2020-01-17 13:42:56'),(8291,'PRODUIT_MULTIPRICES_LIMIT',1,'5','chaine',0,'','2020-01-17 14:21:46'),(8293,'PRODUIT_CUSTOMER_PRICES_BY_QTY',1,'0','chaine',0,'','2020-01-17 14:21:46'),(8303,'PRODUCT_PRICE_UNIQ',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8304,'PRODUIT_MULTIPRICES',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8305,'PRODUIT_CUSTOMER_PRICES',1,'1','chaine',0,'','2020-01-17 14:25:30'),(8306,'PRODUIT_SOUSPRODUITS',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8307,'PRODUIT_DESC_IN_FORM',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8308,'PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8309,'PRODUIT_USE_SEARCH_TO_SELECT',1,'1','chaine',0,'','2020-01-17 14:25:30'),(8310,'PRODUIT_FOURN_TEXTS',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8313,'MAIN_MODULE_FCKEDITOR',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-18 17:13:27'),(8314,'FCKEDITOR_ENABLE_TICKET',1,'1','chaine',0,'','2020-01-18 19:39:54'),(8321,'FCKEDITOR_SKIN',1,'moono-lisa','chaine',0,'','2020-01-18 19:41:15'),(8322,'FCKEDITOR_TEST',1,'Test < aaa
\r\n
\r\n\"\"','chaine',0,'','2020-01-18 19:41:15'),(8373,'MAIN_FEATURES_LEVEL',0,'0','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2020-01-20 17:42:42'),(8484,'MAIN_LANG_DEFAULT',1,'auto','chaine',0,'','2020-01-21 09:40:00'),(8485,'MAIN_IHM_PARAMS_REV',1,'11','chaine',0,'','2020-01-21 09:40:00'),(8486,'MAIN_MULTILANGS',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8487,'MAIN_THEME',1,'eldy','chaine',0,'','2020-01-21 09:40:00'),(8488,'THEME_ELDY_USE_HOVER',1,'237,244,251','chaine',0,'','2020-01-21 09:40:00'),(8489,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2020-01-21 09:40:00'),(8490,'MAIN_SIZE_SHORTLIST_LIMIT',1,'3','chaine',0,'','2020-01-21 09:40:00'),(8491,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8492,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8493,'MAIN_START_WEEK',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8494,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2020-01-21 09:40:00'),(8495,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2020-01-21 09:40:00'),(8496,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8497,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8498,'MAIN_HELPCENTER_DISABLELINK',0,'0','chaine',0,'','2020-01-21 09:40:00'),(8499,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n__(SomeTranslationAreUncomplete)__
','chaine',0,'','2020-01-21 09:40:00'),(8501,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8508,'MAIN_MODULE_ACCOUNTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:28'),(8509,'MAIN_MODULE_AGENDA',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:28'),(8510,'MAIN_MODULE_BARCODE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:28'),(8511,'MAIN_MODULE_CRON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:28'),(8512,'MAIN_MODULE_COMMANDE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:28'),(8513,'MAIN_MODULE_DON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:29'),(8514,'MAIN_MODULE_ECM',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:29'),(8515,'MAIN_MODULE_EXPENSEREPORT',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:29'),(8516,'MAIN_MODULE_FACTURE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:29'),(8517,'MAIN_MODULE_FOURNISSEUR',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:29'),(8518,'MAIN_MODULE_HOLIDAY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:29'),(8519,'MAIN_MODULE_OPENSURVEY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:29'),(8520,'MAIN_MODULE_PRINTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:29'),(8521,'MAIN_MODULE_RESOURCE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:29'),(8522,'MAIN_MODULE_SALARIES',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:29'),(8523,'MAIN_MODULE_SOCIETE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:30'),(8524,'MAIN_MODULE_SERVICE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:30'),(8525,'TAKEPOS_PRINT_METHOD',1,'browser','chaine',0,'','2020-06-12 17:12:30'),(8526,'MAIN_MODULE_TAKEPOS',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:30'),(8527,'MAIN_MODULE_TAKEPOS_TRIGGERS',1,'0','chaine',0,NULL,'2020-06-12 17:12:30'),(8528,'MAIN_MODULE_TAKEPOS_LOGIN',1,'0','chaine',0,NULL,'2020-06-12 17:12:30'),(8529,'MAIN_MODULE_TAKEPOS_SUBSTITUTIONS',1,'1','chaine',0,NULL,'2020-06-12 17:12:30'),(8530,'MAIN_MODULE_TAKEPOS_MENUS',1,'0','chaine',0,NULL,'2020-06-12 17:12:30'),(8531,'MAIN_MODULE_TAKEPOS_THEME',1,'0','chaine',0,NULL,'2020-06-12 17:12:30'),(8532,'MAIN_MODULE_TAKEPOS_TPL',1,'0','chaine',0,NULL,'2020-06-12 17:12:30'),(8533,'MAIN_MODULE_TAKEPOS_BARCODE',1,'0','chaine',0,NULL,'2020-06-12 17:12:30'),(8534,'MAIN_MODULE_TAKEPOS_MODELS',1,'0','chaine',0,NULL,'2020-06-12 17:12:30'),(8535,'MAIN_MODULE_USER',0,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:30'),(8536,'MAIN_MODULE_VARIANTS',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:30'),(8537,'MAIN_MODULE_WEBSITE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"::1\"}','2020-06-12 17:12:30'),(8538,'MAIN_VERSION_LAST_UPGRADE',0,'12.0.0','chaine',0,'Dolibarr version for last upgrade','2020-06-12 17:12:32'),(8540,'MAIN_FIRST_PING_OK_DATE',1,'20200612171237','chaine',0,'','2020-06-12 17:12:37'),(8541,'MAIN_FIRST_PING_OK_ID',1,'7d3fa4278b44d85aa629096595435c63','chaine',0,'','2020-06-12 17:12:37'),(8542,'MAIN_INFO_SOCIETE_COUNTRY',1,'117:IN:India','chaine',0,'','2020-06-12 17:24:42'),(8543,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2020-06-12 17:24:42'),(8544,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street.','chaine',0,'','2020-06-12 17:24:42'),(8545,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2020-06-12 17:24:42'),(8546,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2020-06-12 17:24:42'),(8547,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2020-06-12 17:24:42'),(8548,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2020-06-12 17:24:42'),(8549,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2020-06-12 17:24:42'),(8550,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2020-06-12 17:24:42'),(8551,'MAIN_INFO_SOCIETE_WEB',1,'https://www.dolibarr.org','chaine',0,'','2020-06-12 17:24:42'),(8552,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company','chaine',0,'','2020-06-12 17:24:42'),(8553,'MAIN_INFO_SOCIETE_GENCOD',1,'1234567890','chaine',0,'','2020-06-12 17:24:42'),(8554,'MAIN_INFO_SOCIETE_FACEBOOK_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8555,'MAIN_INFO_SOCIETE_TWITTER_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8556,'MAIN_INFO_SOCIETE_LINKEDIN_URL',1,'https://www.linkedin.com/company/9400559/admin/','chaine',0,'','2020-06-12 17:24:42'),(8557,'MAIN_INFO_SOCIETE_INSTAGRAM_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8558,'MAIN_INFO_SOCIETE_YOUTUBE_URL',1,'DolibarrERPCRM','chaine',0,'','2020-06-12 17:24:42'),(8559,'MAIN_INFO_SOCIETE_GITHUB_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8560,'MAIN_INFO_SOCIETE_MANAGERS',1,'Zack Zeceo','chaine',0,'','2020-06-12 17:24:42'),(8561,'MAIN_INFO_GDPR',1,'Zack Zeceo','chaine',0,'','2020-06-12 17:24:42'),(8562,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2020-06-12 17:24:42'),(8563,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2020-06-12 17:24:42'),(8564,'MAIN_INFO_SIREN',1,'123456','chaine',0,'','2020-06-12 17:24:42'),(8565,'MAIN_INFO_SIRET',1,'ABC-DEF','chaine',0,'','2020-06-12 17:24:42'),(8566,'MAIN_INFO_APE',1,'15E-45-8D','chaine',0,'','2020-06-12 17:24:42'),(8567,'MAIN_INFO_TVAINTRA',1,'FR12345678','chaine',0,'','2020-06-12 17:24:42'),(8568,'MAIN_INFO_SOCIETE_OBJECT',1,'A company demo to show how Dolibarr ERP CRM is wonderfull','chaine',0,'','2020-06-12 17:24:42'),(8569,'SOCIETE_FISCAL_MONTH_START',1,'4','chaine',0,'','2020-06-12 17:24:42'),(8570,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2020-06-12 17:24:42'),(8571,'FACTURE_LOCAL_TAX1_OPTION',1,'localtax1on','chaine',0,'','2020-06-12 17:24:42'),(8572,'FACTURE_LOCAL_TAX2_OPTION',1,'localtax2on','chaine',0,'','2020-06-12 17:24:42'),(8573,'MAIN_INFO_VALUE_LOCALTAX1',1,'0','chaine',0,'','2020-06-12 17:24:42'),(8574,'MAIN_INFO_LOCALTAX_CALC1',1,'0','chaine',0,'','2020-06-12 17:24:42'),(8575,'MAIN_INFO_VALUE_LOCALTAX2',1,'0','chaine',0,'','2020-06-12 17:24:42'),(8576,'MAIN_INFO_LOCALTAX_CALC2',1,'0','chaine',0,'','2020-06-12 17:24:42'); /*!40000 ALTER TABLE `llx_const` ENABLE KEYS */; UNLOCK TABLES; @@ -4543,11 +4668,11 @@ CREATE TABLE `llx_contrat` ( `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_supplier` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `entity` int(11) NOT NULL DEFAULT 1, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `date_contrat` datetime DEFAULT NULL, - `statut` smallint(6) DEFAULT '0', + `statut` smallint(6) DEFAULT 0, `mise_en_service` datetime DEFAULT NULL, `fin_validite` datetime DEFAULT NULL, `date_cloture` datetime DEFAULT NULL, @@ -4555,11 +4680,11 @@ CREATE TABLE `llx_contrat` ( `fk_projet` int(11) DEFAULT NULL, `fk_commercial_signature` int(11) DEFAULT NULL, `fk_commercial_suivi` int(11) DEFAULT NULL, - `fk_user_author` int(11) NOT NULL DEFAULT '0', + `fk_user_author` int(11) NOT NULL DEFAULT 0, `fk_user_mise_en_service` int(11) DEFAULT NULL, `fk_user_cloture` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -4594,7 +4719,7 @@ DROP TABLE IF EXISTS `llx_contrat_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_contrat_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -4620,49 +4745,49 @@ DROP TABLE IF EXISTS `llx_contratdet`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_contratdet` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_contrat` int(11) NOT NULL, `fk_product` int(11) DEFAULT NULL, - `statut` smallint(6) DEFAULT '0', - `label` text COLLATE utf8_unicode_ci, - `description` text COLLATE utf8_unicode_ci, + `statut` smallint(6) DEFAULT 0, + `label` text COLLATE utf8_unicode_ci DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_remise_except` int(11) DEFAULT NULL, `date_commande` datetime DEFAULT NULL, `date_ouverture_prevue` datetime DEFAULT NULL, `date_ouverture` datetime DEFAULT NULL, `date_fin_validite` datetime DEFAULT NULL, `date_cloture` datetime DEFAULT NULL, - `tva_tx` double(6,3) DEFAULT '0.000', + `tva_tx` double(6,3) DEFAULT 0.000, `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double NOT NULL, - `remise_percent` double DEFAULT '0', - `subprice` double(24,8) DEFAULT '0.00000000', + `remise_percent` double DEFAULT 0, + `subprice` double(24,8) DEFAULT 0.00000000, `price_ht` double DEFAULT NULL, - `remise` double DEFAULT '0', - `total_ht` double(24,8) DEFAULT '0.00000000', - `total_tva` double(24,8) DEFAULT '0.00000000', - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', - `product_type` int(11) DEFAULT '1', - `info_bits` int(11) DEFAULT '0', + `remise` double DEFAULT 0, + `total_ht` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, + `total_localtax1` double(24,8) DEFAULT 0.00000000, + `total_localtax2` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, + `product_type` int(11) DEFAULT 1, + `info_bits` int(11) DEFAULT 0, `fk_product_fournisseur_price` int(11) DEFAULT NULL, - `buy_price_ht` double(24,8) DEFAULT '0.00000000', - `fk_user_author` int(11) NOT NULL DEFAULT '0', + `buy_price_ht` double(24,8) DEFAULT 0.00000000, + `fk_user_author` int(11) NOT NULL DEFAULT 0, `fk_user_ouverture` int(11) DEFAULT NULL, `fk_user_cloture` int(11) DEFAULT NULL, - `commentaire` text COLLATE utf8_unicode_ci, + `commentaire` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_subprice` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`), KEY `idx_contratdet_fk_contrat` (`fk_contrat`), KEY `idx_contratdet_fk_product` (`fk_product`), @@ -4695,7 +4820,7 @@ DROP TABLE IF EXISTS `llx_contratdet_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_contratdet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -4721,12 +4846,12 @@ DROP TABLE IF EXISTS `llx_contratdet_log`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_contratdet_log` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_contratdet` int(11) NOT NULL, `date` datetime NOT NULL, `statut` smallint(6) NOT NULL, `fk_user_author` int(11) NOT NULL, - `commentaire` text COLLATE utf8_unicode_ci, + `commentaire` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_contratdet_log_fk_contratdet` (`fk_contratdet`), KEY `idx_contratdet_log_date` (`date`), @@ -4752,7 +4877,7 @@ DROP TABLE IF EXISTS `llx_cronjob`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_cronjob` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `jobtype` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `label` text COLLATE utf8_unicode_ci NOT NULL, @@ -4760,31 +4885,31 @@ CREATE TABLE `llx_cronjob` ( `classesname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `objectname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `methodename` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `params` text COLLATE utf8_unicode_ci, + `params` text COLLATE utf8_unicode_ci DEFAULT NULL, `md5params` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `module_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `priority` int(11) DEFAULT '0', + `priority` int(11) DEFAULT 0, `datelastrun` datetime DEFAULT NULL, `datenextrun` datetime DEFAULT NULL, `datestart` datetime DEFAULT NULL, `dateend` datetime DEFAULT NULL, `datelastresult` datetime DEFAULT NULL, - `lastresult` text COLLATE utf8_unicode_ci, - `lastoutput` text COLLATE utf8_unicode_ci, + `lastresult` text COLLATE utf8_unicode_ci DEFAULT NULL, + `lastoutput` text COLLATE utf8_unicode_ci DEFAULT NULL, `unitfrequency` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '3600', - `frequency` int(11) NOT NULL DEFAULT '0', + `frequency` int(11) NOT NULL DEFAULT 0, `nbrun` int(11) DEFAULT NULL, - `status` int(11) NOT NULL DEFAULT '1', + `status` int(11) NOT NULL DEFAULT 1, `fk_user_author` int(11) DEFAULT NULL, `fk_user_mod` int(11) DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `libname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) DEFAULT '0', - `maxrun` int(11) NOT NULL DEFAULT '0', - `autodelete` int(11) DEFAULT '0', + `entity` int(11) DEFAULT 0, + `maxrun` int(11) NOT NULL DEFAULT 0, + `autodelete` int(11) DEFAULT 0, `fk_mailing` int(11) DEFAULT NULL, `test` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', - `processing` int(11) NOT NULL DEFAULT '0', + `processing` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -4808,9 +4933,9 @@ DROP TABLE IF EXISTS `llx_default_values`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_default_values` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `user_id` int(11) NOT NULL DEFAULT '0', + `user_id` int(11) NOT NULL DEFAULT 0, `page` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `param` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `value` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -4839,20 +4964,20 @@ DROP TABLE IF EXISTS `llx_deplacement`; CREATE TABLE `llx_deplacement` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `dated` datetime DEFAULT NULL, `fk_user` int(11) NOT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `type` varchar(12) COLLATE utf8_unicode_ci NOT NULL, - `fk_statut` int(11) NOT NULL DEFAULT '1', + `fk_statut` int(11) NOT NULL DEFAULT 1, `km` double DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, - `fk_projet` int(11) DEFAULT '0', - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `fk_projet` int(11) DEFAULT 0, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -4878,13 +5003,13 @@ DROP TABLE IF EXISTS `llx_document_model`; CREATE TABLE `llx_document_model` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `nom` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `entity` int(11) NOT NULL DEFAULT 1, + `type` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_document_model` (`nom`,`type`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=381 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=386 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4893,7 +5018,7 @@ CREATE TABLE `llx_document_model` ( LOCK TABLES `llx_document_model` WRITE; /*!40000 ALTER TABLE `llx_document_model` DISABLE KEYS */; -INSERT INTO `llx_document_model` VALUES (9,'merou',1,'shipping',NULL,NULL),(181,'generic_invoice_odt',1,'invoice','ODT templates','FACTURE_ADDON_PDF_ODT_PATH'),(193,'canelle2',1,'invoice_supplier','canelle2',NULL),(195,'canelle',1,'invoice_supplier','canelle',NULL),(198,'azur',2,'propal',NULL,NULL),(199,'html_cerfafr',2,'donation',NULL,NULL),(200,'crabe',2,'invoice',NULL,NULL),(201,'generic_odt',1,'company','ODT templates','COMPANY_ADDON_PDF_ODT_PATH'),(250,'baleine',1,'project',NULL,NULL),(255,'soleil',1,'ficheinter',NULL,NULL),(256,'azur',1,'propal',NULL,NULL),(273,'beluga',1,'project','beluga',NULL),(278,'standard',1,'expensereport',NULL,NULL),(281,'sepamandate',1,'bankaccount','sepamandate',NULL),(299,'standard',1,'member',NULL,NULL),(319,'generic_bom_odt',1,'bom','ODT templates','BOM_ADDON_PDF_ODT_PATH'),(320,'generic_mo_odt',1,'mrp','ODT templates','MRP_MO_ADDON_PDF_ODT_PATH'),(366,'generic_user_odt',1,'user',NULL,NULL),(367,'generic_usergroup_odt',1,'group',NULL,NULL),(370,'aurore',1,'supplier_proposal',NULL,NULL),(371,'rouget',1,'shipping',NULL,NULL),(372,'typhon',1,'delivery',NULL,NULL),(377,'einstein',1,'order',NULL,NULL),(378,'html_cerfafr',1,'donation',NULL,NULL),(379,'crabe',1,'invoice',NULL,NULL),(380,'muscadet',1,'order_supplier',NULL,NULL); +INSERT INTO `llx_document_model` VALUES (9,'merou',1,'shipping',NULL,NULL),(181,'generic_invoice_odt',1,'invoice','ODT templates','FACTURE_ADDON_PDF_ODT_PATH'),(193,'canelle2',1,'invoice_supplier','canelle2',NULL),(195,'canelle',1,'invoice_supplier','canelle',NULL),(198,'azur',2,'propal',NULL,NULL),(199,'html_cerfafr',2,'donation',NULL,NULL),(200,'crabe',2,'invoice',NULL,NULL),(201,'generic_odt',1,'company','ODT templates','COMPANY_ADDON_PDF_ODT_PATH'),(250,'baleine',1,'project',NULL,NULL),(255,'soleil',1,'ficheinter',NULL,NULL),(256,'azur',1,'propal',NULL,NULL),(273,'beluga',1,'project','beluga',NULL),(281,'sepamandate',1,'bankaccount','sepamandate',NULL),(299,'standard',1,'member',NULL,NULL),(319,'generic_bom_odt',1,'bom','ODT templates','BOM_ADDON_PDF_ODT_PATH'),(320,'generic_mo_odt',1,'mrp','ODT templates','MRP_MO_ADDON_PDF_ODT_PATH'),(366,'generic_user_odt',1,'user',NULL,NULL),(367,'generic_usergroup_odt',1,'group',NULL,NULL),(370,'aurore',1,'supplier_proposal',NULL,NULL),(371,'rouget',1,'shipping',NULL,NULL),(372,'typhon',1,'delivery',NULL,NULL),(381,'einstein',1,'order',NULL,NULL),(382,'html_cerfafr',1,'donation',NULL,NULL),(383,'standard',1,'expensereport',NULL,NULL),(384,'crabe',1,'invoice',NULL,NULL),(385,'muscadet',1,'order_supplier',NULL,NULL); /*!40000 ALTER TABLE `llx_document_model` ENABLE KEYS */; UNLOCK TABLES; @@ -4907,18 +5032,18 @@ DROP TABLE IF EXISTS `llx_don`; CREATE TABLE `llx_don` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `entity` int(11) NOT NULL DEFAULT 1, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_statut` smallint(6) NOT NULL DEFAULT 0, `datec` datetime DEFAULT NULL, `datedon` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_payment` int(11) DEFAULT NULL, - `paid` smallint(6) NOT NULL DEFAULT '0', + `paid` smallint(6) NOT NULL DEFAULT 0, `firstname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `lastname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `societe` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `address` text COLLATE utf8_unicode_ci, + `address` text COLLATE utf8_unicode_ci DEFAULT NULL, `zip` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -4926,12 +5051,12 @@ CREATE TABLE `llx_don` ( `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phone` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, `phone_mobile` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, - `public` smallint(6) NOT NULL DEFAULT '1', + `public` smallint(6) NOT NULL DEFAULT 1, `fk_projet` int(11) DEFAULT NULL, `fk_user_author` int(11) NOT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `date_valid` datetime DEFAULT NULL, @@ -4961,7 +5086,7 @@ DROP TABLE IF EXISTS `llx_don_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_don_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -4988,17 +5113,17 @@ DROP TABLE IF EXISTS `llx_ecm_directories`; CREATE TABLE `llx_ecm_directories` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_parent` int(11) DEFAULT NULL, `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `cachenbofdoc` int(11) NOT NULL DEFAULT '0', + `cachenbofdoc` int(11) NOT NULL DEFAULT 0, `fullpath` varchar(750) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_c` datetime DEFAULT NULL, - `date_m` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `date_m` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_c` int(11) DEFAULT NULL, `fk_user_m` int(11) DEFAULT NULL, - `acl` text COLLATE utf8_unicode_ci, + `acl` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ecm_directories` (`label`,`fk_parent`,`entity`), KEY `idx_ecm_directories_fk_user_c` (`fk_user_c`), @@ -5030,23 +5155,23 @@ CREATE TABLE `llx_ecm_files` ( `ref` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `share` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `filename` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `filepath` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fullpath_orig` varchar(750) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, - `keywords` text COLLATE utf8_unicode_ci, - `cover` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `keywords` text COLLATE utf8_unicode_ci DEFAULT NULL, + `cover` text COLLATE utf8_unicode_ci DEFAULT NULL, `gen_or_uploaded` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_c` datetime DEFAULT NULL, - `date_m` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `date_m` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_c` int(11) DEFAULT NULL, `fk_user_m` int(11) DEFAULT NULL, - `acl` text COLLATE utf8_unicode_ci, + `acl` text COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) DEFAULT NULL, `keyword` varchar(750) COLLATE utf8_unicode_ci DEFAULT NULL, - `src_object_type` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `src_object_type` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `src_object_id` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ecm_files` (`filepath`,`filename`,`entity`), @@ -5074,8 +5199,8 @@ DROP TABLE IF EXISTS `llx_ecommerce_category`; CREATE TABLE `llx_ecommerce_category` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `type` tinyint(4) NOT NULL DEFAULT '1', - `description` text COLLATE utf8_unicode_ci, + `type` tinyint(4) NOT NULL DEFAULT 1, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_category` int(11) NOT NULL, `fk_site` int(11) NOT NULL, `remote_id` int(11) NOT NULL, @@ -5108,7 +5233,7 @@ DROP TABLE IF EXISTS `llx_element_contact`; CREATE TABLE `llx_element_contact` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datecreate` datetime DEFAULT NULL, - `statut` smallint(6) DEFAULT '5', + `statut` smallint(6) DEFAULT 5, `element_id` int(11) NOT NULL, `fk_c_type_contact` int(11) NOT NULL, `fk_socpeople` int(11) NOT NULL, @@ -5117,7 +5242,7 @@ CREATE TABLE `llx_element_contact` ( KEY `fk_element_contact_fk_c_type_contact` (`fk_c_type_contact`), KEY `idx_element_contact_fk_socpeople` (`fk_socpeople`), CONSTRAINT `fk_element_contact_fk_c_type_contact` FOREIGN KEY (`fk_c_type_contact`) REFERENCES `llx_c_type_contact` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5126,7 +5251,7 @@ CREATE TABLE `llx_element_contact` ( LOCK TABLES `llx_element_contact` WRITE; /*!40000 ALTER TABLE `llx_element_contact` DISABLE KEYS */; -INSERT INTO `llx_element_contact` VALUES (1,'2012-07-09 00:49:43',4,1,160,1),(2,'2012-07-09 00:49:56',4,2,160,1),(3,'2012-07-09 00:50:19',4,3,160,1),(4,'2012-07-09 00:50:42',4,4,160,1),(5,'2012-07-09 01:52:36',4,1,120,1),(6,'2012-07-09 01:53:25',4,1,10,2),(7,'2012-07-09 01:53:25',4,1,11,2),(8,'2012-07-10 18:13:37',4,2,10,2),(9,'2012-07-10 18:13:37',4,2,11,2),(11,'2012-07-11 16:22:36',4,5,160,1),(12,'2012-07-11 16:23:53',4,2,180,1),(13,'2015-01-23 15:04:27',4,19,200,5),(14,'2015-01-23 16:06:37',4,19,210,2),(15,'2015-01-23 16:12:43',4,19,220,2),(16,'2015-03-06 10:04:57',4,3,10,1),(17,'2015-03-06 10:04:57',4,3,11,1),(18,'2016-12-21 13:52:41',4,3,180,1),(19,'2016-12-21 13:55:39',4,4,180,1),(20,'2016-12-21 14:16:58',4,5,180,1),(21,'2018-07-30 15:29:07',4,6,160,12),(22,'2018-07-30 15:29:48',4,7,160,12),(23,'2018-07-30 15:30:25',4,8,160,12),(24,'2018-07-30 15:33:27',4,6,180,12),(25,'2018-07-30 15:33:39',4,7,180,12),(26,'2018-07-30 15:33:54',4,8,180,12),(27,'2018-07-30 15:34:09',4,9,180,12),(28,'2018-07-31 18:27:20',4,9,160,12),(29,'2019-09-26 14:09:02',4,2,155,12),(30,'2019-09-26 14:10:31',4,3,157,1),(31,'2019-09-26 14:10:57',4,3,155,14),(32,'2019-11-29 12:46:47',4,6,155,16),(33,'2019-11-29 12:52:53',4,7,155,16),(34,'2019-12-21 19:46:33',4,10,160,12),(35,'2019-12-21 19:49:28',4,11,160,12),(36,'2019-12-21 19:52:12',4,12,160,12),(37,'2019-12-21 19:53:21',4,13,160,12); +INSERT INTO `llx_element_contact` VALUES (1,'2012-07-09 00:49:43',4,1,160,1),(2,'2012-07-09 00:49:56',4,2,160,1),(3,'2012-07-09 00:50:19',4,3,160,1),(4,'2012-07-09 00:50:42',4,4,160,1),(5,'2012-07-09 01:52:36',4,1,120,1),(6,'2012-07-09 01:53:25',4,1,10,2),(7,'2012-07-09 01:53:25',4,1,11,2),(8,'2012-07-10 18:13:37',4,2,10,2),(9,'2012-07-10 18:13:37',4,2,11,2),(11,'2012-07-11 16:22:36',4,5,160,1),(12,'2012-07-11 16:23:53',4,2,180,1),(13,'2015-01-23 15:04:27',4,19,200,5),(14,'2015-01-23 16:06:37',4,19,210,2),(15,'2015-01-23 16:12:43',4,19,220,2),(16,'2015-03-06 10:04:57',4,3,10,1),(17,'2015-03-06 10:04:57',4,3,11,1),(18,'2016-12-21 13:52:41',4,3,180,1),(19,'2016-12-21 13:55:39',4,4,180,1),(20,'2016-12-21 14:16:58',4,5,180,1),(21,'2018-07-30 15:29:07',4,6,160,12),(22,'2018-07-30 15:29:48',4,7,160,12),(23,'2018-07-30 15:30:25',4,8,160,12),(24,'2018-07-30 15:33:27',4,6,180,12),(25,'2018-07-30 15:33:39',4,7,180,12),(26,'2018-07-30 15:33:54',4,8,180,12),(27,'2018-07-30 15:34:09',4,9,180,12),(28,'2018-07-31 18:27:20',4,9,160,12),(29,'2019-09-26 14:09:02',4,2,155,12),(30,'2019-09-26 14:10:31',4,3,157,1),(31,'2019-09-26 14:10:57',4,3,155,14),(32,'2019-11-29 12:46:47',4,6,155,16),(33,'2019-11-29 12:52:53',4,7,155,16),(34,'2019-12-21 19:46:33',4,10,160,12),(35,'2019-12-21 19:49:28',4,11,160,12),(36,'2019-12-21 19:52:12',4,12,160,12),(37,'2019-12-21 19:53:21',4,13,160,12),(38,'2020-06-12 19:13:21',4,4,180,12),(39,'2020-06-12 19:13:21',4,1,161,12); /*!40000 ALTER TABLE `llx_element_contact` ENABLE KEYS */; UNLOCK TABLES; @@ -5202,12 +5327,12 @@ CREATE TABLE `llx_element_resources` ( `busy` int(11) DEFAULT NULL, `mandatory` int(11) DEFAULT NULL, `fk_user_create` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `duree` double DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_element_resources_idx1` (`resource_id`,`resource_type`,`element_id`,`element_type`), KEY `idx_element_element_element_id` (`element_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5216,6 +5341,7 @@ CREATE TABLE `llx_element_resources` ( LOCK TABLES `llx_element_resources` WRITE; /*!40000 ALTER TABLE `llx_element_resources` DISABLE KEYS */; +INSERT INTO `llx_element_resources` VALUES (1,604,'action',4,'dolresource',1,0,NULL,'2020-06-12 17:28:39',NULL); /*!40000 ALTER TABLE `llx_element_resources` ENABLE KEYS */; UNLOCK TABLES; @@ -5228,32 +5354,33 @@ DROP TABLE IF EXISTS `llx_emailcollector_emailcollector`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_emailcollector_emailcollector` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` mediumtext COLLATE utf8_unicode_ci, + `description` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `host` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `user` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `password` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `source_directory` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `filter` mediumtext COLLATE utf8_unicode_ci, + `filter` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `actiontodo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `target_directory` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `datelastresult` datetime DEFAULT NULL, `lastresult` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `note_public` mediumtext COLLATE utf8_unicode_ci, - `note_private` mediumtext COLLATE utf8_unicode_ci, + `note_public` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) NOT NULL, `codelastresult` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) DEFAULT '0', + `position` int(11) DEFAULT 0, `login` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `datelastok` datetime DEFAULT NULL, - `maxemailpercollect` int(11) DEFAULT '100', + `maxemailpercollect` int(11) DEFAULT 100, + `hostcharset` varchar(16) COLLATE utf8_unicode_ci DEFAULT 'UTF-8', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_emailcollector_emailcollector_ref` (`ref`,`entity`), KEY `idx_emailcollector_rowid` (`rowid`), @@ -5268,7 +5395,7 @@ CREATE TABLE `llx_emailcollector_emailcollector` ( LOCK TABLES `llx_emailcollector_emailcollector` WRITE; /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` DISABLE KEYS */; -INSERT INTO `llx_emailcollector_emailcollector` VALUES (3,1,'Collect_Ticket_Requets','Example to collect ticket requests','This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-01-12 20:13:55',12,NULL,NULL,0,NULL,0,NULL,NULL,100),(4,1,'Collect_Responses','Example to collect any email responses','This collector will scan your mailbox to find all emails that are an answer of an email sent from your application. An event with the email response will be recorded at the good place (Module Agenda must be enabled). For example, if your send a commercial proposal, order or invoice by email and your customer answers your email, the system will automatically find the answer and add it into your ERP.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-01-12 20:13:55',12,NULL,NULL,0,NULL,0,NULL,NULL,100),(5,1,'Collect_Leads','Example to collect leads','This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can\'t be found in database (new customer), the lead will be attached to the thirdparty with ID 1.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-01-12 20:13:55',12,NULL,NULL,0,NULL,0,NULL,NULL,100); +INSERT INTO `llx_emailcollector_emailcollector` VALUES (3,1,'Collect_Ticket_Requets','Example to collect ticket requests','This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-01-12 20:13:55',12,NULL,NULL,0,NULL,0,NULL,NULL,100,'UTF-8'),(4,1,'Collect_Responses','Example to collect any email responses','This collector will scan your mailbox to find all emails that are an answer of an email sent from your application. An event with the email response will be recorded at the good place (Module Agenda must be enabled). For example, if your send a commercial proposal, order or invoice by email and your customer answers your email, the system will automatically find the answer and add it into your ERP.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-01-12 20:13:55',12,NULL,NULL,0,NULL,0,NULL,NULL,100,'UTF-8'),(5,1,'Collect_Leads','Example to collect leads','This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can\'t be found in database (new customer), the lead will be attached to the thirdparty with ID 1.',NULL,NULL,NULL,'INBOX',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2020-01-13 00:13:55','2020-01-12 20:13:55',12,NULL,NULL,0,NULL,0,NULL,NULL,100,'UTF-8'); /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` ENABLE KEYS */; UNLOCK TABLES; @@ -5285,12 +5412,12 @@ CREATE TABLE `llx_emailcollector_emailcollectoraction` ( `type` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `actionparam` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) NOT NULL, - `position` int(11) DEFAULT '0', + `position` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_emailcollector_emailcollectoraction` (`fk_emailcollector`,`type`), KEY `idx_emailcollector_fk_emailcollector` (`fk_emailcollector`), @@ -5321,7 +5448,7 @@ CREATE TABLE `llx_emailcollector_emailcollectorfilter` ( `type` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `rulevalue` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -5354,13 +5481,13 @@ DROP TABLE IF EXISTS `llx_emailsenderprofile`; CREATE TABLE `llx_emailsenderprofile` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, - `note_public` mediumtext COLLATE utf8_unicode_ci, - `note_private` mediumtext COLLATE utf8_unicode_ci, + `note_public` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -5392,7 +5519,7 @@ DROP TABLE IF EXISTS `llx_emailsenderprofile_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_emailsenderprofile_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -5418,21 +5545,23 @@ DROP TABLE IF EXISTS `llx_entrepot`; CREATE TABLE `llx_entrepot` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `ref` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `description` text COLLATE utf8_unicode_ci, + `entity` int(11) NOT NULL DEFAULT 1, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `lieu` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `zip` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_departement` int(11) DEFAULT NULL, - `fk_pays` int(11) DEFAULT '0', - `statut` tinyint(4) DEFAULT '1', + `fk_pays` int(11) DEFAULT 0, + `statut` tinyint(4) DEFAULT 1, `fk_user_author` int(11) DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_parent` int(11) DEFAULT '0', + `fk_parent` int(11) DEFAULT 0, + `fax` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_entrepot_label` (`ref`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -5444,7 +5573,7 @@ CREATE TABLE `llx_entrepot` ( LOCK TABLES `llx_entrepot` WRITE; /*!40000 ALTER TABLE `llx_entrepot` DISABLE KEYS */; -INSERT INTO `llx_entrepot` VALUES (1,'2012-07-09 00:31:22','2012-07-08 22:40:36','WAREHOUSEHOUSTON',1,'Warehouse located at Houston','Warehouse houston','','','Houston',NULL,11,1,1,NULL,NULL,0),(2,'2012-07-09 00:41:03','2012-07-08 22:41:03','WAREHOUSEPARIS',1,'
','Warehouse Paris','','75000','Paris',NULL,1,1,1,NULL,NULL,0),(3,'2012-07-11 16:18:59','2018-07-30 13:52:08','Stock personnel Dupont',1,'Cet entrepôt représente le stock personnel de Alain Dupont','','','','',NULL,2,1,1,NULL,NULL,0),(9,'2017-10-03 11:47:41','2017-10-03 09:47:41','Personal stock Marie Curie',1,'This warehouse represents personal stock of Marie Curie','','','','',NULL,1,1,1,NULL,NULL,0),(10,'2017-10-05 09:07:52','2018-07-30 13:52:24','Personal stock Alex Theceo',1,'This warehouse represents personal stock of Alex Theceo','','','','',NULL,3,1,1,NULL,NULL,0),(12,'2017-10-05 21:29:35','2017-10-05 19:29:35','Personal stock Charly Commery',1,'This warehouse represents personal stock of Charly Commery','','','','',NULL,1,1,11,NULL,NULL,0),(13,'2017-10-05 21:33:33','2018-07-30 13:51:38','Personal stock Sam Scientol',1,'This warehouse represents personal stock of Sam Scientol','','','7500','Paris',NULL,1,0,11,NULL,NULL,0),(18,'2018-01-22 17:27:02','2018-01-22 16:27:02','Personal stock Laurent Destailleur',1,'This warehouse represents personal stock of Laurent Destailleur','','','','',NULL,1,1,12,NULL,NULL,0),(19,'2018-07-30 16:50:23','2018-07-30 12:50:23','Personal stock Eldy',1,'This warehouse represents personal stock of Eldy','','','','',NULL,14,1,12,NULL,NULL,0),(20,'2017-02-02 03:55:45','2017-02-01 23:55:45','Personal stock Alex Boston',1,'This warehouse represents personal stock of Alex Boston','','','','',NULL,14,1,12,NULL,NULL,NULL); +INSERT INTO `llx_entrepot` VALUES (1,'2012-07-09 00:31:22','2020-06-12 17:18:30','WAREHOUSEHOUSTON',1,'Warehouse located at Houston','Warehouse houston','','','Houston',NULL,11,1,1,NULL,NULL,NULL,'',''),(2,'2012-07-09 00:41:03','2020-06-12 17:18:33','WAREHOUSEPARIS',1,'','Warehouse Paris','','75000','Paris',NULL,1,1,1,NULL,NULL,NULL,'',''),(3,'2012-07-11 16:18:59','2020-06-12 17:18:25','Stock personnel Dupont',1,'Cet entrepôt représente le stock personnel de Alain Dupont','','','','',NULL,2,1,1,NULL,NULL,NULL,'',''),(9,'2017-10-03 11:47:41','2017-10-03 09:47:41','Personal stock Marie Curie',1,'This warehouse represents personal stock of Marie Curie','','','','',NULL,1,1,1,NULL,NULL,0,NULL,NULL),(10,'2017-10-05 09:07:52','2018-07-30 13:52:24','Personal stock Alex Theceo',1,'This warehouse represents personal stock of Alex Theceo','','','','',NULL,3,1,1,NULL,NULL,0,NULL,NULL),(12,'2017-10-05 21:29:35','2017-10-05 19:29:35','Personal stock Charly Commery',1,'This warehouse represents personal stock of Charly Commery','','','','',NULL,1,1,11,NULL,NULL,0,NULL,NULL),(13,'2017-10-05 21:33:33','2018-07-30 13:51:38','Personal stock Sam Scientol',1,'This warehouse represents personal stock of Sam Scientol','','','7500','Paris',NULL,1,0,11,NULL,NULL,0,NULL,NULL),(18,'2018-01-22 17:27:02','2020-06-12 17:18:18','Personal stock Laurent Destailleur',1,'This warehouse represents personal stock of Laurent Destailleur','','','','',NULL,1,1,12,NULL,NULL,NULL,'',''),(19,'2018-07-30 16:50:23','2020-06-12 17:18:12','Personal stock Eldy',1,'This warehouse represents personal stock of Eldy','','','','',NULL,14,1,12,NULL,NULL,NULL,'',''),(20,'2017-02-02 03:55:45','2020-06-12 17:18:55','Personal stock Alex Boston',1,'This warehouse represents personal stock of Alex Boston','PSTOCKALEXB','','','',NULL,14,1,12,NULL,NULL,NULL,'',''); /*!40000 ALTER TABLE `llx_entrepot` ENABLE KEYS */; UNLOCK TABLES; @@ -5457,7 +5586,7 @@ DROP TABLE IF EXISTS `llx_entrepot_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_entrepot_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -5483,13 +5612,13 @@ DROP TABLE IF EXISTS `llx_establishment`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_establishment` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `zip` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_state` int(11) DEFAULT '0', - `fk_country` int(11) DEFAULT '0', + `fk_state` int(11) DEFAULT 0, + `fk_country` int(11) DEFAULT 0, `profid1` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `profid2` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `profid3` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -5497,8 +5626,8 @@ CREATE TABLE `llx_establishment` ( `fk_user_author` int(11) NOT NULL, `fk_user_mod` int(11) DEFAULT NULL, `datec` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `status` tinyint(4) DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `status` tinyint(4) DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -5546,9 +5675,9 @@ DROP TABLE IF EXISTS `llx_events`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_events` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `type` varchar(32) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `dateevent` datetime DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `description` varchar(250) COLLATE utf8_unicode_ci NOT NULL, @@ -5580,9 +5709,9 @@ DROP TABLE IF EXISTS `llx_expedition`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_expedition` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_customer` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) NOT NULL, `fk_projet` int(11) DEFAULT NULL, @@ -5597,7 +5726,7 @@ CREATE TABLE `llx_expedition` ( `fk_address` int(11) DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, `tracking_number` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_statut` smallint(6) DEFAULT '0', + `fk_statut` smallint(6) DEFAULT 0, `height` float DEFAULT NULL, `height_unit` int(11) DEFAULT NULL, `width` float DEFAULT NULL, @@ -5605,14 +5734,14 @@ CREATE TABLE `llx_expedition` ( `size` float DEFAULT NULL, `weight_units` int(11) DEFAULT NULL, `weight` float DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `billed` smallint(6) DEFAULT '0', + `billed` smallint(6) DEFAULT 0, `fk_user_modif` int(11) DEFAULT NULL, `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -5647,7 +5776,7 @@ DROP TABLE IF EXISTS `llx_expedition_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_expedition_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -5673,11 +5802,11 @@ DROP TABLE IF EXISTS `llx_expedition_methode`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_expedition_methode` ( `rowid` int(11) NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `libelle` varchar(50) COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci, - `active` tinyint(4) DEFAULT '0', + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `active` tinyint(4) DEFAULT 0, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -5703,7 +5832,7 @@ CREATE TABLE `llx_expedition_package` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_expedition` int(11) NOT NULL, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `value` double(24,8) DEFAULT '0.00000000', + `value` double(24,8) DEFAULT 0.00000000, `fk_package_type` int(11) DEFAULT NULL, `height` float DEFAULT NULL, `width` float DEFAULT NULL, @@ -5711,9 +5840,9 @@ CREATE TABLE `llx_expedition_package` ( `size_units` int(11) DEFAULT NULL, `weight` float DEFAULT NULL, `weight_units` int(11) DEFAULT NULL, - `dangerous_goods` smallint(6) DEFAULT '0', - `tail_lift` smallint(6) DEFAULT '0', - `rang` int(11) DEFAULT '0', + `dangerous_goods` smallint(6) DEFAULT 0, + `tail_lift` smallint(6) DEFAULT 0, + `rang` int(11) DEFAULT 0, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -5740,7 +5869,7 @@ CREATE TABLE `llx_expeditiondet` ( `fk_origin_line` int(11) DEFAULT NULL, `fk_entrepot` int(11) DEFAULT NULL, `qty` double DEFAULT NULL, - `rang` int(11) DEFAULT '0', + `rang` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), KEY `idx_expeditiondet_fk_expedition` (`fk_expedition`), KEY `idx_expeditiondet_fk_origin_line` (`fk_origin_line`), @@ -5770,8 +5899,8 @@ CREATE TABLE `llx_expeditiondet_batch` ( `fk_expeditiondet` int(11) NOT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, - `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `qty` double NOT NULL DEFAULT '0', + `batch` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `qty` double NOT NULL DEFAULT 0, `fk_origin_stock` int(11) NOT NULL, PRIMARY KEY (`rowid`), KEY `idx_fk_expeditiondet` (`fk_expeditiondet`), @@ -5797,7 +5926,7 @@ DROP TABLE IF EXISTS `llx_expeditiondet_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_expeditiondet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -5824,14 +5953,14 @@ DROP TABLE IF EXISTS `llx_expensereport`; CREATE TABLE `llx_expensereport` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(50) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_number_int` int(11) DEFAULT NULL, `ref_ext` int(11) DEFAULT NULL, - `total_ht` double(24,8) DEFAULT '0.00000000', - `total_tva` double(24,8) DEFAULT '0.00000000', - `localtax1` double(24,8) DEFAULT '0.00000000', - `localtax2` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', + `total_ht` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, + `localtax1` double(24,8) DEFAULT 0.00000000, + `localtax2` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, `date_debut` date NOT NULL, `date_fin` date NOT NULL, `date_create` datetime NOT NULL, @@ -5839,7 +5968,7 @@ CREATE TABLE `llx_expensereport` ( `date_approve` datetime DEFAULT NULL, `date_refuse` datetime DEFAULT NULL, `date_cancel` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_author` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, @@ -5849,9 +5978,9 @@ CREATE TABLE `llx_expensereport` ( `fk_user_cancel` int(11) DEFAULT NULL, `fk_statut` int(11) NOT NULL, `fk_c_paiement` int(11) DEFAULT NULL, - `paid` smallint(6) NOT NULL DEFAULT '0', - `note_public` text COLLATE utf8_unicode_ci, - `note_private` text COLLATE utf8_unicode_ci, + `paid` smallint(6) NOT NULL DEFAULT 0, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, `detail_refuse` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `detail_cancel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `integration_compta` int(11) DEFAULT NULL, @@ -5859,10 +5988,10 @@ CREATE TABLE `llx_expensereport` ( `model_pdf` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -5883,7 +6012,7 @@ CREATE TABLE `llx_expensereport` ( LOCK TABLES `llx_expensereport` WRITE; /*!40000 ALTER TABLE `llx_expensereport` DISABLE KEYS */; -INSERT INTO `llx_expensereport` VALUES (1,'ADMIN-ER00002-150101',1,2,NULL,8.33000000,1.67000000,0.00000000,0.00000000,10.00000000,'2017-01-01','2017-01-03','2018-01-22 19:03:37','2018-01-22 19:06:50','2017-02-16 02:12:40',NULL,NULL,'2017-02-15 22:12:40',12,NULL,12,12,12,NULL,NULL,5,NULL,0,'Holidays',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(2,'ER1912-0001',1,NULL,NULL,141.67000000,28.33000000,0.00000000,0.00000000,170.00000000,'2017-02-01','2017-02-28','2018-01-22 19:04:44','2019-12-20 20:34:13','2019-12-20 20:34:19',NULL,'2019-12-21 00:34:26','2019-12-20 16:34:26',12,12,12,12,12,NULL,12,4,NULL,0,'Work on projet X','','','aaaa',NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(3,'(PROV3)',1,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'2017-02-02','2017-02-02','2017-02-02 03:57:03','2017-02-02 00:00:00',NULL,NULL,NULL,'2018-03-16 10:00:54',19,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL); +INSERT INTO `llx_expensereport` VALUES (1,'ADMIN-ER00002-150101',1,2,NULL,8.33000000,1.67000000,0.00000000,0.00000000,10.00000000,'2020-01-01','2020-01-03','2020-01-22 19:03:37','2020-01-22 19:06:50','2020-02-16 02:12:40',NULL,NULL,'2020-06-12 17:12:08',12,NULL,12,12,12,NULL,NULL,5,NULL,0,'Holidays',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(2,'ER1912-0001',1,NULL,NULL,141.67000000,28.33000000,0.00000000,0.00000000,170.00000000,'2020-02-01','2020-02-28','2020-01-22 19:04:44','2021-12-20 20:34:13','2021-12-20 20:34:19',NULL,'2021-12-21 00:34:26','2020-06-12 17:12:08',12,12,12,12,12,NULL,12,4,NULL,0,'Work on projet X','','','aaaa',NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL),(3,'(PROV3)',1,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'2020-02-02','2020-02-02','2020-02-02 03:57:03','2020-02-02 00:00:00',NULL,NULL,NULL,'2020-06-12 17:12:08',19,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL); /*!40000 ALTER TABLE `llx_expensereport` ENABLE KEYS */; UNLOCK TABLES; @@ -5901,36 +6030,36 @@ CREATE TABLE `llx_expensereport_det` ( `fk_c_type_fees` int(11) NOT NULL, `fk_projet` int(11) DEFAULT NULL, `comments` text COLLATE utf8_unicode_ci NOT NULL, - `product_type` int(11) DEFAULT '-1', + `product_type` int(11) DEFAULT -1, `qty` double NOT NULL, - `subprice` double(24,8) NOT NULL DEFAULT '0.00000000', + `subprice` double(24,8) NOT NULL DEFAULT 0.00000000, `value_unit` double(24,8) NOT NULL, `remise_percent` double DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, - `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `total_ht` double(24,8) NOT NULL DEFAULT '0.00000000', - `total_tva` double(24,8) NOT NULL DEFAULT '0.00000000', - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) NOT NULL DEFAULT '0.00000000', + `total_ht` double(24,8) NOT NULL DEFAULT 0.00000000, + `total_tva` double(24,8) NOT NULL DEFAULT 0.00000000, + `total_localtax1` double(24,8) DEFAULT 0.00000000, + `total_localtax2` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) NOT NULL DEFAULT 0.00000000, `date` date NOT NULL, - `info_bits` int(11) DEFAULT '0', - `special_code` int(11) DEFAULT '0', - `rang` int(11) DEFAULT '0', + `info_bits` int(11) DEFAULT 0, + `special_code` int(11) DEFAULT 0, + `rang` int(11) DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', - `fk_facture` int(11) DEFAULT '0', - `fk_code_ventilation` int(11) DEFAULT '0', + `multicurrency_subprice` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, + `fk_facture` int(11) DEFAULT 0, + `fk_code_ventilation` int(11) DEFAULT 0, `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', - `rule_warning_message` text COLLATE utf8_unicode_ci, + `rule_warning_message` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_c_exp_tax_cat` int(11) DEFAULT NULL, `fk_ecm_files` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -5956,7 +6085,7 @@ DROP TABLE IF EXISTS `llx_expensereport_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_expensereport_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -5983,12 +6112,12 @@ DROP TABLE IF EXISTS `llx_expensereport_ik`; CREATE TABLE `llx_expensereport_ik` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `fk_c_exp_tax_cat` int(11) NOT NULL DEFAULT '0', - `fk_range` int(11) NOT NULL DEFAULT '0', - `coef` double NOT NULL DEFAULT '0', - `ikoffset` double NOT NULL DEFAULT '0', - `active` int(11) DEFAULT '1', + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_c_exp_tax_cat` int(11) NOT NULL DEFAULT 0, + `fk_range` int(11) NOT NULL DEFAULT 0, + `coef` double NOT NULL DEFAULT 0, + `ikoffset` double NOT NULL DEFAULT 0, + `active` int(11) DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -6013,7 +6142,7 @@ DROP TABLE IF EXISTS `llx_expensereport_rules`; CREATE TABLE `llx_expensereport_rules` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `dates` datetime NOT NULL, `datee` datetime NOT NULL, `amount` double(24,8) DEFAULT NULL, @@ -6022,8 +6151,8 @@ CREATE TABLE `llx_expensereport_rules` ( `fk_usergroup` int(11) DEFAULT NULL, `fk_c_type_fees` int(11) NOT NULL, `code_expense_rules_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL, - `is_for_all` tinyint(4) DEFAULT '0', - `entity` int(11) DEFAULT '1', + `is_for_all` tinyint(4) DEFAULT 0, + `entity` int(11) DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -6049,7 +6178,7 @@ CREATE TABLE `llx_export_compta` ( `ref` varchar(12) COLLATE utf8_unicode_ci NOT NULL, `date_export` datetime NOT NULL, `fk_user` int(11) NOT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -6072,11 +6201,11 @@ DROP TABLE IF EXISTS `llx_export_model`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_export_model` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_user` int(11) NOT NULL DEFAULT '0', + `fk_user` int(11) NOT NULL DEFAULT 0, `label` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `field` text COLLATE utf8_unicode_ci NOT NULL, - `filter` text COLLATE utf8_unicode_ci, + `filter` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_export_model` (`label`,`type`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -6103,29 +6232,29 @@ CREATE TABLE `llx_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `elementtype` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'member', `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `entity` int(11) NOT NULL DEFAULT 1, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `type` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, `size` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, - `pos` int(11) DEFAULT '0', - `alwayseditable` int(11) DEFAULT '0', - `param` text COLLATE utf8_unicode_ci, - `fieldunique` int(11) DEFAULT '0', - `fieldrequired` int(11) DEFAULT '0', + `pos` int(11) DEFAULT 0, + `alwayseditable` int(11) DEFAULT 0, + `param` text COLLATE utf8_unicode_ci DEFAULT NULL, + `fieldunique` int(11) DEFAULT 0, + `fieldrequired` int(11) DEFAULT 0, `perms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `list` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `totalizable` tinyint(1) DEFAULT '0', - `ishidden` int(11) DEFAULT '0', - `fieldcomputed` text COLLATE utf8_unicode_ci, + `totalizable` tinyint(1) DEFAULT 0, + `ishidden` int(11) DEFAULT 0, + `fieldcomputed` text COLLATE utf8_unicode_ci DEFAULT NULL, `fielddefault` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `langs` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, `enabled` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', - `help` text COLLATE utf8_unicode_ci, - `printable` tinyint(1) DEFAULT '0', + `help` text COLLATE utf8_unicode_ci DEFAULT NULL, + `printable` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_extrafields_name` (`name`,`entity`,`elementtype`) ) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -6151,10 +6280,10 @@ DROP TABLE IF EXISTS `llx_facture`; CREATE TABLE `llx_facture` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_int` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `type` smallint(6) NOT NULL DEFAULT '0', + `type` smallint(6) NOT NULL DEFAULT 0, `ref_client` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `increment` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) NOT NULL, @@ -6162,21 +6291,21 @@ CREATE TABLE `llx_facture` ( `datef` date DEFAULT NULL, `date_valid` date DEFAULT NULL, `date_closing` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `paye` smallint(6) NOT NULL DEFAULT '0', - `amount` double(24,8) NOT NULL DEFAULT '0.00000000', - `remise_percent` double DEFAULT '0', - `remise_absolue` double DEFAULT '0', - `remise` double DEFAULT '0', + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `paye` smallint(6) NOT NULL DEFAULT 0, + `amount` double(24,8) NOT NULL DEFAULT 0.00000000, + `remise_percent` double DEFAULT 0, + `remise_absolue` double DEFAULT 0, + `remise` double DEFAULT 0, `close_code` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `close_note` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `tva` double(24,8) DEFAULT '0.00000000', - `localtax1` double(24,8) DEFAULT '0.00000000', - `localtax2` double(24,8) DEFAULT '0.00000000', - `revenuestamp` double(24,8) DEFAULT '0.00000000', - `total` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', - `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `tva` double(24,8) DEFAULT 0.00000000, + `localtax1` double(24,8) DEFAULT 0.00000000, + `localtax2` double(24,8) DEFAULT 0.00000000, + `revenuestamp` double(24,8) DEFAULT 0.00000000, + `total` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, + `fk_statut` smallint(6) NOT NULL DEFAULT 0, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, @@ -6185,11 +6314,11 @@ CREATE TABLE `llx_facture` ( `fk_projet` int(11) DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_cond_reglement` int(11) NOT NULL DEFAULT '1', + `fk_cond_reglement` int(11) NOT NULL DEFAULT 1, `fk_mode_reglement` int(11) DEFAULT NULL, `date_lim_reglement` date DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -6204,10 +6333,10 @@ CREATE TABLE `llx_facture` ( `date_pointoftax` date DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, `fk_fac_rec_source` int(11) DEFAULT NULL, `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `module_source` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -6236,7 +6365,7 @@ CREATE TABLE `llx_facture` ( LOCK TABLES `llx_facture` WRITE; /*!40000 ALTER TABLE `llx_facture` DISABLE KEYS */; -INSERT INTO `llx_facture` VALUES (2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2012-07-10 18:20:13','2018-07-10',NULL,NULL,'2018-07-30 15:13:20',1,10.00000000,NULL,NULL,0,NULL,NULL,0.10000000,0.00000000,0.00000000,0.00000000,46.00000000,46.10000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2018-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2013-07-18 20:33:35','2018-07-18',NULL,NULL,'2018-07-30 15:13:20',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,15.00000000,15.00000000,2,1,NULL,1,NULL,NULL,1,NULL,NULL,1,0,'2018-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2013-08-01 03:34:11','2017-08-01',NULL,NULL,'2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,6,'2017-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2013-08-06 20:33:53','2017-08-06',NULL,NULL,'2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.98000000,0.00000000,0.00000000,0.00000000,5.00000000,5.98000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,4,'2017-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2013-08-08 02:41:44','2017-08-08',NULL,NULL,'2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2017-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2013-08-08 02:55:14','2017-08-08',NULL,NULL,'2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2017-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 17:45:20','2017-12-08','2017-12-08',NULL,'2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,-0.63000000,0.00000000,0.00000000,0.00000000,-11.00000000,-11.63000000,1,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2017-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 18:20:14','2017-12-08','2017-12-08',NULL,'2018-07-30 15:12:32',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,-5.00000000,2,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2017-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2014-12-09 20:04:19','2017-12-09','2018-02-12',NULL,'2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,2.74000000,0.00000000,0.00000000,0.00000000,14.00000000,16.74000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2017-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2017-12-11','2018-03-24',NULL,'2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,90.00000000,0.00000000,0.00000000,0.60000000,520.00000000,610.60000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2017-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2017-12-11','2017-03-03',NULL,'2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,'abandon',NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,3,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2017-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:35:51','2017-12-11','2017-12-12',NULL,'2018-07-30 15:12:32',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2017-12-11','This is a comment (private)','This is a comment (public)','generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:22:48','2018-01-19','2018-01-19',NULL,'2019-12-21 15:40:22',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,1,'2018-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,'facture/FS1301-0001/FS1301-0001.pdf',NULL,NULL),(149,'FA1601-0024',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:30:05','2018-01-19','2017-08-29','2020-01-02 20:49:34','2020-01-02 16:49:34',0,0.00000000,NULL,NULL,0,'other','test',1.80000000,0.90000000,0.90000000,0.00000000,20.00000000,23.60000000,2,1,NULL,12,12,NULL,NULL,NULL,NULL,0,0,'2018-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,20.00000000,1.80000000,23.60000000,NULL,'facture/FA1601-0024/FA1601-0024.pdf',NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:10','2018-01-19','2019-10-04',NULL,'2019-10-04 08:28:23',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,12,NULL,NULL,NULL,NULL,NULL,0,1,'2018-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,5.00000000,0.63000000,5.63000000,NULL,'facture/FA6801-0010/FA6801-0010.pdf',NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:58','2018-01-19','2018-01-19',NULL,'2018-07-30 15:13:20',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,1,'2018-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2015-03-06 16:47:48','2018-07-18','2016-03-06',NULL,'2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,1.11000000,0.00000000,0.00000000,0.00000000,8.89000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2018-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2015-03-20 14:30:11','2018-07-10','2018-03-20',NULL,'2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2018-07-10',NULL,NULL,'generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2015-03-22 09:40:10','2018-03-22','2017-03-02',NULL,'2017-02-06 04:11:17',0,0.00000000,NULL,NULL,0,NULL,NULL,17.64000000,0.00000000,0.00000000,0.40000000,340.00000000,358.04000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,3,'2018-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2016-03-03 19:22:03','2018-03-03','2017-03-03',NULL,'2018-07-30 15:13:20',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,-1000.00000000,1,1,NULL,1,NULL,32,NULL,NULL,NULL,0,0,'2018-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(216,'(PROV216)',1,NULL,NULL,0,NULL,NULL,26,'2017-02-12 23:21:27','2017-02-12',NULL,NULL,'2017-02-12 19:21:27',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2017-02-12',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,0,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(217,'(PROV217)',1,NULL,NULL,0,NULL,NULL,1,'2017-08-31 13:26:17','2017-08-31',NULL,NULL,'2020-01-20 11:25:41',0,0.00000000,NULL,NULL,0,NULL,NULL,1.13000000,0.00000000,0.00000000,0.00000000,21.00000000,22.13000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2017-08-31',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,21.00000000,1.13000000,22.13000000,NULL,'facture/(PROV217)/(PROV217).pdf',NULL,NULL),(218,'FA1909-0025',1,NULL,NULL,0,NULL,NULL,12,'2019-09-26 17:30:14','2019-09-26','2019-09-26',NULL,'2019-09-26 15:33:37',0,0.00000000,NULL,NULL,0,NULL,NULL,1.08000000,0.00000000,0.00000000,0.00000000,42.50000000,43.58000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,0,0,'2019-09-26',NULL,NULL,'',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,0,'EUR',1.00000000,42.50000000,1.08000000,43.58000000,NULL,NULL,'takepos','1'),(219,'(PROV-POS1-0)',1,NULL,NULL,0,NULL,NULL,1,'2019-11-28 19:04:03','2019-11-28',NULL,NULL,'2020-01-21 09:21:32',0,0.00000000,NULL,NULL,0,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,5.00000000,6.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'2019-11-28',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,0,'EUR',1.00000000,5.00000000,1.00000000,6.00000000,NULL,NULL,'takepos','1'),(220,'(PROV220)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:03:17','2020-01-16',NULL,NULL,'2020-01-16 01:03:17',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(221,'AC2001-0001',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:05','2020-01-16','2020-01-16',NULL,'2020-01-16 01:22:24',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,123.00000000,123.00000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,123.00000000,0.00000000,123.00000000,NULL,'facture/AC2001-0001/AC2001-0001.pdf',NULL,NULL),(222,'(PROV222)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:28','2020-01-16',NULL,NULL,'2020-01-16 01:21:28',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(223,'(PROV223)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:32:04','2020-01-16',NULL,NULL,'2020-01-16 01:32:04',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2020-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL,NULL),(224,'AC2001-0002',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:33:19','2020-01-16','2020-01-16','2020-01-16 02:36:48','2020-01-16 01:36:48',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,20.50000000,20.50000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,20.50000000,0.00000000,20.50000000,NULL,'facture/AC2001-0002/AC2001-0002.pdf',NULL,NULL),(225,'(PROV225)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:37:48','2020-01-16',NULL,NULL,'2020-01-16 01:37:55',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,389.50000000,389.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2020-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,389.50000000,0.00000000,389.50000000,NULL,'facture/(PROV225)/(PROV225).pdf',NULL,NULL),(226,'(PROV226)',1,NULL,NULL,3,NULL,NULL,11,'2020-01-19 14:20:54','2020-01-19',NULL,NULL,'2020-01-19 13:21:21',0,0.00000000,NULL,NULL,0,NULL,NULL,12.50000000,0.00000000,0.00000000,0.00000000,120.00000000,132.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,120.00000000,12.50000000,132.50000000,NULL,'facture/(PROV226)/(PROV226).pdf',NULL,NULL),(227,'AC2001-0003',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:22:54','2020-01-19','2020-01-19',NULL,'2020-01-19 13:51:48',0,0.00000000,NULL,NULL,0,NULL,NULL,39.20000000,0.00000000,0.00000000,0.00000000,200.00000000,239.20000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,'facture/AC2001-0003/AC2001-0003.pdf',NULL,NULL),(228,'AC2001-0004',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:24:49','2020-01-19','2020-01-19',NULL,'2020-01-19 14:13:07',0,0.00000000,NULL,NULL,0,NULL,NULL,1.94000000,0.00000000,0.00000000,0.00000000,48.60000000,50.54000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,48.60000000,1.94000000,50.54000000,NULL,'facture/AC2001-0004/AC2001-0004.pdf',NULL,NULL),(229,'FA1707-0026',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:17','2017-07-18','2020-01-21','2020-01-21 10:23:17','2020-01-21 09:23:17',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2017-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1707-0026/FA1707-0026.pdf',NULL,NULL),(230,'FA1807-0027',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:28','2018-07-18','2020-01-21','2020-01-21 10:23:28','2020-01-21 09:23:28',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2018-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1807-0027/FA1807-0027.pdf',NULL,NULL),(231,'FA1907-0028',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:49','2019-07-18','2020-01-21','2020-01-21 10:23:49','2020-01-21 09:23:49',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2019-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1907-0028/FA1907-0028.pdf',NULL,NULL); +INSERT INTO `llx_facture` VALUES (2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2012-07-10 18:20:13','2019-07-10',NULL,NULL,'2020-06-12 17:12:08',1,10.00000000,NULL,NULL,0,NULL,NULL,0.10000000,0.00000000,0.00000000,0.00000000,46.00000000,46.10000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2013-07-18 20:33:35','2019-07-18',NULL,NULL,'2020-06-12 17:12:09',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,15.00000000,15.00000000,2,1,NULL,1,NULL,NULL,1,NULL,NULL,1,0,'2019-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2013-08-01 03:34:11','2019-08-01',NULL,NULL,'2020-06-12 17:12:08',1,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,6,'2019-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2013-08-06 20:33:53','2019-08-06',NULL,NULL,'2020-06-12 17:12:08',1,0.00000000,NULL,NULL,0,NULL,NULL,0.98000000,0.00000000,0.00000000,0.00000000,5.00000000,5.98000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,4,'2019-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2013-08-08 02:41:44','2019-08-08',NULL,NULL,'2020-06-12 17:12:08',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2013-08-08 02:55:14','2019-08-08',NULL,NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 17:45:20','2019-12-08','2019-12-08',NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,NULL,NULL,-0.63000000,0.00000000,0.00000000,0.00000000,-11.00000000,-11.63000000,1,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2019-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 18:20:14','2019-12-08','2019-12-08',NULL,'2020-06-12 17:12:08',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,-5.00000000,2,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2019-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2014-12-09 20:04:19','2019-12-09','2020-02-12',NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,NULL,NULL,2.74000000,0.00000000,0.00000000,0.00000000,14.00000000,16.74000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2019-12-11','2020-03-24',NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,NULL,NULL,90.00000000,0.00000000,0.00000000,0.60000000,520.00000000,610.60000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2019-12-11','2020-03-03',NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,'abandon',NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,3,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:35:51','2019-12-11','2019-12-12',NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-12-11','This is a comment (private)','This is a comment (public)','generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:22:48','2020-01-19','2020-01-19',NULL,'2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,1,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,'facture/FS1301-0001/FS1301-0001.pdf',NULL,NULL),(149,'FA1601-0024',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:30:05','2020-01-19','2019-08-29','2020-01-02 20:49:34','2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,'other','test',1.80000000,0.90000000,0.90000000,0.00000000,20.00000000,23.60000000,2,1,NULL,12,12,NULL,NULL,NULL,NULL,0,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,20.00000000,1.80000000,23.60000000,NULL,'facture/FA1601-0024/FA1601-0024.pdf',NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:10','2020-01-19','2020-10-04',NULL,'2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,12,NULL,NULL,NULL,NULL,NULL,0,1,'2020-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,5.00000000,0.63000000,5.63000000,NULL,'facture/FA6801-0010/FA6801-0010.pdf',NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:58','2020-01-19','2020-01-19',NULL,'2020-06-12 17:12:09',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,1,'2020-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2015-03-06 16:47:48','2019-07-18','2018-03-06',NULL,'2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,NULL,NULL,1.11000000,0.00000000,0.00000000,0.00000000,8.89000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2015-03-20 14:30:11','2019-07-10','2020-03-20',NULL,'2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-07-10',NULL,NULL,'generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2015-03-22 09:40:10','2020-03-22','2019-03-02',NULL,'2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,NULL,NULL,17.64000000,0.00000000,0.00000000,0.40000000,340.00000000,358.04000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,3,'2020-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2016-03-03 19:22:03','2020-03-03','2019-03-03',NULL,'2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,-1000.00000000,1,1,NULL,1,NULL,32,NULL,NULL,NULL,0,0,'2020-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(216,'(PROV216)',1,NULL,NULL,0,NULL,NULL,26,'2017-02-12 23:21:27','2020-02-12',NULL,NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-02-12',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,0,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(217,'(PROV217)',1,NULL,NULL,0,NULL,NULL,1,'2017-08-31 13:26:17','2019-08-31',NULL,NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,NULL,NULL,1.13000000,0.00000000,0.00000000,0.00000000,21.00000000,22.13000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2019-08-31',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,21.00000000,1.13000000,22.13000000,NULL,'facture/(PROV217)/(PROV217).pdf',NULL,NULL),(218,'FA1909-0025',1,NULL,NULL,0,NULL,NULL,12,'2019-09-26 17:30:14','2019-09-26','2019-09-26',NULL,'2019-09-26 15:33:37',0,0.00000000,NULL,NULL,0,NULL,NULL,1.08000000,0.00000000,0.00000000,0.00000000,42.50000000,43.58000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,0,0,'2019-09-26',NULL,NULL,'',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,0,'EUR',1.00000000,42.50000000,1.08000000,43.58000000,NULL,NULL,'takepos','1'),(219,'(PROV-POS1-0)',1,NULL,NULL,0,NULL,NULL,1,'2019-11-28 19:04:03','2019-11-28',NULL,NULL,'2020-01-21 09:21:32',0,0.00000000,NULL,NULL,0,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,5.00000000,6.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'2019-11-28',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,0,'EUR',1.00000000,5.00000000,1.00000000,6.00000000,NULL,NULL,'takepos','1'),(220,'(PROV220)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:03:17','2020-01-16',NULL,NULL,'2020-01-16 01:03:17',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(221,'AC2001-0001',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:05','2020-01-16','2020-01-16',NULL,'2020-01-16 01:22:24',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,123.00000000,123.00000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,123.00000000,0.00000000,123.00000000,NULL,'facture/AC2001-0001/AC2001-0001.pdf',NULL,NULL),(222,'(PROV222)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:28','2020-01-16',NULL,NULL,'2020-01-16 01:21:28',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(223,'(PROV223)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:32:04','2020-01-16',NULL,NULL,'2020-01-16 01:32:04',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2020-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL,NULL),(224,'AC2001-0002',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:33:19','2020-01-16','2020-01-16','2020-01-16 02:36:48','2020-01-16 01:36:48',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,20.50000000,20.50000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,20.50000000,0.00000000,20.50000000,NULL,'facture/AC2001-0002/AC2001-0002.pdf',NULL,NULL),(225,'(PROV225)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:37:48','2020-01-16',NULL,NULL,'2020-01-16 01:37:55',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,389.50000000,389.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2020-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,389.50000000,0.00000000,389.50000000,NULL,'facture/(PROV225)/(PROV225).pdf',NULL,NULL),(226,'(PROV226)',1,NULL,NULL,3,NULL,NULL,11,'2020-01-19 14:20:54','2020-01-19',NULL,NULL,'2020-01-19 13:21:21',0,0.00000000,NULL,NULL,0,NULL,NULL,12.50000000,0.00000000,0.00000000,0.00000000,120.00000000,132.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,120.00000000,12.50000000,132.50000000,NULL,'facture/(PROV226)/(PROV226).pdf',NULL,NULL),(227,'AC2001-0003',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:22:54','2020-01-19','2020-01-19',NULL,'2020-01-19 13:51:48',0,0.00000000,NULL,NULL,0,NULL,NULL,39.20000000,0.00000000,0.00000000,0.00000000,200.00000000,239.20000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,'facture/AC2001-0003/AC2001-0003.pdf',NULL,NULL),(228,'AC2001-0004',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:24:49','2020-01-19','2020-01-19',NULL,'2020-01-19 14:13:07',0,0.00000000,NULL,NULL,0,NULL,NULL,1.94000000,0.00000000,0.00000000,0.00000000,48.60000000,50.54000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,1,'EUR',1.00000000,48.60000000,1.94000000,50.54000000,NULL,'facture/AC2001-0004/AC2001-0004.pdf',NULL,NULL),(229,'FA1707-0026',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:17','2019-07-18','2022-01-21','2020-01-21 10:23:17','2020-06-12 17:12:08',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2019-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1707-0026/FA1707-0026.pdf',NULL,NULL),(230,'FA1807-0027',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:28','2019-07-18','2021-01-21','2020-01-21 10:23:28','2020-06-12 17:12:09',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2019-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1807-0027/FA1807-0027.pdf',NULL,NULL),(231,'FA1907-0028',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:49','2019-07-18','2020-01-21','2020-01-21 10:23:49','2020-01-21 09:23:49',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2019-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1907-0028/FA1907-0028.pdf',NULL,NULL); /*!40000 ALTER TABLE `llx_facture` ENABLE KEYS */; UNLOCK TABLES; @@ -6249,7 +6378,7 @@ DROP TABLE IF EXISTS `llx_facture_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facture_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -6277,26 +6406,26 @@ CREATE TABLE `llx_facture_fourn` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `ref_supplier` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `type` smallint(6) NOT NULL DEFAULT '0', + `type` smallint(6) NOT NULL DEFAULT 0, `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, `datef` date DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `paye` smallint(6) NOT NULL DEFAULT '0', - `amount` double(24,8) NOT NULL DEFAULT '0.00000000', - `remise` double(24,8) DEFAULT '0.00000000', + `paye` smallint(6) NOT NULL DEFAULT 0, + `amount` double(24,8) NOT NULL DEFAULT 0.00000000, + `remise` double(24,8) DEFAULT 0.00000000, `close_code` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `close_note` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `tva` double(24,8) DEFAULT '0.00000000', - `localtax1` double(24,8) DEFAULT '0.00000000', - `localtax2` double(24,8) DEFAULT '0.00000000', - `total_ht` double(24,8) DEFAULT '0.00000000', - `total_tva` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', - `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `tva` double(24,8) DEFAULT 0.00000000, + `localtax1` double(24,8) DEFAULT 0.00000000, + `localtax2` double(24,8) DEFAULT 0.00000000, + `total_ht` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, + `fk_statut` smallint(6) NOT NULL DEFAULT 0, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, @@ -6306,8 +6435,8 @@ CREATE TABLE `llx_facture_fourn` ( `fk_cond_reglement` int(11) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, `date_lim_reglement` date DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -6315,10 +6444,10 @@ CREATE TABLE `llx_facture_fourn` ( `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_pointoftax` date DEFAULT NULL, `date_valid` date DEFAULT NULL, @@ -6361,37 +6490,37 @@ CREATE TABLE `llx_facture_fourn_det` ( `fk_product` int(11) DEFAULT NULL, `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `pu_ht` double(24,8) DEFAULT NULL, `pu_ttc` double(24,8) DEFAULT NULL, `qty` double DEFAULT NULL, - `remise_percent` double DEFAULT '0', + `remise_percent` double DEFAULT 0, `tva_tx` double(6,3) DEFAULT NULL, `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `total_ht` double(24,8) DEFAULT NULL, `tva` double(24,8) DEFAULT NULL, - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_localtax1` double(24,8) DEFAULT 0.00000000, + `total_localtax2` double(24,8) DEFAULT 0.00000000, `total_ttc` double(24,8) DEFAULT NULL, - `product_type` int(11) DEFAULT '0', + `product_type` int(11) DEFAULT 0, `date_start` datetime DEFAULT NULL, `date_end` datetime DEFAULT NULL, - `info_bits` int(11) NOT NULL DEFAULT '0', + `info_bits` int(11) NOT NULL DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_code_ventilation` int(11) NOT NULL DEFAULT '0', - `special_code` int(11) DEFAULT '0', - `rang` int(11) DEFAULT '0', + `fk_code_ventilation` int(11) NOT NULL DEFAULT 0, + `special_code` int(11) DEFAULT 0, + `rang` int(11) DEFAULT 0, `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_subprice` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`), KEY `idx_facture_fourn_det_fk_facture` (`fk_facture_fourn`), KEY `fk_facture_fourn_det_fk_unit` (`fk_unit`), @@ -6421,7 +6550,7 @@ DROP TABLE IF EXISTS `llx_facture_fourn_det_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facture_fourn_det_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -6447,7 +6576,7 @@ DROP TABLE IF EXISTS `llx_facture_fourn_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facture_fourn_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -6473,26 +6602,26 @@ DROP TABLE IF EXISTS `llx_facture_rec`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facture_rec` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `titre` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `titre` varchar(200) COLLATE utf8_unicode_ci NOT NULL, + `entity` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, - `amount` double(24,8) NOT NULL DEFAULT '0.00000000', - `remise` double DEFAULT '0', - `remise_percent` double DEFAULT '0', - `remise_absolue` double DEFAULT '0', - `tva` double(24,8) DEFAULT '0.00000000', - `localtax1` double(24,8) DEFAULT '0.00000000', - `localtax2` double(24,8) DEFAULT '0.00000000', - `total` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', + `amount` double(24,8) NOT NULL DEFAULT 0.00000000, + `remise` double DEFAULT 0, + `remise_percent` double DEFAULT 0, + `remise_absolue` double DEFAULT 0, + `tva` double(24,8) DEFAULT 0.00000000, + `localtax1` double(24,8) DEFAULT 0.00000000, + `localtax2` double(24,8) DEFAULT 0.00000000, + `total` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, `fk_user_author` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, - `fk_cond_reglement` int(11) NOT NULL DEFAULT '1', - `fk_mode_reglement` int(11) DEFAULT '0', + `fk_cond_reglement` int(11) NOT NULL DEFAULT 1, + `fk_mode_reglement` int(11) DEFAULT 0, `date_lim_reglement` date DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `modelpdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `last_gen` varchar(7) COLLATE utf8_unicode_ci DEFAULT NULL, `unit_frequency` varchar(2) COLLATE utf8_unicode_ci DEFAULT 'd', @@ -6501,21 +6630,21 @@ CREATE TABLE `llx_facture_rec` ( `nb_gen_done` int(11) DEFAULT NULL, `nb_gen_max` int(11) DEFAULT NULL, `frequency` int(11) DEFAULT NULL, - `usenewprice` int(11) DEFAULT '0', - `revenuestamp` double(24,8) DEFAULT '0.00000000', - `auto_validate` int(11) DEFAULT '0', - `generate_pdf` int(11) DEFAULT '1', - `fk_account` int(11) DEFAULT '0', + `usenewprice` int(11) DEFAULT 0, + `revenuestamp` double(24,8) DEFAULT 0.00000000, + `auto_validate` int(11) DEFAULT 0, + `generate_pdf` int(11) DEFAULT 1, + `fk_account` int(11) DEFAULT 0, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, `fk_user_modif` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', - `suspended` int(11) DEFAULT '0', + `suspended` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_facture_rec_uk_titre` (`titre`,`entity`), KEY `idx_facture_rec_fk_soc` (`fk_soc`), @@ -6546,7 +6675,7 @@ DROP TABLE IF EXISTS `llx_facture_rec_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facture_rec_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -6576,46 +6705,46 @@ CREATE TABLE `llx_facturedet` ( `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, - `remise_percent` double DEFAULT '0', - `remise` double DEFAULT '0', + `remise_percent` double DEFAULT 0, + `remise` double DEFAULT 0, `fk_remise_except` int(11) DEFAULT NULL, `subprice` double(24,8) DEFAULT NULL, `price` double(24,8) DEFAULT NULL, `total_ht` double(24,8) DEFAULT NULL, `total_tva` double(24,8) DEFAULT NULL, - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_localtax1` double(24,8) DEFAULT 0.00000000, + `total_localtax2` double(24,8) DEFAULT 0.00000000, `total_ttc` double(24,8) DEFAULT NULL, - `product_type` int(11) DEFAULT '0', + `product_type` int(11) DEFAULT 0, `date_start` datetime DEFAULT NULL, `date_end` datetime DEFAULT NULL, - `info_bits` int(11) DEFAULT '0', + `info_bits` int(11) DEFAULT 0, `fk_product_fournisseur_price` int(11) DEFAULT NULL, - `buy_price_ht` double(24,8) DEFAULT '0.00000000', - `fk_code_ventilation` int(11) NOT NULL DEFAULT '0', - `special_code` int(10) unsigned DEFAULT '0', - `rang` int(11) DEFAULT '0', + `buy_price_ht` double(24,8) DEFAULT 0.00000000, + `fk_code_ventilation` int(11) NOT NULL DEFAULT 0, + `special_code` int(10) unsigned DEFAULT 0, + `rang` int(11) DEFAULT 0, `fk_contract_line` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `situation_percent` double DEFAULT '100', + `situation_percent` double DEFAULT 100, `fk_prev_id` int(11) DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_subprice` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_fk_remise_except` (`fk_remise_except`,`fk_facture`), KEY `idx_facturedet_fk_facture` (`fk_facture`), @@ -6646,7 +6775,7 @@ DROP TABLE IF EXISTS `llx_facturedet_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facturedet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -6675,40 +6804,40 @@ CREATE TABLE `llx_facturedet_rec` ( `fk_facture` int(11) NOT NULL, `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `product_type` int(11) DEFAULT '0', + `product_type` int(11) DEFAULT 0, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, - `remise_percent` double DEFAULT '0', - `remise` double DEFAULT '0', + `remise_percent` double DEFAULT 0, + `remise` double DEFAULT 0, `subprice` double(24,8) DEFAULT NULL, `price` double(24,8) DEFAULT NULL, `total_ht` double(24,8) DEFAULT NULL, `total_tva` double(24,8) DEFAULT NULL, - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_localtax1` double(24,8) DEFAULT 0.00000000, + `total_localtax2` double(24,8) DEFAULT 0.00000000, `total_ttc` double(24,8) DEFAULT NULL, - `info_bits` int(11) DEFAULT '0', - `special_code` int(10) unsigned DEFAULT '0', - `rang` int(11) DEFAULT '0', + `info_bits` int(11) DEFAULT 0, + `special_code` int(10) unsigned DEFAULT 0, + `rang` int(11) DEFAULT 0, `fk_contract_line` int(11) DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', - `date_start_fill` int(11) DEFAULT '0', - `date_end_fill` int(11) DEFAULT '0', - `buy_price_ht` double(24,8) DEFAULT '0.00000000', + `multicurrency_subprice` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, + `date_start_fill` int(11) DEFAULT 0, + `date_end_fill` int(11) DEFAULT 0, + `buy_price_ht` double(24,8) DEFAULT 0.00000000, `fk_product_fournisseur_price` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -6737,7 +6866,7 @@ DROP TABLE IF EXISTS `llx_facturedet_rec_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_facturedet_rec_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -6764,25 +6893,25 @@ DROP TABLE IF EXISTS `llx_fichinter`; CREATE TABLE `llx_fichinter` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_soc` int(11) NOT NULL, - `fk_projet` int(11) DEFAULT '0', - `fk_contrat` int(11) DEFAULT '0', + `fk_projet` int(11) DEFAULT 0, + `fk_contrat` int(11) DEFAULT 0, `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `entity` int(11) NOT NULL DEFAULT 1, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, `datei` date DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `fk_statut` smallint(6) DEFAULT '0', + `fk_statut` smallint(6) DEFAULT 0, `duree` double DEFAULT NULL, `dateo` date DEFAULT NULL, `datee` date DEFAULT NULL, `datet` date DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -6814,7 +6943,7 @@ DROP TABLE IF EXISTS `llx_fichinter_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_fichinter_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -6841,17 +6970,17 @@ DROP TABLE IF EXISTS `llx_fichinter_rec`; CREATE TABLE `llx_fichinter_rec` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `titre` varchar(50) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `fk_contrat` int(11) DEFAULT '0', + `fk_contrat` int(11) DEFAULT 0, `fk_user_author` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, `duree` double DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `modelpdf` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `frequency` int(11) DEFAULT NULL, `unit_frequency` varchar(2) COLLATE utf8_unicode_ci DEFAULT 'm', `date_when` datetime DEFAULT NULL, @@ -6890,9 +7019,9 @@ CREATE TABLE `llx_fichinterdet` ( `fk_fichinter` int(11) DEFAULT NULL, `fk_parent_line` int(11) DEFAULT NULL, `date` datetime DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `duree` int(11) DEFAULT NULL, - `rang` int(11) DEFAULT '0', + `rang` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), KEY `idx_fichinterdet_fk_fichinter` (`fk_fichinter`), CONSTRAINT `fk_fichinterdet_fk_fichinter` FOREIGN KEY (`fk_fichinter`) REFERENCES `llx_fichinter` (`rowid`) @@ -6918,7 +7047,7 @@ DROP TABLE IF EXISTS `llx_fichinterdet_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_fichinterdet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -6946,37 +7075,37 @@ CREATE TABLE `llx_fichinterdet_rec` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_fichinter` int(11) NOT NULL, `date` datetime DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `duree` int(11) DEFAULT NULL, - `rang` int(11) DEFAULT '0', + `rang` int(11) DEFAULT 0, `total_ht` double(24,8) DEFAULT NULL, `subprice` double(24,8) DEFAULT NULL, `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tva_tx` double(6,3) DEFAULT NULL, - `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL, - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL, `qty` double DEFAULT NULL, - `remise_percent` double DEFAULT '0', - `remise` double DEFAULT '0', + `remise_percent` double DEFAULT 0, + `remise` double DEFAULT 0, `fk_remise_except` int(11) DEFAULT NULL, `price` double(24,8) DEFAULT NULL, `total_tva` double(24,8) DEFAULT NULL, - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', + `total_localtax1` double(24,8) DEFAULT 0.00000000, + `total_localtax2` double(24,8) DEFAULT 0.00000000, `total_ttc` double(24,8) DEFAULT NULL, - `product_type` int(11) DEFAULT '0', + `product_type` int(11) DEFAULT 0, `date_start` datetime DEFAULT NULL, `date_end` datetime DEFAULT NULL, - `info_bits` int(11) DEFAULT '0', - `buy_price_ht` double(24,8) DEFAULT '0.00000000', + `info_bits` int(11) DEFAULT 0, + `buy_price_ht` double(24,8) DEFAULT 0.00000000, `fk_product_fournisseur_price` int(11) DEFAULT NULL, - `fk_code_ventilation` int(11) NOT NULL DEFAULT '0', - `fk_export_commpta` int(11) NOT NULL DEFAULT '0', - `special_code` int(10) unsigned DEFAULT '0', + `fk_code_ventilation` int(11) NOT NULL DEFAULT 0, + `fk_export_commpta` int(11) NOT NULL DEFAULT 0, + `special_code` int(10) unsigned DEFAULT 0, `fk_unit` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -7006,8 +7135,8 @@ CREATE TABLE `llx_holiday` ( `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `date_debut` date NOT NULL, `date_fin` date NOT NULL, - `halfday` int(11) DEFAULT '0', - `statut` int(11) NOT NULL DEFAULT '1', + `halfday` int(11) DEFAULT 0, + `statut` int(11) NOT NULL DEFAULT 1, `fk_validator` int(11) NOT NULL, `date_valid` datetime DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, @@ -7016,13 +7145,13 @@ CREATE TABLE `llx_holiday` ( `date_cancel` datetime DEFAULT NULL, `fk_user_cancel` int(11) DEFAULT NULL, `detail_refuse` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, - `note` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_create` int(11) DEFAULT NULL, - `fk_type` int(11) NOT NULL DEFAULT '1', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `entity` int(11) NOT NULL DEFAULT '1', + `fk_type` int(11) NOT NULL DEFAULT 1, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `entity` int(11) NOT NULL DEFAULT 1, `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -7045,7 +7174,7 @@ CREATE TABLE `llx_holiday` ( LOCK TABLES `llx_holiday` WRITE; /*!40000 ALTER TABLE `llx_holiday` DISABLE KEYS */; -INSERT INTO `llx_holiday` VALUES (1,1,'2015-02-17 19:06:35','gdf','2015-02-10','2015-02-11',0,3,1,'2015-02-17 19:06:57',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2018-11-23 11:57:26',1,'1',NULL,NULL,NULL,NULL),(2,12,'2018-01-22 19:10:01','','2019-12-28','2020-01-03',0,1,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2020-01-15 13:36:45',1,'2',NULL,NULL,NULL,NULL),(3,13,'2018-01-22 19:10:29','','2018-01-11','2018-01-13',0,2,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2018-11-23 11:57:26',1,'3',NULL,NULL,NULL,NULL); +INSERT INTO `llx_holiday` VALUES (1,1,'2020-02-17 19:06:35','gdf','2020-02-10','2020-02-11',0,3,1,'2020-02-17 19:06:57',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2020-06-12 17:12:08',1,'1',NULL,NULL,NULL,NULL),(2,12,'2018-01-22 19:10:01','','2019-12-28','2020-01-03',0,1,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2020-01-15 13:36:45',1,'2',NULL,NULL,NULL,NULL),(3,13,'2020-01-22 19:10:29','','2020-01-11','2020-01-13',0,2,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2020-06-12 17:12:09',1,'3',NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_holiday` ENABLE KEYS */; UNLOCK TABLES; @@ -7059,7 +7188,7 @@ DROP TABLE IF EXISTS `llx_holiday_config`; CREATE TABLE `llx_holiday_config` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `value` text COLLATE utf8_unicode_ci, + `value` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `name` (`name`), UNIQUE KEY `idx_holiday_config` (`name`) @@ -7085,7 +7214,7 @@ DROP TABLE IF EXISTS `llx_holiday_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_holiday_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -7117,7 +7246,7 @@ CREATE TABLE `llx_holiday_logs` ( `type_action` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `prev_solde` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `new_solde` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `fk_type` int(11) NOT NULL DEFAULT '1', + `fk_type` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=195 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -7141,9 +7270,9 @@ DROP TABLE IF EXISTS `llx_holiday_users`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_holiday_users` ( `fk_user` int(11) NOT NULL, - `nb_holiday` double NOT NULL DEFAULT '0', - `fk_type` int(11) NOT NULL DEFAULT '1', - UNIQUE KEY `uk_holiday_users` (`fk_user`,`fk_type`,`nb_holiday`) + `nb_holiday` double NOT NULL DEFAULT 0, + `fk_type` int(11) NOT NULL DEFAULT 1, + UNIQUE KEY `uk_holiday_users` (`fk_user`,`fk_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -7166,7 +7295,7 @@ DROP TABLE IF EXISTS `llx_import_model`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_import_model` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_user` int(11) NOT NULL DEFAULT '0', + `fk_user` int(11) NOT NULL DEFAULT 0, `label` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `type` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `field` text COLLATE utf8_unicode_ci NOT NULL, @@ -7195,14 +7324,14 @@ DROP TABLE IF EXISTS `llx_inventory`; CREATE TABLE `llx_inventory` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_warehouse` int(11) DEFAULT NULL, `date_inventory` date DEFAULT NULL, `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `date_validation` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, @@ -7241,7 +7370,7 @@ DROP TABLE IF EXISTS `llx_inventory_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_inventory_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -7267,10 +7396,10 @@ DROP TABLE IF EXISTS `llx_inventorydet`; CREATE TABLE `llx_inventorydet` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `fk_inventory` int(11) DEFAULT '0', - `fk_warehouse` int(11) DEFAULT '0', - `fk_product` int(11) DEFAULT '0', + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_inventory` int(11) DEFAULT 0, + `fk_warehouse` int(11) DEFAULT 0, + `fk_product` int(11) DEFAULT 0, `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `qty_view` double DEFAULT NULL, `qty_stock` double DEFAULT NULL, @@ -7291,6 +7420,77 @@ LOCK TABLES `llx_inventorydet` WRITE; /*!40000 ALTER TABLE `llx_inventorydet` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_justificativedocuments_justificativedocument` +-- + +DROP TABLE IF EXISTS `llx_justificativedocuments_justificativedocument`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_justificativedocuments_justificativedocument` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `entity` int(11) NOT NULL DEFAULT 1, + `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '(PROV)', + `fk_project` int(11) DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `date_creation` datetime NOT NULL, + `date_validation` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_user` int(11) NOT NULL, + `fk_user_creat` int(11) NOT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `status` int(11) NOT NULL, + `fk_type` int(11) NOT NULL, + `amount` double(24,8) DEFAULT NULL, + `date_start` date DEFAULT NULL, + `date_end` date DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_justificativedocuments_justificativedocument_rowid` (`rowid`), + KEY `idx_justificativedocuments_justificativedocument_ref` (`ref`), + KEY `idx_justificativedocuments_justificativedocument_fk_project` (`fk_project`), + KEY `idx_justificativedocuments_justificativedocument_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_justificativedocuments_justificativedocument` +-- + +LOCK TABLES `llx_justificativedocuments_justificativedocument` WRITE; +/*!40000 ALTER TABLE `llx_justificativedocuments_justificativedocument` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_justificativedocuments_justificativedocument` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_justificativedocuments_justificativedocument_extrafields` +-- + +DROP TABLE IF EXISTS `llx_justificativedocuments_justificativedocument_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_justificativedocuments_justificativedocument_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_object` int(11) NOT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_fk_object` (`fk_object`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_justificativedocuments_justificativedocument_extrafields` +-- + +LOCK TABLES `llx_justificativedocuments_justificativedocument_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_justificativedocuments_justificativedocument_extrafields` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_justificativedocuments_justificativedocument_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_links` -- @@ -7300,7 +7500,7 @@ DROP TABLE IF EXISTS `llx_links`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_links` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datea` datetime NOT NULL, `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, @@ -7330,9 +7530,9 @@ DROP TABLE IF EXISTS `llx_livraison`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_livraison` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_customer` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) NOT NULL, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -7343,10 +7543,10 @@ CREATE TABLE `llx_livraison` ( `fk_user_valid` int(11) DEFAULT NULL, `date_delivery` datetime DEFAULT NULL, `fk_address` int(11) DEFAULT NULL, - `fk_statut` smallint(6) DEFAULT '0', - `total_ht` double(24,8) DEFAULT '0.00000000', - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `fk_statut` smallint(6) DEFAULT 0, + `total_ht` double(24,8) DEFAULT 0.00000000, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -7382,7 +7582,7 @@ DROP TABLE IF EXISTS `llx_livraison_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_livraison_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -7411,11 +7611,11 @@ CREATE TABLE `llx_livraisondet` ( `fk_livraison` int(11) DEFAULT NULL, `fk_origin_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `qty` double DEFAULT NULL, - `subprice` double(24,8) DEFAULT '0.00000000', - `total_ht` double(24,8) DEFAULT '0.00000000', - `rang` int(11) DEFAULT '0', + `subprice` double(24,8) DEFAULT 0.00000000, + `total_ht` double(24,8) DEFAULT 0.00000000, + `rang` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), KEY `idx_livraisondet_fk_expedition` (`fk_livraison`), CONSTRAINT `fk_livraisondet_fk_livraison` FOREIGN KEY (`fk_livraison`) REFERENCES `llx_livraison` (`rowid`) @@ -7440,7 +7640,7 @@ DROP TABLE IF EXISTS `llx_livraisondet_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_livraisondet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -7466,9 +7666,9 @@ DROP TABLE IF EXISTS `llx_loan`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_loan` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `label` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `fk_bank` int(11) DEFAULT NULL, `capital` double(24,8) DEFAULT NULL, @@ -7476,19 +7676,19 @@ CREATE TABLE `llx_loan` ( `dateend` date DEFAULT NULL, `nbterm` double DEFAULT NULL, `rate` double NOT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `capital_position` double(24,8) DEFAULT NULL, `date_position` date DEFAULT NULL, - `paid` smallint(6) NOT NULL DEFAULT '0', + `paid` smallint(6) NOT NULL DEFAULT 0, `accountancy_account_capital` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_account_insurance` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_account_interest` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', + `active` tinyint(4) NOT NULL DEFAULT 1, `fk_projet` int(11) DEFAULT NULL, - `insurance_amount` double(24,8) DEFAULT '0.00000000', + `insurance_amount` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -7514,15 +7714,15 @@ CREATE TABLE `llx_loan_schedule` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_loan` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datep` datetime DEFAULT NULL, `amount_capital` double(24,8) DEFAULT NULL, `amount_insurance` double(24,8) DEFAULT NULL, `amount_interest` double(24,8) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -7548,14 +7748,14 @@ DROP TABLE IF EXISTS `llx_localtax`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_localtax` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `localtaxtype` tinyint(4) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datep` date DEFAULT NULL, `datev` date DEFAULT NULL, - `amount` double NOT NULL DEFAULT '0', + `amount` double NOT NULL DEFAULT 0, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -7581,11 +7781,11 @@ DROP TABLE IF EXISTS `llx_mailing`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_mailing` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `statut` smallint(6) DEFAULT '0', + `statut` smallint(6) DEFAULT 0, `titre` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `sujet` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `body` mediumtext COLLATE utf8_unicode_ci, + `body` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `bgcolor` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, `bgimage` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cible` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -7606,7 +7806,7 @@ CREATE TABLE `llx_mailing` ( `joined_file3` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `joined_file4` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -7637,13 +7837,13 @@ CREATE TABLE `llx_mailing_cibles` ( `email` varchar(160) COLLATE utf8_unicode_ci NOT NULL, `other` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tag` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `statut` smallint(6) NOT NULL DEFAULT '0', + `statut` smallint(6) NOT NULL DEFAULT 0, `source_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `source_id` int(11) DEFAULT NULL, `source_type` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `date_envoi` datetime DEFAULT NULL, `error_text` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `uk_mailing_cibles` (`fk_mailing`,`email`), KEY `idx_mailing_cibles_email` (`email`) @@ -7669,12 +7869,12 @@ DROP TABLE IF EXISTS `llx_mailing_unsubscribe`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_mailing_unsubscribe` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `unsubscribegroup` varchar(128) COLLATE utf8_unicode_ci DEFAULT '', `ip` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `date_creat` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `uk_mailing_unsubscribe` (`email`,`entity`,`unsubscribegroup`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -7699,8 +7899,8 @@ DROP TABLE IF EXISTS `llx_menu`; CREATE TABLE `llx_menu` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `menu_handler` varchar(16) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `module` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT 1, + `module` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `type` varchar(4) COLLATE utf8_unicode_ci NOT NULL, `mainmenu` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `fk_menu` int(11) NOT NULL, @@ -7713,14 +7913,14 @@ CREATE TABLE `llx_menu` ( `langs` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `level` smallint(6) DEFAULT NULL, `leftmenu` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, - `perms` text COLLATE utf8_unicode_ci, + `perms` text COLLATE utf8_unicode_ci DEFAULT NULL, `enabled` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', - `usertype` int(11) NOT NULL DEFAULT '0', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `usertype` int(11) NOT NULL DEFAULT 0, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `idx_menu_uk_menu` (`menu_handler`,`fk_menu`,`position`,`url`,`entity`), KEY `idx_menu_menuhandler_type` (`menu_handler`,`type`) -) ENGINE=InnoDB AUTO_INCREMENT=166976 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=167003 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7729,7 +7929,7 @@ CREATE TABLE `llx_menu` ( LOCK TABLES `llx_menu` WRITE; /*!40000 ALTER TABLE `llx_menu` DISABLE KEYS */; -INSERT INTO `llx_menu` VALUES (103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(145127,'all',1,'printing','left','home',-1,'admintools','home',300,'/printing/index.php?mainmenu=home&leftmenu=admintools','','MenuDirectPrinting','printing',NULL,NULL,'$user->rights->printing->read','$conf->printing->enabled && $leftmenu==\'admintools\'',0,'2017-01-29 15:12:44'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2017-08-30 15:14:30'),(161089,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,20,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)',2,'2017-08-30 15:14:30'),(161090,'auguria',1,'product|service','top','products',0,NULL,NULL,30,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2017-08-30 15:14:30'),(161092,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,40,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(161093,'auguria',1,'comptabilite|accounting|facture|don|tax|salaries|loan','top','accountancy',0,NULL,NULL,50,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled',2,'2017-08-30 15:14:30'),(161094,'auguria',1,'projet','top','project',0,NULL,NULL,70,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(161095,'auguria',1,'mailing|export|import|opensurvey|resource','top','tools',0,NULL,NULL,90,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read || $user->rights->resource->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled || $conf->resource->enabled',2,'2017-08-30 15:14:30'),(161101,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,60,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2017-08-30 15:14:30'),(161102,'auguria',1,'hrm|holiday|deplacement|expensereport','top','hrm',0,NULL,NULL,80,'/hrm/index.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(161177,'auguria',1,'','left','home',161088,NULL,NULL,0,'/index.php','','MyDashboard','',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2017-08-30 15:14:30'),(161188,'auguria',1,'','left','home',161187,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161189,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161190,'auguria',1,'','left','home',161187,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161191,'auguria',1,'','left','home',161187,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161192,'auguria',1,'','left','home',161187,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:47'),(161193,'auguria',1,'','left','home',161187,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161194,'auguria',1,'','left','home',161187,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161195,'auguria',1,'','left','home',161187,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:36'),(161196,'auguria',1,'','left','home',161187,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161197,'auguria',1,'','left','home',161187,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161198,'auguria',1,'','left','home',161187,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161199,'auguria',1,'','left','home',161187,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161200,'auguria',1,'','left','home',161187,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161201,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161288,'auguria',1,'','left','home',161387,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161289,'auguria',1,'','left','home',161288,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161290,'auguria',1,'','left','home',161288,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161291,'auguria',1,'','left','home',161288,NULL,NULL,4,'/admin/system/filecheck.php?leftmenu=admintools','','FileCheck','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161292,'auguria',1,'','left','home',161387,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161293,'auguria',1,'','left','home',161387,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161294,'auguria',1,'','left','home',161387,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161295,'auguria',1,'','left','home',161387,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161297,'auguria',1,'','left','home',161387,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161387,'auguria',1,'','left','home',161088,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','AdminTools','admin',0,'admintools','','$user->admin',2,'2017-08-30 15:14:30'),(161388,'auguria',1,'','left','home',161387,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161389,'auguria',1,'','left','home',161387,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161392,'auguria',1,'','left','home',161387,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161393,'auguria',1,'','left','home',161387,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2017-08-30 15:14:30'),(161394,'auguria',1,'','left','home',161387,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161395,'auguria',1,'','left','home',161387,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161396,'auguria',1,'','left','home',161387,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161398,'auguria',1,'','left','home',161387,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','ExternalResources','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161407,'auguria',1,'','left','home',161387,NULL,NULL,15,'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools','','ProductVatMassChange','products',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161487,'auguria',1,'','left','home',161088,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2017-08-30 15:14:30'),(161488,'auguria',1,'','left','home',161487,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161489,'auguria',1,'','left','home',161488,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161490,'auguria',1,'','left','home',161487,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161491,'auguria',1,'','left','home',161490,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161587,'auguria',1,'','left','companies',161089,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161588,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/card.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161589,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/list.php?action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161590,'auguria',1,'','left','companies',161587,NULL,NULL,5,'/societe/list.php?type=f&leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161591,'auguria',1,'','left','companies',161590,NULL,NULL,0,'/societe/card.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161593,'auguria',1,'','left','companies',161587,NULL,NULL,3,'/societe/list.php?type=p&leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161594,'auguria',1,'','left','companies',161593,NULL,NULL,0,'/societe/card.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161596,'auguria',1,'','left','companies',161587,NULL,NULL,4,'/societe/list.php?type=c&leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161597,'auguria',1,'','left','companies',161596,NULL,NULL,0,'/societe/card.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161687,'auguria',1,'','left','companies',161089,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161688,'auguria',1,'','left','companies',161687,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161689,'auguria',1,'','left','companies',161687,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161691,'auguria',1,'','left','companies',161689,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161692,'auguria',1,'','left','companies',161689,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161693,'auguria',1,'','left','companies',161689,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','ThirdPartySuppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161694,'auguria',1,'','left','companies',161689,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161737,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161738,'auguria',1,'','left','companies',161737,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161747,'auguria',1,'','left','companies',161089,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161748,'auguria',1,'','left','companies',161747,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161757,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=4','','ContactCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161758,'auguria',1,'','left','companies',161757,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(162187,'auguria',1,'','left','commercial',161092,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162188,'auguria',1,'','left','commercial',162187,NULL,NULL,0,'/comm/propal/card.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162189,'auguria',1,'','left','commercial',162187,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162190,'auguria',1,'','left','commercial',162189,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&search_status=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162191,'auguria',1,'','left','commercial',162189,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&search_status=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162192,'auguria',1,'','left','commercial',162189,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&search_status=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162193,'auguria',1,'','left','commercial',162189,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&search_status=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162194,'auguria',1,'','left','commercial',162189,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&search_status=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162197,'auguria',1,'','left','commercial',162187,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162287,'auguria',1,'','left','commercial',161092,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162288,'auguria',1,'','left','commercial',162287,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162289,'auguria',1,'','left','commercial',162287,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162290,'auguria',1,'','left','commercial',162289,NULL,NULL,2,'/commande/list.php?leftmenu=orders&search_status=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162291,'auguria',1,'','left','commercial',162289,NULL,NULL,3,'/commande/list.php?leftmenu=orders&search_status=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162292,'auguria',1,'','left','commercial',162289,NULL,NULL,4,'/commande/list.php?leftmenu=orders&search_status=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162293,'auguria',1,'','left','commercial',162289,NULL,NULL,5,'/commande/list.php?leftmenu=orders&search_status=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162294,'auguria',1,'','left','commercial',162289,NULL,NULL,6,'/commande/list.php?leftmenu=orders&search_status=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162295,'auguria',1,'','left','commercial',162289,NULL,NULL,7,'/commande/list.php?leftmenu=orders&search_status=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162296,'auguria',1,'','left','commercial',162287,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162387,'auguria',1,'','left','commercial',161090,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2017-08-30 15:14:30'),(162388,'auguria',1,'','left','commercial',162387,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162389,'auguria',1,'','left','commercial',162387,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162390,'auguria',1,'','left','commercial',162387,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162487,'auguria',1,'','left','commercial',161092,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162488,'auguria',1,'','left','commercial',162487,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162489,'auguria',1,'','left','commercial',162487,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162490,'auguria',1,'','left','commercial',162487,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162491,'auguria',1,'','left','commercial',162490,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162492,'auguria',1,'','left','commercial',162490,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162493,'auguria',1,'','left','commercial',162490,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162494,'auguria',1,'','left','commercial',162490,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162587,'auguria',1,'','left','commercial',161092,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162588,'auguria',1,'','left','commercial',162587,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162589,'auguria',1,'','left','commercial',162587,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162590,'auguria',1,'','left','commercial',162587,NULL,NULL,2,'/fichinter/stats/index.php?leftmenu=ficheinter','','Statistics','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162687,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162688,'auguria',1,'','left','accountancy',162687,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162689,'auguria',1,'','left','accountancy',162687,NULL,NULL,1,'/fourn/facture/list.php?leftmenu=suppliers_bills','','List','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162690,'auguria',1,'','left','accountancy',162687,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162691,'auguria',1,'','left','accountancy',162687,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162692,'auguria',1,'','left','accountancy',162690,NULL,NULL,1,'/fourn/facture/rapport.php?leftmenu=suppliers_bills','','Reporting','bills',2,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162787,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162788,'auguria',1,'','left','accountancy',162787,NULL,NULL,3,'/compta/facture/card.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162789,'auguria',1,'','left','accountancy',162787,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162791,'auguria',1,'','left','accountancy',162787,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162792,'auguria',1,'','left','accountancy',162787,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162797,'auguria',1,'','left','accountancy',162791,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162798,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162799,'auguria',1,'','left','accountancy',162798,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162800,'auguria',1,'','left','accountancy',162798,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162801,'auguria',1,'','left','accountancy',162787,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162807,'auguria',1,'','left','accountancy',162792,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162808,'auguria',1,'','left','accountancy',162792,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162809,'auguria',1,'','left','accountancy',162792,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162810,'auguria',1,'','left','accountancy',162792,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162987,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/commande/list.php?leftmenu=orders&search_status=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2017-08-30 15:14:30'),(163087,'auguria',1,'','left','accountancy',161093,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2017-08-30 15:14:30'),(163088,'auguria',1,'','left','accountancy',163087,NULL,NULL,0,'/don/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163089,'auguria',1,'','left','accountancy',163087,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163187,'auguria',1,'','left','accountancy',161102,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163188,'auguria',1,'','left','accountancy',163187,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163189,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163190,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163287,'auguria',1,'','left','accountancy',161093,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuSpecialExpenses','compta',0,'tax','(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)','$conf->tax->enabled || $conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163297,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->payment->read','$conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163298,'auguria',1,'','left','accountancy',163297,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->payment->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163299,'auguria',1,'','left','accountancy',163297,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->payment->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163307,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2017-08-30 15:14:30'),(163308,'auguria',1,'','left','accountancy',163307,NULL,NULL,2,'/loan/card.php?leftmenu=tax_loan&action=create','','NewLoan','loan',2,'','$user->rights->loan->write','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2017-08-30 15:14:30'),(163310,'auguria',1,'','left','accountancy',163307,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)',0,'2017-08-30 15:14:30'),(163337,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2017-08-30 15:14:30'),(163338,'auguria',1,'','left','accountancy',163337,NULL,NULL,2,'/compta/sociales/card.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163339,'auguria',1,'','left','accountancy',163337,NULL,NULL,3,'/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163387,'auguria',1,'','left','accountancy',163287,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2017-08-30 15:14:30'),(163388,'auguria',1,'','left','accountancy',163387,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','New','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163389,'auguria',1,'','left','accountancy',163387,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','List','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163390,'auguria',1,'','left','accountancy',163387,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163391,'auguria',1,'','left','accountancy',163387,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163487,'auguria',1,'','left','accountancy',161093,NULL,NULL,7,'/accountancy/index.php?leftmenu=accountancy','','MenuAccountancy','accountancy',0,'accounting','! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163488,'auguria',1,'','left','accountancy',163487,NULL,NULL,2,'/accountancy/customer/index.php?leftmenu=dispatch_customer','','CustomersVentilation','accountancy',1,'dispatch_customer','$user->rights->accounting->bind->write','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163489,'auguria',1,'','left','accountancy',163488,NULL,NULL,3,'/accountancy/customer/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163490,'auguria',1,'','left','accountancy',163488,NULL,NULL,4,'/accountancy/customer/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163497,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/supplier/index.php?leftmenu=dispatch_supplier','','SuppliersVentilation','accountancy',1,'ventil_supplier','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2017-08-30 15:14:30'),(163498,'auguria',1,'','left','accountancy',163497,NULL,NULL,6,'/accountancy/supplier/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163499,'auguria',1,'','left','accountancy',163497,NULL,NULL,7,'/accountancy/supplier/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163507,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/expensereport/index.php?leftmenu=dispatch_expensereport','','ExpenseReportsVentilation','accountancy',1,'ventil_expensereport','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(163508,'auguria',1,'','left','accountancy',163507,NULL,NULL,6,'/accountancy/expensereport/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163509,'auguria',1,'','left','accountancy',163507,NULL,NULL,7,'/accountancy/expensereport/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163517,'auguria',1,'','left','accountancy',163487,NULL,NULL,15,'/accountancy/bookkeeping/list.php','','Bookkeeping','accountancy',1,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163522,'auguria',1,'','left','accountancy',163487,NULL,NULL,16,'/accountancy/bookkeeping/balance.php','','AccountBalance','accountancy',1,'balance','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163527,'auguria',1,'','left','accountancy',163487,NULL,NULL,17,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','Reportings','main',1,'report','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163528,'auguria',1,'','left','accountancy',163527,NULL,NULL,19,'/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportInOut','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163529,'auguria',1,'','left','accountancy',163528,NULL,NULL,18,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','ByAccounts','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163530,'auguria',1,'','left','accountancy',163528,NULL,NULL,20,'/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163531,'auguria',1,'','left','accountancy',163527,NULL,NULL,21,'/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportTurnover','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163532,'auguria',1,'','left','accountancy',163531,NULL,NULL,22,'/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163533,'auguria',1,'','left','accountancy',163531,NULL,NULL,23,'/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy','','ByUsers','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163534,'auguria',1,'','left','accountancy',163531,NULL,NULL,24,'/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy','','ByProductsAndServices','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163537,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin','','FiscalPeriod','admin',1,'accountancy_admin_period','','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\" && $conf->global->MAIN_FEATURES_LEVEL > 0',2,'2017-08-30 15:14:30'),(163538,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Setup','accountancy',1,'accountancy_admin','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163541,'auguria',1,'','left','accountancy',163538,NULL,NULL,10,'/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingJournals','accountancy',2,'accountancy_admin_journal','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163542,'auguria',1,'','left','accountancy',163538,NULL,NULL,20,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Pcg_version','accountancy',2,'accountancy_admin_chartmodel','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163543,'auguria',1,'','left','accountancy',163538,NULL,NULL,30,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Chartofaccounts','accountancy',2,'accountancy_admin_chart','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163544,'auguria',1,'','left','accountancy',163538,NULL,NULL,40,'/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingCategory','accountancy',2,'accountancy_admin_chart_group','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163545,'auguria',1,'','left','accountancy',163538,NULL,NULL,50,'/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuDefaultAccounts','accountancy',2,'accountancy_admin_default','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163546,'auguria',1,'','left','accountancy',163538,NULL,NULL,60,'/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuVatAccounts','accountancy',2,'accountancy_admin_vat','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163547,'auguria',1,'','left','accountancy',163538,NULL,NULL,70,'/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuTaxAccounts','accountancy',2,'accountancy_admin_tax','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163548,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuExpenseReportAccounts','accountancy',2,'accountancy_admin_expensereport','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163549,'auguria',1,'','left','accountancy',163538,NULL,NULL,90,'/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuProductsAccounts','accountancy',2,'accountancy_admin_product','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163587,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2017-08-30 15:14:30'),(163589,'auguria',1,'','left','accountancy',163587,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163590,'auguria',1,'','left','accountancy',163587,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163591,'auguria',1,'','left','accountancy',163587,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163593,'auguria',1,'','left','accountancy',163587,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163594,'auguria',1,'','left','accountancy',163587,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163687,'auguria',1,'','left','accountancy',161101,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2017-08-30 15:14:30'),(163688,'auguria',1,'','left','accountancy',163687,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163690,'auguria',1,'','left','accountancy',163687,NULL,NULL,2,'/compta/bank/bankentries.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163691,'auguria',1,'','left','accountancy',163687,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163693,'auguria',1,'','left','accountancy',163687,NULL,NULL,5,'/compta/bank/transfer.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163737,'auguria',1,'','left','accountancy',161101,NULL,NULL,4,'/categories/index.php?leftmenu=bank&type=5','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163738,'auguria',1,'','left','accountancy',163737,NULL,NULL,0,'/categories/card.php?leftmenu=bank&action=create&type=5','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163787,'auguria',1,'','left','accountancy',161093,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled',0,'2017-08-30 15:14:30'),(163792,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'','','Journalization','main',1,'','$user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163793,'auguria',1,'','left','accountancy',163792,NULL,NULL,4,'/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1','','SellsJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163794,'auguria',1,'','left','accountancy',163792,NULL,NULL,1,'/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3','','BankJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163795,'auguria',1,'','left','accountancy',163792,NULL,NULL,2,'/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6','','ExpenseReportJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163796,'auguria',1,'','left','accountancy',163792,NULL,NULL,3,'/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2','','PurchasesJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163798,'auguria',1,'','left','accountancy',163787,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163799,'auguria',1,'','left','accountancy',163788,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163800,'auguria',1,'','left','accountancy',163787,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163801,'auguria',1,'','left','accountancy',163790,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163802,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163803,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyprodserv.php?leftmenu=ca','','ByProductsAndServices','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163887,'auguria',1,'','left','products',161090,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163888,'auguria',1,'','left','products',163887,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163889,'auguria',1,'','left','products',163887,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163890,'auguria',1,'','left','products',163887,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163891,'auguria',1,'','left','products',163887,NULL,NULL,7,'/product/stats/card.php?id=all&leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(163892,'auguria',1,'','left','products',163887,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163893,'auguria',1,'','left','products',163887,NULL,NULL,6,'/product/stock/productlot_list.php','','LotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163987,'auguria',1,'','left','products',161090,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163988,'auguria',1,'','left','products',163987,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163989,'auguria',1,'','left','products',163987,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163990,'auguria',1,'','left','products',163987,NULL,NULL,5,'/product/stats/card.php?id=all&leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(164187,'auguria',1,'','left','products',161090,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164188,'auguria',1,'','left','products',164187,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164189,'auguria',1,'','left','products',164187,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164191,'auguria',1,'','left','products',164187,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164192,'auguria',1,'','left','products',164187,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(164193,'auguria',1,'','left','products',164187,NULL,NULL,5,'/product/stock/massstockmove.php','','MassStockTransferShort','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164287,'auguria',1,'','left','products',161090,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164288,'auguria',1,'','left','products',164287,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164487,'auguria',1,'','left','project',161094,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164687,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164688,'auguria',1,'','left','project',164687,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164689,'auguria',1,'','left','project',164687,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164690,'auguria',1,'','left','project',164687,NULL,NULL,3,'/projet/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164787,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164788,'auguria',1,'','left','project',164787,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164789,'auguria',1,'','left','project',164787,NULL,NULL,2,'/projet/tasks/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164791,'auguria',1,'','left','project',164787,NULL,NULL,4,'/projet/tasks/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164891,'auguria',1,'','left','project',161094,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=6','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164892,'auguria',1,'','left','project',164891,NULL,NULL,0,'/categories/card.php?action=create&type=6','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164987,'auguria',1,'','left','tools',161095,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164988,'auguria',1,'','left','tools',164987,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164989,'auguria',1,'','left','tools',164987,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(165187,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165188,'auguria',1,'','left','tools',165187,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165217,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165218,'auguria',1,'','left','tools',165217,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165287,'auguria',1,'','left','members',161100,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165288,'auguria',1,'','left','members',165287,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165289,'auguria',1,'','left','members',165287,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165290,'auguria',1,'','left','members',165289,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165291,'auguria',1,'','left','members',165289,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165292,'auguria',1,'','left','members',165289,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165293,'auguria',1,'','left','members',165289,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165294,'auguria',1,'','left','members',165289,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165295,'auguria',1,'','left','members',165287,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165387,'auguria',1,'','left','members',161100,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165388,'auguria',1,'','left','members',165387,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165389,'auguria',1,'','left','members',165387,NULL,NULL,1,'/adherents/subscription/list.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165390,'auguria',1,'','left','members',165387,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165589,'auguria',1,'','left','members',165287,NULL,NULL,9,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165590,'auguria',1,'','left','members',165287,NULL,NULL,10,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165687,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/user/index.php?leftmenu=hrm&mode=employee','','Employees','hrm',0,'hrm','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165688,'auguria',1,'','left','hrm',165687,NULL,NULL,1,'/user/card.php?action=create&employee=1','','NewEmployee','hrm',1,'','$user->rights->hrm->employee->write','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165689,'auguria',1,'','left','hrm',165687,NULL,NULL,2,'/user/index.php?$leftmenu=hrm&mode=employee&contextpage=employeelist','','List','hrm',1,'','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165787,'auguria',1,'','left','members',161100,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165788,'auguria',1,'','left','members',165787,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165789,'auguria',1,'','left','members',165787,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(166087,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166088,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166089,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List','holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166090,'auguria',1,'','left','hrm',166089,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove','trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166091,'auguria',1,'','left','hrm',166087,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166092,'auguria',1,'','left','hrm',166087,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166187,'auguria',1,'','left','commercial',161092,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166188,'auguria',1,'','left','commercial',166187,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166189,'auguria',1,'','left','commercial',166187,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&search_status=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166195,'auguria',1,'','left','commercial',166187,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166287,'auguria',1,'','left','members',161100,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166288,'auguria',1,'','left','members',166287,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166387,'auguria',1,'','left','hrm',161102,NULL,NULL,5,'/expensereport/index.php?leftmenu=expensereport','','TripsAndExpenses','trips',0,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166388,'auguria',1,'','left','hrm',166387,NULL,NULL,1,'/expensereport/card.php?action=create&leftmenu=expensereport','','New','trips',1,'','$user->rights->expensereport->creer','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166389,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/list.php?leftmenu=expensereport','','List','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166390,'auguria',1,'','left','hrm',166389,NULL,NULL,2,'/expensereport/list.php?search_status=2&leftmenu=expensereport','','ListToApprove','trips',2,'','$user->rights->expensereport->approve','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166391,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/stats/index.php?leftmenu=expensereport','','Statistics','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166467,'all',1,'variants','left','products',-1,'product','products',100,'/variants/list.php','','VariantAttributes','products',NULL,'product','1','$conf->product->enabled',0,'2018-01-19 11:28:04'),(166541,'all',1,'ticket','top','ticket',0,NULL,NULL,88,'/ticket/index.php','','Ticket','ticket',NULL,'1','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166542,'all',1,'ticket','left','ticket',-1,NULL,'ticket',101,'/ticket/index.php','','Ticket','ticket',NULL,'ticket','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166543,'all',1,'ticket','left','ticket',-1,'ticket','ticket',102,'/ticket/card.php?action=create','','NewTicket','ticket',NULL,NULL,'$user->rights->ticket->write','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166544,'all',1,'ticket','left','ticket',-1,'ticket','ticket',103,'/ticket/list.php?search_fk_status=non_closed','','List','ticket',NULL,'ticketlist','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166545,'all',1,'ticket','left','ticket',-1,'ticket','ticket',105,'/ticket/list.php?mode=mine&search_fk_status=non_closed','','MenuTicketMyAssign','ticket',NULL,'ticketmy','$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166546,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/ticket/stats/index.php','','Statistics','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166547,'all',1,'takepos','top','takepos',0,NULL,NULL,1001,'/takepos/takepos.php','takepos','PointOfSaleShort','cashdesk',NULL,NULL,'1','$conf->takepos->enabled',2,'2019-06-05 09:15:58'),(166919,'all',1,'supplier_proposal','left','commercial',-1,NULL,'commercial',300,'/supplier_proposal/index.php','','SupplierProposalsShort','supplier_proposal',NULL,'supplier_proposalsubmenu','$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166920,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',301,'/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals','','SupplierProposalNew','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->creer','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166921,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',302,'/supplier_proposal/list.php?leftmenu=supplier_proposals','','List','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166922,'all',1,'supplier_proposal','left','commercial',-1,'supplier_proposalsubmenu','commercial',303,'/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier','','Statistics','supplier_proposal',NULL,NULL,'$user->rights->supplier_proposal->lire','$conf->supplier_proposal->enabled',2,'2020-01-13 14:37:09'),(166923,'all',1,'resource','left','tools',-1,NULL,'tools',100,'/resource/list.php','','MenuResourceIndex','resource',NULL,'resource','$user->rights->resource->read','1',0,'2020-01-20 11:46:00'),(166924,'all',1,'resource','left','tools',-1,'resource','tools',101,'/resource/card.php?action=create','','MenuResourceAdd','resource',NULL,'resource_add','$user->rights->resource->write','1',0,'2020-01-20 11:46:00'),(166925,'all',1,'resource','left','tools',-1,'resource','tools',102,'/resource/list.php','','List','resource',NULL,'resource_list','$user->rights->resource->read','1',0,'2020-01-20 11:46:00'),(166951,'all',1,'agenda','top','agenda',0,NULL,NULL,86,'/comm/action/index.php','','TMenuAgenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166952,'all',1,'agenda','left','agenda',166951,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166953,'all',1,'agenda','left','agenda',166952,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166954,'all',1,'agenda','left','agenda',166952,NULL,NULL,140,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166955,'all',1,'agenda','left','agenda',166954,NULL,NULL,141,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166956,'all',1,'agenda','left','agenda',166954,NULL,NULL,142,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166957,'all',1,'agenda','left','agenda',166954,NULL,NULL,143,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166958,'all',1,'agenda','left','agenda',166954,NULL,NULL,144,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166959,'all',1,'agenda','left','agenda',166952,NULL,NULL,110,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166960,'all',1,'agenda','left','agenda',166959,NULL,NULL,111,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166961,'all',1,'agenda','left','agenda',166959,NULL,NULL,112,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166962,'all',1,'agenda','left','agenda',166959,NULL,NULL,113,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166963,'all',1,'agenda','left','agenda',166959,NULL,NULL,114,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-01-20 11:47:19'),(166964,'all',1,'agenda','left','agenda',166952,NULL,NULL,160,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2020-01-20 11:47:19'),(166965,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','products',NULL,'barcodeprint','($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled',2,'2020-01-20 11:47:19'),(166966,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)',0,'2020-01-20 11:47:19'),(166967,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?leftmenu=admintools','','CronList','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',2,'2020-01-20 11:47:19'),(166968,'all',1,'ecm','top','ecm',0,NULL,NULL,82,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2020-01-20 11:47:20'),(166969,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2020-01-20 11:47:20'),(166970,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2020-01-20 11:47:20'),(166971,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',2,'2020-01-20 11:47:20'),(166972,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2020-01-20 11:47:20'),(166973,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2020-01-20 11:47:20'),(166974,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2020-01-20 11:47:20'),(166975,'all',1,'website','top','website',0,NULL,NULL,100,'/website/index.php','','WebSites','website',NULL,NULL,'$user->rights->website->read','$conf->website->enabled',2,'2020-01-20 11:47:21'); +INSERT INTO `llx_menu` VALUES (103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(145127,'all',1,'printing','left','home',-1,'admintools','home',300,'/printing/index.php?mainmenu=home&leftmenu=admintools','','MenuDirectPrinting','printing',NULL,NULL,'$user->rights->printing->read','$conf->printing->enabled && $leftmenu==\'admintools\'',0,'2017-01-29 15:12:44'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2017-08-30 15:14:30'),(161089,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,20,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)',2,'2017-08-30 15:14:30'),(161090,'auguria',1,'product|service','top','products',0,NULL,NULL,30,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2017-08-30 15:14:30'),(161092,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,40,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(161093,'auguria',1,'comptabilite|accounting|facture|don|tax|salaries|loan','top','accountancy',0,NULL,NULL,50,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled',2,'2017-08-30 15:14:30'),(161094,'auguria',1,'projet','top','project',0,NULL,NULL,70,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(161095,'auguria',1,'mailing|export|import|opensurvey|resource','top','tools',0,NULL,NULL,90,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read || $user->rights->resource->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled || $conf->resource->enabled',2,'2017-08-30 15:14:30'),(161101,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,60,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2017-08-30 15:14:30'),(161102,'auguria',1,'hrm|holiday|deplacement|expensereport','top','hrm',0,NULL,NULL,80,'/hrm/index.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(161177,'auguria',1,'','left','home',161088,NULL,NULL,0,'/index.php','','MyDashboard','',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2017-08-30 15:14:30'),(161188,'auguria',1,'','left','home',161187,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161189,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161190,'auguria',1,'','left','home',161187,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161191,'auguria',1,'','left','home',161187,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161192,'auguria',1,'','left','home',161187,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:47'),(161193,'auguria',1,'','left','home',161187,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161194,'auguria',1,'','left','home',161187,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161195,'auguria',1,'','left','home',161187,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:36'),(161196,'auguria',1,'','left','home',161187,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161197,'auguria',1,'','left','home',161187,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161198,'auguria',1,'','left','home',161187,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161199,'auguria',1,'','left','home',161187,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161200,'auguria',1,'','left','home',161187,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161201,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161288,'auguria',1,'','left','home',161387,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161289,'auguria',1,'','left','home',161288,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161290,'auguria',1,'','left','home',161288,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161291,'auguria',1,'','left','home',161288,NULL,NULL,4,'/admin/system/filecheck.php?leftmenu=admintools','','FileCheck','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161292,'auguria',1,'','left','home',161387,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161293,'auguria',1,'','left','home',161387,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161294,'auguria',1,'','left','home',161387,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161295,'auguria',1,'','left','home',161387,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161297,'auguria',1,'','left','home',161387,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161387,'auguria',1,'','left','home',161088,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','AdminTools','admin',0,'admintools','','$user->admin',2,'2017-08-30 15:14:30'),(161388,'auguria',1,'','left','home',161387,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161389,'auguria',1,'','left','home',161387,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161392,'auguria',1,'','left','home',161387,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161393,'auguria',1,'','left','home',161387,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2017-08-30 15:14:30'),(161394,'auguria',1,'','left','home',161387,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161395,'auguria',1,'','left','home',161387,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161396,'auguria',1,'','left','home',161387,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161398,'auguria',1,'','left','home',161387,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','ExternalResources','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161407,'auguria',1,'','left','home',161387,NULL,NULL,15,'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools','','ProductVatMassChange','products',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161487,'auguria',1,'','left','home',161088,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2017-08-30 15:14:30'),(161488,'auguria',1,'','left','home',161487,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161489,'auguria',1,'','left','home',161488,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161490,'auguria',1,'','left','home',161487,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161491,'auguria',1,'','left','home',161490,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161587,'auguria',1,'','left','companies',161089,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161588,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/card.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161589,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/list.php?action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161590,'auguria',1,'','left','companies',161587,NULL,NULL,5,'/societe/list.php?type=f&leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161591,'auguria',1,'','left','companies',161590,NULL,NULL,0,'/societe/card.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161593,'auguria',1,'','left','companies',161587,NULL,NULL,3,'/societe/list.php?type=p&leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161594,'auguria',1,'','left','companies',161593,NULL,NULL,0,'/societe/card.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161596,'auguria',1,'','left','companies',161587,NULL,NULL,4,'/societe/list.php?type=c&leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161597,'auguria',1,'','left','companies',161596,NULL,NULL,0,'/societe/card.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161687,'auguria',1,'','left','companies',161089,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161688,'auguria',1,'','left','companies',161687,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161689,'auguria',1,'','left','companies',161687,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161691,'auguria',1,'','left','companies',161689,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161692,'auguria',1,'','left','companies',161689,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161693,'auguria',1,'','left','companies',161689,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','ThirdPartySuppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161694,'auguria',1,'','left','companies',161689,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161737,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161738,'auguria',1,'','left','companies',161737,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161747,'auguria',1,'','left','companies',161089,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161748,'auguria',1,'','left','companies',161747,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161757,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=4','','ContactCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161758,'auguria',1,'','left','companies',161757,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(162187,'auguria',1,'','left','commercial',161092,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162188,'auguria',1,'','left','commercial',162187,NULL,NULL,0,'/comm/propal/card.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162189,'auguria',1,'','left','commercial',162187,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162190,'auguria',1,'','left','commercial',162189,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&search_status=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162191,'auguria',1,'','left','commercial',162189,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&search_status=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162192,'auguria',1,'','left','commercial',162189,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&search_status=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162193,'auguria',1,'','left','commercial',162189,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&search_status=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162194,'auguria',1,'','left','commercial',162189,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&search_status=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162197,'auguria',1,'','left','commercial',162187,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162287,'auguria',1,'','left','commercial',161092,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162288,'auguria',1,'','left','commercial',162287,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162289,'auguria',1,'','left','commercial',162287,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162290,'auguria',1,'','left','commercial',162289,NULL,NULL,2,'/commande/list.php?leftmenu=orders&search_status=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162291,'auguria',1,'','left','commercial',162289,NULL,NULL,3,'/commande/list.php?leftmenu=orders&search_status=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162292,'auguria',1,'','left','commercial',162289,NULL,NULL,4,'/commande/list.php?leftmenu=orders&search_status=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162293,'auguria',1,'','left','commercial',162289,NULL,NULL,5,'/commande/list.php?leftmenu=orders&search_status=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162294,'auguria',1,'','left','commercial',162289,NULL,NULL,6,'/commande/list.php?leftmenu=orders&search_status=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162295,'auguria',1,'','left','commercial',162289,NULL,NULL,7,'/commande/list.php?leftmenu=orders&search_status=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162296,'auguria',1,'','left','commercial',162287,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162387,'auguria',1,'','left','commercial',161090,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2017-08-30 15:14:30'),(162388,'auguria',1,'','left','commercial',162387,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162389,'auguria',1,'','left','commercial',162387,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162390,'auguria',1,'','left','commercial',162387,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162487,'auguria',1,'','left','commercial',161092,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162488,'auguria',1,'','left','commercial',162487,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162489,'auguria',1,'','left','commercial',162487,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162490,'auguria',1,'','left','commercial',162487,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162491,'auguria',1,'','left','commercial',162490,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162492,'auguria',1,'','left','commercial',162490,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162493,'auguria',1,'','left','commercial',162490,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162494,'auguria',1,'','left','commercial',162490,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162587,'auguria',1,'','left','commercial',161092,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162588,'auguria',1,'','left','commercial',162587,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162589,'auguria',1,'','left','commercial',162587,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162590,'auguria',1,'','left','commercial',162587,NULL,NULL,2,'/fichinter/stats/index.php?leftmenu=ficheinter','','Statistics','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162687,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162688,'auguria',1,'','left','accountancy',162687,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162689,'auguria',1,'','left','accountancy',162687,NULL,NULL,1,'/fourn/facture/list.php?leftmenu=suppliers_bills','','List','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162690,'auguria',1,'','left','accountancy',162687,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162691,'auguria',1,'','left','accountancy',162687,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162692,'auguria',1,'','left','accountancy',162690,NULL,NULL,1,'/fourn/facture/rapport.php?leftmenu=suppliers_bills','','Reporting','bills',2,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162787,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162788,'auguria',1,'','left','accountancy',162787,NULL,NULL,3,'/compta/facture/card.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162789,'auguria',1,'','left','accountancy',162787,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162791,'auguria',1,'','left','accountancy',162787,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162792,'auguria',1,'','left','accountancy',162787,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162797,'auguria',1,'','left','accountancy',162791,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162798,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162799,'auguria',1,'','left','accountancy',162798,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162800,'auguria',1,'','left','accountancy',162798,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162801,'auguria',1,'','left','accountancy',162787,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162807,'auguria',1,'','left','accountancy',162792,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162808,'auguria',1,'','left','accountancy',162792,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162809,'auguria',1,'','left','accountancy',162792,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162810,'auguria',1,'','left','accountancy',162792,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162987,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/commande/list.php?leftmenu=orders&search_status=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2017-08-30 15:14:30'),(163087,'auguria',1,'','left','accountancy',161093,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2017-08-30 15:14:30'),(163088,'auguria',1,'','left','accountancy',163087,NULL,NULL,0,'/don/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163089,'auguria',1,'','left','accountancy',163087,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163187,'auguria',1,'','left','accountancy',161102,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163188,'auguria',1,'','left','accountancy',163187,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163189,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163190,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163287,'auguria',1,'','left','accountancy',161093,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuSpecialExpenses','compta',0,'tax','(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)','$conf->tax->enabled || $conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163297,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->payment->read','$conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163298,'auguria',1,'','left','accountancy',163297,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->payment->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163299,'auguria',1,'','left','accountancy',163297,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->payment->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163307,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2017-08-30 15:14:30'),(163308,'auguria',1,'','left','accountancy',163307,NULL,NULL,2,'/loan/card.php?leftmenu=tax_loan&action=create','','NewLoan','loan',2,'','$user->rights->loan->write','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2017-08-30 15:14:30'),(163310,'auguria',1,'','left','accountancy',163307,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)',0,'2017-08-30 15:14:30'),(163337,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2017-08-30 15:14:30'),(163338,'auguria',1,'','left','accountancy',163337,NULL,NULL,2,'/compta/sociales/card.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163339,'auguria',1,'','left','accountancy',163337,NULL,NULL,3,'/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163387,'auguria',1,'','left','accountancy',163287,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2017-08-30 15:14:30'),(163388,'auguria',1,'','left','accountancy',163387,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','New','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163389,'auguria',1,'','left','accountancy',163387,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','List','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163390,'auguria',1,'','left','accountancy',163387,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163391,'auguria',1,'','left','accountancy',163387,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163487,'auguria',1,'','left','accountancy',161093,NULL,NULL,7,'/accountancy/index.php?leftmenu=accountancy','','MenuAccountancy','accountancy',0,'accounting','! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163488,'auguria',1,'','left','accountancy',163487,NULL,NULL,2,'/accountancy/customer/index.php?leftmenu=dispatch_customer','','CustomersVentilation','accountancy',1,'dispatch_customer','$user->rights->accounting->bind->write','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163489,'auguria',1,'','left','accountancy',163488,NULL,NULL,3,'/accountancy/customer/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163490,'auguria',1,'','left','accountancy',163488,NULL,NULL,4,'/accountancy/customer/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163497,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/supplier/index.php?leftmenu=dispatch_supplier','','SuppliersVentilation','accountancy',1,'ventil_supplier','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2017-08-30 15:14:30'),(163498,'auguria',1,'','left','accountancy',163497,NULL,NULL,6,'/accountancy/supplier/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163499,'auguria',1,'','left','accountancy',163497,NULL,NULL,7,'/accountancy/supplier/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163507,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/expensereport/index.php?leftmenu=dispatch_expensereport','','ExpenseReportsVentilation','accountancy',1,'ventil_expensereport','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(163508,'auguria',1,'','left','accountancy',163507,NULL,NULL,6,'/accountancy/expensereport/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163509,'auguria',1,'','left','accountancy',163507,NULL,NULL,7,'/accountancy/expensereport/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163517,'auguria',1,'','left','accountancy',163487,NULL,NULL,15,'/accountancy/bookkeeping/list.php','','Bookkeeping','accountancy',1,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163522,'auguria',1,'','left','accountancy',163487,NULL,NULL,16,'/accountancy/bookkeeping/balance.php','','AccountBalance','accountancy',1,'balance','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163527,'auguria',1,'','left','accountancy',163487,NULL,NULL,17,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','Reportings','main',1,'report','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163528,'auguria',1,'','left','accountancy',163527,NULL,NULL,19,'/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportInOut','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163529,'auguria',1,'','left','accountancy',163528,NULL,NULL,18,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','ByAccounts','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163530,'auguria',1,'','left','accountancy',163528,NULL,NULL,20,'/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163531,'auguria',1,'','left','accountancy',163527,NULL,NULL,21,'/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportTurnover','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163532,'auguria',1,'','left','accountancy',163531,NULL,NULL,22,'/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163533,'auguria',1,'','left','accountancy',163531,NULL,NULL,23,'/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy','','ByUsers','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163534,'auguria',1,'','left','accountancy',163531,NULL,NULL,24,'/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy','','ByProductsAndServices','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163537,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin','','FiscalPeriod','admin',1,'accountancy_admin_period','','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\" && $conf->global->MAIN_FEATURES_LEVEL > 0',2,'2017-08-30 15:14:30'),(163538,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Setup','accountancy',1,'accountancy_admin','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163541,'auguria',1,'','left','accountancy',163538,NULL,NULL,10,'/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingJournals','accountancy',2,'accountancy_admin_journal','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163542,'auguria',1,'','left','accountancy',163538,NULL,NULL,20,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Pcg_version','accountancy',2,'accountancy_admin_chartmodel','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163543,'auguria',1,'','left','accountancy',163538,NULL,NULL,30,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Chartofaccounts','accountancy',2,'accountancy_admin_chart','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163544,'auguria',1,'','left','accountancy',163538,NULL,NULL,40,'/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingCategory','accountancy',2,'accountancy_admin_chart_group','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163545,'auguria',1,'','left','accountancy',163538,NULL,NULL,50,'/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuDefaultAccounts','accountancy',2,'accountancy_admin_default','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163546,'auguria',1,'','left','accountancy',163538,NULL,NULL,60,'/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuVatAccounts','accountancy',2,'accountancy_admin_vat','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163547,'auguria',1,'','left','accountancy',163538,NULL,NULL,70,'/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuTaxAccounts','accountancy',2,'accountancy_admin_tax','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163548,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuExpenseReportAccounts','accountancy',2,'accountancy_admin_expensereport','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163549,'auguria',1,'','left','accountancy',163538,NULL,NULL,90,'/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuProductsAccounts','accountancy',2,'accountancy_admin_product','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163587,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2017-08-30 15:14:30'),(163589,'auguria',1,'','left','accountancy',163587,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163590,'auguria',1,'','left','accountancy',163587,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163591,'auguria',1,'','left','accountancy',163587,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163593,'auguria',1,'','left','accountancy',163587,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163594,'auguria',1,'','left','accountancy',163587,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163687,'auguria',1,'','left','accountancy',161101,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2017-08-30 15:14:30'),(163688,'auguria',1,'','left','accountancy',163687,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163690,'auguria',1,'','left','accountancy',163687,NULL,NULL,2,'/compta/bank/bankentries.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163691,'auguria',1,'','left','accountancy',163687,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163693,'auguria',1,'','left','accountancy',163687,NULL,NULL,5,'/compta/bank/transfer.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163737,'auguria',1,'','left','accountancy',161101,NULL,NULL,4,'/categories/index.php?leftmenu=bank&type=5','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163738,'auguria',1,'','left','accountancy',163737,NULL,NULL,0,'/categories/card.php?leftmenu=bank&action=create&type=5','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163787,'auguria',1,'','left','accountancy',161093,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled',0,'2017-08-30 15:14:30'),(163792,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'','','Journalization','main',1,'','$user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163793,'auguria',1,'','left','accountancy',163792,NULL,NULL,4,'/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1','','SellsJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163794,'auguria',1,'','left','accountancy',163792,NULL,NULL,1,'/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3','','BankJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163795,'auguria',1,'','left','accountancy',163792,NULL,NULL,2,'/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6','','ExpenseReportJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163796,'auguria',1,'','left','accountancy',163792,NULL,NULL,3,'/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2','','PurchasesJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163798,'auguria',1,'','left','accountancy',163787,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163799,'auguria',1,'','left','accountancy',163788,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163800,'auguria',1,'','left','accountancy',163787,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163801,'auguria',1,'','left','accountancy',163790,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163802,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163803,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyprodserv.php?leftmenu=ca','','ByProductsAndServices','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163887,'auguria',1,'','left','products',161090,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163888,'auguria',1,'','left','products',163887,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163889,'auguria',1,'','left','products',163887,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163890,'auguria',1,'','left','products',163887,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163891,'auguria',1,'','left','products',163887,NULL,NULL,7,'/product/stats/card.php?id=all&leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(163892,'auguria',1,'','left','products',163887,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163893,'auguria',1,'','left','products',163887,NULL,NULL,6,'/product/stock/productlot_list.php','','LotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163987,'auguria',1,'','left','products',161090,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163988,'auguria',1,'','left','products',163987,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163989,'auguria',1,'','left','products',163987,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163990,'auguria',1,'','left','products',163987,NULL,NULL,5,'/product/stats/card.php?id=all&leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(164187,'auguria',1,'','left','products',161090,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164188,'auguria',1,'','left','products',164187,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164189,'auguria',1,'','left','products',164187,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164191,'auguria',1,'','left','products',164187,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164192,'auguria',1,'','left','products',164187,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(164193,'auguria',1,'','left','products',164187,NULL,NULL,5,'/product/stock/massstockmove.php','','MassStockTransferShort','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164287,'auguria',1,'','left','products',161090,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164288,'auguria',1,'','left','products',164287,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164487,'auguria',1,'','left','project',161094,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164687,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164688,'auguria',1,'','left','project',164687,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164689,'auguria',1,'','left','project',164687,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164690,'auguria',1,'','left','project',164687,NULL,NULL,3,'/projet/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164787,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164788,'auguria',1,'','left','project',164787,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164789,'auguria',1,'','left','project',164787,NULL,NULL,2,'/projet/tasks/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164791,'auguria',1,'','left','project',164787,NULL,NULL,4,'/projet/tasks/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164891,'auguria',1,'','left','project',161094,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=6','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164892,'auguria',1,'','left','project',164891,NULL,NULL,0,'/categories/card.php?action=create&type=6','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164987,'auguria',1,'','left','tools',161095,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164988,'auguria',1,'','left','tools',164987,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164989,'auguria',1,'','left','tools',164987,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(165187,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165188,'auguria',1,'','left','tools',165187,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165217,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165218,'auguria',1,'','left','tools',165217,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165287,'auguria',1,'','left','members',161100,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165288,'auguria',1,'','left','members',165287,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165289,'auguria',1,'','left','members',165287,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165290,'auguria',1,'','left','members',165289,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165291,'auguria',1,'','left','members',165289,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165292,'auguria',1,'','left','members',165289,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165293,'auguria',1,'','left','members',165289,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165294,'auguria',1,'','left','members',165289,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165295,'auguria',1,'','left','members',165287,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165387,'auguria',1,'','left','members',161100,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165388,'auguria',1,'','left','members',165387,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165389,'auguria',1,'','left','members',165387,NULL,NULL,1,'/adherents/subscription/list.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165390,'auguria',1,'','left','members',165387,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165589,'auguria',1,'','left','members',165287,NULL,NULL,9,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165590,'auguria',1,'','left','members',165287,NULL,NULL,10,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165687,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/user/index.php?leftmenu=hrm&mode=employee','','Employees','hrm',0,'hrm','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165688,'auguria',1,'','left','hrm',165687,NULL,NULL,1,'/user/card.php?action=create&employee=1','','NewEmployee','hrm',1,'','$user->rights->hrm->employee->write','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165689,'auguria',1,'','left','hrm',165687,NULL,NULL,2,'/user/index.php?$leftmenu=hrm&mode=employee&contextpage=employeelist','','List','hrm',1,'','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165787,'auguria',1,'','left','members',161100,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165788,'auguria',1,'','left','members',165787,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165789,'auguria',1,'','left','members',165787,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(166087,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166088,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166089,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List','holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166090,'auguria',1,'','left','hrm',166089,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove','trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166091,'auguria',1,'','left','hrm',166087,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166092,'auguria',1,'','left','hrm',166087,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166187,'auguria',1,'','left','commercial',161092,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166188,'auguria',1,'','left','commercial',166187,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166189,'auguria',1,'','left','commercial',166187,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&search_status=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166195,'auguria',1,'','left','commercial',166187,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166287,'auguria',1,'','left','members',161100,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166288,'auguria',1,'','left','members',166287,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166387,'auguria',1,'','left','hrm',161102,NULL,NULL,5,'/expensereport/index.php?leftmenu=expensereport','','TripsAndExpenses','trips',0,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166388,'auguria',1,'','left','hrm',166387,NULL,NULL,1,'/expensereport/card.php?action=create&leftmenu=expensereport','','New','trips',1,'','$user->rights->expensereport->creer','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166389,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/list.php?leftmenu=expensereport','','List','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166390,'auguria',1,'','left','hrm',166389,NULL,NULL,2,'/expensereport/list.php?search_status=2&leftmenu=expensereport','','ListToApprove','trips',2,'','$user->rights->expensereport->approve','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166391,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/stats/index.php?leftmenu=expensereport','','Statistics','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166467,'all',1,'variants','left','products',-1,'product','products',100,'/variants/list.php','','VariantAttributes','products',NULL,'product','1','$conf->product->enabled',0,'2018-01-19 11:28:04'),(166541,'all',1,'ticket','top','ticket',0,NULL,NULL,88,'/ticket/index.php','','Ticket','ticket',NULL,'1','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166542,'all',1,'ticket','left','ticket',-1,NULL,'ticket',101,'/ticket/index.php','','Ticket','ticket',NULL,'ticket','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166543,'all',1,'ticket','left','ticket',-1,'ticket','ticket',102,'/ticket/card.php?action=create','','NewTicket','ticket',NULL,NULL,'$user->rights->ticket->write','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166544,'all',1,'ticket','left','ticket',-1,'ticket','ticket',103,'/ticket/list.php?search_fk_status=non_closed','','List','ticket',NULL,'ticketlist','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166545,'all',1,'ticket','left','ticket',-1,'ticket','ticket',105,'/ticket/list.php?mode=mine&search_fk_status=non_closed','','MenuTicketMyAssign','ticket',NULL,'ticketmy','$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166546,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/ticket/stats/index.php','','Statistics','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166923,'all',1,'resource','left','tools',-1,NULL,'tools',100,'/resource/list.php','','MenuResourceIndex','resource',NULL,'resource','$user->rights->resource->read','1',0,'2020-01-20 11:46:00'),(166924,'all',1,'resource','left','tools',-1,'resource','tools',101,'/resource/card.php?action=create','','MenuResourceAdd','resource',NULL,'resource_add','$user->rights->resource->write','1',0,'2020-01-20 11:46:00'),(166925,'all',1,'resource','left','tools',-1,'resource','tools',102,'/resource/list.php','','List','resource',NULL,'resource_list','$user->rights->resource->read','1',0,'2020-01-20 11:46:00'),(166976,'all',1,'agenda','top','agenda',0,NULL,NULL,86,'/comm/action/index.php','','TMenuAgenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-06-12 17:12:28'),(166977,'all',1,'agenda','left','agenda',166976,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-06-12 17:12:28'),(166978,'all',1,'agenda','left','agenda',166977,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2020-06-12 17:12:28'),(166979,'all',1,'agenda','left','agenda',166977,NULL,NULL,140,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-06-12 17:12:28'),(166980,'all',1,'agenda','left','agenda',166979,NULL,NULL,141,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-06-12 17:12:28'),(166981,'all',1,'agenda','left','agenda',166979,NULL,NULL,142,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-06-12 17:12:28'),(166982,'all',1,'agenda','left','agenda',166979,NULL,NULL,143,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-06-12 17:12:28'),(166983,'all',1,'agenda','left','agenda',166979,NULL,NULL,144,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-06-12 17:12:28'),(166984,'all',1,'agenda','left','agenda',166977,NULL,NULL,110,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-06-12 17:12:28'),(166985,'all',1,'agenda','left','agenda',166984,NULL,NULL,111,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-06-12 17:12:28'),(166986,'all',1,'agenda','left','agenda',166984,NULL,NULL,112,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-06-12 17:12:28'),(166987,'all',1,'agenda','left','agenda',166984,NULL,NULL,113,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-06-12 17:12:28'),(166988,'all',1,'agenda','left','agenda',166984,NULL,NULL,114,'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-06-12 17:12:28'),(166989,'all',1,'agenda','left','agenda',166977,NULL,NULL,160,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2020-06-12 17:12:28'),(166990,'all',1,'agenda','left','agenda',166977,NULL,NULL,170,'/categories/index.php?mainmenu=agenda&leftmenu=agenda&type=10','','Categories','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->categorie->enabled&&$conf->categorie->enabled',2,'2020-06-12 17:12:28'),(166991,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','products',NULL,'barcodeprint','($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled',2,'2020-06-12 17:12:28'),(166992,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)',0,'2020-06-12 17:12:28'),(166993,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?leftmenu=admintools','','CronList','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',2,'2020-06-12 17:12:28'),(166994,'all',1,'ecm','top','ecm',0,NULL,NULL,82,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2020-06-12 17:12:29'),(166995,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2020-06-12 17:12:29'),(166996,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2020-06-12 17:12:29'),(166997,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',2,'2020-06-12 17:12:29'),(166998,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2020-06-12 17:12:29'),(166999,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2020-06-12 17:12:29'),(167000,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2020-06-12 17:12:29'),(167001,'all',1,'takepos','top','takepos',0,NULL,NULL,1001,'/takepos/index.php','takepos','PointOfSaleShort','cashdesk',NULL,NULL,'$user->rights->takepos->run','$conf->takepos->enabled',2,'2020-06-12 17:12:30'),(167002,'all',1,'website','top','website',0,NULL,NULL,100,'/website/index.php','','WebSites','website',NULL,NULL,'$user->rights->website->read','$conf->website->enabled',2,'2020-06-12 17:12:30'); /*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */; UNLOCK TABLES; @@ -7742,7 +7942,7 @@ DROP TABLE IF EXISTS `llx_monmodule_abcdef_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_monmodule_abcdef_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -7768,7 +7968,7 @@ DROP TABLE IF EXISTS `llx_monmodule_actioncommreminder`; CREATE TABLE `llx_monmodule_actioncommreminder` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `status` int(11) DEFAULT NULL, - `entity` int(11) DEFAULT '1', + `entity` int(11) DEFAULT 1, `dateremind` datetime NOT NULL, `typeremind` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `fk_user` int(11) NOT NULL, @@ -7800,7 +8000,7 @@ DROP TABLE IF EXISTS `llx_monmodule_actioncommreminder_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_monmodule_actioncommreminder_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -7826,14 +8026,14 @@ DROP TABLE IF EXISTS `llx_monmodule_eleves`; CREATE TABLE `llx_monmodule_eleves` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, - `note_public` mediumtext COLLATE utf8_unicode_ci, - `note_private` mediumtext COLLATE utf8_unicode_ci, + `note_public` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -7866,7 +8066,7 @@ DROP TABLE IF EXISTS `llx_monmodule_eleves_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_monmodule_eleves_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -7882,6 +8082,144 @@ LOCK TABLES `llx_monmodule_eleves_extrafields` WRITE; /*!40000 ALTER TABLE `llx_monmodule_eleves_extrafields` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_monmodule_myobject_extrafields` +-- + +DROP TABLE IF EXISTS `llx_monmodule_myobject_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_monmodule_myobject_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_object` int(11) NOT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_fk_object` (`fk_object`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_monmodule_myobject_extrafields` +-- + +LOCK TABLES `llx_monmodule_myobject_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_monmodule_myobject_extrafields` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_monmodule_myobject_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_monmodule_test` +-- + +DROP TABLE IF EXISTS `llx_monmodule_test`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_monmodule_test` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '(PROV)', + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `amount` double(24,8) DEFAULT NULL, + `qty` double DEFAULT NULL, + `fk_soc` int(11) DEFAULT NULL, + `fk_project` int(11) DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `date_creation` datetime NOT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_user_creat` int(11) NOT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `status` int(11) NOT NULL, + `aa` double DEFAULT NULL, + `dd` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_monmodule_test_rowid` (`rowid`), + KEY `idx_monmodule_test_ref` (`ref`), + KEY `idx_monmodule_test_fk_soc` (`fk_soc`), + KEY `idx_monmodule_test_fk_project` (`fk_project`), + KEY `idx_monmodule_test_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_monmodule_test` +-- + +LOCK TABLES `llx_monmodule_test` WRITE; +/*!40000 ALTER TABLE `llx_monmodule_test` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_monmodule_test` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_monmodule_test2` +-- + +DROP TABLE IF EXISTS `llx_monmodule_test2`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_monmodule_test2` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '(PROV)', + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `amount` double(24,8) DEFAULT NULL, + `qty` double DEFAULT NULL, + `fk_soc` int(11) DEFAULT NULL, + `fk_project` int(11) DEFAULT NULL, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `date_creation` datetime NOT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_user_creat` int(11) NOT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `status` int(11) NOT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_monmodule_test2_rowid` (`rowid`), + KEY `idx_monmodule_test2_ref` (`ref`), + KEY `idx_monmodule_test2_fk_soc` (`fk_soc`), + KEY `idx_monmodule_test2_fk_project` (`fk_project`), + KEY `idx_monmodule_test2_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_monmodule_test2` +-- + +LOCK TABLES `llx_monmodule_test2` WRITE; +/*!40000 ALTER TABLE `llx_monmodule_test2` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_monmodule_test2` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_monmodule_test2_extrafields` +-- + +DROP TABLE IF EXISTS `llx_monmodule_test2_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_monmodule_test2_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_object` int(11) NOT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_fk_object` (`fk_object`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_monmodule_test2_extrafields` +-- + +LOCK TABLES `llx_monmodule_test2_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_monmodule_test2_extrafields` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_monmodule_test2_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_monobj_extrafields` -- @@ -7891,7 +8229,7 @@ DROP TABLE IF EXISTS `llx_monobj_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_monobj_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -7917,15 +8255,15 @@ DROP TABLE IF EXISTS `llx_mrp_mo`; CREATE TABLE `llx_mrp_mo` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '(PROV)', - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `qty` double NOT NULL, `fk_warehouse` int(11) DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, - `note_public` text COLLATE utf8_unicode_ci, - `note_private` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -7972,7 +8310,7 @@ DROP TABLE IF EXISTS `llx_mrp_mo_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_mrp_mo_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -7989,6 +8327,32 @@ LOCK TABLES `llx_mrp_mo_extrafields` WRITE; /*!40000 ALTER TABLE `llx_mrp_mo_extrafields` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_mrp_myobject_extrafields` +-- + +DROP TABLE IF EXISTS `llx_mrp_myobject_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_mrp_myobject_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_object` int(11) NOT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_fk_object` (`fk_object`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_mrp_myobject_extrafields` +-- + +LOCK TABLES `llx_mrp_myobject_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_mrp_myobject_extrafields` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_mrp_myobject_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_mrp_production` -- @@ -7999,21 +8363,21 @@ DROP TABLE IF EXISTS `llx_mrp_production`; CREATE TABLE `llx_mrp_production` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_mo` int(11) NOT NULL, - `position` int(11) NOT NULL DEFAULT '0', + `position` int(11) NOT NULL DEFAULT 0, `fk_product` int(11) NOT NULL, `fk_warehouse` int(11) DEFAULT NULL, - `qty` double NOT NULL DEFAULT '1', - `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `qty` double NOT NULL DEFAULT 1, + `batch` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `role` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_mrp_production` int(11) DEFAULT NULL, `fk_stock_movement` int(11) DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `qty_frozen` smallint(6) DEFAULT '0', - `disable_stock_change` smallint(6) DEFAULT '0', + `qty_frozen` smallint(6) DEFAULT 0, + `disable_stock_change` smallint(6) DEFAULT 0, PRIMARY KEY (`rowid`), KEY `fk_mrp_production_product` (`fk_product`), KEY `fk_mrp_production_stock_movement` (`fk_stock_movement`), @@ -8046,7 +8410,7 @@ CREATE TABLE `llx_multicurrency` ( `date_create` datetime DEFAULT NULL, `code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) DEFAULT '1', + `entity` int(11) DEFAULT 1, `fk_user` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -8072,9 +8436,9 @@ DROP TABLE IF EXISTS `llx_multicurrency_rate`; CREATE TABLE `llx_multicurrency_rate` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `date_sync` datetime DEFAULT NULL, - `rate` double NOT NULL DEFAULT '0', + `rate` double NOT NULL DEFAULT 0, `fk_multicurrency` int(11) NOT NULL, - `entity` int(11) DEFAULT '1', + `entity` int(11) DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -8098,7 +8462,7 @@ DROP TABLE IF EXISTS `llx_myobject`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_myobject` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_othertable` int(11) NOT NULL, `name` varchar(189) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -8123,19 +8487,19 @@ DROP TABLE IF EXISTS `llx_nomenclature`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_nomenclature` ( - `rowid` int(11) NOT NULL DEFAULT '0', + `rowid` int(11) NOT NULL DEFAULT 0, `date_cre` datetime DEFAULT NULL, `date_maj` datetime DEFAULT NULL, `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_object` int(11) NOT NULL DEFAULT '0', - `fk_nomenclature_parent` int(11) NOT NULL DEFAULT '0', - `is_default` int(11) NOT NULL DEFAULT '0', - `qty_reference` double NOT NULL DEFAULT '0', - `totalPRCMO_PMP` double NOT NULL DEFAULT '0', - `totalPRCMO_OF` double NOT NULL DEFAULT '0', - `totalPRCMO` double NOT NULL DEFAULT '0', + `fk_object` int(11) NOT NULL DEFAULT 0, + `fk_nomenclature_parent` int(11) NOT NULL DEFAULT 0, + `is_default` int(11) NOT NULL DEFAULT 0, + `qty_reference` double NOT NULL DEFAULT 0, + `totalPRCMO_PMP` double NOT NULL DEFAULT 0, + `totalPRCMO_OF` double NOT NULL DEFAULT 0, + `totalPRCMO` double NOT NULL DEFAULT 0, `object_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `note_private` longtext COLLATE utf8_unicode_ci, + `note_private` longtext COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `date_cre` (`date_cre`), KEY `date_maj` (`date_maj`), @@ -8165,13 +8529,13 @@ DROP TABLE IF EXISTS `llx_nomenclature_coef`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_nomenclature_coef` ( - `rowid` int(11) NOT NULL DEFAULT '0', + `rowid` int(11) NOT NULL DEFAULT 0, `date_cre` datetime DEFAULT NULL, `date_maj` datetime DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `code_type` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `tx` double NOT NULL DEFAULT '0', + `tx` double NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), KEY `date_cre` (`date_cre`), KEY `date_maj` (`date_maj`), @@ -8197,13 +8561,13 @@ DROP TABLE IF EXISTS `llx_nomenclature_coef_object`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_nomenclature_coef_object` ( - `rowid` int(11) NOT NULL DEFAULT '0', + `rowid` int(11) NOT NULL DEFAULT 0, `date_cre` datetime DEFAULT NULL, `date_maj` datetime DEFAULT NULL, - `fk_object` int(11) NOT NULL DEFAULT '0', + `fk_object` int(11) NOT NULL DEFAULT 0, `type_object` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `code_type` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `tx_object` double NOT NULL DEFAULT '0', + `tx_object` double NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), KEY `date_cre` (`date_cre`), KEY `date_maj` (`date_maj`), @@ -8230,18 +8594,18 @@ DROP TABLE IF EXISTS `llx_nomenclature_workstation`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_nomenclature_workstation` ( - `rowid` int(11) NOT NULL DEFAULT '0', + `rowid` int(11) NOT NULL DEFAULT 0, `date_cre` datetime DEFAULT NULL, `date_maj` datetime DEFAULT NULL, - `fk_workstation` int(11) NOT NULL DEFAULT '0', - `fk_nomenclature` int(11) NOT NULL DEFAULT '0', - `rang` int(11) NOT NULL DEFAULT '0', - `unifyRang` int(11) NOT NULL DEFAULT '0', - `nb_hour` double NOT NULL DEFAULT '0', - `nb_hour_prepare` double NOT NULL DEFAULT '0', - `nb_hour_manufacture` double NOT NULL DEFAULT '0', - `nb_days_before_beginning` double NOT NULL DEFAULT '0', - `note_private` longtext COLLATE utf8_unicode_ci, + `fk_workstation` int(11) NOT NULL DEFAULT 0, + `fk_nomenclature` int(11) NOT NULL DEFAULT 0, + `rang` int(11) NOT NULL DEFAULT 0, + `unifyRang` int(11) NOT NULL DEFAULT 0, + `nb_hour` double NOT NULL DEFAULT 0, + `nb_hour_prepare` double NOT NULL DEFAULT 0, + `nb_hour_manufacture` double NOT NULL DEFAULT 0, + `nb_days_before_beginning` double NOT NULL DEFAULT 0, + `note_private` longtext COLLATE utf8_unicode_ci DEFAULT NULL, `code_type` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `date_cre` (`date_cre`), @@ -8270,13 +8634,13 @@ DROP TABLE IF EXISTS `llx_nomenclature_workstation_thm_object`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_nomenclature_workstation_thm_object` ( - `rowid` int(11) NOT NULL DEFAULT '0', + `rowid` int(11) NOT NULL DEFAULT 0, `date_cre` datetime DEFAULT NULL, `date_maj` datetime DEFAULT NULL, - `fk_workstation` int(11) NOT NULL DEFAULT '0', - `fk_object` int(11) NOT NULL DEFAULT '0', + `fk_workstation` int(11) NOT NULL DEFAULT 0, + `fk_object` int(11) NOT NULL DEFAULT 0, `type_object` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `thm_object` double NOT NULL DEFAULT '0', + `thm_object` double NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), KEY `date_cre` (`date_cre`), KEY `date_maj` (`date_maj`), @@ -8302,20 +8666,20 @@ DROP TABLE IF EXISTS `llx_nomenclaturedet`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_nomenclaturedet` ( - `rowid` int(11) NOT NULL DEFAULT '0', + `rowid` int(11) NOT NULL DEFAULT 0, `date_cre` datetime DEFAULT NULL, `date_maj` datetime DEFAULT NULL, `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_product` int(11) NOT NULL DEFAULT '0', - `fk_nomenclature` int(11) NOT NULL DEFAULT '0', - `is_imported` int(11) NOT NULL DEFAULT '0', - `rang` int(11) NOT NULL DEFAULT '0', - `unifyRang` int(11) NOT NULL DEFAULT '0', + `fk_product` int(11) NOT NULL DEFAULT 0, + `fk_nomenclature` int(11) NOT NULL DEFAULT 0, + `is_imported` int(11) NOT NULL DEFAULT 0, + `rang` int(11) NOT NULL DEFAULT 0, + `unifyRang` int(11) NOT NULL DEFAULT 0, `code_type` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `workstations` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `qty` double NOT NULL DEFAULT '0', - `price` double NOT NULL DEFAULT '0', - `note_private` longtext COLLATE utf8_unicode_ci, + `qty` double NOT NULL DEFAULT 0, + `price` double NOT NULL DEFAULT 0, + `note_private` longtext COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `date_cre` (`date_cre`), KEY `date_maj` (`date_maj`), @@ -8346,7 +8710,7 @@ DROP TABLE IF EXISTS `llx_notify`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_notify` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `daten` datetime DEFAULT NULL, `fk_action` int(11) NOT NULL, `fk_soc` int(11) DEFAULT NULL, @@ -8379,7 +8743,7 @@ DROP TABLE IF EXISTS `llx_notify_def`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_notify_def` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` date DEFAULT NULL, `fk_action` int(11) NOT NULL, `fk_soc` int(11) DEFAULT NULL, @@ -8408,7 +8772,7 @@ DROP TABLE IF EXISTS `llx_notify_def_object`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_notify_def_object` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `objet_type` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `objet_id` int(11) NOT NULL, `type_notif` varchar(16) COLLATE utf8_unicode_ci DEFAULT 'browser', @@ -8465,12 +8829,12 @@ DROP TABLE IF EXISTS `llx_oauth_token`; CREATE TABLE `llx_oauth_token` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `service` varchar(36) COLLATE utf8_unicode_ci DEFAULT NULL, - `token` text COLLATE utf8_unicode_ci, + `token` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `fk_adherent` int(11) DEFAULT NULL, `entity` int(11) DEFAULT NULL, - `tokenstring` text COLLATE utf8_unicode_ci, + `tokenstring` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -8493,11 +8857,11 @@ DROP TABLE IF EXISTS `llx_object_lang`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_object_lang` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_object` int(11) NOT NULL DEFAULT '0', + `fk_object` int(11) NOT NULL DEFAULT 0, `type_object` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `property` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `lang` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `value` text COLLATE utf8_unicode_ci, + `value` text COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_object_lang` (`fk_object`,`type_object`,`property`,`lang`) @@ -8522,11 +8886,11 @@ DROP TABLE IF EXISTS `llx_onlinesignature`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_onlinesignature` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `object_type` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `object_id` int(11) NOT NULL, `datec` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `ip` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `pathoffile` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -8554,7 +8918,7 @@ CREATE TABLE `llx_opensurvey_comments` ( `id_comment` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_sondage` char(16) COLLATE utf8_unicode_ci NOT NULL, `comment` text COLLATE utf8_unicode_ci NOT NULL, - `usercomment` text COLLATE utf8_unicode_ci, + `usercomment` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id_comment`), KEY `idx_id_comment` (`id_comment`), KEY `idx_id_sondage` (`id_sondage`) @@ -8581,8 +8945,8 @@ DROP TABLE IF EXISTS `llx_opensurvey_formquestions`; CREATE TABLE `llx_opensurvey_formquestions` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `id_sondage` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, - `question` text COLLATE utf8_unicode_ci, - `available_answers` text COLLATE utf8_unicode_ci, + `question` text COLLATE utf8_unicode_ci DEFAULT NULL, + `available_answers` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -8605,20 +8969,20 @@ DROP TABLE IF EXISTS `llx_opensurvey_sondage`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_opensurvey_sondage` ( `id_sondage` varchar(16) COLLATE utf8_unicode_ci NOT NULL, - `commentaires` text COLLATE utf8_unicode_ci, + `commentaires` text COLLATE utf8_unicode_ci DEFAULT NULL, `mail_admin` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `nom_admin` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_creat` int(11) NOT NULL, `titre` text COLLATE utf8_unicode_ci NOT NULL, `date_fin` datetime DEFAULT NULL, - `status` int(11) DEFAULT '1', + `status` int(11) DEFAULT 1, `format` varchar(2) COLLATE utf8_unicode_ci NOT NULL, - `mailsonde` tinyint(4) NOT NULL DEFAULT '0', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `entity` int(11) NOT NULL DEFAULT '1', - `allow_comments` tinyint(4) NOT NULL DEFAULT '1', - `allow_spy` tinyint(4) NOT NULL DEFAULT '1', - `sujet` text COLLATE utf8_unicode_ci, + `mailsonde` tinyint(4) NOT NULL DEFAULT 0, + `tms` timestamp NOT NULL DEFAULT current_timestamp(), + `entity` int(11) NOT NULL DEFAULT 1, + `allow_comments` tinyint(4) NOT NULL DEFAULT 1, + `allow_spy` tinyint(4) NOT NULL DEFAULT 1, + `sujet` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id_sondage`), KEY `idx_date_fin` (`date_fin`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -8644,7 +9008,7 @@ DROP TABLE IF EXISTS `llx_opensurvey_user_formanswers`; CREATE TABLE `llx_opensurvey_user_formanswers` ( `fk_user_survey` int(11) NOT NULL, `fk_question` int(11) NOT NULL, - `reponses` text COLLATE utf8_unicode_ci + `reponses` text COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -8698,10 +9062,10 @@ DROP TABLE IF EXISTS `llx_overwrite_trans`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_overwrite_trans` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `lang` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, `transkey` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `transvalue` text COLLATE utf8_unicode_ci, + `transvalue` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_overwrite_trans` (`lang`,`transkey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -8725,7 +9089,7 @@ DROP TABLE IF EXISTS `llx_packages_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_packages_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -8751,20 +9115,20 @@ DROP TABLE IF EXISTS `llx_paiement`; CREATE TABLE `llx_paiement` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_paiement` int(11) NOT NULL, `num_paiement` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, - `fk_bank` int(11) NOT NULL DEFAULT '0', + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, + `fk_bank` int(11) NOT NULL DEFAULT 0, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `statut` smallint(6) NOT NULL DEFAULT '0', - `fk_export_compta` int(11) NOT NULL DEFAULT '0', - `multicurrency_amount` double(24,8) DEFAULT '0.00000000', + `statut` smallint(6) NOT NULL DEFAULT 0, + `fk_export_compta` int(11) NOT NULL DEFAULT 0, + `multicurrency_amount` double(24,8) DEFAULT 0.00000000, `ext_payment_id` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `ext_payment_site` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -8777,7 +9141,7 @@ CREATE TABLE `llx_paiement` ( LOCK TABLES `llx_paiement` WRITE; /*!40000 ALTER TABLE `llx_paiement` DISABLE KEYS */; -INSERT INTO `llx_paiement` VALUES (3,'',1,'2013-07-18 20:50:47','2018-07-30 15:13:20','2018-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0,0.00000000,NULL,NULL),(5,'',1,'2013-08-01 03:34:11','2018-07-30 15:12:32','2017-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0,0.00000000,NULL,NULL),(6,'',1,'2013-08-06 20:33:54','2018-07-30 15:12:32','2017-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0,0.00000000,NULL,NULL),(8,'',1,'2013-08-08 02:53:40','2018-07-30 15:12:32','2017-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0,0.00000000,NULL,NULL),(9,'',1,'2013-08-08 02:55:58','2018-07-30 15:12:32','2017-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0,0.00000000,NULL,NULL),(17,'',1,'2014-12-09 15:28:44','2018-07-30 15:12:32','2017-12-09 12:00:00',2.00000000,4,'','',16,1,NULL,0,0,0.00000000,NULL,NULL),(18,'',1,'2014-12-09 15:28:53','2018-07-30 15:12:32','2017-12-09 12:00:00',-2.00000000,4,'','',17,1,NULL,0,0,0.00000000,NULL,NULL),(19,'',1,'2014-12-09 17:35:55','2018-07-30 15:12:32','2017-12-09 12:00:00',-2.00000000,4,'','',18,1,NULL,0,0,0.00000000,NULL,NULL),(20,'',1,'2014-12-09 17:37:02','2018-07-30 15:12:32','2017-12-09 12:00:00',2.00000000,4,'','',19,1,NULL,0,0,0.00000000,NULL,NULL),(21,'',1,'2014-12-09 18:35:07','2018-07-30 15:12:32','2017-12-09 12:00:00',-2.00000000,4,'','',20,1,NULL,0,0,0.00000000,NULL,NULL),(23,'',1,'2014-12-12 18:54:33','2018-07-30 15:12:32','2017-12-12 12:00:00',1.00000000,1,'','',21,1,NULL,0,0,0.00000000,NULL,NULL),(24,'',1,'2015-03-06 16:48:16','2018-07-30 15:13:20','2018-03-06 00:00:00',20.00000000,4,'','Adhésion/cotisation 2016',22,1,NULL,0,0,0.00000000,NULL,NULL),(25,'',1,'2015-03-20 14:30:11','2018-07-30 15:13:20','2018-03-20 00:00:00',10.00000000,2,'','Adhésion/cotisation 2011',23,1,NULL,0,0,0.00000000,NULL,NULL),(26,'',1,'2016-03-02 19:57:58','2018-07-30 15:13:20','2018-07-09 12:00:00',605.00000000,2,'','',24,1,NULL,0,0,0.00000000,NULL,NULL),(29,'',1,'2016-03-02 20:01:39','2018-07-30 15:13:20','2018-03-19 12:00:00',500.00000000,4,'','',26,1,NULL,0,0,0.00000000,NULL,NULL),(30,'',1,'2016-03-02 20:02:06','2018-07-30 15:13:20','2018-03-21 12:00:00',400.00000000,2,'','',27,1,NULL,0,0,0.00000000,NULL,NULL),(32,'',1,'2016-03-03 19:22:32','2018-07-30 15:12:32','2017-10-03 12:00:00',-400.00000000,4,'','',28,1,NULL,0,0,0.00000000,NULL,NULL),(33,'',1,'2016-03-03 19:23:16','2018-07-30 15:13:20','2018-03-10 12:00:00',-300.00000000,4,'','',29,1,NULL,0,0,0.00000000,NULL,NULL),(34,'PAY1603-0001',1,'2017-02-06 08:10:24','2017-02-06 04:10:24','2018-03-22 12:00:00',150.00000000,7,'','',33,12,NULL,0,0,150.00000000,NULL,NULL),(35,'PAY1603-0002',1,'2017-02-06 08:10:50','2017-02-06 04:10:50','2018-03-25 12:00:00',140.00000000,3,'','',34,12,NULL,0,0,140.00000000,NULL,NULL),(36,'PAY1702-0003',1,'2017-02-21 16:07:43','2017-02-21 12:07:43','2017-02-21 12:00:00',50.00000000,3,'T170201','',37,12,NULL,0,0,50.00000000,NULL,NULL),(38,'PAY1803-0004',1,'2018-03-16 13:59:31','2018-03-16 09:59:31','2018-03-16 12:00:00',10.00000000,7,'','',39,12,NULL,0,0,10.00000000,NULL,NULL),(39,'PAY1801-0005',1,'2019-10-04 10:28:14','2019-10-04 08:28:14','2018-01-19 12:00:00',5.63000000,4,'','',41,12,NULL,0,0,5.63000000,NULL,NULL),(40,'PAY2001-0006',1,'2020-01-16 02:36:48','2020-01-16 01:36:48','2020-01-16 12:00:00',20.50000000,2,'','',50,12,NULL,0,0,20.50000000,NULL,NULL),(41,'PAY2001-0007',1,'2020-01-21 10:23:17','2020-01-21 09:23:17','2020-01-21 00:00:00',50.00000000,7,'','Subscription 2017',53,12,NULL,0,0,50.00000000,NULL,NULL),(42,'PAY2001-0008',1,'2020-01-21 10:23:28','2020-01-21 09:23:28','2020-01-21 00:00:00',50.00000000,7,'','Subscription 2018',54,12,NULL,0,0,50.00000000,NULL,NULL),(43,'PAY2001-0009',1,'2020-01-21 10:23:49','2020-01-21 09:23:49','2020-01-21 00:00:00',50.00000000,6,'','Subscription 2019',55,12,NULL,0,0,50.00000000,NULL,NULL); +INSERT INTO `llx_paiement` VALUES (3,'',1,'2013-07-18 20:50:47','2020-06-12 17:12:09','2019-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0,0.00000000,NULL,NULL),(5,'',1,'2013-08-01 03:34:11','2020-06-12 17:12:08','2019-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0,0.00000000,NULL,NULL),(6,'',1,'2013-08-06 20:33:54','2020-06-12 17:12:08','2019-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0,0.00000000,NULL,NULL),(8,'',1,'2013-08-08 02:53:40','2020-06-12 17:12:08','2019-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0,0.00000000,NULL,NULL),(9,'',1,'2013-08-08 02:55:58','2020-06-12 17:12:08','2019-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0,0.00000000,NULL,NULL),(17,'',1,'2014-12-09 15:28:44','2020-06-12 17:12:08','2019-12-09 12:00:00',2.00000000,4,'','',16,1,NULL,0,0,0.00000000,NULL,NULL),(18,'',1,'2014-12-09 15:28:53','2020-06-12 17:12:08','2019-12-09 12:00:00',-2.00000000,4,'','',17,1,NULL,0,0,0.00000000,NULL,NULL),(19,'',1,'2014-12-09 17:35:55','2020-06-12 17:12:08','2019-12-09 12:00:00',-2.00000000,4,'','',18,1,NULL,0,0,0.00000000,NULL,NULL),(20,'',1,'2014-12-09 17:37:02','2020-06-12 17:12:08','2019-12-09 12:00:00',2.00000000,4,'','',19,1,NULL,0,0,0.00000000,NULL,NULL),(21,'',1,'2014-12-09 18:35:07','2020-06-12 17:12:08','2019-12-09 12:00:00',-2.00000000,4,'','',20,1,NULL,0,0,0.00000000,NULL,NULL),(23,'',1,'2014-12-12 18:54:33','2020-06-12 17:12:08','2019-12-12 12:00:00',1.00000000,1,'','',21,1,NULL,0,0,0.00000000,NULL,NULL),(24,'',1,'2015-03-06 16:48:16','2020-06-12 17:12:09','2020-03-06 00:00:00',20.00000000,4,'','Adhésion/cotisation 2016',22,1,NULL,0,0,0.00000000,NULL,NULL),(25,'',1,'2015-03-20 14:30:11','2020-06-12 17:12:09','2020-03-20 00:00:00',10.00000000,2,'','Adhésion/cotisation 2011',23,1,NULL,0,0,0.00000000,NULL,NULL),(26,'',1,'2016-03-02 19:57:58','2020-06-12 17:12:09','2019-07-09 12:00:00',605.00000000,2,'','',24,1,NULL,0,0,0.00000000,NULL,NULL),(29,'',1,'2016-03-02 20:01:39','2020-06-12 17:12:09','2020-03-19 12:00:00',500.00000000,4,'','',26,1,NULL,0,0,0.00000000,NULL,NULL),(30,'',1,'2016-03-02 20:02:06','2020-06-12 17:12:09','2020-03-21 12:00:00',400.00000000,2,'','',27,1,NULL,0,0,0.00000000,NULL,NULL),(32,'',1,'2016-03-03 19:22:32','2020-06-12 17:12:08','2019-10-03 12:00:00',-400.00000000,4,'','',28,1,NULL,0,0,0.00000000,NULL,NULL),(33,'',1,'2016-03-03 19:23:16','2020-06-12 17:12:09','2020-03-10 12:00:00',-300.00000000,4,'','',29,1,NULL,0,0,0.00000000,NULL,NULL),(34,'PAY1603-0001',1,'2017-02-06 08:10:24','2020-06-12 17:12:09','2020-03-22 12:00:00',150.00000000,7,'','',33,12,NULL,0,0,150.00000000,NULL,NULL),(35,'PAY1603-0002',1,'2017-02-06 08:10:50','2020-06-12 17:12:09','2020-03-25 12:00:00',140.00000000,3,'','',34,12,NULL,0,0,140.00000000,NULL,NULL),(36,'PAY1702-0003',1,'2017-02-21 16:07:43','2020-06-12 17:12:08','2020-02-21 12:00:00',50.00000000,3,'T170201','',37,12,NULL,0,0,50.00000000,NULL,NULL),(38,'PAY1803-0004',1,'2018-03-16 13:59:31','2020-06-12 17:12:09','2020-03-16 12:00:00',10.00000000,7,'','',39,12,NULL,0,0,10.00000000,NULL,NULL),(39,'PAY1801-0005',1,'2019-10-04 10:28:14','2020-06-12 17:12:09','2020-01-19 12:00:00',5.63000000,4,'','',41,12,NULL,0,0,5.63000000,NULL,NULL),(40,'PAY2001-0006',1,'2020-01-16 02:36:48','2020-01-16 01:36:48','2020-01-16 12:00:00',20.50000000,2,'','',50,12,NULL,0,0,20.50000000,NULL,NULL),(41,'PAY2001-0007',1,'2020-01-21 10:23:17','2020-01-21 09:23:17','2020-01-21 00:00:00',50.00000000,7,'','Subscription 2017',53,12,NULL,0,0,50.00000000,NULL,NULL),(42,'PAY2001-0008',1,'2020-01-21 10:23:28','2020-01-21 09:23:28','2020-01-21 00:00:00',50.00000000,7,'','Subscription 2018',54,12,NULL,0,0,50.00000000,NULL,NULL),(43,'PAY2001-0009',1,'2020-01-21 10:23:49','2020-01-21 09:23:49','2020-01-21 00:00:00',50.00000000,6,'','Subscription 2019',55,12,NULL,0,0,50.00000000,NULL,NULL); /*!40000 ALTER TABLE `llx_paiement` ENABLE KEYS */; UNLOCK TABLES; @@ -8793,7 +9157,7 @@ CREATE TABLE `llx_paiement_facture` ( `fk_paiement` int(11) DEFAULT NULL, `fk_facture` int(11) DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, - `multicurrency_amount` double(24,8) DEFAULT '0.00000000', + `multicurrency_amount` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_paiement_facture` (`fk_paiement`,`fk_facture`), KEY `idx_paiement_facture_fk_facture` (`fk_facture`), @@ -8824,12 +9188,12 @@ CREATE TABLE `llx_paiementcharge` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_charge` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_typepaiement` int(11) NOT NULL, `num_paiement` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -8858,7 +9222,7 @@ CREATE TABLE `llx_paiementfourn` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, @@ -8866,10 +9230,10 @@ CREATE TABLE `llx_paiementfourn` ( `fk_user_modif` int(11) DEFAULT NULL, `fk_paiement` int(11) NOT NULL, `num_paiement` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_bank` int(11) NOT NULL, - `statut` smallint(6) NOT NULL DEFAULT '0', - `multicurrency_amount` double(24,8) DEFAULT '0.00000000', + `statut` smallint(6) NOT NULL DEFAULT 0, + `multicurrency_amount` double(24,8) DEFAULT 0.00000000, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -8896,8 +9260,8 @@ CREATE TABLE `llx_paiementfourn_facturefourn` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_paiementfourn` int(11) DEFAULT NULL, `fk_facturefourn` int(11) DEFAULT NULL, - `amount` double DEFAULT '0', - `multicurrency_amount` double(24,8) DEFAULT '0.00000000', + `amount` double DEFAULT 0, + `multicurrency_amount` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_paiementfourn_facturefourn` (`fk_paiementfourn`,`fk_facturefourn`), KEY `idx_paiementfourn_facturefourn_fk_facture` (`fk_facturefourn`), @@ -8926,12 +9290,12 @@ CREATE TABLE `llx_payment_donation` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_donation` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -8960,12 +9324,12 @@ CREATE TABLE `llx_payment_expensereport` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_expensereport` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datep` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -8994,15 +9358,15 @@ CREATE TABLE `llx_payment_loan` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_loan` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datep` datetime DEFAULT NULL, `amount_capital` double(24,8) DEFAULT NULL, `amount_insurance` double(24,8) DEFAULT NULL, `amount_interest` double(24,8) DEFAULT NULL, `fk_typepayment` int(11) NOT NULL, `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_bank` int(11) NOT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -9029,7 +9393,7 @@ DROP TABLE IF EXISTS `llx_payment_salary`; CREATE TABLE `llx_payment_salary` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `fk_user` int(11) NOT NULL, `datep` date DEFAULT NULL, @@ -9042,8 +9406,8 @@ CREATE TABLE `llx_payment_salary` ( `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `datesp` date DEFAULT NULL, `dateep` date DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `note` text COLLATE utf8_unicode_ci, + `entity` int(11) NOT NULL DEFAULT 1, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -9076,7 +9440,7 @@ DROP TABLE IF EXISTS `llx_payment_salary_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_payment_salary_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -9103,19 +9467,19 @@ DROP TABLE IF EXISTS `llx_payment_various`; CREATE TABLE `llx_payment_various` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `datep` date DEFAULT NULL, `datev` date DEFAULT NULL, - `sens` smallint(6) NOT NULL DEFAULT '0', - `amount` double(24,8) NOT NULL DEFAULT '0.00000000', + `sens` smallint(6) NOT NULL DEFAULT 0, + `amount` double(24,8) NOT NULL DEFAULT 0.00000000, `fk_typepayment` int(11) NOT NULL, `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `note` text COLLATE utf8_unicode_ci, + `entity` int(11) NOT NULL DEFAULT 1, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -9146,15 +9510,15 @@ CREATE TABLE `llx_pointage` ( `fk_user` int(11) DEFAULT NULL, `datedeb` datetime DEFAULT NULL, `datefin` datetime DEFAULT NULL, - `commentaire_in` text COLLATE utf8_unicode_ci, - `commentaire_out` text COLLATE utf8_unicode_ci, + `commentaire_in` text COLLATE utf8_unicode_ci DEFAULT NULL, + `commentaire_out` text COLLATE utf8_unicode_ci DEFAULT NULL, `statut` int(11) DEFAULT NULL, - `fk_user_modify_by` int(11) NOT NULL DEFAULT '0', + `fk_user_modify_by` int(11) NOT NULL DEFAULT 0, `datemodif` datetime DEFAULT NULL, - `ip_deb` text COLLATE utf8_unicode_ci, - `ip_fin` text COLLATE utf8_unicode_ci, + `ip_deb` text COLLATE utf8_unicode_ci DEFAULT NULL, + `ip_fin` text COLLATE utf8_unicode_ci DEFAULT NULL, `created` datetime DEFAULT NULL, - `fk_user_created_by` int(11) NOT NULL DEFAULT '0', + `fk_user_created_by` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9178,13 +9542,13 @@ DROP TABLE IF EXISTS `llx_pos_cash_fence`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_pos_cash_fence` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `opening` double(24,8) DEFAULT '0.00000000', - `cash` double(24,8) DEFAULT '0.00000000', - `card` double(24,8) DEFAULT '0.00000000', - `cheque` double(24,8) DEFAULT '0.00000000', + `opening` double(24,8) DEFAULT 0.00000000, + `cash` double(24,8) DEFAULT 0.00000000, + `card` double(24,8) DEFAULT 0.00000000, + `cheque` double(24,8) DEFAULT 0.00000000, `status` int(11) DEFAULT NULL, `date_creation` datetime NOT NULL, `date_valid` datetime DEFAULT NULL, @@ -9195,7 +9559,7 @@ CREATE TABLE `llx_pos_cash_fence` ( `posnumber` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -9221,17 +9585,18 @@ DROP TABLE IF EXISTS `llx_prelevement_bons`; CREATE TABLE `llx_prelevement_bons` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, - `statut` smallint(6) DEFAULT '0', - `credite` smallint(6) DEFAULT '0', - `note` text COLLATE utf8_unicode_ci, + `statut` smallint(6) DEFAULT 0, + `credite` smallint(6) DEFAULT 0, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `date_trans` datetime DEFAULT NULL, `method_trans` smallint(6) DEFAULT NULL, `fk_user_trans` int(11) DEFAULT NULL, `date_credit` datetime DEFAULT NULL, `fk_user_credit` int(11) DEFAULT NULL, + `type` varchar(16) COLLATE utf8_unicode_ci DEFAULT 'debit-order', PRIMARY KEY (`rowid`), UNIQUE KEY `uk_prelevement_bons_ref` (`ref`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -9243,7 +9608,7 @@ CREATE TABLE `llx_prelevement_bons` ( LOCK TABLES `llx_prelevement_bons` WRITE; /*!40000 ALTER TABLE `llx_prelevement_bons` DISABLE KEYS */; -INSERT INTO `llx_prelevement_bons` VALUES (1,'T170201',1,'2017-02-21 15:53:46',50.00000000,2,0,NULL,'2017-02-21 12:00:00',0,12,'2017-02-21 12:00:00',12); +INSERT INTO `llx_prelevement_bons` VALUES (1,'T170201',1,'2017-02-21 15:53:46',50.00000000,2,0,NULL,'2017-02-21 12:00:00',0,12,'2017-02-21 12:00:00',12,'debit-order'); /*!40000 ALTER TABLE `llx_prelevement_bons` ENABLE KEYS */; UNLOCK TABLES; @@ -9256,8 +9621,9 @@ DROP TABLE IF EXISTS `llx_prelevement_facture`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_prelevement_facture` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_facture` int(11) NOT NULL, + `fk_facture` int(11) DEFAULT NULL, `fk_prelevement_lignes` int(11) NOT NULL, + `fk_facture_fourn` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_prelevement_facture_fk_prelevement_lignes` (`fk_prelevement_lignes`), CONSTRAINT `fk_prelevement_facture_fk_prelevement_lignes` FOREIGN KEY (`fk_prelevement_lignes`) REFERENCES `llx_prelevement_lignes` (`rowid`) @@ -9270,7 +9636,7 @@ CREATE TABLE `llx_prelevement_facture` ( LOCK TABLES `llx_prelevement_facture` WRITE; /*!40000 ALTER TABLE `llx_prelevement_facture` DISABLE KEYS */; -INSERT INTO `llx_prelevement_facture` VALUES (1,211,1); +INSERT INTO `llx_prelevement_facture` VALUES (1,211,1,NULL); /*!40000 ALTER TABLE `llx_prelevement_facture` ENABLE KEYS */; UNLOCK TABLES; @@ -9283,10 +9649,10 @@ DROP TABLE IF EXISTS `llx_prelevement_facture_demande`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_prelevement_facture_demande` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_facture` int(11) NOT NULL, + `fk_facture` int(11) DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `date_demande` datetime NOT NULL, - `traite` smallint(6) DEFAULT '0', + `traite` smallint(6) DEFAULT 0, `date_traite` datetime DEFAULT NULL, `fk_prelevement_bons` int(11) DEFAULT NULL, `fk_user_demande` int(11) NOT NULL, @@ -9298,6 +9664,7 @@ CREATE TABLE `llx_prelevement_facture_demande` ( `sourcetype` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ext_payment_id` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `ext_payment_site` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `fk_facture_fourn` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9308,7 +9675,7 @@ CREATE TABLE `llx_prelevement_facture_demande` ( LOCK TABLES `llx_prelevement_facture_demande` WRITE; /*!40000 ALTER TABLE `llx_prelevement_facture_demande` DISABLE KEYS */; -INSERT INTO `llx_prelevement_facture_demande` VALUES (1,211,50.00000000,'2017-02-06 08:11:17',1,'2017-02-21 15:53:46',1,12,'','','','',NULL,NULL,NULL,NULL),(2,5,NULL,'2020-01-01 14:35:21',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4XtGr4FnPvt5gmHCi23hC','StripeTest'),(3,6,NULL,'2020-01-01 14:50:42',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4mkGr4FnPvt5gaMAjhU23','StripeTest'),(4,7,NULL,'2020-01-01 14:59:09',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4uvGr4FnPvt5gPJHfyUQt','StripeTest'),(5,8,NULL,'2020-01-01 15:08:10',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw53eGr4FnPvt5gY0i3EWWR','StripeTest'),(6,9,NULL,'2020-01-01 15:27:14',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5M6Gr4FnPvt5gyICZxNY7','StripeTest'),(7,10,NULL,'2020-01-01 15:36:11',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5UlGr4FnPvt5gdsfT25YK','StripeTest'),(8,11,NULL,'2020-01-01 15:44:14',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5cYGr4FnPvt5ggY1HBL2m','StripeTest'),(9,12,NULL,'2020-01-01 16:52:06',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw6gDGr4FnPvt5gjuuxU6K3','StripeTest'); +INSERT INTO `llx_prelevement_facture_demande` VALUES (1,211,50.00000000,'2017-02-06 08:11:17',1,'2017-02-21 15:53:46',1,12,'','','','',NULL,NULL,NULL,NULL,NULL),(2,5,NULL,'2020-01-01 14:35:21',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4XtGr4FnPvt5gmHCi23hC','StripeTest',NULL),(3,6,NULL,'2020-01-01 14:50:42',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4mkGr4FnPvt5gaMAjhU23','StripeTest',NULL),(4,7,NULL,'2020-01-01 14:59:09',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw4uvGr4FnPvt5gPJHfyUQt','StripeTest',NULL),(5,8,NULL,'2020-01-01 15:08:10',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw53eGr4FnPvt5gY0i3EWWR','StripeTest',NULL),(6,9,NULL,'2020-01-01 15:27:14',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5M6Gr4FnPvt5gyICZxNY7','StripeTest',NULL),(7,10,NULL,'2020-01-01 15:36:11',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5UlGr4FnPvt5gdsfT25YK','StripeTest',NULL),(8,11,NULL,'2020-01-01 15:44:14',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw5cYGr4FnPvt5ggY1HBL2m','StripeTest',NULL),(9,12,NULL,'2020-01-01 16:52:06',0,NULL,NULL,0,NULL,NULL,NULL,NULL,1,'member','pi_1Fw6gDGr4FnPvt5gjuuxU6K3','StripeTest',NULL); /*!40000 ALTER TABLE `llx_prelevement_facture_demande` ENABLE KEYS */; UNLOCK TABLES; @@ -9323,14 +9690,14 @@ CREATE TABLE `llx_prelevement_lignes` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_prelevement_bons` int(11) DEFAULT NULL, `fk_soc` int(11) NOT NULL, - `statut` smallint(6) DEFAULT '0', + `statut` smallint(6) DEFAULT 0, `client_nom` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `code_banque` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `code_guichet` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cle_rib` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_prelevement_lignes_fk_prelevement_bons` (`fk_prelevement_bons`), CONSTRAINT `fk_prelevement_lignes_fk_prelevement_bons` FOREIGN KEY (`fk_prelevement_bons`) REFERENCES `llx_prelevement_bons` (`rowid`) @@ -9361,8 +9728,8 @@ CREATE TABLE `llx_prelevement_rejet` ( `motif` int(11) DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `fk_user_creation` int(11) DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, - `afacturer` tinyint(4) DEFAULT '0', + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, + `afacturer` tinyint(4) DEFAULT 0, `fk_facture` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -9414,7 +9781,7 @@ DROP TABLE IF EXISTS `llx_printer_receipt_template`; CREATE TABLE `llx_printer_receipt_template` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `template` text COLLATE utf8_unicode_ci, + `template` text COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -9438,12 +9805,12 @@ DROP TABLE IF EXISTS `llx_printing`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_printing` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `printer_name` text COLLATE utf8_unicode_ci NOT NULL, `printer_location` text COLLATE utf8_unicode_ci NOT NULL, `printer_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `copy` int(11) NOT NULL DEFAULT '1', + `copy` int(11) NOT NULL DEFAULT 1, `module` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `driver` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `userid` int(11) DEFAULT NULL, @@ -9470,35 +9837,35 @@ DROP TABLE IF EXISTS `llx_product`; CREATE TABLE `llx_product` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `virtual` tinyint(4) NOT NULL DEFAULT '0', - `fk_parent` int(11) DEFAULT '0', + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `virtual` tinyint(4) NOT NULL DEFAULT 0, + `fk_parent` int(11) DEFAULT 0, `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci, - `note` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `customcode` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_country` int(11) DEFAULT NULL, - `price` double(24,8) DEFAULT '0.00000000', - `price_ttc` double(24,8) DEFAULT '0.00000000', - `price_min` double(24,8) DEFAULT '0.00000000', - `price_min_ttc` double(24,8) DEFAULT '0.00000000', + `price` double(24,8) DEFAULT 0.00000000, + `price_ttc` double(24,8) DEFAULT 0.00000000, + `price_min` double(24,8) DEFAULT 0.00000000, + `price_min_ttc` double(24,8) DEFAULT 0.00000000, `price_base_type` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'HT', `tva_tx` double(6,3) DEFAULT NULL, - `recuperableonly` int(11) NOT NULL DEFAULT '0', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `recuperableonly` int(11) NOT NULL DEFAULT 0, + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `tosell` tinyint(4) DEFAULT '1', - `tobuy` tinyint(4) DEFAULT '1', - `onportal` smallint(6) DEFAULT '0', - `tobatch` tinyint(4) NOT NULL DEFAULT '0', - `fk_product_type` int(11) DEFAULT '0', + `tosell` tinyint(4) DEFAULT 1, + `tobuy` tinyint(4) DEFAULT 1, + `onportal` smallint(6) DEFAULT 0, + `tobatch` tinyint(4) NOT NULL DEFAULT 0, + `fk_product_type` int(11) DEFAULT 0, `duration` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `seuil_stock_alerte` int(11) DEFAULT NULL, `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -9508,6 +9875,8 @@ CREATE TABLE `llx_product` ( `accountancy_code_sell_intra` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code_sell_export` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code_buy` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_buy_intra` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_buy_export` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `partnumber` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `weight` float DEFAULT NULL, `weight_units` tinyint(4) DEFAULT NULL, @@ -9518,20 +9887,20 @@ CREATE TABLE `llx_product` ( `volume` float DEFAULT NULL, `volume_units` tinyint(4) DEFAULT NULL, `stock` double DEFAULT NULL, - `pmp` double(24,8) NOT NULL DEFAULT '0.00000000', + `pmp` double(24,8) NOT NULL DEFAULT 0.00000000, `fifo` double(24,8) DEFAULT NULL, `lifo` double(24,8) DEFAULT NULL, `canvas` varchar(32) COLLATE utf8_unicode_ci DEFAULT 'default@product', `finished` tinyint(4) DEFAULT NULL, - `hidden` tinyint(4) DEFAULT '0', + `hidden` tinyint(4) DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `desiredstock` int(11) DEFAULT '0', + `desiredstock` int(11) DEFAULT 0, `fk_price_expression` int(11) DEFAULT NULL, `fk_unit` int(11) DEFAULT NULL, `cost_price` double(24,8) DEFAULT NULL, `default_vat_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `price_autogen` smallint(6) DEFAULT '0', - `note_public` text COLLATE utf8_unicode_ci, + `price_autogen` smallint(6) DEFAULT 0, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT '', `width` float DEFAULT NULL, `width_units` tinyint(4) DEFAULT NULL, @@ -9567,7 +9936,7 @@ CREATE TABLE `llx_product` ( LOCK TABLES `llx_product` WRITE; /*!40000 ALTER TABLE `llx_product` DISABLE KEYS */; -INSERT INTO `llx_product` VALUES (1,'2012-07-08 14:33:17','2020-01-18 19:17:03',0,0,'PINKDRESS',1,NULL,'Pink dress','A beatifull pink dress','','',NULL,9.00000000,10.12500000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,12,1,1,0,1,0,'',NULL,NULL,'123456789066',2,'','','','',NULL,670,-3,NULL,0,NULL,0,NULL,0,2.8,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:30:01','2019-11-28 15:09:50',0,0,'PEARPIE',1,NULL,'Pear Pie','','','',NULL,10.00000000,12.00000000,8.33333000,10.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,'',NULL,NULL,'123456789077',2,'','','','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,998,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-09 00:30:25','2018-01-16 16:40:03',0,0,'CAKECONTRIB',1,NULL,'Cake making contribution','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,1,'1m',NULL,NULL,'123456789088',2,'701CAKEM',NULL,NULL,'601CAKEM',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2012-07-10 14:44:06','2020-01-08 16:41:18',0,0,'APPLEPIE',1,NULL,'Apple Pie','Nice Bio Apple Pie.
\r\n ','','',NULL,9.00000000,9.00000000,6.00000000,6.00000000,'HT',0.000,0,9.000,'1',9.000,'1',1,12,1,1,0,1,0,'',NULL,NULL,'123456789034',2,'701','','','601',NULL,500,-3,NULL,0,NULL,0,NULL,0,1020.2,10.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,'CGST+SGST',0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2013-07-20 23:11:38','2018-01-16 16:18:24',0,0,'DOLIDROID',1,NULL,'DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

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

\r\n\r\n

WARNING ! 

\r\n\r\n

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

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

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

\r\n\r\n

WARNING ! 

\r\n\r\n

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

','','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,'https://play.google.com/store/apps/details?id=com.nltechno.dolidroidpro','123456789023',2,'701',NULL,NULL,'601',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'2011-12-31 00:00:00','2017-02-16 00:12:09',0,0,'COMP-XP4523',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',NULL,12,1,1,0,1,0,'',150,NULL,'123456789055',2,'701OLDC',NULL,NULL,'601OLDC',NULL,NULL,NULL,1.7,0,NULL,0,NULL,0,NULL,0,110,0.00000000,NULL,NULL,NULL,NULL,0,'20110729232310',200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'2015-01-13 20:24:42','2019-10-08 17:21:07',0,0,'ROLLUPABC',1,NULL,'Rollup Dolibarr','A nice rollup','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,'',NULL,NULL,'123456789044',2,'','','','',NULL,NULL,NULL,95,-3,NULL,0,2.34,-4,NULL,0,-1,0.00000000,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,12.00000000,NULL,0,NULL,'',NULL,8,NULL,8,NULL,NULL,NULL,NULL),(12,'2018-07-30 17:31:29','2018-07-30 13:35:02',0,0,'DOLICLOUD',1,NULL,'SaaS service of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','','',NULL,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,1,'',NULL,'http://www.dolicloud.com','123456789013',2,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,8.50000000,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2017-02-16 03:49:00','2017-02-15 23:49:27',0,0,'COMP-XP4548',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,12,1,1,0,1,0,'',150,NULL,NULL,2,'',NULL,NULL,'',NULL,NULL,NULL,1.7,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,'2019-10-07 00:00:00','2019-11-28 13:51:35',0,0,'PREF123456',1,NULL,'Product name in default language','Product description in default language','a private note (free text)','customs code',1,100.00000000,110.00000000,100.00000000,110.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,NULL,0,1,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-3,1,-1,4,-4,5,-3,NULL,0.00000000,NULL,NULL,NULL,0,0,'20191007122224',NULL,NULL,NULL,NULL,NULL,0,'a public note (free text)','',2,-1,3,-1,NULL,NULL,NULL,NULL),(24,'2019-11-28 16:33:35','2019-11-28 15:02:01',0,0,'POS-CARROT',1,NULL,'Carrot','','','',NULL,0.83333000,1.00000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(25,'2019-11-28 16:37:36','2020-01-13 11:13:19',0,0,'POS-APPLE',1,NULL,'Apple','','','',NULL,1.25000000,1.50000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,15.599999999999994,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(26,'2019-11-28 16:38:44','2019-11-28 12:38:44',0,0,'POS-KIWI',1,NULL,'Kiwi','','','',NULL,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,'2019-11-28 16:39:21','2019-11-28 14:57:44',0,0,'POS-PEACH',1,NULL,'Peach','','','',NULL,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(28,'2019-11-28 16:39:58','2019-11-28 12:39:58',0,0,'POS-ORANGE',1,NULL,'Orange','','','',NULL,2.00000000,2.40000000,0.00000000,0.00000000,'HT',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,'2019-11-28 17:03:14','2019-11-28 13:03:14',0,0,'POS-Eggs',1,NULL,'Eggs','','','',NULL,1.66667000,2.00000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,'2019-11-28 17:09:14','2019-11-28 13:09:14',0,0,'POS-Chips',1,NULL,'Chips','','','',NULL,0.41667000,0.50000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,30,-3,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_product` ENABLE KEYS */; UNLOCK TABLES; @@ -9580,10 +9949,10 @@ DROP TABLE IF EXISTS `llx_product_association`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_association` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_product_pere` int(11) NOT NULL DEFAULT '0', - `fk_product_fils` int(11) NOT NULL DEFAULT '0', + `fk_product_pere` int(11) NOT NULL DEFAULT 0, + `fk_product_fils` int(11) NOT NULL DEFAULT 0, `qty` double DEFAULT NULL, - `incdec` int(11) DEFAULT '1', + `incdec` int(11) DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_association` (`fk_product_pere`,`fk_product_fils`), KEY `idx_product_association` (`fk_product_fils`), @@ -9612,8 +9981,8 @@ CREATE TABLE `llx_product_attribute` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `rang` int(11) NOT NULL DEFAULT '0', - `entity` int(11) NOT NULL DEFAULT '1', + `rang` int(11) NOT NULL DEFAULT 0, + `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_attribute_ref` (`ref`), UNIQUE KEY `unique_ref` (`ref`) @@ -9644,7 +10013,7 @@ CREATE TABLE `llx_product_attribute_combination` ( `variation_price` float NOT NULL, `variation_price_percentage` int(11) DEFAULT NULL, `variation_weight` float NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), KEY `idx_product_att_com_product_parent` (`fk_product_parent`), KEY `idx_product_att_com_product_child` (`fk_product_child`) @@ -9697,7 +10066,7 @@ CREATE TABLE `llx_product_attribute_value` ( `fk_product_attribute` int(11) NOT NULL, `ref` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_attribute_value` (`fk_product_attribute`,`ref`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -9722,17 +10091,16 @@ DROP TABLE IF EXISTS `llx_product_batch`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_batch` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_product_stock` int(11) NOT NULL, `eatby` datetime DEFAULT NULL, `sellby` datetime DEFAULT NULL, - `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `qty` double NOT NULL DEFAULT '0', + `batch` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `qty` double NOT NULL DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_batch` (`fk_product_stock`,`batch`), KEY `idx_fk_product_stock` (`fk_product_stock`), - KEY `ix_fk_product_stock` (`fk_product_stock`), KEY `idx_batch` (`batch`), CONSTRAINT `fk_product_batch_fk_product_stock` FOREIGN KEY (`fk_product_stock`) REFERENCES `llx_product_stock` (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -9757,22 +10125,22 @@ DROP TABLE IF EXISTS `llx_product_customer_price`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_customer_price` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_product` int(11) NOT NULL, `fk_soc` int(11) NOT NULL, - `price` double(24,8) DEFAULT '0.00000000', - `price_ttc` double(24,8) DEFAULT '0.00000000', - `price_min` double(24,8) DEFAULT '0.00000000', - `price_min_ttc` double(24,8) DEFAULT '0.00000000', + `price` double(24,8) DEFAULT 0.00000000, + `price_ttc` double(24,8) DEFAULT 0.00000000, + `price_min` double(24,8) DEFAULT 0.00000000, + `price_min_ttc` double(24,8) DEFAULT 0.00000000, `price_base_type` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'HT', `tva_tx` double(6,3) DEFAULT NULL, `default_vat_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `recuperableonly` int(11) NOT NULL DEFAULT '0', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `recuperableonly` int(11) NOT NULL DEFAULT 0, + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `fk_user` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -9808,20 +10176,20 @@ DROP TABLE IF EXISTS `llx_product_customer_price_log`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_customer_price_log` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime DEFAULT NULL, `fk_product` int(11) NOT NULL, `fk_soc` int(11) NOT NULL, - `price` double(24,8) DEFAULT '0.00000000', - `price_ttc` double(24,8) DEFAULT '0.00000000', - `price_min` double(24,8) DEFAULT '0.00000000', - `price_min_ttc` double(24,8) DEFAULT '0.00000000', + `price` double(24,8) DEFAULT 0.00000000, + `price_ttc` double(24,8) DEFAULT 0.00000000, + `price_min` double(24,8) DEFAULT 0.00000000, + `price_min_ttc` double(24,8) DEFAULT 0.00000000, `price_base_type` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'HT', `tva_tx` double(6,3) DEFAULT NULL, - `recuperableonly` int(11) NOT NULL DEFAULT '0', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `recuperableonly` int(11) NOT NULL DEFAULT 0, + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `fk_user` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -9848,7 +10216,7 @@ DROP TABLE IF EXISTS `llx_product_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -9874,10 +10242,10 @@ DROP TABLE IF EXISTS `llx_product_factory`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_factory` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_product_father` int(11) NOT NULL DEFAULT '0', - `fk_product_children` int(11) NOT NULL DEFAULT '0', - `pmp` double(24,8) DEFAULT '0.00000000', - `price` double(24,8) DEFAULT '0.00000000', + `fk_product_father` int(11) NOT NULL DEFAULT 0, + `fk_product_children` int(11) NOT NULL DEFAULT 0, + `pmp` double(24,8) DEFAULT 0.00000000, + `price` double(24,8) DEFAULT 0.00000000, `qty` double DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_factory` (`fk_product_father`,`fk_product_children`), @@ -9905,36 +10273,36 @@ DROP TABLE IF EXISTS `llx_product_fournisseur_price`; CREATE TABLE `llx_product_fournisseur_price` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_product` int(11) DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, `ref_fourn` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `desc_fourn` text COLLATE utf8_unicode_ci, + `desc_fourn` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_availability` int(11) DEFAULT NULL, - `price` double(24,8) DEFAULT '0.00000000', + `price` double(24,8) DEFAULT 0.00000000, `quantity` double DEFAULT NULL, - `remise_percent` double NOT NULL DEFAULT '0', - `remise` double NOT NULL DEFAULT '0', - `unitprice` double(24,8) DEFAULT '0.00000000', - `charges` double(24,8) DEFAULT '0.00000000', - `tva_tx` double(6,3) NOT NULL DEFAULT '0.000', + `remise_percent` double NOT NULL DEFAULT 0, + `remise` double NOT NULL DEFAULT 0, + `unitprice` double(24,8) DEFAULT 0.00000000, + `charges` double(24,8) DEFAULT 0.00000000, + `tva_tx` double(6,3) NOT NULL DEFAULT 0.000, `default_vat_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `info_bits` int(11) NOT NULL DEFAULT '0', + `info_bits` int(11) NOT NULL DEFAULT 0, `fk_user` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_supplier_price_expression` int(11) DEFAULT NULL, `fk_price_expression` int(11) DEFAULT NULL, `delivery_time_days` int(11) DEFAULT NULL, `supplier_reputation` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, `multicurrency_unitprice` double(24,8) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `multicurrency_price` double(24,8) DEFAULT NULL, - `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `barcode` varchar(180) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_barcode_type` int(11) DEFAULT NULL, @@ -9971,7 +10339,7 @@ DROP TABLE IF EXISTS `llx_product_fournisseur_price_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_fournisseur_price_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -10000,12 +10368,12 @@ CREATE TABLE `llx_product_fournisseur_price_log` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, `fk_product_fournisseur` int(11) NOT NULL, - `price` double(24,8) DEFAULT '0.00000000', + `price` double(24,8) DEFAULT 0.00000000, `quantity` double DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, `multicurrency_price` double(24,8) DEFAULT NULL, `multicurrency_unitprice` double(24,8) DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -10031,11 +10399,11 @@ DROP TABLE IF EXISTS `llx_product_lang`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_lang` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_product` int(11) NOT NULL DEFAULT '0', + `fk_product` int(11) NOT NULL DEFAULT 0, `lang` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci, - `note` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_lang` (`fk_product`,`lang`), @@ -10062,13 +10430,13 @@ DROP TABLE IF EXISTS `llx_product_lot`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_lot` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) DEFAULT '1', + `entity` int(11) DEFAULT 1, `fk_product` int(11) NOT NULL, - `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `batch` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` int(11) DEFAULT NULL, @@ -10096,7 +10464,7 @@ DROP TABLE IF EXISTS `llx_product_lot_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_lot_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -10122,32 +10490,32 @@ DROP TABLE IF EXISTS `llx_product_price`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_price` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `entity` int(11) NOT NULL DEFAULT 1, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_product` int(11) NOT NULL, `date_price` datetime DEFAULT NULL, - `price_level` smallint(6) DEFAULT '1', + `price_level` smallint(6) DEFAULT 1, `price` double(24,8) DEFAULT NULL, `price_ttc` double(24,8) DEFAULT NULL, `price_min` double(24,8) DEFAULT NULL, `price_min_ttc` double(24,8) DEFAULT NULL, `price_base_type` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'HT', - `tva_tx` double(6,3) NOT NULL DEFAULT '0.000', + `tva_tx` double(6,3) NOT NULL DEFAULT 0.000, `default_vat_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `recuperableonly` int(11) NOT NULL DEFAULT '0', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `recuperableonly` int(11) NOT NULL DEFAULT 0, + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `fk_user_author` int(11) DEFAULT NULL, - `tosell` tinyint(4) DEFAULT '1', - `price_by_qty` int(11) NOT NULL DEFAULT '0', + `tosell` tinyint(4) DEFAULT 1, + `price_by_qty` int(11) NOT NULL DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_price_expression` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_price` double(24,8) DEFAULT '0.00000000', - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', + `multicurrency_price` double(24,8) DEFAULT 0.00000000, + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, `multicurrency_price_ttc` double(24,8) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_product_price_fk_user_author` (`fk_user_author`), @@ -10177,21 +10545,21 @@ DROP TABLE IF EXISTS `llx_product_price_by_qty`; CREATE TABLE `llx_product_price_by_qty` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_product_price` int(11) NOT NULL, - `price` double(24,8) DEFAULT '0.00000000', - `price_ttc` double(24,8) DEFAULT '0.00000000', - `remise_percent` double NOT NULL DEFAULT '0', - `remise` double NOT NULL DEFAULT '0', - `qty_min` double DEFAULT '0', + `price` double(24,8) DEFAULT 0.00000000, + `price_ttc` double(24,8) DEFAULT 0.00000000, + `remise_percent` double NOT NULL DEFAULT 0, + `remise` double NOT NULL DEFAULT 0, + `qty_min` double DEFAULT 0, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `quantity` double DEFAULT NULL, - `unitprice` double(24,8) DEFAULT '0.00000000', + `unitprice` double(24,8) DEFAULT 0.00000000, `price_base_type` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'HT', `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, `multicurrency_price` double(24,8) DEFAULT NULL, `multicurrency_price_ttc` double(24,8) DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -10246,7 +10614,7 @@ DROP TABLE IF EXISTS `llx_product_stock`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_stock` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_product` int(11) NOT NULL, `fk_entrepot` int(11) NOT NULL, `reel` double DEFAULT NULL, @@ -10302,11 +10670,11 @@ DROP TABLE IF EXISTS `llx_product_warehouse_properties`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_product_warehouse_properties` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_product` int(11) NOT NULL, `fk_entrepot` int(11) NOT NULL, - `seuil_stock_alerte` int(11) DEFAULT '0', - `desiredstock` int(11) DEFAULT '0', + `seuil_stock_alerte` int(11) DEFAULT 0, + `desiredstock` int(11) DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -10332,20 +10700,20 @@ CREATE TABLE `llx_projet` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_soc` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `dateo` date DEFAULT NULL, `datee` date DEFAULT NULL, `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_creat` int(11) NOT NULL, `public` int(11) DEFAULT NULL, - `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `fk_statut` smallint(6) NOT NULL DEFAULT 0, `fk_opp_status` int(11) DEFAULT NULL, `opp_percent` double(5,2) DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `budget_amount` double(24,8) DEFAULT NULL, `date_close` datetime DEFAULT NULL, @@ -10353,10 +10721,10 @@ CREATE TABLE `llx_projet` ( `opp_amount` double(24,8) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `usage_bill_time` int(11) DEFAULT '0', - `usage_opportunity` int(11) DEFAULT '0', - `usage_task` int(11) DEFAULT '1', - `usage_organize_event` int(11) DEFAULT '0', + `usage_bill_time` int(11) DEFAULT 0, + `usage_opportunity` int(11) DEFAULT 0, + `usage_task` int(11) DEFAULT 1, + `usage_organize_event` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_projet_ref` (`ref`,`entity`), KEY `idx_projet_fk_soc` (`fk_soc`), @@ -10383,10 +10751,10 @@ DROP TABLE IF EXISTS `llx_projet_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_projet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `priority` mediumtext COLLATE utf8_unicode_ci, + `priority` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_projet_extrafields` (`fk_object`) ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -10412,26 +10780,26 @@ DROP TABLE IF EXISTS `llx_projet_task`; CREATE TABLE `llx_projet_task` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_projet` int(11) NOT NULL, - `fk_task_parent` int(11) NOT NULL DEFAULT '0', + `fk_task_parent` int(11) NOT NULL DEFAULT 0, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `dateo` datetime DEFAULT NULL, `datee` datetime DEFAULT NULL, `datev` datetime DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci, - `duration_effective` double DEFAULT '0', - `planned_workload` double DEFAULT '0', - `progress` int(11) DEFAULT '0', - `priority` int(11) DEFAULT '0', + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, + `duration_effective` double DEFAULT 0, + `planned_workload` double DEFAULT 0, + `progress` int(11) DEFAULT 0, + `priority` int(11) DEFAULT 0, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `fk_statut` smallint(6) NOT NULL DEFAULT '0', - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, - `rang` int(11) DEFAULT '0', + `fk_statut` smallint(6) NOT NULL DEFAULT 0, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `rang` int(11) DEFAULT 0, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -10451,7 +10819,7 @@ CREATE TABLE `llx_projet_task` ( LOCK TABLES `llx_projet_task` WRITE; /*!40000 ALTER TABLE `llx_projet_task` DISABLE KEYS */; -INSERT INTO `llx_projet_task` VALUES (2,'2',1,5,0,'2012-07-11 16:23:53','2015-09-08 23:06:14','2012-07-11 12:00:00','2013-07-14 12:00:00',NULL,'Heberger site RMLL','',0,0,0,0,1,NULL,0,NULL,NULL,0,NULL,NULL),(3,'TK1007-0001',1,1,0,'2016-12-21 13:52:41','2018-07-30 11:35:40','2016-12-21 16:52:00',NULL,NULL,'Analyze','',9000,36000,0,0,1,NULL,0,NULL,'gdfgdfgdf',0,NULL,NULL),(4,'TK1007-0002',1,1,0,'2016-12-21 13:55:39','2018-07-30 11:35:51','2016-12-21 16:55:00',NULL,NULL,'Specification','',7200,18000,25,0,1,NULL,0,NULL,NULL,0,NULL,NULL),(5,'TK1007-0003',1,1,0,'2016-12-21 14:16:58','2018-07-30 11:35:59','2016-12-21 17:16:00',NULL,NULL,'Development','',0,0,0,0,1,NULL,0,NULL,NULL,0,NULL,NULL),(6,'TK1607-0004',1,6,0,'2018-07-30 15:33:27','2018-07-30 11:34:47','2018-07-30 02:00:00',NULL,NULL,'Project preparation phase A','',75600,720000,10,0,12,NULL,0,NULL,NULL,0,NULL,NULL),(7,'TK1607-0005',1,6,0,'2018-07-30 15:33:39','2017-01-30 11:23:39','2018-07-30 02:00:00',NULL,NULL,'Project preparation phase B','',40260,1080000,5,0,12,NULL,0,NULL,NULL,0,NULL,NULL),(8,'TK1607-0006',1,6,0,'2018-07-30 15:33:53','2018-07-30 11:33:53','2018-07-30 02:00:00',NULL,NULL,'Project execution phase A','',0,162000,0,0,12,NULL,0,NULL,NULL,0,NULL,NULL),(9,'TK1607-0007',1,6,0,'2018-07-30 15:34:09','2018-07-30 11:34:09','2018-10-27 02:00:00',NULL,NULL,'Project execution phase B','',0,2160000,0,0,12,NULL,0,NULL,NULL,0,NULL,NULL),(10,'TK1007-0008',1,1,0,'2018-07-30 15:36:31','2018-07-30 11:36:31','2018-07-30 02:00:00',NULL,NULL,'Tests','',0,316800,0,0,12,NULL,0,NULL,NULL,0,NULL,NULL); +INSERT INTO `llx_projet_task` VALUES (2,'2',1,5,0,'2012-07-11 16:23:53','2015-09-08 23:06:14','2012-07-11 12:00:00','2013-07-14 12:00:00',NULL,'Heberger site RMLL','',0,0,0,0,1,NULL,0,NULL,NULL,0,NULL,NULL),(3,'TK1007-0001',1,1,0,'2016-12-21 13:52:41','2018-07-30 11:35:40','2016-12-21 16:52:00',NULL,NULL,'Analyze','',9000,36000,0,0,1,NULL,0,NULL,'gdfgdfgdf',0,NULL,NULL),(4,'TK1007-0002',1,1,0,'2016-12-21 13:55:39','2020-06-12 17:13:30','2016-12-21 16:55:00',NULL,NULL,'Specification','',10800,18000,25,0,1,NULL,0,NULL,NULL,0,NULL,NULL),(5,'TK1007-0003',1,1,0,'2016-12-21 14:16:58','2018-07-30 11:35:59','2016-12-21 17:16:00',NULL,NULL,'Development','',0,0,0,0,1,NULL,0,NULL,NULL,0,NULL,NULL),(6,'TK1607-0004',1,6,0,'2018-07-30 15:33:27','2018-07-30 11:34:47','2018-07-30 02:00:00',NULL,NULL,'Project preparation phase A','',75600,720000,10,0,12,NULL,0,NULL,NULL,0,NULL,NULL),(7,'TK1607-0005',1,6,0,'2018-07-30 15:33:39','2017-01-30 11:23:39','2018-07-30 02:00:00',NULL,NULL,'Project preparation phase B','',40260,1080000,5,0,12,NULL,0,NULL,NULL,0,NULL,NULL),(8,'TK1607-0006',1,6,0,'2018-07-30 15:33:53','2018-07-30 11:33:53','2018-07-30 02:00:00',NULL,NULL,'Project execution phase A','',0,162000,0,0,12,NULL,0,NULL,NULL,0,NULL,NULL),(9,'TK1607-0007',1,6,0,'2018-07-30 15:34:09','2018-07-30 11:34:09','2018-10-27 02:00:00',NULL,NULL,'Project execution phase B','',0,2160000,0,0,12,NULL,0,NULL,NULL,0,NULL,NULL),(10,'TK1007-0008',1,1,0,'2018-07-30 15:36:31','2018-07-30 11:36:31','2018-07-30 02:00:00',NULL,NULL,'Tests','',0,316800,0,0,12,NULL,0,NULL,NULL,0,NULL,NULL); /*!40000 ALTER TABLE `llx_projet_task` ENABLE KEYS */; UNLOCK TABLES; @@ -10464,7 +10832,7 @@ DROP TABLE IF EXISTS `llx_projet_task_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_projet_task_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -10493,21 +10861,21 @@ CREATE TABLE `llx_projet_task_time` ( `fk_task` int(11) NOT NULL, `task_date` date DEFAULT NULL, `task_datehour` datetime DEFAULT NULL, - `task_date_withhour` int(11) DEFAULT '0', + `task_date_withhour` int(11) DEFAULT 0, `task_duration` double DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `thm` double(24,8) DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `invoice_id` int(11) DEFAULT NULL, `invoice_line_id` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `datec` date DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), KEY `idx_projet_task_time_task` (`fk_task`), KEY `idx_projet_task_time_date` (`task_date`), KEY `idx_projet_task_time_datehour` (`task_datehour`) -) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -10516,7 +10884,7 @@ CREATE TABLE `llx_projet_task_time` ( LOCK TABLES `llx_projet_task_time` WRITE; /*!40000 ALTER TABLE `llx_projet_task_time` DISABLE KEYS */; -INSERT INTO `llx_projet_task_time` VALUES (2,4,'2016-12-21','2016-12-21 12:00:00',0,3600,1,NULL,'',NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(3,4,'2016-12-18','2016-12-18 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(4,3,'2016-12-21','2016-12-21 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(5,3,'2016-12-21','2016-12-21 12:00:00',0,1800,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(6,3,'2016-12-21','2016-12-21 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(7,6,'2018-07-25','2018-07-25 00:00:00',0,18000,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(8,6,'2018-07-26','2018-07-26 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(9,6,'2018-07-27','2018-07-27 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(10,6,'2018-07-29','2018-07-29 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(11,6,'2018-07-31','2018-07-31 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(12,7,'2018-07-25','2018-07-25 00:00:00',0,10800,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(13,7,'2018-07-26','2018-07-26 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(14,7,'2018-07-27','2018-07-27 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(15,7,'2017-01-30','2017-01-30 10:00:00',1,660,12,NULL,'',NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'); +INSERT INTO `llx_projet_task_time` VALUES (2,4,'2016-12-21','2016-12-21 12:00:00',0,3600,1,NULL,'',NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(3,4,'2016-12-18','2016-12-18 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(4,3,'2016-12-21','2016-12-21 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(5,3,'2016-12-21','2016-12-21 12:00:00',0,1800,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(6,3,'2016-12-21','2016-12-21 12:00:00',0,3600,1,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(7,6,'2018-07-25','2018-07-25 00:00:00',0,18000,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(8,6,'2018-07-26','2018-07-26 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(9,6,'2018-07-27','2018-07-27 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(10,6,'2018-07-29','2018-07-29 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(11,6,'2018-07-31','2018-07-31 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(12,7,'2018-07-25','2018-07-25 00:00:00',0,10800,12,NULL,NULL,NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(13,7,'2018-07-26','2018-07-26 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(14,7,'2018-07-27','2018-07-27 00:00:00',0,14400,12,NULL,NULL,NULL,NULL,NULL,NULL,'2018-03-16 10:00:54'),(15,7,'2017-01-30','2017-01-30 10:00:00',1,660,12,NULL,'',NULL,NULL,NULL,NULL,'0000-00-00 00:00:00'),(16,4,'2020-06-13','2020-06-13 00:00:00',0,3600,12,NULL,'',NULL,NULL,NULL,NULL,'2020-06-12 17:13:30'); /*!40000 ALTER TABLE `llx_projet_task_time` ENABLE KEYS */; UNLOCK TABLES; @@ -10529,16 +10897,16 @@ DROP TABLE IF EXISTS `llx_projet_taskdet`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_projet_taskdet` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_task` int(11) NOT NULL DEFAULT '0', - `fk_product` int(11) NOT NULL DEFAULT '0', + `fk_task` int(11) NOT NULL DEFAULT 0, + `fk_product` int(11) NOT NULL DEFAULT 0, `qty_planned` double DEFAULT NULL, `qty_used` double DEFAULT NULL, `qty_deleted` double DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `pmp` double(24,8) DEFAULT '0.00000000', - `price` double(24,8) DEFAULT '0.00000000', - `fk_statut` int(11) NOT NULL DEFAULT '0', - `note_public` mediumtext COLLATE utf8_unicode_ci, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `pmp` double(24,8) DEFAULT 0.00000000, + `price` double(24,8) DEFAULT 0.00000000, + `fk_statut` int(11) NOT NULL DEFAULT 0, + `note_public` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_projet_taskdet` (`fk_task`,`fk_product`), KEY `idx_projet_taskdet_fk_task` (`fk_task`), @@ -10564,8 +10932,8 @@ DROP TABLE IF EXISTS `llx_projet_taskdet_equipement`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_projet_taskdet_equipement` ( - `fk_equipement` int(11) NOT NULL DEFAULT '0', - `fk_projet_taskdet` int(11) NOT NULL DEFAULT '0', + `fk_equipement` int(11) NOT NULL DEFAULT 0, + `fk_projet_taskdet` int(11) NOT NULL DEFAULT 0, UNIQUE KEY `uk_factory_equipement` (`fk_equipement`,`fk_projet_taskdet`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -10590,9 +10958,9 @@ CREATE TABLE `llx_propal` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_soc` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_int` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_client` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -10605,22 +10973,22 @@ CREATE TABLE `llx_propal` ( `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, `fk_user_cloture` int(11) DEFAULT NULL, - `fk_statut` smallint(6) NOT NULL DEFAULT '0', - `price` double DEFAULT '0', - `remise_percent` double DEFAULT '0', - `remise_absolue` double DEFAULT '0', - `remise` double DEFAULT '0', - `total_ht` double(24,8) DEFAULT '0.00000000', - `tva` double(24,8) DEFAULT '0.00000000', - `localtax1` double(24,8) DEFAULT '0.00000000', - `localtax2` double(24,8) DEFAULT '0.00000000', - `total` double(24,8) DEFAULT '0.00000000', + `fk_statut` smallint(6) NOT NULL DEFAULT 0, + `price` double DEFAULT 0, + `remise_percent` double DEFAULT 0, + `remise_absolue` double DEFAULT 0, + `remise` double DEFAULT 0, + `total_ht` double(24,8) DEFAULT 0.00000000, + `tva` double(24,8) DEFAULT 0.00000000, + `localtax1` double(24,8) DEFAULT 0.00000000, + `localtax2` double(24,8) DEFAULT 0.00000000, + `total` double(24,8) DEFAULT 0.00000000, `fk_account` int(11) DEFAULT NULL, `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_livraison` date DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, @@ -10633,10 +11001,10 @@ CREATE TABLE `llx_propal` ( `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_propal_ref` (`ref`,`entity`), @@ -10661,7 +11029,7 @@ CREATE TABLE `llx_propal` ( LOCK TABLES `llx_propal` WRITE; /*!40000 ALTER TABLE `llx_propal` DISABLE KEYS */; -INSERT INTO `llx_propal` VALUES (1,2,NULL,'2018-07-30 15:56:45','PR1007-0001',1,NULL,NULL,'','2012-07-09 01:33:49','2018-07-09','2018-07-24 12:00:00','2017-08-08 14:24:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,1,NULL,'2018-07-30 15:56:54','PR1007-0002',1,NULL,NULL,'','2012-07-10 02:11:44','2018-07-10','2018-07-25 12:00:00','2018-07-10 02:12:55','2017-07-20 15:23:12',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,1,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,4,NULL,'2018-07-30 15:56:54','PR1007-0003',1,NULL,NULL,'','2012-07-18 11:35:11','2018-07-18','2018-08-02 12:00:00','2018-07-18 11:36:18','2017-07-20 15:21:15',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(5,19,NULL,'2018-07-30 15:56:54','PR1302-0005',1,NULL,NULL,'','2015-02-17 15:39:56','2018-02-17','2018-03-04 12:00:00','2018-11-15 23:27:10',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(6,19,NULL,'2018-07-30 15:56:54','PR1302-0006',1,NULL,NULL,'','2015-02-17 15:40:12','2018-02-17','2018-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(7,19,NULL,'2017-01-29 17:49:33','PR1302-0007',1,NULL,NULL,'','2015-02-17 15:41:15','2018-02-17','2018-03-04 12:00:00','2017-01-29 21:49:33',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,400.00000000,0.00000000,400.00000000,NULL),(8,19,NULL,'2018-07-30 15:56:39','PR1302-0008',1,NULL,NULL,'','2015-02-17 15:43:39','2018-02-17','2018-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(10,7,4,'2019-09-27 14:54:30','PR1909-0031',1,NULL,NULL,'','2017-11-15 23:37:08','2017-11-15','2018-11-30 12:00:00','2019-09-27 16:54:30',NULL,12,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,3,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',NULL,NULL,1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0031/PR1909-0031.pdf'),(11,1,NULL,'2017-02-16 00:44:58','PR1702-0009',1,NULL,NULL,'','2017-02-16 01:44:58','2017-05-13','2017-05-28 12:00:00','2017-02-16 01:44:58',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,60.00000000,0.00000000,0.00000000,0.00000000,60.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,60.00000000,0.00000000,60.00000000,NULL),(12,7,NULL,'2017-02-16 00:45:44','PR1702-0010',1,NULL,NULL,'','2017-02-16 01:45:44','2017-06-24','2017-07-09 12:00:00','2017-02-16 01:45:44',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,832.00000000,0.00000000,0.00000000,0.00000000,832.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,832.00000000,0.00000000,832.00000000,NULL),(13,26,NULL,'2017-02-16 00:46:15','PR1702-0011',1,NULL,NULL,'','2017-02-16 01:46:15','2017-04-03','2017-04-18 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,242.00000000,0.00000000,0.00000000,0.00000000,242.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,242.00000000,0.00000000,242.00000000,NULL),(14,3,NULL,'2017-02-16 00:46:15','PR1702-0012',1,NULL,NULL,'','2017-02-16 01:46:15','2018-06-19','2018-07-04 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,245.00000000,0.00000000,0.00000000,0.00000000,245.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,245.00000000,0.00000000,245.00000000,NULL),(15,26,NULL,'2017-02-16 00:46:15','PR1702-0013',1,NULL,NULL,'','2017-02-16 01:46:15','2018-05-01','2018-05-16 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,940.00000000,0.00000000,0.00000000,0.00000000,940.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,940.00000000,0.00000000,940.00000000,NULL),(16,1,NULL,'2017-02-16 00:46:15','PR1702-0014',1,NULL,NULL,'','2017-02-16 01:46:15','2017-05-13','2017-05-28 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,125.00000000,0.00000000,0.00000000,0.00000000,125.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,125.00000000,0.00000000,125.00000000,NULL),(17,1,NULL,'2017-02-16 00:46:15','PR1702-0015',1,NULL,NULL,'','2017-02-16 01:46:15','2018-07-23','2018-08-07 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,163.00000000,0.00000000,0.00000000,0.00000000,163.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,163.00000000,0.00000000,163.00000000,NULL),(18,26,NULL,'2017-02-16 00:46:15','PR1702-0016',1,NULL,NULL,'','2017-02-16 01:46:15','2017-02-13','2017-02-28 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,900.00000000,0.00000000,0.00000000,0.00000000,900.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL),(19,12,NULL,'2017-02-16 00:46:15','PR1702-0017',1,NULL,NULL,'','2017-02-16 01:46:15','2017-03-30','2017-04-14 12:00:00','2017-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL),(20,26,NULL,'2017-02-16 00:46:15','PR1702-0018',1,NULL,NULL,'','2017-02-16 01:46:15','2018-11-13','2018-11-28 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,830.00000000,0.00000000,0.00000000,0.00000000,830.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,830.00000000,0.00000000,830.00000000,NULL),(21,1,NULL,'2017-02-16 00:47:09','PR1702-0019',1,NULL,NULL,'','2017-02-16 01:46:15','2017-09-23','2018-10-08 12:00:00','2017-02-16 04:47:09',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,89.00000000,0.00000000,0.00000000,0.00000000,89.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,89.00000000,0.00000000,89.00000000,NULL),(22,26,NULL,'2019-09-27 17:47:00','PR1702-0020',1,NULL,NULL,'','2017-02-16 01:46:15','2018-11-13','2018-11-28 12:00:00','2017-02-16 01:46:15',NULL,1,NULL,1,NULL,0,0,NULL,NULL,0,70.00000000,0.00000000,0.00000000,0.00000000,70.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,70.00000000,0.00000000,70.00000000,'propale/PR1702-0020/PR1702-0020.pdf'),(23,12,NULL,'2017-02-17 12:07:18','PR1702-0021',1,NULL,NULL,'','2017-02-16 01:46:17','2018-04-03','2018-04-18 12:00:00','2017-02-17 16:07:18',NULL,2,NULL,12,NULL,1,0,NULL,NULL,0,715.00000000,0.00000000,0.00000000,0.00000000,715.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,715.00000000,0.00000000,715.00000000,NULL),(24,7,NULL,'2017-02-16 00:46:17','PR1702-0022',1,NULL,NULL,'','2017-02-16 01:46:17','2018-11-13','2018-11-28 12:00:00','2017-02-16 01:46:17',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,250.00000000,0.00000000,250.00000000,NULL),(25,3,NULL,'2017-02-16 00:47:29','PR1702-0023',1,NULL,NULL,'','2017-02-16 01:46:17','2018-07-09','2018-07-24 12:00:00','2017-02-16 01:46:17','2017-02-16 04:47:29',1,NULL,1,12,4,0,NULL,NULL,0,1018.00000000,0.00000000,0.00000000,0.00000000,1018.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL),(26,1,NULL,'2017-02-16 00:46:18','PR1702-0024',1,NULL,NULL,'','2017-02-16 01:46:17','2018-04-03','2018-04-18 12:00:00','2017-02-16 01:46:18',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,710.00000000,0.00000000,0.00000000,0.00000000,710.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,710.00000000,0.00000000,710.00000000,NULL),(27,6,NULL,'2017-02-16 00:46:18','PR1702-0025',1,NULL,NULL,'','2017-02-16 01:46:18','2018-11-12','2018-11-27 12:00:00','2017-02-16 01:46:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,300.00000000,0.00000000,300.00000000,NULL),(28,19,NULL,'2017-02-16 00:46:31','PR1702-0026',1,NULL,NULL,'','2017-02-16 01:46:18','2017-07-30','2017-08-14 12:00:00','2017-02-16 01:46:18','2017-02-16 04:46:31',2,NULL,2,12,2,0,NULL,NULL,0,440.00000000,0.00000000,0.00000000,0.00000000,440.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL),(29,1,NULL,'2019-12-20 16:50:23','PR1702-0027',1,NULL,NULL,'','2017-02-16 01:46:18','2017-07-23','2017-08-07 12:00:00','2017-02-16 01:46:18','2019-12-20 20:50:23',2,NULL,2,12,2,0,NULL,NULL,0,1000.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,'propale/PR1702-0027/PR1702-0027.pdf'),(30,1,NULL,'2017-02-16 00:46:42','PR1702-0028',1,NULL,NULL,'','2017-02-16 01:46:18','2018-05-01','2018-05-16 12:00:00','2017-02-16 01:46:18','2017-02-16 04:46:42',2,NULL,2,12,3,0,NULL,NULL,0,1200.00000000,0.00000000,0.00000000,0.00000000,1200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,0.00000000,1200.00000000,NULL),(31,11,NULL,'2017-02-16 00:46:18','PR1702-0029',1,NULL,NULL,'','2017-02-16 01:46:18','2018-06-24','2018-07-09 12:00:00','2017-02-16 01:46:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,720.00000000,0.00000000,0.00000000,0.00000000,720.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,720.00000000,0.00000000,720.00000000,NULL),(32,19,NULL,'2017-02-16 00:46:18','PR1702-0030',1,NULL,NULL,'','2017-02-16 01:46:18','2018-11-12','2018-11-27 12:00:00','2017-02-16 01:46:18',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,608.00000000,0.00000000,0.00000000,0.00000000,608.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,608.00000000,0.00000000,608.00000000,NULL),(33,10,6,'2020-01-15 18:37:15','PR1909-0032',1,NULL,NULL,'','2019-09-27 17:07:40','2019-09-27','2019-10-12 12:00:00','2019-09-27 17:08:59',NULL,12,12,12,NULL,1,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'This is a private note','This is a public note','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/PR1909-0032/PR1909-0032.pdf'),(34,10,6,'2020-01-18 17:13:33','PR1909-0033',1,NULL,NULL,'','2019-09-27 17:11:21','2019-09-27','2019-10-12 12:00:00','2019-09-27 17:13:13','2020-01-07 23:43:06',12,12,12,12,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,NULL,'a & a
\r\nb < r','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0033/PR1909-0033.pdf'),(35,10,NULL,'2020-01-01 19:54:50','(PROV35)',1,NULL,NULL,'','2019-09-27 17:53:44','2019-09-27','2019-10-12 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,5.00000000,0.00000000,5.00000000,'propale/(PROV35)/(PROV35).pdf'),(36,1,NULL,'2020-01-19 13:24:27','PR2001-0034',1,NULL,NULL,'','2020-01-01 23:55:35','2020-01-01','2020-01-16 12:00:00','2020-01-19 14:24:22','2020-01-19 14:24:27',12,NULL,12,12,2,0,NULL,NULL,0,4.00000000,0.24000000,0.00000000,0.00000000,4.24000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,'propale/PR2001-0034/PR2001-0034.pdf'),(37,10,NULL,'2020-01-05 20:46:07','(PROV37)',1,NULL,NULL,'','2020-01-06 00:44:16','2020-01-05','2020-01-20 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/(PROV37)/(PROV37).pdf'),(38,30,NULL,'2020-01-13 13:25:28','(PROV38)',1,NULL,NULL,'','2020-01-13 17:25:28','2020-01-13','2020-01-28 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/(PROV38)/(PROV38).pdf'); +INSERT INTO `llx_propal` VALUES (1,2,NULL,'2020-06-12 17:12:08','PR1007-0001',1,NULL,NULL,'','2012-07-09 01:33:49','2019-07-09','2019-07-24 12:00:00','2019-08-08 14:24:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,1,NULL,'2020-06-12 17:12:08','PR1007-0002',1,NULL,NULL,'','2012-07-10 02:11:44','2019-07-10','2019-07-25 12:00:00','2019-07-10 02:12:55','2019-07-20 15:23:12',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,1,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,4,NULL,'2020-06-12 17:12:08','PR1007-0003',1,NULL,NULL,'','2012-07-18 11:35:11','2019-07-18','2019-08-02 12:00:00','2019-07-18 11:36:18','2019-07-20 15:21:15',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(5,19,NULL,'2020-06-12 17:12:08','PR1302-0005',1,NULL,NULL,'','2015-02-17 15:39:56','2020-02-17','2020-03-04 12:00:00','2019-11-15 23:27:10',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(6,19,NULL,'2020-06-12 17:12:08','PR1302-0006',1,NULL,NULL,'','2015-02-17 15:40:12','2020-02-17','2020-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(7,19,NULL,'2020-06-12 17:12:08','PR1302-0007',1,NULL,NULL,'','2015-02-17 15:41:15','2020-02-17','2020-03-04 12:00:00','2019-01-29 21:49:33',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,400.00000000,0.00000000,400.00000000,NULL),(8,19,NULL,'2020-06-12 17:12:08','PR1302-0008',1,NULL,NULL,'','2015-02-17 15:43:39','2020-02-17','2020-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(10,7,4,'2020-06-12 17:12:08','PR1909-0031',1,NULL,NULL,'','2017-11-15 23:37:08','2019-11-15','2020-11-30 12:00:00','2021-09-27 16:54:30',NULL,12,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,3,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',NULL,NULL,1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0031/PR1909-0031.pdf'),(11,1,NULL,'2020-06-12 17:12:08','PR1702-0009',1,NULL,NULL,'','2017-02-16 01:44:58','2020-05-13','2020-05-28 12:00:00','2020-02-16 01:44:58',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,60.00000000,0.00000000,0.00000000,0.00000000,60.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,60.00000000,0.00000000,60.00000000,NULL),(12,7,NULL,'2020-06-12 17:12:08','PR1702-0010',1,NULL,NULL,'','2017-02-16 01:45:44','2019-06-24','2019-07-09 12:00:00','2020-02-16 01:45:44',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,832.00000000,0.00000000,0.00000000,0.00000000,832.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,832.00000000,0.00000000,832.00000000,NULL),(13,26,NULL,'2020-06-12 17:12:08','PR1702-0011',1,NULL,NULL,'','2017-02-16 01:46:15','2020-04-03','2020-04-18 12:00:00','2020-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,242.00000000,0.00000000,0.00000000,0.00000000,242.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,242.00000000,0.00000000,242.00000000,NULL),(14,3,NULL,'2020-06-12 17:12:08','PR1702-0012',1,NULL,NULL,'','2017-02-16 01:46:15','2019-06-19','2019-07-04 12:00:00','2019-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,245.00000000,0.00000000,0.00000000,0.00000000,245.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,245.00000000,0.00000000,245.00000000,NULL),(15,26,NULL,'2020-06-12 17:12:08','PR1702-0013',1,NULL,NULL,'','2017-02-16 01:46:15','2020-05-01','2020-05-16 12:00:00','2019-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,940.00000000,0.00000000,0.00000000,0.00000000,940.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,940.00000000,0.00000000,940.00000000,NULL),(16,1,NULL,'2020-06-12 17:12:08','PR1702-0014',1,NULL,NULL,'','2017-02-16 01:46:15','2020-05-13','2020-05-28 12:00:00','2020-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,125.00000000,0.00000000,0.00000000,0.00000000,125.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,125.00000000,0.00000000,125.00000000,NULL),(17,1,NULL,'2020-06-12 17:12:08','PR1702-0015',1,NULL,NULL,'','2017-02-16 01:46:15','2019-07-23','2019-08-07 12:00:00','2019-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,163.00000000,0.00000000,0.00000000,0.00000000,163.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,163.00000000,0.00000000,163.00000000,NULL),(18,26,NULL,'2020-06-12 17:12:08','PR1702-0016',1,NULL,NULL,'','2017-02-16 01:46:15','2020-02-13','2020-02-28 12:00:00','2020-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,900.00000000,0.00000000,0.00000000,0.00000000,900.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL),(19,12,NULL,'2020-06-12 17:12:08','PR1702-0017',1,NULL,NULL,'','2017-02-16 01:46:15','2020-03-30','2020-04-14 12:00:00','2020-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL),(20,26,NULL,'2020-06-12 17:12:08','PR1702-0018',1,NULL,NULL,'','2017-02-16 01:46:15','2019-11-13','2019-11-28 12:00:00','2019-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,830.00000000,0.00000000,0.00000000,0.00000000,830.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,830.00000000,0.00000000,830.00000000,NULL),(21,1,NULL,'2020-06-12 17:12:08','PR1702-0019',1,NULL,NULL,'','2017-02-16 01:46:15','2019-09-23','2020-10-08 12:00:00','2020-02-16 04:47:09',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,89.00000000,0.00000000,0.00000000,0.00000000,89.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,89.00000000,0.00000000,89.00000000,NULL),(22,26,NULL,'2020-06-12 17:12:08','PR1702-0020',1,NULL,NULL,'','2017-02-16 01:46:15','2019-11-13','2019-11-28 12:00:00','2019-02-16 01:46:15',NULL,1,NULL,1,NULL,0,0,NULL,NULL,0,70.00000000,0.00000000,0.00000000,0.00000000,70.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,70.00000000,0.00000000,70.00000000,'propale/PR1702-0020/PR1702-0020.pdf'),(23,12,NULL,'2020-06-12 17:12:08','PR1702-0021',1,NULL,NULL,'','2017-02-16 01:46:17','2020-04-03','2020-04-18 12:00:00','2019-02-17 16:07:18',NULL,2,NULL,12,NULL,1,0,NULL,NULL,0,715.00000000,0.00000000,0.00000000,0.00000000,715.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,715.00000000,0.00000000,715.00000000,NULL),(24,7,NULL,'2020-06-12 17:12:08','PR1702-0022',1,NULL,NULL,'','2017-02-16 01:46:17','2019-11-13','2019-11-28 12:00:00','2019-02-16 01:46:17',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,250.00000000,0.00000000,250.00000000,NULL),(25,3,NULL,'2020-06-12 17:12:08','PR1702-0023',1,NULL,NULL,'','2017-02-16 01:46:17','2019-07-09','2019-07-24 12:00:00','2019-02-16 01:46:17','2019-02-16 04:47:29',1,NULL,1,12,4,0,NULL,NULL,0,1018.00000000,0.00000000,0.00000000,0.00000000,1018.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL),(26,1,NULL,'2020-06-12 17:12:08','PR1702-0024',1,NULL,NULL,'','2017-02-16 01:46:17','2020-04-03','2020-04-18 12:00:00','2019-02-16 01:46:18',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,710.00000000,0.00000000,0.00000000,0.00000000,710.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,710.00000000,0.00000000,710.00000000,NULL),(27,6,NULL,'2020-06-12 17:12:08','PR1702-0025',1,NULL,NULL,'','2017-02-16 01:46:18','2019-11-12','2019-11-27 12:00:00','2019-02-16 01:46:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,300.00000000,0.00000000,300.00000000,NULL),(28,19,NULL,'2020-06-12 17:12:08','PR1702-0026',1,NULL,NULL,'','2017-02-16 01:46:18','2019-07-30','2019-08-14 12:00:00','2020-02-16 01:46:18','2020-02-16 04:46:31',2,NULL,2,12,2,0,NULL,NULL,0,440.00000000,0.00000000,0.00000000,0.00000000,440.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL),(29,1,NULL,'2020-06-12 17:12:08','PR1702-0027',1,NULL,NULL,'','2017-02-16 01:46:18','2019-07-23','2019-08-07 12:00:00','2020-02-16 01:46:18','2021-12-20 20:50:23',2,NULL,2,12,2,0,NULL,NULL,0,1000.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,'propale/PR1702-0027/PR1702-0027.pdf'),(30,1,NULL,'2020-06-12 17:12:08','PR1702-0028',1,NULL,NULL,'','2017-02-16 01:46:18','2020-05-01','2020-05-16 12:00:00','2019-02-16 01:46:18','2019-02-16 04:46:42',2,NULL,2,12,3,0,NULL,NULL,0,1200.00000000,0.00000000,0.00000000,0.00000000,1200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,0.00000000,1200.00000000,NULL),(31,11,NULL,'2020-06-12 17:12:08','PR1702-0029',1,NULL,NULL,'','2017-02-16 01:46:18','2019-06-24','2019-07-09 12:00:00','2019-02-16 01:46:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,720.00000000,0.00000000,0.00000000,0.00000000,720.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,720.00000000,0.00000000,720.00000000,NULL),(32,19,NULL,'2020-06-12 17:12:08','PR1702-0030',1,NULL,NULL,'','2017-02-16 01:46:18','2019-11-12','2019-11-27 12:00:00','2019-02-16 01:46:18',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,608.00000000,0.00000000,0.00000000,0.00000000,608.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,608.00000000,0.00000000,608.00000000,NULL),(33,10,6,'2020-01-15 18:37:15','PR1909-0032',1,NULL,NULL,'','2019-09-27 17:07:40','2019-09-27','2019-10-12 12:00:00','2019-09-27 17:08:59',NULL,12,12,12,NULL,1,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'This is a private note','This is a public note','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/PR1909-0032/PR1909-0032.pdf'),(34,10,6,'2020-01-18 17:13:33','PR1909-0033',1,NULL,NULL,'','2019-09-27 17:11:21','2019-09-27','2019-10-12 12:00:00','2019-09-27 17:13:13','2020-01-07 23:43:06',12,12,12,12,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,NULL,'a & a
\r\nb < r','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0033/PR1909-0033.pdf'),(35,10,NULL,'2020-01-01 19:54:50','(PROV35)',1,NULL,NULL,'','2019-09-27 17:53:44','2019-09-27','2019-10-12 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,5.00000000,0.00000000,5.00000000,'propale/(PROV35)/(PROV35).pdf'),(36,1,NULL,'2020-01-19 13:24:27','PR2001-0034',1,NULL,NULL,'','2020-01-01 23:55:35','2020-01-01','2020-01-16 12:00:00','2020-01-19 14:24:22','2020-01-19 14:24:27',12,NULL,12,12,2,0,NULL,NULL,0,4.00000000,0.24000000,0.00000000,0.00000000,4.24000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,'propale/PR2001-0034/PR2001-0034.pdf'),(37,10,NULL,'2020-01-05 20:46:07','(PROV37)',1,NULL,NULL,'','2020-01-06 00:44:16','2020-01-05','2020-01-20 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/(PROV37)/(PROV37).pdf'),(38,30,NULL,'2020-01-13 13:25:28','(PROV38)',1,NULL,NULL,'','2020-01-13 17:25:28','2020-01-13','2020-01-28 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/(PROV38)/(PROV38).pdf'); /*!40000 ALTER TABLE `llx_propal` ENABLE KEYS */; UNLOCK TABLES; @@ -10674,7 +11042,7 @@ DROP TABLE IF EXISTS `llx_propal_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_propal_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -10706,7 +11074,7 @@ CREATE TABLE `llx_propal_merge_pdf_product` ( `fk_user_author` int(11) DEFAULT NULL, `fk_user_mod` int(11) NOT NULL, `datec` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -10734,39 +11102,39 @@ CREATE TABLE `llx_propaldet` ( `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_remise_except` int(11) DEFAULT NULL, - `tva_tx` double(6,3) DEFAULT '0.000', + `tva_tx` double(6,3) DEFAULT 0.000, `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `qty` double DEFAULT NULL, - `remise_percent` double DEFAULT '0', - `remise` double DEFAULT '0', + `remise_percent` double DEFAULT 0, + `remise` double DEFAULT 0, `price` double DEFAULT NULL, - `subprice` double(24,8) DEFAULT '0.00000000', - `total_ht` double(24,8) DEFAULT '0.00000000', - `total_tva` double(24,8) DEFAULT '0.00000000', - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', - `product_type` int(11) DEFAULT '0', + `subprice` double(24,8) DEFAULT 0.00000000, + `total_ht` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, + `total_localtax1` double(24,8) DEFAULT 0.00000000, + `total_localtax2` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, + `product_type` int(11) DEFAULT 0, `date_start` datetime DEFAULT NULL, `date_end` datetime DEFAULT NULL, - `info_bits` int(11) DEFAULT '0', + `info_bits` int(11) DEFAULT 0, `fk_product_fournisseur_price` int(11) DEFAULT NULL, - `buy_price_ht` double(24,8) DEFAULT '0.00000000', - `special_code` int(10) unsigned DEFAULT '0', - `rang` int(11) DEFAULT '0', + `buy_price_ht` double(24,8) DEFAULT 0.00000000, + `special_code` int(10) unsigned DEFAULT 0, + `rang` int(11) DEFAULT 0, `fk_unit` int(11) DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_subprice` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, PRIMARY KEY (`rowid`), KEY `idx_propaldet_fk_propal` (`fk_propal`), KEY `idx_propaldet_fk_product` (`fk_product`), @@ -10795,7 +11163,7 @@ DROP TABLE IF EXISTS `llx_propaldet_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_propaldet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -10821,9 +11189,9 @@ DROP TABLE IF EXISTS `llx_reception`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_reception` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) NOT NULL, `fk_projet` int(11) DEFAULT NULL, `ref_ext` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -10838,16 +11206,16 @@ CREATE TABLE `llx_reception` ( `date_reception` datetime DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, `tracking_number` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_statut` smallint(6) DEFAULT '0', - `billed` smallint(6) DEFAULT '0', + `fk_statut` smallint(6) DEFAULT 0, + `billed` smallint(6) DEFAULT 0, `height` float DEFAULT NULL, `width` float DEFAULT NULL, `size_units` int(11) DEFAULT NULL, `size` float DEFAULT NULL, `weight_units` int(11) DEFAULT NULL, `weight` float DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -10884,7 +11252,7 @@ DROP TABLE IF EXISTS `llx_reception_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_reception_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -10910,20 +11278,20 @@ DROP TABLE IF EXISTS `llx_resource`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_resource` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `asset_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_code_type_resource` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8_unicode_ci, - `note_private` text COLLATE utf8_unicode_ci, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, - `fk_statut` smallint(6) NOT NULL DEFAULT '0', + `fk_statut` smallint(6) NOT NULL DEFAULT 0, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_country` int(11) DEFAULT NULL, @@ -10941,7 +11309,7 @@ CREATE TABLE `llx_resource` ( LOCK TABLES `llx_resource` WRITE; /*!40000 ALTER TABLE `llx_resource` DISABLE KEYS */; -INSERT INTO `llx_resource` VALUES (1,1,'Car Kangoo 1',NULL,'Car number 1 - Num XDF-45-GH','RES_CARS',NULL,NULL,'2017-02-20 16:44:12',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL),(2,1,'Car Kangoo 2',NULL,'Car number 2 - Num GHY-78-JJ','RES_CARS',NULL,NULL,'2017-02-20 16:44:01',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL),(3,1,'Meeting room - 14p',NULL,'Meeting room
\r\n14 places','RES_ROOMS',NULL,NULL,'2017-02-20 16:44:38',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL),(4,1,'Meeting room - 8p',NULL,'Meeting room
\r\n8 places','RES_ROOMS',NULL,NULL,'2017-02-20 16:45:00',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO `llx_resource` VALUES (1,1,'Car Kangoo 1',NULL,'Car number 1 - Num XDF-45-GH','RES_CARS',NULL,NULL,'2017-02-20 16:44:12',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL),(2,1,'Car Kangoo 2',NULL,'Car number 2 - Num GHY-78-JJ','RES_CARS',NULL,NULL,'2017-02-20 16:44:01',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL),(3,1,'Meeting room - 14p',NULL,'Meeting room
\r\n14 places','RES_ROOMS',NULL,NULL,'2017-02-20 16:44:38',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL),(4,1,'Meeting room - 8p',NULL,'Meeting room 8 places','RES_ROOMS',NULL,NULL,'2020-06-12 17:14:48',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_resource` ENABLE KEYS */; UNLOCK TABLES; @@ -10954,7 +11322,7 @@ DROP TABLE IF EXISTS `llx_resource_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_resource_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -10979,16 +11347,16 @@ DROP TABLE IF EXISTS `llx_rights_def`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_rights_def` ( - `id` int(11) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL DEFAULT 0, `libelle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `module` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `perms` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `subperms` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `type` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL, - `bydefault` tinyint(4) DEFAULT '0', - `module_position` int(11) NOT NULL DEFAULT '0', - `family_position` int(11) NOT NULL DEFAULT '0', + `bydefault` tinyint(4) DEFAULT 0, + `module_position` int(11) NOT NULL DEFAULT 0, + `family_position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`,`entity`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -10999,7 +11367,7 @@ CREATE TABLE `llx_rights_def` ( LOCK TABLES `llx_rights_def` WRITE; /*!40000 ALTER TABLE `llx_rights_def` DISABLE KEYS */; -INSERT INTO `llx_rights_def` VALUES (11,'Read invoices','facture',1,'lire',NULL,'a',0,0,0),(11,'Lire les factures','facture',2,'lire',NULL,'a',1,10,0),(12,'Create and update invoices','facture',1,'creer',NULL,'a',0,0,0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0,10,0),(13,'Devalidate invoices','facture',1,'invoice_advance','unvalidate','a',0,0,0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0,10,0),(14,'Validate invoices','facture',1,'invoice_advance','validate','a',0,0,0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0,10,0),(15,'Send invoices by email','facture',1,'invoice_advance','send','a',0,0,0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0,10,0),(16,'Issue payments on invoices','facture',1,'paiement',NULL,'a',0,0,0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0,10,0),(19,'Delete invoices','facture',1,'supprimer',NULL,'a',0,0,0),(19,'Supprimer les factures','facture',2,'supprimer',NULL,'a',0,10,0),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1,22,0),(21,'Lire les propositions commerciales','propale',2,'lire',NULL,'r',1,22,0),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0,22,0),(22,'Creer/modifier les propositions commerciales','propale',2,'creer',NULL,'w',0,22,0),(24,'Valider les propositions commerciales','propale',1,'propal_advance','validate','d',0,22,0),(24,'Valider les propositions commerciales','propale',2,'valider',NULL,'d',0,22,0),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0,22,0),(25,'Envoyer les propositions commerciales aux clients','propale',2,'propal_advance','send','d',0,22,0),(26,'Cloturer les propositions commerciales','propale',1,'cloturer',NULL,'d',0,22,0),(26,'Cloturer les propositions commerciales','propale',2,'cloturer',NULL,'d',0,22,0),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0,22,0),(27,'Supprimer les propositions commerciales','propale',2,'supprimer',NULL,'d',0,22,0),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0,22,0),(28,'Exporter les propositions commerciales et attributs','propale',2,'export',NULL,'r',0,22,0),(31,'Lire les produits','produit',1,'lire',NULL,'r',1,25,0),(31,'Lire les produits','produit',2,'lire',NULL,'r',1,25,0),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0,25,0),(32,'Creer/modifier les produits','produit',2,'creer',NULL,'w',0,25,0),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0,25,0),(34,'Supprimer les produits','produit',2,'supprimer',NULL,'d',0,25,0),(38,'Exporter les produits','produit',1,'export',NULL,'r',0,25,0),(38,'Exporter les produits','produit',2,'export',NULL,'r',0,25,0),(39,'Ignore minimum price','produit',1,'ignore_price_min_advance',NULL,'r',0,25,0),(41,'Read projects and tasks (shared projects or projects I am contact for). Can also enter time consumed on assigned tasks (timesheet)','projet',1,'lire',NULL,'r',1,14,0),(42,'Create/modify projects and tasks (shared projects or projects I am contact for)','projet',1,'creer',NULL,'w',0,14,0),(44,'Delete project and tasks (shared projects or projects I am contact for)','projet',1,'supprimer',NULL,'d',0,14,0),(45,'Export projects','projet',1,'export',NULL,'d',0,14,0),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1,41,0),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0,41,0),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0,41,0),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0,41,0),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0,41,0),(69,'Valider les fiches d\'intervention ','ficheinter',1,'ficheinter_advance','validate','a',0,41,0),(70,'Dévalider les fiches d\'intervention','ficheinter',1,'ficheinter_advance','unvalidate','a',0,41,0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',0,55,0),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',0,55,0),(74,'Remove members','adherent',1,'supprimer',NULL,'d',0,55,0),(75,'Setup types of membership','adherent',1,'configurer',NULL,'w',0,55,0),(76,'Export members','adherent',1,'export',NULL,'r',0,55,0),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',0,55,0),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0,55,0),(81,'Lire les commandes clients','commande',1,'lire',NULL,'r',0,0,0),(82,'Creer/modifier les commandes clients','commande',1,'creer',NULL,'w',0,0,0),(84,'Valider les commandes clients','commande',1,'order_advance','validate','d',0,0,0),(86,'Envoyer les commandes clients','commande',1,'order_advance','send','d',0,0,0),(87,'Cloturer les commandes clients','commande',1,'cloturer',NULL,'d',0,0,0),(88,'Annuler les commandes clients','commande',1,'order_advance','annuler','d',0,0,0),(89,'Supprimer les commandes clients','commande',1,'supprimer',NULL,'d',0,0,0),(91,'Lire les charges','tax',1,'charges','lire','r',0,50,0),(91,'Lire les charges','tax',2,'charges','lire','r',1,50,0),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0,50,0),(92,'Creer/modifier les charges','tax',2,'charges','creer','w',0,50,0),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0,50,0),(93,'Supprimer les charges','tax',2,'charges','supprimer','d',0,50,0),(94,'Exporter les charges','tax',1,'charges','export','r',0,50,0),(94,'Exporter les charges','tax',2,'charges','export','r',0,50,0),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',0,0,0),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0,0,0),(104,'Valider les expeditions','expedition',1,'shipping_advance','validate','d',0,0,0),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0,0,0),(106,'Exporter les expeditions','expedition',1,'shipment','export','r',0,0,0),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0,0,0),(111,'Lire les comptes bancaires','banque',1,'lire',NULL,'r',0,51,0),(111,'Lire les comptes bancaires','banque',2,'lire',NULL,'r',1,51,0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0,51,0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',2,'modifier',NULL,'w',0,51,0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0,51,0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',2,'configurer',NULL,'a',0,51,0),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0,51,0),(114,'Rapprocher les ecritures bancaires','banque',2,'consolidate',NULL,'w',0,51,0),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0,51,0),(115,'Exporter transactions et releves','banque',2,'export',NULL,'r',0,51,0),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0,51,0),(116,'Virements entre comptes','banque',2,'transfer',NULL,'w',0,51,0),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0,51,0),(117,'Gerer les envois de cheques','banque',2,'cheque',NULL,'w',0,51,0),(121,'Read third parties','societe',1,'lire',NULL,'r',0,0,0),(121,'Lire les societes','societe',2,'lire',NULL,'r',1,9,0),(122,'Create and update third parties','societe',1,'creer',NULL,'w',0,0,0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0,9,0),(125,'Delete third parties','societe',1,'supprimer',NULL,'d',0,0,0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0,9,0),(126,'Export third parties','societe',1,'export',NULL,'r',0,0,0),(126,'Exporter les societes','societe',2,'export',NULL,'r',0,9,0),(141,'Read all projects and tasks (also private projects I am not contact for)','projet',1,'all','lire','r',0,14,0),(142,'Create/modify all projects and tasks (also private projects I am not contact for)','projet',1,'all','creer','w',0,14,0),(144,'Delete all projects and tasks (also private projects I am not contact for)','projet',1,'all','supprimer','d',0,14,0),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1,52,0),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0,52,0),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0,52,0),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0,52,0),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1,35,0),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0,35,0),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0,35,0),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0,35,0),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0,35,0),(167,'Export contracts','contrat',1,'export',NULL,'r',0,35,0),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1,11,0),(221,'Consulter les mailings','mailing',2,'lire',NULL,'r',1,11,0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',0,11,0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',2,'creer',NULL,'w',0,11,0),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0,11,0),(223,'Valider les mailings (permet leur envoi)','mailing',2,'valider',NULL,'w',0,11,0),(229,'Supprimer les mailings','mailing',1,'supprimer',NULL,'d',0,11,0),(229,'Supprimer les mailings','mailing',2,'supprimer',NULL,'d',0,11,0),(237,'View recipients and info','mailing',1,'mailing_advance','recipient','r',0,11,0),(237,'View recipients and info','mailing',2,'mailing_advance','recipient','r',0,11,0),(238,'Manually send mailings','mailing',1,'mailing_advance','send','w',0,11,0),(238,'Manually send mailings','mailing',2,'mailing_advance','send','w',0,11,0),(239,'Delete mailings after validation and/or sent','mailing',1,'mailing_advance','delete','d',0,11,0),(239,'Delete mailings after validation and/or sent','mailing',2,'mailing_advance','delete','d',0,11,0),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1,20,0),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',0,20,0),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',0,20,0),(251,'Consulter les autres utilisateurs','user',1,'user','lire','r',0,0,0),(252,'Consulter les permissions des autres utilisateurs','user',1,'user_advance','readperms','r',0,0,0),(253,'Creer/modifier utilisateurs internes et externes','user',1,'user','creer','w',0,0,0),(254,'Creer/modifier utilisateurs externes seulement','user',1,'user_advance','write','w',0,0,0),(255,'Modifier le mot de passe des autres utilisateurs','user',1,'user','password','w',0,0,0),(256,'Supprimer ou desactiver les autres utilisateurs','user',1,'user','supprimer','d',0,0,0),(262,'Read all third parties by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).','societe',1,'client','voir','r',0,0,0),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',2,'client','voir','r',1,9,0),(281,'Read contacts','societe',1,'contact','lire','r',0,0,0),(281,'Lire les contacts','societe',2,'contact','lire','r',1,9,0),(282,'Create and update contact','societe',1,'contact','creer','w',0,0,0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0,9,0),(283,'Delete contacts','societe',1,'contact','supprimer','d',0,0,0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0,9,0),(286,'Export contacts','societe',1,'contact','export','d',0,0,0),(286,'Exporter les contacts','societe',2,'contact','export','d',0,9,0),(300,'Read barcodes','barcode',1,'lire_advance',NULL,'r',1,0,0),(301,'Create/modify barcodes','barcode',1,'creer_advance',NULL,'w',0,0,0),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',0,50,0),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',0,50,0),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',0,50,0),(341,'Consulter ses propres permissions','user',1,'self_advance','readperms','r',0,0,0),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',0,0,0),(343,'Modifier son propre mot de passe','user',1,'self','password','w',0,0,0),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',0,0,0),(351,'Consulter les groupes','user',1,'group_advance','read','r',0,0,0),(352,'Consulter les permissions des groupes','user',1,'group_advance','readperms','r',0,0,0),(353,'Creer/modifier les groupes et leurs permissions','user',1,'group_advance','write','w',0,0,0),(354,'Supprimer ou desactiver les groupes','user',1,'group_advance','delete','d',0,0,0),(358,'Exporter les utilisateurs','user',1,'user','export','r',0,0,0),(511,'Read payments of employee salaries','salaries',1,'read',NULL,'r',0,0,0),(512,'Create/modify payments of empoyee salaries','salaries',1,'write',NULL,'w',0,0,0),(514,'Delete payments of employee salary','salaries',1,'delete',NULL,'d',0,0,0),(517,'Export payments of employee salaries','salaries',1,'export',NULL,'r',0,0,0),(520,'Read loans','loan',1,'read',NULL,'r',0,50,0),(522,'Create/modify loans','loan',1,'write',NULL,'w',0,50,0),(524,'Delete loans','loan',1,'delete',NULL,'d',0,50,0),(525,'Access loan calculator','loan',1,'calc',NULL,'r',0,50,0),(527,'Export loans','loan',1,'export',NULL,'r',0,50,0),(531,'Read services','service',1,'lire',NULL,'r',0,0,0),(532,'Create/modify services','service',1,'creer',NULL,'w',0,0,0),(534,'Delete les services','service',1,'supprimer',NULL,'d',0,0,0),(538,'Export services','service',1,'export',NULL,'r',0,0,0),(650,'Read bom of Bom','bom',1,'read',NULL,'w',0,60,0),(651,'Create/Update bom of Bom','bom',1,'write',NULL,'w',0,60,0),(652,'Delete bom of Bom','bom',1,'delete',NULL,'w',0,60,0),(660,'Read objects of Mrp','mrp',1,'read',NULL,'w',0,62,0),(661,'Create/Update objects of Mrp','mrp',1,'write',NULL,'w',0,62,0),(662,'Delete objects of Mrp','mrp',1,'delete',NULL,'w',0,62,0),(701,'Lire les dons','don',1,'lire',NULL,'r',1,50,0),(701,'Lire les dons','don',2,'lire',NULL,'r',1,50,0),(702,'Creer/modifier les dons','don',1,'creer',NULL,'w',0,50,0),(702,'Creer/modifier les dons','don',2,'creer',NULL,'w',0,50,0),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0,50,0),(703,'Supprimer les dons','don',2,'supprimer',NULL,'d',0,50,0),(771,'Read expense reports (yours and your subordinates)','expensereport',1,'lire',NULL,'r',1,42,0),(772,'Create/modify expense reports','expensereport',1,'creer',NULL,'w',0,42,0),(773,'Delete expense reports','expensereport',1,'supprimer',NULL,'d',0,42,0),(774,'Read all expense reports','expensereport',1,'readall',NULL,'r',1,42,0),(775,'Approve expense reports','expensereport',1,'approve',NULL,'w',0,42,0),(776,'Pay expense reports','expensereport',1,'to_paid',NULL,'w',0,42,0),(777,'Read expense reports of everybody','expensereport',1,'readall',NULL,'r',1,42,0),(778,'Create expense reports for everybody','expensereport',1,'writeall_advance',NULL,'w',0,42,0),(779,'Export expense reports','expensereport',1,'export',NULL,'r',0,42,0),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1,40,0),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',0,40,0),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',0,40,0),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1,40,0),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',0,40,0),(1101,'Read delivery receipts','expedition',1,'livraison','lire','r',0,0,0),(1102,'Create/modify delivery receipts','expedition',1,'livraison','creer','w',0,0,0),(1104,'Validate delivery receipts','expedition',1,'livraison_advance','validate','d',0,0,0),(1109,'Delete delivery receipts','expedition',1,'livraison','supprimer','d',0,0,0),(1121,'Read supplier proposals','supplier_proposal',1,'lire',NULL,'w',0,0,0),(1122,'Create/modify supplier proposals','supplier_proposal',1,'creer',NULL,'w',0,0,0),(1123,'Validate supplier proposals','supplier_proposal',1,'validate_advance',NULL,'w',0,0,0),(1124,'Envoyer les demandes fournisseurs','supplier_proposal',1,'send_advance',NULL,'w',0,0,0),(1125,'Delete supplier proposals','supplier_proposal',1,'supprimer',NULL,'w',0,0,0),(1126,'Close supplier price requests','supplier_proposal',1,'cloturer',NULL,'w',0,0,0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',0,0,0),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',0,0,0),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0,0,0),(1184,'Valider une commande fournisseur','fournisseur',1,'supplier_order_advance','validate','w',0,0,0),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0,0,0),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0,0,0),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0,0,0),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0,0,0),(1189,'Check/Uncheck a supplier order reception','fournisseur',1,'commande_advance','check','w',0,0,0),(1191,'Exporter les commande fournisseurs, attributs','fournisseur',1,'commande','export','r',0,0,0),(1201,'Lire les exports','export',1,'lire',NULL,'r',1,72,0),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',0,72,0),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',0,0,0),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0,0,0),(1233,'Valider une facture fournisseur','fournisseur',1,'supplier_invoice_advance','validate','w',0,0,0),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0,0,0),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0,0,0),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0,0,0),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0,70,0),(1321,'Export customer invoices, attributes and payments','facture',1,'facture','export','r',0,0,0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0,10,0),(1322,'Re-open a fully paid invoice','facture',1,'invoice_advance','reopen','r',0,0,0),(1421,'Exporter les commandes clients et attributs','commande',1,'commande','export','r',0,0,0),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',0,0,0),(2401,'Read actions/tasks linked to his account','agenda',2,'myactions','read','r',1,15,0),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0,0,0),(2402,'Create/modify actions/tasks linked to his account','agenda',2,'myactions','create','w',0,15,0),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0,0,0),(2403,'Delete actions/tasks linked to his account','agenda',2,'myactions','delete','w',0,15,0),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0,0,0),(2411,'Read actions/tasks of others','agenda',2,'allactions','read','r',0,15,0),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0,0,0),(2412,'Create/modify actions/tasks of others','agenda',2,'allactions','create','w',0,15,0),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0,0,0),(2413,'Delete actions/tasks of others','agenda',2,'allactions','delete','w',0,15,0),(2414,'Export actions/tasks of others','agenda',1,'export',NULL,'w',0,0,0),(2501,'Consulter/Télécharger les documents','ecm',1,'read',NULL,'r',0,0,0),(2503,'Soumettre ou supprimer des documents','ecm',1,'upload',NULL,'w',0,0,0),(2515,'Administrer les rubriques de documents','ecm',1,'setup',NULL,'w',0,0,0),(10001,'Read website content','website',1,'read',NULL,'w',0,0,0),(10002,'Create/modify website content (html and javascript content)','website',1,'write',NULL,'w',0,0,0),(10003,'Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers.','website',1,'writephp',NULL,'w',0,0,0),(10005,'Delete website content','website',1,'delete',NULL,'w',0,0,0),(20001,'Read your own leave requests','holiday',1,'read',NULL,'w',0,0,0),(20001,'Créer / Modifier / Lire ses demandes de congés payés','holiday',2,'write',NULL,'w',1,42,0),(20002,'Create/modify your own leave requests','holiday',1,'write',NULL,'w',0,0,0),(20002,'Lire / Modifier toutes les demandes de congés payés','holiday',2,'lire_tous',NULL,'w',0,42,0),(20003,'Delete leave requests','holiday',1,'delete',NULL,'w',0,0,0),(20003,'Supprimer des demandes de congés payés','holiday',2,'delete',NULL,'w',0,42,0),(20004,'Read leave requests for everybody','holiday',1,'read_all',NULL,'w',0,0,0),(20004,'Définir les congés payés des utilisateurs','holiday',2,'define_holiday',NULL,'w',0,42,0),(20005,'Create/modify leave requests for everybody','holiday',1,'write_all',NULL,'w',0,0,0),(20005,'Voir les logs de modification des congés payés','holiday',2,'view_log',NULL,'w',0,42,0),(20006,'Setup leave requests of users (setup and update balance)','holiday',1,'define_holiday',NULL,'w',0,0,0),(20006,'Accéder au rapport mensuel des congés payés','holiday',2,'month_report',NULL,'w',0,42,0),(20007,'Approve leave requests','holiday',1,'approve',NULL,'w',0,0,0),(23001,'Read cron jobs','cron',1,'read',NULL,'w',0,0,0),(23002,'Create cron Jobs','cron',1,'create',NULL,'w',0,0,0),(23003,'Delete cron Jobs','cron',1,'delete',NULL,'w',0,0,0),(23004,'Execute cron Jobs','cron',1,'execute',NULL,'w',0,0,0),(50151,'Use point of sale','takepos',1,'use',NULL,'a',0,60,0),(50401,'Bind products and invoices with accounting accounts','accounting',1,'bind','write','r',0,61,0),(50411,'Read operations in General Ledger','accounting',1,'mouvements','lire','r',0,61,0),(50412,'Write/Edit operations in General Ledger','accounting',1,'mouvements','creer','w',0,61,0),(50414,'Delete operations in Ledger','accounting',1,'mouvements','supprimer','d',0,61,0),(50415,'Delete all operations by year and journal in Ledger','accounting',1,'mouvements','supprimer_tous','d',0,61,0),(50418,'Export operations of the Ledger','accounting',1,'mouvements','export','r',0,61,0),(50420,'Report and export reports (turnover, balance, journals, general ledger)','accounting',1,'comptarapport','lire','r',0,61,0),(50430,'Define and close a fiscal year','accounting',1,'fiscalyear','write','r',0,61,0),(50440,'Manage chart of accounts, setup of accountancy','accounting',1,'chartofaccount',NULL,'r',0,61,0),(55001,'Read surveys','opensurvey',1,'read',NULL,'r',0,0,0),(55002,'Create/modify surveys','opensurvey',1,'write',NULL,'w',0,0,0),(56001,'Read ticket','ticket',1,'read',NULL,'r',0,60,0),(56002,'Create les tickets','ticket',1,'write',NULL,'w',0,60,0),(56003,'Delete les tickets','ticket',1,'delete',NULL,'d',0,60,0),(56004,'Manage tickets','ticket',1,'manage',NULL,'w',0,60,0),(56005,'See all tickets, even if not assigned to (not effective for external users, always restricted to the thirdpardy they depends on)','ticket',1,'view','all','r',0,60,0),(59001,'Visualiser les marges','margins',1,'liretous',NULL,'r',0,55,0),(59002,'Définir les marges','margins',1,'creer',NULL,'w',0,55,0),(59003,'Read every user margin','margins',1,'read','all','r',0,55,0),(63001,'Read resources','resource',1,'read',NULL,'w',0,0,0),(63002,'Create/Modify resources','resource',1,'write',NULL,'w',0,0,0),(63003,'Delete resources','resource',1,'delete',NULL,'w',0,0,0),(63004,'Link resources to agenda events','resource',1,'link',NULL,'w',0,0,0),(64001,'DirectPrint','printing',1,'read',NULL,'r',0,52,0),(101250,'Read surveys','opensurvey',2,'survey','read','r',0,40,0),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0,40,0); +INSERT INTO `llx_rights_def` VALUES (11,'Read invoices','facture',1,'lire',NULL,'a',0,0,0),(11,'Lire les factures','facture',2,'lire',NULL,'a',1,10,0),(12,'Create and update invoices','facture',1,'creer',NULL,'a',0,0,0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0,10,0),(13,'Devalidate invoices','facture',1,'invoice_advance','unvalidate','a',0,0,0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0,10,0),(14,'Validate invoices','facture',1,'invoice_advance','validate','a',0,0,0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0,10,0),(15,'Send invoices by email','facture',1,'invoice_advance','send','a',0,0,0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0,10,0),(16,'Issue payments on invoices','facture',1,'paiement',NULL,'a',0,0,0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0,10,0),(19,'Delete invoices','facture',1,'supprimer',NULL,'a',0,0,0),(19,'Supprimer les factures','facture',2,'supprimer',NULL,'a',0,10,0),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1,22,0),(21,'Lire les propositions commerciales','propale',2,'lire',NULL,'r',1,22,0),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0,22,0),(22,'Creer/modifier les propositions commerciales','propale',2,'creer',NULL,'w',0,22,0),(24,'Valider les propositions commerciales','propale',1,'propal_advance','validate','d',0,22,0),(24,'Valider les propositions commerciales','propale',2,'valider',NULL,'d',0,22,0),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0,22,0),(25,'Envoyer les propositions commerciales aux clients','propale',2,'propal_advance','send','d',0,22,0),(26,'Cloturer les propositions commerciales','propale',1,'propal_advance','close','d',0,22,0),(26,'Cloturer les propositions commerciales','propale',2,'propal_advance','close','d',0,22,0),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0,22,0),(27,'Supprimer les propositions commerciales','propale',2,'supprimer',NULL,'d',0,22,0),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0,22,0),(28,'Exporter les propositions commerciales et attributs','propale',2,'export',NULL,'r',0,22,0),(31,'Lire les produits','produit',1,'lire',NULL,'r',1,25,0),(31,'Lire les produits','produit',2,'lire',NULL,'r',1,25,0),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0,25,0),(32,'Creer/modifier les produits','produit',2,'creer',NULL,'w',0,25,0),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0,25,0),(34,'Supprimer les produits','produit',2,'supprimer',NULL,'d',0,25,0),(38,'Exporter les produits','produit',1,'export',NULL,'r',0,25,0),(38,'Exporter les produits','produit',2,'export',NULL,'r',0,25,0),(39,'Ignore minimum price','produit',1,'ignore_price_min_advance',NULL,'r',0,25,0),(41,'Read projects and tasks (shared projects or projects I am contact for). Can also enter time consumed on assigned tasks (timesheet)','projet',1,'lire',NULL,'r',1,14,0),(42,'Create/modify projects and tasks (shared projects or projects I am contact for)','projet',1,'creer',NULL,'w',0,14,0),(44,'Delete project and tasks (shared projects or projects I am contact for)','projet',1,'supprimer',NULL,'d',0,14,0),(45,'Export projects','projet',1,'export',NULL,'d',0,14,0),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1,41,0),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0,41,0),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0,41,0),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0,41,0),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0,41,0),(69,'Valider les fiches d\'intervention ','ficheinter',1,'ficheinter_advance','validate','a',0,41,0),(70,'Dévalider les fiches d\'intervention','ficheinter',1,'ficheinter_advance','unvalidate','a',0,41,0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',0,55,0),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',0,55,0),(74,'Remove members','adherent',1,'supprimer',NULL,'d',0,55,0),(75,'Setup types of membership','adherent',1,'configurer',NULL,'w',0,55,0),(76,'Export members','adherent',1,'export',NULL,'r',0,55,0),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',0,55,0),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0,55,0),(81,'Read sales orders','commande',1,'lire',NULL,'r',0,0,0),(82,'Creeat/modify sales orders','commande',1,'creer',NULL,'w',0,0,0),(84,'Validate sales orders','commande',1,'order_advance','validate','d',0,0,0),(86,'Send sale orders by email','commande',1,'order_advance','send','d',0,0,0),(87,'Close sale orders','commande',1,'order_advance','close','d',0,0,0),(88,'Cancel sale orders','commande',1,'order_advance','annuler','d',0,0,0),(89,'Delete sales orders','commande',1,'supprimer',NULL,'d',0,0,0),(91,'Lire les charges','tax',1,'charges','lire','r',0,50,0),(91,'Lire les charges','tax',2,'charges','lire','r',1,50,0),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0,50,0),(92,'Creer/modifier les charges','tax',2,'charges','creer','w',0,50,0),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0,50,0),(93,'Supprimer les charges','tax',2,'charges','supprimer','d',0,50,0),(94,'Exporter les charges','tax',1,'charges','export','r',0,50,0),(94,'Exporter les charges','tax',2,'charges','export','r',0,50,0),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',0,0,0),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0,0,0),(104,'Valider les expeditions','expedition',1,'shipping_advance','validate','d',0,0,0),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0,0,0),(106,'Exporter les expeditions','expedition',1,'shipment','export','r',0,0,0),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0,0,0),(111,'Lire les comptes bancaires','banque',1,'lire',NULL,'r',0,51,0),(111,'Lire les comptes bancaires','banque',2,'lire',NULL,'r',1,51,0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0,51,0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',2,'modifier',NULL,'w',0,51,0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0,51,0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',2,'configurer',NULL,'a',0,51,0),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0,51,0),(114,'Rapprocher les ecritures bancaires','banque',2,'consolidate',NULL,'w',0,51,0),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0,51,0),(115,'Exporter transactions et releves','banque',2,'export',NULL,'r',0,51,0),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0,51,0),(116,'Virements entre comptes','banque',2,'transfer',NULL,'w',0,51,0),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0,51,0),(117,'Gerer les envois de cheques','banque',2,'cheque',NULL,'w',0,51,0),(121,'Read third parties','societe',1,'lire',NULL,'r',0,0,0),(121,'Lire les societes','societe',2,'lire',NULL,'r',1,9,0),(122,'Create and update third parties','societe',1,'creer',NULL,'w',0,0,0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0,9,0),(125,'Delete third parties','societe',1,'supprimer',NULL,'d',0,0,0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0,9,0),(126,'Export third parties','societe',1,'export',NULL,'r',0,0,0),(126,'Exporter les societes','societe',2,'export',NULL,'r',0,9,0),(141,'Read all projects and tasks (also private projects I am not contact for)','projet',1,'all','lire','r',0,14,0),(142,'Create/modify all projects and tasks (also private projects I am not contact for)','projet',1,'all','creer','w',0,14,0),(144,'Delete all projects and tasks (also private projects I am not contact for)','projet',1,'all','supprimer','d',0,14,0),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1,52,0),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0,52,0),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0,52,0),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0,52,0),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1,35,0),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0,35,0),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0,35,0),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0,35,0),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0,35,0),(167,'Export contracts','contrat',1,'export',NULL,'r',0,35,0),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1,11,0),(221,'Consulter les mailings','mailing',2,'lire',NULL,'r',1,11,0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',0,11,0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',2,'creer',NULL,'w',0,11,0),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0,11,0),(223,'Valider les mailings (permet leur envoi)','mailing',2,'valider',NULL,'w',0,11,0),(229,'Supprimer les mailings','mailing',1,'supprimer',NULL,'d',0,11,0),(229,'Supprimer les mailings','mailing',2,'supprimer',NULL,'d',0,11,0),(237,'View recipients and info','mailing',1,'mailing_advance','recipient','r',0,11,0),(237,'View recipients and info','mailing',2,'mailing_advance','recipient','r',0,11,0),(238,'Manually send mailings','mailing',1,'mailing_advance','send','w',0,11,0),(238,'Manually send mailings','mailing',2,'mailing_advance','send','w',0,11,0),(239,'Delete mailings after validation and/or sent','mailing',1,'mailing_advance','delete','d',0,11,0),(239,'Delete mailings after validation and/or sent','mailing',2,'mailing_advance','delete','d',0,11,0),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1,20,0),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',0,20,0),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',0,20,0),(251,'Consulter les autres utilisateurs','user',1,'user','lire','r',0,0,0),(252,'Consulter les permissions des autres utilisateurs','user',1,'user_advance','readperms','r',0,0,0),(253,'Creer/modifier utilisateurs internes et externes','user',1,'user','creer','w',0,0,0),(254,'Creer/modifier utilisateurs externes seulement','user',1,'user_advance','write','w',0,0,0),(255,'Modifier le mot de passe des autres utilisateurs','user',1,'user','password','w',0,0,0),(256,'Supprimer ou desactiver les autres utilisateurs','user',1,'user','supprimer','d',0,0,0),(262,'Read all third parties by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).','societe',1,'client','voir','r',0,0,0),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',2,'client','voir','r',1,9,0),(281,'Read contacts','societe',1,'contact','lire','r',0,0,0),(281,'Lire les contacts','societe',2,'contact','lire','r',1,9,0),(282,'Create and update contact','societe',1,'contact','creer','w',0,0,0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0,9,0),(283,'Delete contacts','societe',1,'contact','supprimer','d',0,0,0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0,9,0),(286,'Export contacts','societe',1,'contact','export','d',0,0,0),(286,'Exporter les contacts','societe',2,'contact','export','d',0,9,0),(300,'Read barcodes','barcode',1,'lire_advance',NULL,'r',1,0,0),(301,'Create/modify barcodes','barcode',1,'creer_advance',NULL,'w',0,0,0),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',0,50,0),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',0,50,0),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',0,50,0),(341,'Consulter ses propres permissions','user',1,'self_advance','readperms','r',0,0,0),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',0,0,0),(343,'Modifier son propre mot de passe','user',1,'self','password','w',0,0,0),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',0,0,0),(351,'Consulter les groupes','user',1,'group_advance','read','r',0,0,0),(352,'Consulter les permissions des groupes','user',1,'group_advance','readperms','r',0,0,0),(353,'Creer/modifier les groupes et leurs permissions','user',1,'group_advance','write','w',0,0,0),(354,'Supprimer ou desactiver les groupes','user',1,'group_advance','delete','d',0,0,0),(358,'Exporter les utilisateurs','user',1,'user','export','r',0,0,0),(511,'Read payments of employee salaries','salaries',1,'read',NULL,'r',0,0,0),(512,'Create/modify payments of empoyee salaries','salaries',1,'write',NULL,'w',0,0,0),(514,'Delete payments of employee salary','salaries',1,'delete',NULL,'d',0,0,0),(517,'Export payments of employee salaries','salaries',1,'export',NULL,'r',0,0,0),(520,'Read loans','loan',1,'read',NULL,'r',0,50,0),(522,'Create/modify loans','loan',1,'write',NULL,'w',0,50,0),(524,'Delete loans','loan',1,'delete',NULL,'d',0,50,0),(525,'Access loan calculator','loan',1,'calc',NULL,'r',0,50,0),(527,'Export loans','loan',1,'export',NULL,'r',0,50,0),(531,'Read services','service',1,'lire',NULL,'r',0,0,0),(532,'Create/modify services','service',1,'creer',NULL,'w',0,0,0),(534,'Delete les services','service',1,'supprimer',NULL,'d',0,0,0),(538,'Export services','service',1,'export',NULL,'r',0,0,0),(650,'Read bom of Bom','bom',1,'read',NULL,'w',0,60,0),(651,'Create/Update bom of Bom','bom',1,'write',NULL,'w',0,60,0),(652,'Delete bom of Bom','bom',1,'delete',NULL,'w',0,60,0),(660,'Read objects of Mrp','mrp',1,'read',NULL,'w',0,62,0),(661,'Create/Update objects of Mrp','mrp',1,'write',NULL,'w',0,62,0),(662,'Delete objects of Mrp','mrp',1,'delete',NULL,'w',0,62,0),(701,'Lire les dons','don',1,'lire',NULL,'r',1,50,0),(701,'Lire les dons','don',2,'lire',NULL,'r',1,50,0),(702,'Creer/modifier les dons','don',1,'creer',NULL,'w',0,50,0),(702,'Creer/modifier les dons','don',2,'creer',NULL,'w',0,50,0),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0,50,0),(703,'Supprimer les dons','don',2,'supprimer',NULL,'d',0,50,0),(771,'Read expense reports (yours and your subordinates)','expensereport',1,'lire',NULL,'r',0,0,0),(772,'Create/modify expense reports','expensereport',1,'creer',NULL,'w',0,0,0),(773,'Delete expense reports','expensereport',1,'supprimer',NULL,'d',0,0,0),(775,'Approve expense reports','expensereport',1,'approve',NULL,'w',0,0,0),(776,'Pay expense reports','expensereport',1,'to_paid',NULL,'w',0,0,0),(777,'Read expense reports of everybody','expensereport',1,'readall',NULL,'r',0,0,0),(778,'Create expense reports for everybody','expensereport',1,'writeall_advance',NULL,'w',0,0,0),(779,'Export expense reports','expensereport',1,'export',NULL,'r',0,0,0),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1,40,0),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',0,40,0),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',0,40,0),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1,40,0),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',0,40,0),(1101,'Read delivery receipts','expedition',1,'livraison','lire','r',0,0,0),(1102,'Create/modify delivery receipts','expedition',1,'livraison','creer','w',0,0,0),(1104,'Validate delivery receipts','expedition',1,'livraison_advance','validate','d',0,0,0),(1109,'Delete delivery receipts','expedition',1,'livraison','supprimer','d',0,0,0),(1121,'Read supplier proposals','supplier_proposal',1,'lire',NULL,'w',0,0,0),(1122,'Create/modify supplier proposals','supplier_proposal',1,'creer',NULL,'w',0,0,0),(1123,'Validate supplier proposals','supplier_proposal',1,'validate_advance',NULL,'w',0,0,0),(1124,'Envoyer les demandes fournisseurs','supplier_proposal',1,'send_advance',NULL,'w',0,0,0),(1125,'Delete supplier proposals','supplier_proposal',1,'supprimer',NULL,'w',0,0,0),(1126,'Close supplier price requests','supplier_proposal',1,'cloturer',NULL,'w',0,0,0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',0,0,0),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',0,0,0),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0,0,0),(1184,'Valider une commande fournisseur','fournisseur',1,'supplier_order_advance','validate','w',0,0,0),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0,0,0),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0,0,0),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0,0,0),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0,0,0),(1189,'Check/Uncheck a supplier order reception','fournisseur',1,'commande_advance','check','w',0,0,0),(1191,'Exporter les commande fournisseurs, attributs','fournisseur',1,'commande','export','r',0,0,0),(1201,'Lire les exports','export',1,'lire',NULL,'r',1,72,0),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',0,72,0),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',0,0,0),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0,0,0),(1233,'Valider une facture fournisseur','fournisseur',1,'supplier_invoice_advance','validate','w',0,0,0),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0,0,0),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0,0,0),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0,0,0),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0,70,0),(1321,'Export customer invoices, attributes and payments','facture',1,'facture','export','r',0,0,0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0,10,0),(1322,'Re-open a fully paid invoice','facture',1,'invoice_advance','reopen','r',0,0,0),(1421,'Export sales orders and attributes','commande',1,'commande','export','r',0,0,0),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',0,0,0),(2401,'Read actions/tasks linked to his account','agenda',2,'myactions','read','r',1,15,0),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0,0,0),(2402,'Create/modify actions/tasks linked to his account','agenda',2,'myactions','create','w',0,15,0),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0,0,0),(2403,'Delete actions/tasks linked to his account','agenda',2,'myactions','delete','w',0,15,0),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0,0,0),(2411,'Read actions/tasks of others','agenda',2,'allactions','read','r',0,15,0),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0,0,0),(2412,'Create/modify actions/tasks of others','agenda',2,'allactions','create','w',0,15,0),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0,0,0),(2413,'Delete actions/tasks of others','agenda',2,'allactions','delete','w',0,15,0),(2414,'Export actions/tasks of others','agenda',1,'export',NULL,'w',0,0,0),(2501,'Consulter/Télécharger les documents','ecm',1,'read',NULL,'r',0,0,0),(2503,'Soumettre ou supprimer des documents','ecm',1,'upload',NULL,'w',0,0,0),(2515,'Administrer les rubriques de documents','ecm',1,'setup',NULL,'w',0,0,0),(10001,'Read website content','website',1,'read',NULL,'w',0,0,0),(10002,'Create/modify website content (html and javascript content)','website',1,'write',NULL,'w',0,0,0),(10003,'Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers.','website',1,'writephp',NULL,'w',0,0,0),(10005,'Delete website content','website',1,'delete',NULL,'w',0,0,0),(20001,'Read your own leave requests','holiday',1,'read',NULL,'w',0,0,0),(20001,'Créer / Modifier / Lire ses demandes de congés payés','holiday',2,'write',NULL,'w',1,42,0),(20002,'Create/modify your own leave requests','holiday',1,'write',NULL,'w',0,0,0),(20002,'Lire / Modifier toutes les demandes de congés payés','holiday',2,'lire_tous',NULL,'w',0,42,0),(20003,'Delete leave requests','holiday',1,'delete',NULL,'w',0,0,0),(20003,'Supprimer des demandes de congés payés','holiday',2,'delete',NULL,'w',0,42,0),(20004,'Read leave requests for everybody','holiday',1,'read_all',NULL,'w',0,0,0),(20004,'Définir les congés payés des utilisateurs','holiday',2,'define_holiday',NULL,'w',0,42,0),(20005,'Create/modify leave requests for everybody','holiday',1,'write_all',NULL,'w',0,0,0),(20005,'Voir les logs de modification des congés payés','holiday',2,'view_log',NULL,'w',0,42,0),(20006,'Setup leave requests of users (setup and update balance)','holiday',1,'define_holiday',NULL,'w',0,0,0),(20006,'Accéder au rapport mensuel des congés payés','holiday',2,'month_report',NULL,'w',0,42,0),(20007,'Approve leave requests','holiday',1,'approve',NULL,'w',0,0,0),(23001,'Read cron jobs','cron',1,'read',NULL,'w',0,0,0),(23002,'Create cron Jobs','cron',1,'create',NULL,'w',0,0,0),(23003,'Delete cron Jobs','cron',1,'delete',NULL,'w',0,0,0),(23004,'Execute cron Jobs','cron',1,'execute',NULL,'w',0,0,0),(50151,'Use Point Of Sale','takepos',1,'run',NULL,'a',0,0,0),(50401,'Bind products and invoices with accounting accounts','accounting',1,'bind','write','r',0,61,0),(50411,'Read operations in General Ledger','accounting',1,'mouvements','lire','r',0,61,0),(50412,'Write/Edit operations in General Ledger','accounting',1,'mouvements','creer','w',0,61,0),(50414,'Delete operations in Ledger','accounting',1,'mouvements','supprimer','d',0,61,0),(50415,'Delete all operations by year and journal in Ledger','accounting',1,'mouvements','supprimer_tous','d',0,61,0),(50418,'Export operations of the Ledger','accounting',1,'mouvements','export','r',0,61,0),(50420,'Report and export reports (turnover, balance, journals, general ledger)','accounting',1,'comptarapport','lire','r',0,61,0),(50430,'Define and close a fiscal year','accounting',1,'fiscalyear','write','r',0,61,0),(50440,'Manage chart of accounts, setup of accountancy','accounting',1,'chartofaccount',NULL,'r',0,61,0),(55001,'Read surveys','opensurvey',1,'read',NULL,'r',0,0,0),(55002,'Create/modify surveys','opensurvey',1,'write',NULL,'w',0,0,0),(56001,'Read ticket','ticket',1,'read',NULL,'r',0,60,0),(56002,'Create les tickets','ticket',1,'write',NULL,'w',0,60,0),(56003,'Delete les tickets','ticket',1,'delete',NULL,'d',0,60,0),(56004,'Manage tickets','ticket',1,'manage',NULL,'w',0,60,0),(56005,'See all tickets, even if not assigned to (not effective for external users, always restricted to the thirdpardy they depends on)','ticket',1,'view','all','r',0,60,0),(59001,'Visualiser les marges','margins',1,'liretous',NULL,'r',0,55,0),(59002,'Définir les marges','margins',1,'creer',NULL,'w',0,55,0),(59003,'Read every user margin','margins',1,'read','all','r',0,55,0),(63001,'Read resources','resource',1,'read',NULL,'w',0,0,0),(63002,'Create/Modify resources','resource',1,'write',NULL,'w',0,0,0),(63003,'Delete resources','resource',1,'delete',NULL,'w',0,0,0),(63004,'Link resources to agenda events','resource',1,'link',NULL,'w',0,0,0),(64001,'DirectPrint','printing',1,'read',NULL,'r',0,52,0),(101250,'Read surveys','opensurvey',2,'survey','read','r',0,40,0),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0,40,0); /*!40000 ALTER TABLE `llx_rights_def` ENABLE KEYS */; UNLOCK TABLES; @@ -11012,7 +11380,7 @@ DROP TABLE IF EXISTS `llx_sellyoursaas_cancellation_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_sellyoursaas_cancellation_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -11037,12 +11405,12 @@ DROP TABLE IF EXISTS `llx_societe`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_societe` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `statut` tinyint(4) DEFAULT '0', + `statut` tinyint(4) DEFAULT 0, `parent` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `nom` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_int` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, `code_client` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -11052,13 +11420,13 @@ CREATE TABLE `llx_societe` ( `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `zip` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_departement` int(11) DEFAULT '0', - `fk_pays` int(11) DEFAULT '0', + `fk_departement` int(11) DEFAULT 0, + `fk_pays` int(11) DEFAULT 0, `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `fax` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `socialnetworks` text COLLATE utf8_unicode_ci, + `socialnetworks` text COLLATE utf8_unicode_ci DEFAULT NULL, `skype` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `whatsapp` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `linkedin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -11068,9 +11436,9 @@ CREATE TABLE `llx_societe` ( `instagram` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `facebook` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `twitter` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_effectif` int(11) DEFAULT '0', - `fk_typent` int(11) DEFAULT '0', - `fk_forme_juridique` int(11) DEFAULT '0', + `fk_effectif` int(11) DEFAULT 0, + `fk_typent` int(11) DEFAULT 0, + `fk_forme_juridique` int(11) DEFAULT 0, `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `siren` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `siret` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -11078,21 +11446,21 @@ CREATE TABLE `llx_societe` ( `idprof4` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `tva_intra` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `capital` double(24,8) DEFAULT NULL, - `fk_stcomm` int(11) NOT NULL DEFAULT '0', - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `fk_stcomm` int(11) NOT NULL DEFAULT 0, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `prefix_comm` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, - `client` tinyint(4) DEFAULT '0', - `fournisseur` tinyint(4) DEFAULT '0', + `client` tinyint(4) DEFAULT 0, + `fournisseur` tinyint(4) DEFAULT 0, `supplier_account` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_prospectlevel` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, - `customer_bad` tinyint(4) DEFAULT '0', - `customer_rate` double DEFAULT '0', - `supplier_rate` double DEFAULT '0', + `customer_bad` tinyint(4) DEFAULT 0, + `customer_rate` double DEFAULT 0, + `supplier_rate` double DEFAULT 0, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, - `remise_client` double DEFAULT '0', - `remise_supplier` double DEFAULT '0', + `remise_client` double DEFAULT 0, + `remise_supplier` double DEFAULT 0, `mode_reglement` tinyint(4) DEFAULT NULL, `cond_reglement` tinyint(4) DEFAULT NULL, `mode_reglement_supplier` int(11) DEFAULT NULL, @@ -11101,21 +11469,21 @@ CREATE TABLE `llx_societe` ( `supplier_order_min_amount` double(24,8) DEFAULT NULL, `cond_reglement_supplier` int(11) DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, - `tva_assuj` tinyint(4) DEFAULT '1', - `localtax1_assuj` tinyint(4) DEFAULT '0', + `tva_assuj` tinyint(4) DEFAULT 1, + `localtax1_assuj` tinyint(4) DEFAULT 0, `localtax1_value` double(6,3) DEFAULT NULL, - `localtax2_assuj` tinyint(4) DEFAULT '0', + `localtax2_assuj` tinyint(4) DEFAULT 0, `localtax2_value` double(6,3) DEFAULT NULL, `barcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `price_level` int(11) DEFAULT NULL, `default_lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `canvas` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `status` tinyint(4) DEFAULT '1', + `status` tinyint(4) DEFAULT 1, `logo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `idprof5` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `idprof6` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_barcode_type` int(11) DEFAULT '0', + `fk_barcode_type` int(11) DEFAULT 0, `webservices_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `webservices_key` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `name_alias` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -11125,7 +11493,7 @@ CREATE TABLE `llx_societe` ( `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, - `fk_entrepot` int(11) DEFAULT '0', + `fk_entrepot` int(11) DEFAULT 0, `logo_squarred` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_prefix_comm` (`prefix_comm`,`entity`), @@ -11157,7 +11525,7 @@ DROP TABLE IF EXISTS `llx_societe_account`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_societe_account` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) DEFAULT '1', + `entity` int(11) DEFAULT 1, `login` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `pass_encoding` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL, `pass_crypted` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -11165,11 +11533,11 @@ CREATE TABLE `llx_societe_account` ( `fk_soc` int(11) DEFAULT NULL, `site` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_website` int(11) DEFAULT NULL, - `note_private` mediumtext COLLATE utf8_unicode_ci, + `note_private` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `date_last_login` datetime DEFAULT NULL, `date_previous_login` datetime DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -11209,17 +11577,17 @@ DROP TABLE IF EXISTS `llx_societe_address`; CREATE TABLE `llx_societe_address` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_soc` int(11) DEFAULT '0', + `fk_soc` int(11) DEFAULT 0, `name` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `zip` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_pays` int(11) DEFAULT '0', + `fk_pays` int(11) DEFAULT 0, `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `fax` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -11271,12 +11639,12 @@ DROP TABLE IF EXISTS `llx_societe_contacts`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_societe_contacts` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `date_creation` datetime NOT NULL, `fk_soc` int(11) NOT NULL, `fk_c_type_contact` int(11) NOT NULL, `fk_socpeople` int(11) NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_societe_contacts_idx1` (`entity`,`fk_soc`,`fk_c_type_contact`,`fk_socpeople`), @@ -11307,7 +11675,7 @@ DROP TABLE IF EXISTS `llx_societe_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_societe_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `height` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -11366,11 +11734,11 @@ DROP TABLE IF EXISTS `llx_societe_prices`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_societe_prices` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_soc` int(11) DEFAULT '0', + `fk_soc` int(11) DEFAULT 0, `tms` timestamp NULL DEFAULT NULL, `datec` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, - `price_level` tinyint(4) DEFAULT '1', + `price_level` tinyint(4) DEFAULT 1, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -11394,13 +11762,13 @@ DROP TABLE IF EXISTS `llx_societe_remise`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_societe_remise` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, - `remise_client` double(6,3) NOT NULL DEFAULT '0.000', - `note` text COLLATE utf8_unicode_ci, + `remise_client` double(6,3) NOT NULL DEFAULT 0.000, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -11423,25 +11791,26 @@ DROP TABLE IF EXISTS `llx_societe_remise_except`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_societe_remise_except` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) NOT NULL, - `discount_type` int(11) NOT NULL DEFAULT '0', + `discount_type` int(11) NOT NULL DEFAULT 0, `datec` datetime DEFAULT NULL, `amount_ht` double(24,8) NOT NULL, - `amount_tva` double(24,8) NOT NULL DEFAULT '0.00000000', - `amount_ttc` double(24,8) NOT NULL DEFAULT '0.00000000', - `tva_tx` double(6,3) NOT NULL DEFAULT '0.000', + `amount_tva` double(24,8) NOT NULL DEFAULT 0.00000000, + `amount_ttc` double(24,8) NOT NULL DEFAULT 0.00000000, + `tva_tx` double(6,3) NOT NULL DEFAULT 0.000, `fk_user` int(11) NOT NULL, `fk_facture_line` int(11) DEFAULT NULL, `fk_facture` int(11) DEFAULT NULL, `fk_facture_source` int(11) DEFAULT NULL, `description` text COLLATE utf8_unicode_ci NOT NULL, - `multicurrency_amount_ht` double(24,8) NOT NULL DEFAULT '0.00000000', - `multicurrency_amount_tva` double(24,8) NOT NULL DEFAULT '0.00000000', - `multicurrency_amount_ttc` double(24,8) NOT NULL DEFAULT '0.00000000', + `multicurrency_amount_ht` double(24,8) NOT NULL DEFAULT 0.00000000, + `multicurrency_amount_tva` double(24,8) NOT NULL DEFAULT 0.00000000, + `multicurrency_amount_ttc` double(24,8) NOT NULL DEFAULT 0.00000000, `fk_invoice_supplier_line` int(11) DEFAULT NULL, `fk_invoice_supplier` int(11) DEFAULT NULL, `fk_invoice_supplier_source` int(11) DEFAULT NULL, + `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', PRIMARY KEY (`rowid`), KEY `idx_societe_remise_except_fk_user` (`fk_user`), KEY `idx_societe_remise_except_fk_soc` (`fk_soc`), @@ -11470,7 +11839,7 @@ CREATE TABLE `llx_societe_remise_except` ( LOCK TABLES `llx_societe_remise_except` WRITE; /*!40000 ALTER TABLE `llx_societe_remise_except` DISABLE KEYS */; -INSERT INTO `llx_societe_remise_except` VALUES (2,1,19,0,'2015-03-19 09:36:15',10.00000000,1.25000000,11.25000000,12.500,1,NULL,NULL,NULL,'hfghgf',0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(14,1,17,1,'2020-01-01 22:06:30',79.16444000,9.89556000,89.06000000,12.500,12,NULL,NULL,NULL,'(CREDIT_NOTE)',0.00000000,0.00000000,0.00000000,NULL,NULL,27),(15,1,19,0,'2020-01-16 02:34:47',20.50000000,0.00000000,20.50000000,0.000,12,1065,NULL,224,'(DEPOSIT)',20.50000000,0.00000000,20.50000000,NULL,NULL,NULL),(16,1,1,0,'2020-01-19 14:49:41',10.00000000,1.96000000,11.96000000,19.600,12,NULL,NULL,NULL,'111',10.00000000,1.96000000,11.96000000,NULL,NULL,NULL),(19,1,1,0,'2020-01-19 15:16:27',48.60000000,1.94000000,50.54000000,4.000,12,NULL,NULL,228,'(DEPOSIT)',48.60000000,1.94000000,50.54000000,NULL,NULL,NULL); +INSERT INTO `llx_societe_remise_except` VALUES (2,1,19,0,'2015-03-19 09:36:15',10.00000000,1.25000000,11.25000000,12.500,1,NULL,NULL,NULL,'hfghgf',0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,''),(14,1,17,1,'2020-01-01 22:06:30',79.16444000,9.89556000,89.06000000,12.500,12,NULL,NULL,NULL,'(CREDIT_NOTE)',0.00000000,0.00000000,0.00000000,NULL,NULL,27,''),(15,1,19,0,'2020-01-16 02:34:47',20.50000000,0.00000000,20.50000000,0.000,12,1065,NULL,224,'(DEPOSIT)',20.50000000,0.00000000,20.50000000,NULL,NULL,NULL,''),(16,1,1,0,'2020-01-19 14:49:41',10.00000000,1.96000000,11.96000000,19.600,12,NULL,NULL,NULL,'111',10.00000000,1.96000000,11.96000000,NULL,NULL,NULL,''),(19,1,1,0,'2020-01-19 15:16:27',48.60000000,1.94000000,50.54000000,4.000,12,NULL,NULL,228,'(DEPOSIT)',48.60000000,1.94000000,50.54000000,NULL,NULL,NULL,''); /*!40000 ALTER TABLE `llx_societe_remise_except` ENABLE KEYS */; UNLOCK TABLES; @@ -11483,13 +11852,13 @@ DROP TABLE IF EXISTS `llx_societe_remise_supplier`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_societe_remise_supplier` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_soc` int(11) NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, - `remise_supplier` double(6,3) NOT NULL DEFAULT '0.000', - `note` mediumtext COLLATE utf8_unicode_ci, + `remise_supplier` double(6,3) NOT NULL DEFAULT 0.000, + `note` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -11516,7 +11885,7 @@ CREATE TABLE `llx_societe_rib` ( `type` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `label` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, `bank` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `code_banque` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -11527,8 +11896,8 @@ CREATE TABLE `llx_societe_rib` ( `iban_prefix` varchar(34) COLLATE utf8_unicode_ci DEFAULT NULL, `domiciliation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `proprio` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `owner_address` text COLLATE utf8_unicode_ci, - `default_rib` tinyint(4) NOT NULL DEFAULT '0', + `owner_address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `default_rib` smallint(6) NOT NULL DEFAULT 0, `rum` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `date_rum` date DEFAULT NULL, `frstrecur` varchar(16) COLLATE utf8_unicode_ci DEFAULT 'FRST', @@ -11539,7 +11908,7 @@ CREATE TABLE `llx_societe_rib` ( `exp_date_month` int(11) DEFAULT NULL, `exp_date_year` int(11) DEFAULT NULL, `country_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `approved` int(11) DEFAULT '0', + `approved` int(11) DEFAULT 0, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ending_date` date DEFAULT NULL, `max_total_amount_of_all_payments` double(24,8) DEFAULT NULL, @@ -11547,9 +11916,10 @@ CREATE TABLE `llx_societe_rib` ( `starting_date` date DEFAULT NULL, `total_amount_of_all_payments` double(24,8) DEFAULT NULL, `stripe_card_ref` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `status` int(11) NOT NULL DEFAULT '1', + `status` int(11) NOT NULL DEFAULT 1, `comment` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ipaddress` varchar(68) COLLATE utf8_unicode_ci DEFAULT NULL, + `stripe_account` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -11560,7 +11930,7 @@ CREATE TABLE `llx_societe_rib` ( LOCK TABLES `llx_societe_rib` WRITE; /*!40000 ALTER TABLE `llx_societe_rib` DISABLE KEYS */; -INSERT INTO `llx_societe_rib` VALUES (1,'ban',19,'2017-02-21 15:50:32','2017-02-21 11:53:08','Morgan Bank','Morgan Bank','','','','','PSPBFIHH','ES80 2310 0001 1800 0001 2345','Royal via,\r\nMadrid','Mr Esposito','10 via ferrata,\r\nMadrid',1,'RUM1301-0008-0',NULL,'FRST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL); +INSERT INTO `llx_societe_rib` VALUES (1,'ban',19,'2017-02-21 15:50:32','2017-02-21 11:53:08','Morgan Bank','Morgan Bank','','','','','PSPBFIHH','ES80 2310 0001 1800 0001 2345','Royal via,\r\nMadrid','Mr Esposito','10 via ferrata,\r\nMadrid',1,'RUM1301-0008-0',NULL,'FRST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_societe_rib` ENABLE KEYS */; UNLOCK TABLES; @@ -11574,18 +11944,18 @@ DROP TABLE IF EXISTS `llx_socpeople`; CREATE TABLE `llx_socpeople` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_soc` int(11) DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `civility` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `lastname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `firstname` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `zip` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, - `town` text COLLATE utf8_unicode_ci, + `town` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_departement` int(11) DEFAULT NULL, - `fk_pays` int(11) DEFAULT '0', + `fk_pays` int(11) DEFAULT 0, `birthday` date DEFAULT NULL, `poste` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, `phone` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -11593,7 +11963,7 @@ CREATE TABLE `llx_socpeople` ( `phone_mobile` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `fax` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `socialnetworks` text COLLATE utf8_unicode_ci, + `socialnetworks` text COLLATE utf8_unicode_ci DEFAULT NULL, `jabberid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `skype` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `whatsapp` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -11605,16 +11975,16 @@ CREATE TABLE `llx_socpeople` ( `facebook` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `twitter` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `photo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `priv` smallint(6) NOT NULL DEFAULT '0', - `no_email` smallint(6) NOT NULL DEFAULT '0', - `fk_user_creat` int(11) DEFAULT '0', + `priv` smallint(6) NOT NULL DEFAULT 0, + `no_email` smallint(6) NOT NULL DEFAULT 0, + `fk_user_creat` int(11) DEFAULT 0, `fk_user_modif` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `default_lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `canvas` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `statut` tinyint(4) NOT NULL DEFAULT '1', + `statut` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), KEY `idx_socpeople_fk_soc` (`fk_soc`), KEY `idx_socpeople_fk_user_creat` (`fk_user_creat`), @@ -11642,7 +12012,7 @@ DROP TABLE IF EXISTS `llx_socpeople_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_socpeople_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -11674,7 +12044,7 @@ CREATE TABLE `llx_stock_lotserial` ( `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` int(11) DEFAULT NULL, @@ -11700,21 +12070,21 @@ DROP TABLE IF EXISTS `llx_stock_mouvement`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_stock_mouvement` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datem` datetime DEFAULT NULL, `fk_product` int(11) NOT NULL, `fk_entrepot` int(11) NOT NULL, `value` double DEFAULT NULL, - `price` double(24,8) DEFAULT '0.00000000', + `price` double(24,8) DEFAULT 0.00000000, `type_mouvement` smallint(6) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_origin` int(11) DEFAULT NULL, `origintype` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_projet` int(11) NOT NULL DEFAULT '0', + `fk_projet` int(11) NOT NULL DEFAULT 0, `inventorycode` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `batch` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `batch` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `eatby` date DEFAULT NULL, `sellby` date DEFAULT NULL, `fk_project` int(11) DEFAULT NULL, @@ -11743,12 +12113,12 @@ DROP TABLE IF EXISTS `llx_submitew_message`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_submitew_message` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `statut` smallint(6) DEFAULT '0', + `statut` smallint(6) DEFAULT 0, `label` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `title` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `body_short` text COLLATE utf8_unicode_ci, - `body_long` text COLLATE utf8_unicode_ci, + `body_short` text COLLATE utf8_unicode_ci DEFAULT NULL, + `body_long` text COLLATE utf8_unicode_ci DEFAULT NULL, `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `cible` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, `nbemail` int(11) DEFAULT NULL, @@ -11796,10 +12166,10 @@ CREATE TABLE `llx_submitew_targets` ( `login` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `pass` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `comment` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) DEFAULT '0', - `titlelength` int(11) DEFAULT '32', - `descshortlength` int(11) DEFAULT '256', - `desclonglength` int(11) DEFAULT '2000', + `position` int(11) DEFAULT 0, + `titlelength` int(11) DEFAULT 32, + `descshortlength` int(11) DEFAULT 256, + `desclonglength` int(11) DEFAULT 2000, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_submitewtargets` (`label`,`langcode`) ) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -11852,15 +12222,17 @@ DROP TABLE IF EXISTS `llx_subscription`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_subscription` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `fk_adherent` int(11) DEFAULT NULL, `dateadh` datetime DEFAULT NULL, `datef` date DEFAULT NULL, `subscription` double(24,8) DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_type` int(11) DEFAULT NULL, + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_valid` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_subscription` (`fk_adherent`,`dateadh`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -11872,7 +12244,7 @@ CREATE TABLE `llx_subscription` ( LOCK TABLES `llx_subscription` WRITE; /*!40000 ALTER TABLE `llx_subscription` DISABLE KEYS */; -INSERT INTO `llx_subscription` VALUES (2,'2020-01-21 00:02:14','2020-01-21 01:02:14',3,'2013-07-18 00:00:00','2014-07-17',50.00000000,51,'Subscription 2013',2),(3,'2020-01-21 09:22:37','2020-01-21 10:22:37',4,'2017-07-18 00:00:00','2018-07-17',50.00000000,52,'Subscription 2017',2),(4,'2020-01-21 09:23:17','2020-01-21 10:23:17',2,'2017-07-18 00:00:00','2018-07-17',50.00000000,53,'Subscription 2017',2),(5,'2020-01-21 09:23:28','2020-01-21 10:23:28',2,'2018-07-18 00:00:00','2019-07-17',50.00000000,54,'Subscription 2018',2),(6,'2020-01-21 09:23:49','2020-01-21 10:23:49',2,'2019-07-18 00:00:00','2020-07-17',50.00000000,55,'Subscription 2019',2); +INSERT INTO `llx_subscription` VALUES (2,'2020-01-21 00:02:14','2020-01-21 01:02:14',3,'2013-07-18 00:00:00','2014-07-17',50.00000000,51,'Subscription 2013',2,NULL,NULL),(3,'2020-01-21 09:22:37','2020-01-21 10:22:37',4,'2017-07-18 00:00:00','2018-07-17',50.00000000,52,'Subscription 2017',2,NULL,NULL),(4,'2020-01-21 09:23:17','2020-01-21 10:23:17',2,'2017-07-18 00:00:00','2018-07-17',50.00000000,53,'Subscription 2017',2,NULL,NULL),(5,'2020-01-21 09:23:28','2020-01-21 10:23:28',2,'2018-07-18 00:00:00','2019-07-17',50.00000000,54,'Subscription 2018',2,NULL,NULL),(6,'2020-01-21 09:23:49','2020-01-21 10:23:49',2,'2019-07-18 00:00:00','2020-07-17',50.00000000,55,'Subscription 2019',2,NULL,NULL); /*!40000 ALTER TABLE `llx_subscription` ENABLE KEYS */; UNLOCK TABLES; @@ -11886,12 +12258,12 @@ DROP TABLE IF EXISTS `llx_supplier_proposal`; CREATE TABLE `llx_supplier_proposal` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_int` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, `date_cloture` datetime DEFAULT NULL, @@ -11899,22 +12271,22 @@ CREATE TABLE `llx_supplier_proposal` ( `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, `fk_user_cloture` int(11) DEFAULT NULL, - `fk_statut` smallint(6) NOT NULL DEFAULT '0', - `price` double DEFAULT '0', - `remise_percent` double DEFAULT '0', - `remise_absolue` double DEFAULT '0', - `remise` double DEFAULT '0', - `total_ht` double(24,8) DEFAULT '0.00000000', - `tva` double(24,8) DEFAULT '0.00000000', - `localtax1` double(24,8) DEFAULT '0.00000000', - `localtax2` double(24,8) DEFAULT '0.00000000', - `total` double(24,8) DEFAULT '0.00000000', + `fk_statut` smallint(6) NOT NULL DEFAULT 0, + `price` double DEFAULT 0, + `remise_percent` double DEFAULT 0, + `remise_absolue` double DEFAULT 0, + `remise` double DEFAULT 0, + `total_ht` double(24,8) DEFAULT 0.00000000, + `tva` double(24,8) DEFAULT 0.00000000, + `localtax1` double(24,8) DEFAULT 0.00000000, + `localtax2` double(24,8) DEFAULT 0.00000000, + `total` double(24,8) DEFAULT 0.00000000, `fk_account` int(11) DEFAULT NULL, `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, `fk_mode_reglement` int(11) DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci, - `note_public` text COLLATE utf8_unicode_ci, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_livraison` date DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, @@ -11922,10 +12294,10 @@ CREATE TABLE `llx_supplier_proposal` ( `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_tx` double(24,8) DEFAULT '1.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_tx` double(24,8) DEFAULT 1.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -11937,7 +12309,7 @@ CREATE TABLE `llx_supplier_proposal` ( LOCK TABLES `llx_supplier_proposal` WRITE; /*!40000 ALTER TABLE `llx_supplier_proposal` DISABLE KEYS */; -INSERT INTO `llx_supplier_proposal` VALUES (2,'(PROV2)',1,NULL,NULL,10,NULL,'2020-01-20 11:19:25','2017-02-17 04:40:14',NULL,NULL,12,12,NULL,NULL,0,0,NULL,NULL,0,290.00000000,0.00000000,0.00000000,0.00000000,290.00000000,NULL,NULL,2,7,'Private note','Public note','aurore','2017-02-17',1,NULL,NULL,1,'EUR',1.00000000,290.00000000,0.00000000,290.00000000,NULL),(3,'(PROV3)',1,NULL,NULL,1,NULL,'2020-01-20 11:06:39','2020-01-20 12:06:39',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'','','aurore',NULL,NULL,NULL,NULL,1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL),(4,'(PROV4)',1,NULL,NULL,17,NULL,'2020-01-20 11:23:36','2020-01-20 12:23:22',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,195.00000000,0.00000000,0.00000000,0.00000000,195.00000000,NULL,NULL,NULL,NULL,'','','aurore',NULL,NULL,NULL,NULL,1,'EUR',1.00000000,195.00000000,0.00000000,195.00000000,NULL); +INSERT INTO `llx_supplier_proposal` VALUES (2,'(PROV2)',1,NULL,NULL,10,NULL,'2020-06-12 17:12:08','2020-02-17 04:40:14',NULL,NULL,12,12,NULL,NULL,0,0,NULL,NULL,0,290.00000000,0.00000000,0.00000000,0.00000000,290.00000000,NULL,NULL,2,7,'Private note','Public note','aurore','2017-02-17',1,NULL,NULL,1,'EUR',1.00000000,290.00000000,0.00000000,290.00000000,NULL),(3,'(PROV3)',1,NULL,NULL,1,NULL,'2020-01-20 11:06:39','2020-01-20 12:06:39',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'','','aurore',NULL,NULL,NULL,NULL,1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL),(4,'(PROV4)',1,NULL,NULL,17,NULL,'2020-01-20 11:23:36','2020-01-20 12:23:22',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,195.00000000,0.00000000,0.00000000,0.00000000,195.00000000,NULL,NULL,NULL,NULL,'','','aurore',NULL,NULL,NULL,NULL,1,'EUR',1.00000000,195.00000000,0.00000000,195.00000000,NULL); /*!40000 ALTER TABLE `llx_supplier_proposal` ENABLE KEYS */; UNLOCK TABLES; @@ -11950,7 +12322,7 @@ DROP TABLE IF EXISTS `llx_supplier_proposal_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_supplier_proposal_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -11979,37 +12351,37 @@ CREATE TABLE `llx_supplier_proposaldet` ( `fk_parent_line` int(11) DEFAULT NULL, `fk_product` int(11) DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, + `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_remise_except` int(11) DEFAULT NULL, - `tva_tx` double(6,3) DEFAULT '0.000', + `tva_tx` double(6,3) DEFAULT 0.000, `vat_src_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT '', - `localtax1_tx` double(6,3) DEFAULT '0.000', + `localtax1_tx` double(6,3) DEFAULT 0.000, `localtax1_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `localtax2_tx` double(6,3) DEFAULT '0.000', + `localtax2_tx` double(6,3) DEFAULT 0.000, `localtax2_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `qty` double DEFAULT NULL, - `remise_percent` double DEFAULT '0', - `remise` double DEFAULT '0', + `remise_percent` double DEFAULT 0, + `remise` double DEFAULT 0, `price` double DEFAULT NULL, - `subprice` double(24,8) DEFAULT '0.00000000', - `total_ht` double(24,8) DEFAULT '0.00000000', - `total_tva` double(24,8) DEFAULT '0.00000000', - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT '0.00000000', - `product_type` int(11) DEFAULT '0', - `info_bits` int(11) DEFAULT '0', - `buy_price_ht` double(24,8) DEFAULT '0.00000000', + `subprice` double(24,8) DEFAULT 0.00000000, + `total_ht` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, + `total_localtax1` double(24,8) DEFAULT 0.00000000, + `total_localtax2` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, + `product_type` int(11) DEFAULT 0, + `info_bits` int(11) DEFAULT 0, + `buy_price_ht` double(24,8) DEFAULT 0.00000000, `fk_product_fournisseur_price` int(11) DEFAULT NULL, - `special_code` int(11) DEFAULT '0', - `rang` int(11) DEFAULT '0', + `special_code` int(11) DEFAULT 0, + `rang` int(11) DEFAULT 0, `ref_fourn` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `multicurrency_subprice` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ht` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_tva` double(24,8) DEFAULT '0.00000000', - `multicurrency_total_ttc` double(24,8) DEFAULT '0.00000000', + `multicurrency_subprice` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ht` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_tva` double(24,8) DEFAULT 0.00000000, + `multicurrency_total_ttc` double(24,8) DEFAULT 0.00000000, `fk_unit` int(11) DEFAULT NULL, `date_start` datetime DEFAULT NULL, `date_end` datetime DEFAULT NULL, @@ -12041,7 +12413,7 @@ DROP TABLE IF EXISTS `llx_supplier_proposaldet_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_supplier_proposaldet_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -12066,7 +12438,7 @@ DROP TABLE IF EXISTS `llx_takepos_floor_tables`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_takepos_floor_tables` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `leftpos` float DEFAULT NULL, `toppos` float DEFAULT NULL, @@ -12093,16 +12465,16 @@ DROP TABLE IF EXISTS `llx_ticket`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_ticket` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) DEFAULT '1', + `entity` int(11) DEFAULT 1, `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `track_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL, - `fk_soc` int(11) DEFAULT '0', - `fk_project` int(11) DEFAULT '0', + `fk_soc` int(11) DEFAULT 0, + `fk_project` int(11) DEFAULT 0, `origin_email` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user_create` int(11) DEFAULT NULL, `fk_user_assign` int(11) DEFAULT NULL, `subject` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `message` mediumtext COLLATE utf8_unicode_ci, + `message` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `fk_statut` int(11) DEFAULT NULL, `resolution` int(11) DEFAULT NULL, `progress` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -12114,9 +12486,16 @@ CREATE TABLE `llx_ticket` ( `date_read` datetime DEFAULT NULL, `date_close` datetime DEFAULT NULL, `notify_tiers_at_create` tinyint(4) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_ticket_track_id` (`track_id`) + UNIQUE KEY `uk_ticket_track_id` (`track_id`), + UNIQUE KEY `uk_ticket_ref` (`ref`,`entity`), + KEY `idx_ticket_entity` (`entity`), + KEY `idx_ticket_fk_soc` (`fk_soc`), + KEY `idx_ticket_fk_user_assign` (`fk_user_assign`), + KEY `idx_ticket_fk_project` (`fk_project`), + KEY `idx_ticket_fk_statut` (`fk_statut`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -12126,7 +12505,7 @@ CREATE TABLE `llx_ticket` ( LOCK TABLES `llx_ticket` WRITE; /*!40000 ALTER TABLE `llx_ticket` DISABLE KEYS */; -INSERT INTO `llx_ticket` VALUES (2,1,'TS1909-0001','15ff11cay39skiaa',NULL,6,NULL,12,12,'Increase memory on server','Pleae increase the memory of server to 164GB',3,NULL,'0',NULL,'REQUEST','OTHER','NORMAL','2019-09-26 14:08:46',NULL,NULL,0,'2019-09-26 12:12:21'),(3,1,'TS1909-0002','r5ya6gdi9f39dcjt',1,NULL,NULL,12,14,'Problem with customer','Please recontact customer.
\r\nNeed someone speaking chinese...',0,NULL,'100',NULL,'ISSUE','OTHER','NORMAL','2019-09-26 14:10:31',NULL,'2019-10-04 13:05:55',0,'2019-11-29 08:45:30'),(4,1,'TS1910-0003','fdv9wrzcte7b3c8b',NULL,NULL,NULL,12,NULL,'test','test',2,NULL,'0',NULL,'COM','OTHER','NORMAL','2019-10-04 12:58:04',NULL,NULL,0,'2019-10-04 10:58:07'),(6,1,'TS1911-0004','5gvo9bsjri55zef9',NULL,4,NULL,12,16,'What is the price for Dolibarr ERP CRM ?','I need to use it for 10 users.',3,NULL,'0',NULL,'COM','OTHER','NORMAL','2019-11-29 12:46:29','2019-11-29 12:46:34',NULL,0,'2019-11-29 08:48:00'),(7,1,'TS1911-0005','d51wjy4nym7wltg7',NULL,NULL,'customer@customercompany.com',NULL,16,'What is the price for Dolibarr ERP CRM ?','I need it for 10 people...',8,NULL,'100',NULL,'COM','OTHER','NORMAL','2019-11-29 12:50:45','2019-11-29 12:52:32','2019-11-29 12:55:48',1,'2019-11-29 08:55:48'); +INSERT INTO `llx_ticket` VALUES (2,1,'TS1909-0001','15ff11cay39skiaa',NULL,6,NULL,12,12,'Increase memory on server','Pleae increase the memory of server to 164GB',3,NULL,'0',NULL,'REQUEST','OTHER','NORMAL','2019-09-26 14:08:46',NULL,NULL,0,'2019-09-26 12:12:21',NULL),(3,1,'TS1909-0002','r5ya6gdi9f39dcjt',1,NULL,NULL,12,14,'Problem with customer','Please recontact customer.
\r\nNeed someone speaking chinese...',0,NULL,'100',NULL,'ISSUE','OTHER','NORMAL','2019-09-26 14:10:31',NULL,'2019-10-04 13:05:55',0,'2019-11-29 08:45:30',NULL),(4,1,'TS1910-0003','fdv9wrzcte7b3c8b',NULL,NULL,NULL,12,NULL,'test','test',2,NULL,'0',NULL,'COM','OTHER','NORMAL','2019-10-04 12:58:04',NULL,NULL,0,'2019-10-04 10:58:07',NULL),(6,1,'TS1911-0004','5gvo9bsjri55zef9',NULL,4,NULL,12,16,'What is the price for Dolibarr ERP CRM ?','I need to use it for 10 users.',3,NULL,'0',NULL,'COM','OTHER','NORMAL','2019-11-29 12:46:29','2019-11-29 12:46:34',NULL,0,'2019-11-29 08:48:00',NULL),(7,1,'TS1911-0005','d51wjy4nym7wltg7',NULL,NULL,'customer@customercompany.com',NULL,16,'What is the price for Dolibarr ERP CRM ?','I need it for 10 people...',8,NULL,'100',NULL,'COM','OTHER','NORMAL','2019-11-29 12:50:45','2019-11-29 12:52:32','2019-11-29 12:55:48',1,'2019-11-29 08:55:48',NULL); /*!40000 ALTER TABLE `llx_ticket` ENABLE KEYS */; UNLOCK TABLES; @@ -12139,7 +12518,7 @@ DROP TABLE IF EXISTS `llx_ticket_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_ticket_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `aaa` int(10) DEFAULT NULL, @@ -12166,14 +12545,14 @@ DROP TABLE IF EXISTS `llx_tva`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_tva` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` date DEFAULT NULL, `datep` date DEFAULT NULL, `datev` date DEFAULT NULL, `amount` double(24,8) DEFAULT NULL, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '1', - `note` text COLLATE utf8_unicode_ci, + `entity` int(11) NOT NULL DEFAULT 1, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `fk_bank` int(11) DEFAULT NULL, `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, @@ -12203,16 +12582,16 @@ DROP TABLE IF EXISTS `llx_user`; CREATE TABLE `llx_user` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `login` varchar(50) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `civility` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_ext` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_int` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `employee` smallint(6) DEFAULT '1', - `fk_establishment` int(11) DEFAULT '0', + `employee` smallint(6) DEFAULT 1, + `fk_establishment` int(11) DEFAULT 0, `pass` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `pass_crypted` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `pass_temp` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -12227,21 +12606,21 @@ CREATE TABLE `llx_user` ( `personal_mobile` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `personal_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `socialnetworks` text COLLATE utf8_unicode_ci, - `signature` text COLLATE utf8_unicode_ci, - `admin` smallint(6) DEFAULT '0', + `socialnetworks` text COLLATE utf8_unicode_ci DEFAULT NULL, + `signature` text COLLATE utf8_unicode_ci DEFAULT NULL, + `admin` smallint(6) DEFAULT 0, `webcal_login` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, - `module_comm` smallint(6) DEFAULT '1', - `module_compta` smallint(6) DEFAULT '1', + `module_comm` smallint(6) DEFAULT 1, + `module_compta` smallint(6) DEFAULT 1, `fk_soc` int(11) DEFAULT NULL, `fk_socpeople` int(11) DEFAULT NULL, `fk_member` int(11) DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `datelastlogin` datetime DEFAULT NULL, `datepreviouslogin` datetime DEFAULT NULL, `egroupware_id` int(11) DEFAULT NULL, `ldap_sid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `statut` tinyint(4) DEFAULT '1', + `statut` tinyint(4) DEFAULT 1, `photo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `openid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -12252,19 +12631,19 @@ CREATE TABLE `llx_user` ( `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `zip` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_state` int(11) DEFAULT '0', - `fk_country` int(11) DEFAULT '0', + `fk_state` int(11) DEFAULT 0, + `fk_country` int(11) DEFAULT 0, `color` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `barcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_barcode_type` int(11) DEFAULT '0', - `nb_holiday` int(11) DEFAULT '0', + `fk_barcode_type` int(11) DEFAULT 0, + `nb_holiday` int(11) DEFAULT 0, `salary` double(24,8) DEFAULT NULL, `tjm` double(24,8) DEFAULT NULL, `salaryextra` double(24,8) DEFAULT NULL, `weeklyhours` double(16,8) DEFAULT NULL, `gender` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `dateemployment` datetime DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -12365,12 +12744,12 @@ DROP TABLE IF EXISTS `llx_user_employment`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_user_employment` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_ext` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_user` int(11) DEFAULT NULL, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `job` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -12405,7 +12784,7 @@ DROP TABLE IF EXISTS `llx_user_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_user_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -12431,7 +12810,7 @@ DROP TABLE IF EXISTS `llx_user_param`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_user_param` ( `fk_user` int(11) NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `param` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `value` text COLLATE utf8_unicode_ci NOT NULL, UNIQUE KEY `uk_user_param` (`fk_user`,`param`,`entity`) @@ -12458,9 +12837,9 @@ DROP TABLE IF EXISTS `llx_user_rib`; CREATE TABLE `llx_user_rib` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_user` int(11) NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `label` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `bank` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `code_banque` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -12494,14 +12873,14 @@ DROP TABLE IF EXISTS `llx_user_rights`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_user_rights` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_user` int(11) NOT NULL, `fk_id` int(11) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_user_rights` (`entity`,`fk_user`,`fk_id`), KEY `fk_user_rights_fk_user_user` (`fk_user`), CONSTRAINT `fk_user_rights_fk_user_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=19638 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=19847 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -12510,7 +12889,7 @@ CREATE TABLE `llx_user_rights` ( LOCK TABLES `llx_user_rights` WRITE; /*!40000 ALTER TABLE `llx_user_rights` DISABLE KEYS */; -INSERT INTO `llx_user_rights` VALUES (12402,1,1,11),(12380,1,1,12),(12385,1,1,13),(12389,1,1,14),(12393,1,1,15),(12398,1,1,16),(12404,1,1,19),(9726,1,1,21),(9700,1,1,22),(9706,1,1,24),(9711,1,1,25),(9716,1,1,26),(9722,1,1,27),(9728,1,1,28),(9978,1,1,31),(9968,1,1,32),(9974,1,1,34),(1910,1,1,36),(9980,1,1,38),(11573,1,1,41),(11574,1,1,42),(11575,1,1,44),(11576,1,1,45),(7184,1,1,61),(7181,1,1,62),(7183,1,1,64),(7185,1,1,67),(7186,1,1,68),(1678,1,1,71),(1673,1,1,72),(1675,1,1,74),(1679,1,1,75),(1677,1,1,76),(1681,1,1,78),(1682,1,1,79),(12322,1,1,81),(12309,1,1,82),(12312,1,1,84),(12314,1,1,86),(12317,1,1,87),(12320,1,1,88),(12323,1,1,89),(11580,1,1,91),(11581,1,1,92),(11582,1,1,93),(11583,1,1,94),(10097,1,1,95),(10099,1,1,96),(10103,1,1,97),(10104,1,1,98),(7139,1,1,101),(7134,1,1,102),(7136,1,1,104),(7137,1,1,105),(7138,1,1,106),(7140,1,1,109),(10229,1,1,111),(10201,1,1,112),(10207,1,1,113),(10213,1,1,114),(10219,1,1,115),(10225,1,1,116),(10231,1,1,117),(12518,1,1,121),(12508,1,1,122),(12514,1,1,125),(12520,1,1,126),(11577,1,1,141),(11578,1,1,142),(11579,1,1,144),(2307,1,1,151),(2304,1,1,152),(2306,1,1,153),(2308,1,1,154),(10092,1,1,161),(10093,1,1,162),(10094,1,1,163),(10095,1,1,164),(10096,1,1,165),(1585,1,1,170),(12342,1,1,171),(12331,1,1,172),(12335,1,1,173),(12339,1,1,174),(12343,1,1,178),(10000,1,1,221),(9990,1,1,222),(9996,1,1,223),(10002,1,1,229),(10007,1,1,237),(10011,1,1,238),(10015,1,1,239),(1686,1,1,241),(1685,1,1,242),(1687,1,1,243),(12604,1,1,251),(12566,1,1,252),(12569,1,1,253),(12572,1,1,254),(12575,1,1,255),(12579,1,1,256),(1617,1,1,258),(12525,1,1,262),(12544,1,1,281),(12534,1,1,282),(12540,1,1,283),(12546,1,1,286),(12288,1,1,300),(12290,1,1,301),(11591,1,1,302),(1763,1,1,331),(1762,1,1,332),(1764,1,1,333),(12582,1,1,341),(12584,1,1,342),(12586,1,1,343),(12588,1,1,344),(12600,1,1,351),(12593,1,1,352),(12597,1,1,353),(12601,1,1,354),(12605,1,1,358),(12560,1,1,531),(12553,1,1,532),(12557,1,1,534),(1625,1,1,536),(12561,1,1,538),(12358,1,1,700),(12348,1,1,701),(12354,1,1,702),(12360,1,1,703),(1755,1,1,1001),(1754,1,1,1002),(1756,1,1,1003),(1758,1,1,1004),(1759,1,1,1005),(7146,1,1,1101),(7143,1,1,1102),(7145,1,1,1104),(7147,1,1,1109),(12412,1,1,1181),(12458,1,1,1182),(12417,1,1,1183),(12420,1,1,1184),(12423,1,1,1185),(12427,1,1,1186),(12431,1,1,1187),(12437,1,1,1188),(12434,1,1,1189),(1578,1,1,1201),(1579,1,1,1202),(12454,1,1,1231),(12443,1,1,1232),(12446,1,1,1233),(12449,1,1,1234),(12452,1,1,1235),(12455,1,1,1236),(12459,1,1,1237),(1736,1,1,1251),(12409,1,1,1321),(12326,1,1,1421),(8190,1,1,1791),(8187,1,1,1792),(8191,1,1,1793),(12264,1,1,2401),(12260,1,1,2402),(12266,1,1,2403),(12280,1,1,2411),(12276,1,1,2412),(12282,1,1,2413),(12286,1,1,2414),(1618,1,1,2500),(12370,1,1,2501),(12367,1,1,2503),(12371,1,1,2515),(9610,1,1,5001),(9611,1,1,5002),(12490,1,1,20001),(12468,1,1,20002),(12474,1,1,20003),(12480,1,1,20004),(12486,1,1,20005),(12492,1,1,20006),(12302,1,1,23001),(12295,1,1,23002),(12299,1,1,23003),(12303,1,1,23004),(7701,1,1,50101),(4984,1,1,50401),(4983,1,1,50402),(4985,1,1,50403),(4987,1,1,50411),(4988,1,1,50412),(4989,1,1,50415),(12498,1,1,55001),(12499,1,1,55002),(3564,1,1,100700),(3565,1,1,100701),(9596,1,1,101051),(9598,1,1,101052),(9600,1,1,101053),(9604,1,1,101060),(9605,1,1,101061),(7177,1,1,101201),(7178,1,1,101202),(10353,1,1,101250),(10355,1,1,101251),(8980,1,1,101261),(8981,1,1,101262),(7616,1,1,101331),(10030,1,1,101701),(10031,1,1,101702),(3582,1,1,102000),(3583,1,1,102001),(9819,1,1,400051),(9823,1,1,400052),(9827,1,1,400053),(9831,1,1,400055),(132,1,2,11),(133,1,2,12),(134,1,2,13),(135,1,2,14),(136,1,2,16),(137,1,2,19),(138,1,2,21),(139,1,2,22),(140,1,2,24),(141,1,2,25),(142,1,2,26),(143,1,2,27),(10359,1,2,31),(145,1,2,32),(10361,1,2,34),(146,1,2,36),(147,1,2,41),(148,1,2,42),(149,1,2,44),(150,1,2,61),(151,1,2,62),(152,1,2,64),(153,1,2,71),(154,1,2,72),(155,1,2,74),(156,1,2,75),(157,1,2,78),(158,1,2,79),(159,1,2,81),(160,1,2,82),(161,1,2,84),(162,1,2,86),(163,1,2,87),(164,1,2,88),(165,1,2,89),(166,1,2,91),(167,1,2,92),(168,1,2,93),(2475,1,2,95),(2476,1,2,96),(2477,1,2,97),(2478,1,2,98),(169,1,2,101),(170,1,2,102),(171,1,2,104),(172,1,2,109),(173,1,2,111),(174,1,2,112),(175,1,2,113),(176,1,2,114),(177,1,2,116),(178,1,2,117),(179,1,2,121),(180,1,2,122),(181,1,2,125),(182,1,2,141),(183,1,2,142),(184,1,2,144),(2479,1,2,151),(2480,1,2,152),(2481,1,2,153),(2482,1,2,154),(185,1,2,161),(186,1,2,162),(187,1,2,163),(188,1,2,164),(189,1,2,165),(190,1,2,170),(2471,1,2,171),(192,1,2,172),(2472,1,2,173),(193,1,2,221),(194,1,2,222),(195,1,2,229),(196,1,2,241),(197,1,2,242),(198,1,2,243),(199,1,2,251),(201,1,2,262),(202,1,2,281),(203,1,2,282),(204,1,2,283),(205,1,2,331),(15072,1,2,510),(2483,1,2,531),(207,1,2,532),(2484,1,2,534),(208,1,2,536),(2473,1,2,700),(210,1,2,701),(211,1,2,702),(2474,1,2,703),(15064,1,2,771),(15057,1,2,772),(15059,1,2,773),(15061,1,2,774),(15063,1,2,775),(15065,1,2,776),(212,1,2,1001),(213,1,2,1002),(214,1,2,1003),(215,1,2,1004),(216,1,2,1005),(217,1,2,1101),(218,1,2,1102),(219,1,2,1104),(220,1,2,1109),(15073,1,2,1121),(15074,1,2,1122),(15075,1,2,1123),(15076,1,2,1124),(15077,1,2,1125),(15078,1,2,1126),(221,1,2,1181),(222,1,2,1182),(223,1,2,1183),(224,1,2,1184),(225,1,2,1185),(226,1,2,1186),(227,1,2,1187),(228,1,2,1188),(229,1,2,1201),(230,1,2,1202),(231,1,2,1231),(232,1,2,1232),(233,1,2,1233),(234,1,2,1234),(235,1,2,1421),(236,1,2,2401),(237,1,2,2402),(238,1,2,2403),(239,1,2,2411),(240,1,2,2412),(241,1,2,2413),(242,1,2,2500),(2470,1,2,2501),(243,1,2,2515),(10363,1,2,20001),(10364,1,2,20002),(10365,1,2,20003),(10366,1,2,20004),(10367,1,2,20005),(10368,1,2,20006),(15054,1,2,23001),(10362,1,2,50101),(15067,1,2,55001),(15066,1,2,59001),(15068,1,2,63001),(15069,1,2,63002),(15070,1,2,63003),(15071,1,2,63004),(10372,1,2,101250),(1807,1,3,11),(1808,1,3,31),(1809,1,3,36),(1810,1,3,41),(1811,1,3,61),(1812,1,3,71),(1813,1,3,72),(1814,1,3,74),(1815,1,3,75),(1816,1,3,78),(1817,1,3,79),(1818,1,3,91),(1819,1,3,95),(1820,1,3,97),(1821,1,3,111),(1822,1,3,121),(1823,1,3,122),(1824,1,3,125),(1825,1,3,161),(1826,1,3,170),(1827,1,3,171),(1828,1,3,172),(1829,1,3,221),(1830,1,3,222),(1831,1,3,229),(1832,1,3,241),(1833,1,3,242),(1834,1,3,243),(1835,1,3,251),(1836,1,3,255),(1837,1,3,256),(1838,1,3,262),(1839,1,3,281),(1840,1,3,282),(1841,1,3,283),(1842,1,3,331),(1843,1,3,531),(1844,1,3,536),(1845,1,3,700),(1846,1,3,1001),(1847,1,3,1002),(1848,1,3,1003),(1849,1,3,1004),(1850,1,3,1005),(1851,1,3,1181),(1852,1,3,1182),(1853,1,3,1201),(1854,1,3,1202),(1855,1,3,1231),(1856,1,3,2401),(1857,1,3,2402),(1858,1,3,2403),(1859,1,3,2411),(1860,1,3,2412),(1861,1,3,2413),(1862,1,3,2500),(1863,1,3,2515),(8026,1,4,11),(8027,1,4,21),(8028,1,4,31),(8029,1,4,41),(8030,1,4,61),(8031,1,4,71),(8032,1,4,72),(8033,1,4,74),(8034,1,4,75),(8035,1,4,78),(8036,1,4,79),(8037,1,4,81),(8038,1,4,91),(8039,1,4,95),(8040,1,4,97),(8041,1,4,101),(8042,1,4,111),(8043,1,4,121),(8044,1,4,151),(8045,1,4,161),(8046,1,4,171),(8047,1,4,221),(8048,1,4,222),(8049,1,4,229),(8050,1,4,241),(8051,1,4,242),(8052,1,4,243),(8146,1,4,251),(8147,1,4,253),(8053,1,4,262),(8054,1,4,281),(8055,1,4,331),(8056,1,4,341),(8057,1,4,342),(8058,1,4,343),(8059,1,4,344),(8060,1,4,531),(8061,1,4,700),(8062,1,4,1001),(8063,1,4,1002),(8064,1,4,1003),(8065,1,4,1004),(8066,1,4,1005),(8067,1,4,1101),(8068,1,4,1181),(8069,1,4,1182),(8070,1,4,1201),(8071,1,4,1202),(8072,1,4,1231),(8073,1,4,2401),(8074,1,4,2501),(8075,1,4,2503),(8076,1,4,2515),(8077,1,4,20001),(8078,1,4,50101),(8079,1,4,101201),(8080,1,4,101261),(8081,1,4,102000),(8082,1,4,400051),(8083,1,4,400052),(8084,1,4,400053),(8085,1,4,400055),(12608,1,10,11),(12609,1,10,21),(12610,1,10,31),(12611,1,10,41),(12612,1,10,61),(12613,1,10,71),(12614,1,10,72),(12615,1,10,74),(12616,1,10,75),(12617,1,10,78),(12618,1,10,79),(12619,1,10,81),(12620,1,10,91),(12621,1,10,95),(12622,1,10,97),(12623,1,10,101),(12624,1,10,111),(12625,1,10,121),(12626,1,10,151),(12627,1,10,161),(12628,1,10,171),(12629,1,10,221),(12630,1,10,222),(12631,1,10,229),(12632,1,10,241),(12633,1,10,242),(12634,1,10,243),(12635,1,10,262),(12636,1,10,281),(12637,1,10,300),(12638,1,10,331),(12639,1,10,341),(12640,1,10,342),(12641,1,10,343),(12642,1,10,344),(12643,1,10,531),(12644,1,10,700),(12645,1,10,1001),(12646,1,10,1002),(12647,1,10,1003),(12648,1,10,1004),(12649,1,10,1005),(12650,1,10,1101),(12651,1,10,1181),(12652,1,10,1182),(12653,1,10,1201),(12654,1,10,1202),(12655,1,10,1231),(12656,1,10,2401),(12657,1,10,2501),(12658,1,10,2503),(12659,1,10,2515),(12660,1,10,20001),(12661,1,10,20002),(12662,1,10,23001),(12663,1,10,50101),(12664,1,11,11),(12665,1,11,21),(12666,1,11,31),(12667,1,11,41),(12668,1,11,61),(12669,1,11,71),(12670,1,11,72),(12671,1,11,74),(12672,1,11,75),(12673,1,11,78),(12674,1,11,79),(12675,1,11,81),(12676,1,11,91),(12677,1,11,95),(12678,1,11,97),(12679,1,11,101),(12680,1,11,111),(12681,1,11,121),(12682,1,11,151),(12683,1,11,161),(12684,1,11,171),(12685,1,11,221),(12686,1,11,222),(12687,1,11,229),(12688,1,11,241),(12689,1,11,242),(12690,1,11,243),(12691,1,11,262),(12692,1,11,281),(12693,1,11,300),(12694,1,11,331),(12695,1,11,341),(12696,1,11,342),(12697,1,11,343),(12698,1,11,344),(12699,1,11,531),(12700,1,11,700),(12701,1,11,1001),(12702,1,11,1002),(12703,1,11,1003),(12704,1,11,1004),(12705,1,11,1005),(12706,1,11,1101),(12707,1,11,1181),(12708,1,11,1182),(12709,1,11,1201),(12710,1,11,1202),(12711,1,11,1231),(12712,1,11,2401),(12713,1,11,2501),(12714,1,11,2503),(12715,1,11,2515),(12716,1,11,20001),(12717,1,11,20002),(12718,1,11,23001),(12719,1,11,50101),(19519,1,12,11),(19511,1,12,12),(19512,1,12,13),(19513,1,12,14),(19514,1,12,15),(19517,1,12,16),(19520,1,12,19),(14146,1,12,21),(14135,1,12,22),(14137,1,12,24),(14139,1,12,25),(14142,1,12,26),(14145,1,12,27),(14148,1,12,28),(14930,1,12,31),(14926,1,12,32),(14929,1,12,34),(14932,1,12,38),(13816,1,12,41),(13813,1,12,42),(13815,1,12,44),(13817,1,12,45),(14094,1,12,61),(14091,1,12,62),(14093,1,12,64),(14095,1,12,67),(14096,1,12,68),(16203,1,12,71),(16198,1,12,72),(16200,1,12,74),(16204,1,12,75),(16202,1,12,76),(16206,1,12,78),(16207,1,12,79),(19491,1,12,81),(19485,1,12,82),(19486,1,12,84),(19487,1,12,86),(19489,1,12,87),(19490,1,12,88),(19492,1,12,89),(15401,1,12,91),(15397,1,12,92),(15400,1,12,93),(15403,1,12,94),(13990,1,12,95),(12734,1,12,97),(19241,1,12,101),(19237,1,12,102),(19238,1,12,104),(19239,1,12,105),(19240,1,12,106),(19242,1,12,109),(15390,1,12,111),(15377,1,12,112),(15380,1,12,113),(15383,1,12,114),(15386,1,12,115),(15389,1,12,116),(15392,1,12,117),(19588,1,12,121),(19583,1,12,122),(19586,1,12,125),(19589,1,12,126),(13821,1,12,141),(13820,1,12,142),(13822,1,12,144),(13912,1,12,151),(13909,1,12,152),(13911,1,12,153),(13913,1,12,154),(14063,1,12,161),(14056,1,12,162),(14058,1,12,163),(14060,1,12,164),(14062,1,12,165),(14064,1,12,167),(13350,1,12,171),(13345,1,12,172),(13347,1,12,173),(13349,1,12,174),(13351,1,12,178),(13838,1,12,221),(13834,1,12,222),(13837,1,12,223),(13840,1,12,229),(13842,1,12,237),(13844,1,12,238),(13846,1,12,239),(13516,1,12,241),(13515,1,12,242),(13517,1,12,243),(19629,1,12,251),(19610,1,12,252),(19612,1,12,253),(19613,1,12,254),(19615,1,12,255),(19617,1,12,256),(19590,1,12,262),(19600,1,12,281),(19595,1,12,282),(19598,1,12,283),(19601,1,12,286),(19474,1,12,300),(19475,1,12,301),(16194,1,12,331),(16193,1,12,332),(16195,1,12,333),(19618,1,12,341),(19619,1,12,342),(19620,1,12,343),(19621,1,12,344),(19627,1,12,351),(19624,1,12,352),(19626,1,12,353),(19628,1,12,354),(19630,1,12,358),(19249,1,12,430),(16384,1,12,501),(16378,1,12,502),(13865,1,12,510),(19577,1,12,511),(19574,1,12,512),(19576,1,12,514),(19578,1,12,517),(15291,1,12,520),(15286,1,12,522),(15288,1,12,524),(15290,1,12,525),(15292,1,12,527),(19607,1,12,531),(19604,1,12,532),(19606,1,12,534),(19608,1,12,538),(16932,1,12,650),(16931,1,12,651),(16933,1,12,652),(17124,1,12,660),(17123,1,12,661),(17125,1,12,662),(13358,1,12,700),(19500,1,12,701),(19498,1,12,702),(19501,1,12,703),(15090,1,12,771),(15081,1,12,772),(15083,1,12,773),(15085,1,12,774),(15087,1,12,775),(15089,1,12,776),(15091,1,12,779),(14917,1,12,1001),(14916,1,12,1002),(14918,1,12,1003),(14920,1,12,1004),(14921,1,12,1005),(19247,1,12,1101),(19245,1,12,1102),(19246,1,12,1104),(19248,1,12,1109),(19233,1,12,1121),(19226,1,12,1122),(19228,1,12,1123),(19230,1,12,1124),(19232,1,12,1125),(19234,1,12,1126),(19523,1,12,1181),(19537,1,12,1182),(19526,1,12,1183),(19527,1,12,1184),(19529,1,12,1185),(19531,1,12,1186),(19533,1,12,1187),(19536,1,12,1188),(19534,1,12,1189),(19538,1,12,1191),(13827,1,12,1201),(13828,1,12,1202),(19546,1,12,1231),(19541,1,12,1232),(19542,1,12,1233),(19544,1,12,1234),(19545,1,12,1235),(19547,1,12,1236),(16302,1,12,1237),(13829,1,12,1251),(19521,1,12,1321),(19522,1,12,1322),(19493,1,12,1421),(19463,1,12,2401),(19461,1,12,2402),(19464,1,12,2403),(19471,1,12,2411),(19469,1,12,2412),(19472,1,12,2413),(19473,1,12,2414),(19505,1,12,2501),(19504,1,12,2503),(19506,1,12,2515),(16386,1,12,3200),(15435,1,12,5001),(15436,1,12,5002),(19636,1,12,10001),(19633,1,12,10002),(19635,1,12,10003),(19637,1,12,10005),(19559,1,12,20001),(19550,1,12,20002),(19552,1,12,20003),(19556,1,12,20004),(19558,1,12,20005),(19560,1,12,20006),(19554,1,12,20007),(19481,1,12,23001),(19478,1,12,23002),(19480,1,12,23003),(19482,1,12,23004),(19019,1,12,50101),(16743,1,12,50151),(19445,1,12,50401),(19453,1,12,50411),(19448,1,12,50412),(19450,1,12,50414),(19452,1,12,50415),(19454,1,12,50418),(19455,1,12,50420),(19456,1,12,50430),(19444,1,12,50440),(19562,1,12,55001),(19563,1,12,55002),(16740,1,12,56001),(16737,1,12,56002),(16739,1,12,56003),(16741,1,12,56004),(16742,1,12,56005),(17135,1,12,59001),(17136,1,12,59002),(17137,1,12,59003),(19570,1,12,63001),(19567,1,12,63002),(19569,1,12,63003),(19571,1,12,63004),(19564,1,12,64001),(17328,1,12,101130),(17327,1,12,101131),(17329,1,12,101132),(16009,1,12,101331),(16010,1,12,101332),(16011,1,12,101333),(19208,1,12,101701),(19209,1,12,101702),(12776,1,13,11),(12777,1,13,21),(12778,1,13,31),(12779,1,13,41),(12780,1,13,61),(12781,1,13,71),(12782,1,13,72),(12783,1,13,74),(12784,1,13,75),(12785,1,13,78),(12786,1,13,79),(12787,1,13,81),(12788,1,13,91),(12789,1,13,95),(12790,1,13,97),(12791,1,13,101),(12792,1,13,111),(12793,1,13,121),(12794,1,13,151),(12795,1,13,161),(12796,1,13,171),(12797,1,13,221),(12798,1,13,222),(12799,1,13,229),(12800,1,13,241),(12801,1,13,242),(12802,1,13,243),(12803,1,13,262),(12804,1,13,281),(12805,1,13,300),(12806,1,13,331),(12807,1,13,341),(12808,1,13,342),(12809,1,13,343),(12810,1,13,344),(12811,1,13,531),(12812,1,13,700),(12813,1,13,1001),(12814,1,13,1002),(12815,1,13,1003),(12816,1,13,1004),(12817,1,13,1005),(12818,1,13,1101),(12819,1,13,1181),(12820,1,13,1182),(12821,1,13,1201),(12822,1,13,1202),(12823,1,13,1231),(12824,1,13,2401),(12825,1,13,2501),(12826,1,13,2503),(12827,1,13,2515),(12828,1,13,20001),(12829,1,13,20002),(12830,1,13,23001),(12831,1,13,50101),(12832,1,14,11),(12833,1,14,21),(12834,1,14,31),(12835,1,14,41),(12836,1,14,61),(12837,1,14,71),(12838,1,14,72),(12839,1,14,74),(12840,1,14,75),(12841,1,14,78),(12842,1,14,79),(12843,1,14,81),(12844,1,14,91),(12845,1,14,95),(12846,1,14,97),(12847,1,14,101),(12848,1,14,111),(12849,1,14,121),(12850,1,14,151),(12851,1,14,161),(12852,1,14,171),(12853,1,14,221),(12854,1,14,222),(12855,1,14,229),(12856,1,14,241),(12857,1,14,242),(12858,1,14,243),(12859,1,14,262),(12860,1,14,281),(12861,1,14,300),(12862,1,14,331),(12863,1,14,341),(12864,1,14,342),(12865,1,14,343),(12866,1,14,344),(12867,1,14,531),(12868,1,14,700),(12869,1,14,1001),(12870,1,14,1002),(12871,1,14,1003),(12872,1,14,1004),(12873,1,14,1005),(12874,1,14,1101),(12875,1,14,1181),(12876,1,14,1182),(12877,1,14,1201),(12878,1,14,1202),(12879,1,14,1231),(12880,1,14,2401),(12881,1,14,2501),(12882,1,14,2503),(12883,1,14,2515),(12884,1,14,20001),(12885,1,14,20002),(12886,1,14,23001),(12887,1,14,50101),(12944,1,16,11),(12945,1,16,21),(12946,1,16,31),(13056,1,16,41),(13057,1,16,42),(13058,1,16,44),(13059,1,16,45),(12948,1,16,61),(12949,1,16,71),(12950,1,16,72),(12951,1,16,74),(12952,1,16,75),(12953,1,16,78),(12954,1,16,79),(12955,1,16,81),(12956,1,16,91),(12957,1,16,95),(12958,1,16,97),(12959,1,16,101),(12960,1,16,111),(12961,1,16,121),(13060,1,16,141),(13061,1,16,142),(13062,1,16,144),(12962,1,16,151),(12963,1,16,161),(12964,1,16,171),(12965,1,16,221),(12966,1,16,222),(12967,1,16,229),(12968,1,16,241),(12969,1,16,242),(12970,1,16,243),(13128,1,16,251),(13064,1,16,262),(12972,1,16,281),(12973,1,16,300),(12974,1,16,331),(12975,1,16,341),(12976,1,16,342),(12977,1,16,343),(12978,1,16,344),(12979,1,16,531),(12980,1,16,700),(12981,1,16,1001),(12982,1,16,1002),(12983,1,16,1003),(12984,1,16,1004),(12985,1,16,1005),(12986,1,16,1101),(12987,1,16,1181),(12988,1,16,1182),(12989,1,16,1201),(12990,1,16,1202),(12991,1,16,1231),(12992,1,16,2401),(12993,1,16,2501),(12994,1,16,2503),(12995,1,16,2515),(12996,1,16,20001),(12997,1,16,20002),(12998,1,16,23001),(12999,1,16,50101),(13000,1,17,11),(13001,1,17,21),(13002,1,17,31),(13065,1,17,41),(13066,1,17,42),(13067,1,17,44),(13068,1,17,45),(13004,1,17,61),(13005,1,17,71),(13006,1,17,72),(13007,1,17,74),(13008,1,17,75),(13009,1,17,78),(13010,1,17,79),(13011,1,17,81),(13012,1,17,91),(13013,1,17,95),(13014,1,17,97),(13015,1,17,101),(13016,1,17,111),(13017,1,17,121),(13069,1,17,141),(13070,1,17,142),(13071,1,17,144),(13018,1,17,151),(13019,1,17,161),(13020,1,17,171),(13021,1,17,221),(13022,1,17,222),(13023,1,17,229),(13024,1,17,241),(13025,1,17,242),(13026,1,17,243),(13028,1,17,281),(13029,1,17,300),(13030,1,17,331),(13031,1,17,341),(13032,1,17,342),(13033,1,17,343),(13034,1,17,344),(13035,1,17,531),(13036,1,17,700),(13037,1,17,1001),(13038,1,17,1002),(13039,1,17,1003),(13040,1,17,1004),(13041,1,17,1005),(13042,1,17,1101),(13043,1,17,1181),(13044,1,17,1182),(13045,1,17,1201),(13046,1,17,1202),(13047,1,17,1231),(13048,1,17,2401),(13049,1,17,2501),(13050,1,17,2503),(13051,1,17,2515),(13052,1,17,20001),(13053,1,17,20002),(13054,1,17,23001),(13055,1,17,50101),(14504,1,18,11),(14505,1,18,21),(14506,1,18,31),(14507,1,18,41),(14508,1,18,61),(14509,1,18,71),(14510,1,18,78),(14511,1,18,81),(14512,1,18,91),(14513,1,18,95),(14514,1,18,101),(14515,1,18,111),(14516,1,18,121),(14517,1,18,151),(14518,1,18,161),(14519,1,18,221),(14520,1,18,241),(14521,1,18,262),(14522,1,18,281),(14523,1,18,300),(14524,1,18,331),(14525,1,18,332),(14526,1,18,333),(14527,1,18,341),(14528,1,18,342),(14529,1,18,343),(14530,1,18,344),(14531,1,18,531),(14532,1,18,701),(14533,1,18,771),(14534,1,18,774),(14535,1,18,1001),(14536,1,18,1004),(14537,1,18,1101),(14538,1,18,1181),(14539,1,18,1182),(14540,1,18,1201),(14541,1,18,1231),(14542,1,18,2401),(14543,1,18,2501),(14544,1,18,2503),(14545,1,18,2515),(14546,1,18,20001),(14547,1,18,20002),(14548,1,18,50101),(14549,1,18,59001),(15242,1,19,21),(15243,1,19,31),(15244,1,19,41),(15245,1,19,61),(15246,1,19,71),(15247,1,19,78),(15248,1,19,81),(15249,1,19,101),(15250,1,19,121),(15251,1,19,151),(15252,1,19,161),(15253,1,19,221),(15254,1,19,241),(15255,1,19,262),(15256,1,19,281),(15257,1,19,300),(15258,1,19,331),(15259,1,19,332),(15260,1,19,341),(15261,1,19,342),(15262,1,19,343),(15263,1,19,344),(15264,1,19,531),(15265,1,19,701),(15266,1,19,771),(15267,1,19,774),(15268,1,19,777),(15269,1,19,1001),(15270,1,19,1004),(15271,1,19,1101),(15272,1,19,1121),(15273,1,19,1181),(15274,1,19,1182),(15275,1,19,1201),(15276,1,19,1231),(15277,1,19,2401),(15278,1,19,2501),(15279,1,19,20001),(15280,1,19,20002),(15281,1,19,50101),(15282,1,19,59001),(15283,1,19,63001); +INSERT INTO `llx_user_rights` VALUES (12402,1,1,11),(12380,1,1,12),(12385,1,1,13),(12389,1,1,14),(12393,1,1,15),(12398,1,1,16),(12404,1,1,19),(9726,1,1,21),(9700,1,1,22),(9706,1,1,24),(9711,1,1,25),(9716,1,1,26),(9722,1,1,27),(9728,1,1,28),(9978,1,1,31),(9968,1,1,32),(9974,1,1,34),(1910,1,1,36),(9980,1,1,38),(11573,1,1,41),(11574,1,1,42),(11575,1,1,44),(11576,1,1,45),(7184,1,1,61),(7181,1,1,62),(7183,1,1,64),(7185,1,1,67),(7186,1,1,68),(1678,1,1,71),(1673,1,1,72),(1675,1,1,74),(1679,1,1,75),(1677,1,1,76),(1681,1,1,78),(1682,1,1,79),(12322,1,1,81),(12309,1,1,82),(12312,1,1,84),(12314,1,1,86),(12317,1,1,87),(12320,1,1,88),(12323,1,1,89),(11580,1,1,91),(11581,1,1,92),(11582,1,1,93),(11583,1,1,94),(10097,1,1,95),(10099,1,1,96),(10103,1,1,97),(10104,1,1,98),(7139,1,1,101),(7134,1,1,102),(7136,1,1,104),(7137,1,1,105),(7138,1,1,106),(7140,1,1,109),(10229,1,1,111),(10201,1,1,112),(10207,1,1,113),(10213,1,1,114),(10219,1,1,115),(10225,1,1,116),(10231,1,1,117),(12518,1,1,121),(12508,1,1,122),(12514,1,1,125),(12520,1,1,126),(11577,1,1,141),(11578,1,1,142),(11579,1,1,144),(2307,1,1,151),(2304,1,1,152),(2306,1,1,153),(2308,1,1,154),(10092,1,1,161),(10093,1,1,162),(10094,1,1,163),(10095,1,1,164),(10096,1,1,165),(1585,1,1,170),(12342,1,1,171),(12331,1,1,172),(12335,1,1,173),(12339,1,1,174),(12343,1,1,178),(10000,1,1,221),(9990,1,1,222),(9996,1,1,223),(10002,1,1,229),(10007,1,1,237),(10011,1,1,238),(10015,1,1,239),(1686,1,1,241),(1685,1,1,242),(1687,1,1,243),(12604,1,1,251),(12566,1,1,252),(12569,1,1,253),(12572,1,1,254),(12575,1,1,255),(12579,1,1,256),(1617,1,1,258),(12525,1,1,262),(12544,1,1,281),(12534,1,1,282),(12540,1,1,283),(12546,1,1,286),(12288,1,1,300),(12290,1,1,301),(11591,1,1,302),(1763,1,1,331),(1762,1,1,332),(1764,1,1,333),(12582,1,1,341),(12584,1,1,342),(12586,1,1,343),(12588,1,1,344),(12600,1,1,351),(12593,1,1,352),(12597,1,1,353),(12601,1,1,354),(12605,1,1,358),(12560,1,1,531),(12553,1,1,532),(12557,1,1,534),(1625,1,1,536),(12561,1,1,538),(12358,1,1,700),(12348,1,1,701),(12354,1,1,702),(12360,1,1,703),(1755,1,1,1001),(1754,1,1,1002),(1756,1,1,1003),(1758,1,1,1004),(1759,1,1,1005),(7146,1,1,1101),(7143,1,1,1102),(7145,1,1,1104),(7147,1,1,1109),(12412,1,1,1181),(12458,1,1,1182),(12417,1,1,1183),(12420,1,1,1184),(12423,1,1,1185),(12427,1,1,1186),(12431,1,1,1187),(12437,1,1,1188),(12434,1,1,1189),(1578,1,1,1201),(1579,1,1,1202),(12454,1,1,1231),(12443,1,1,1232),(12446,1,1,1233),(12449,1,1,1234),(12452,1,1,1235),(12455,1,1,1236),(12459,1,1,1237),(1736,1,1,1251),(12409,1,1,1321),(12326,1,1,1421),(8190,1,1,1791),(8187,1,1,1792),(8191,1,1,1793),(12264,1,1,2401),(12260,1,1,2402),(12266,1,1,2403),(12280,1,1,2411),(12276,1,1,2412),(12282,1,1,2413),(12286,1,1,2414),(1618,1,1,2500),(12370,1,1,2501),(12367,1,1,2503),(12371,1,1,2515),(9610,1,1,5001),(9611,1,1,5002),(12490,1,1,20001),(12468,1,1,20002),(12474,1,1,20003),(12480,1,1,20004),(12486,1,1,20005),(12492,1,1,20006),(12302,1,1,23001),(12295,1,1,23002),(12299,1,1,23003),(12303,1,1,23004),(7701,1,1,50101),(4984,1,1,50401),(4983,1,1,50402),(4985,1,1,50403),(4987,1,1,50411),(4988,1,1,50412),(4989,1,1,50415),(12498,1,1,55001),(12499,1,1,55002),(3564,1,1,100700),(3565,1,1,100701),(9596,1,1,101051),(9598,1,1,101052),(9600,1,1,101053),(9604,1,1,101060),(9605,1,1,101061),(7177,1,1,101201),(7178,1,1,101202),(10353,1,1,101250),(10355,1,1,101251),(8980,1,1,101261),(8981,1,1,101262),(7616,1,1,101331),(10030,1,1,101701),(10031,1,1,101702),(3582,1,1,102000),(3583,1,1,102001),(9819,1,1,400051),(9823,1,1,400052),(9827,1,1,400053),(9831,1,1,400055),(132,1,2,11),(133,1,2,12),(134,1,2,13),(135,1,2,14),(136,1,2,16),(137,1,2,19),(138,1,2,21),(139,1,2,22),(140,1,2,24),(141,1,2,25),(142,1,2,26),(143,1,2,27),(10359,1,2,31),(145,1,2,32),(10361,1,2,34),(146,1,2,36),(147,1,2,41),(148,1,2,42),(149,1,2,44),(150,1,2,61),(151,1,2,62),(152,1,2,64),(153,1,2,71),(154,1,2,72),(155,1,2,74),(156,1,2,75),(157,1,2,78),(158,1,2,79),(159,1,2,81),(160,1,2,82),(161,1,2,84),(162,1,2,86),(163,1,2,87),(164,1,2,88),(165,1,2,89),(166,1,2,91),(167,1,2,92),(168,1,2,93),(2475,1,2,95),(2476,1,2,96),(2477,1,2,97),(2478,1,2,98),(169,1,2,101),(170,1,2,102),(171,1,2,104),(172,1,2,109),(173,1,2,111),(174,1,2,112),(175,1,2,113),(176,1,2,114),(177,1,2,116),(178,1,2,117),(179,1,2,121),(180,1,2,122),(181,1,2,125),(182,1,2,141),(183,1,2,142),(184,1,2,144),(2479,1,2,151),(2480,1,2,152),(2481,1,2,153),(2482,1,2,154),(185,1,2,161),(186,1,2,162),(187,1,2,163),(188,1,2,164),(189,1,2,165),(190,1,2,170),(2471,1,2,171),(192,1,2,172),(2472,1,2,173),(193,1,2,221),(194,1,2,222),(195,1,2,229),(196,1,2,241),(197,1,2,242),(198,1,2,243),(199,1,2,251),(201,1,2,262),(202,1,2,281),(203,1,2,282),(204,1,2,283),(205,1,2,331),(15072,1,2,510),(2483,1,2,531),(207,1,2,532),(2484,1,2,534),(208,1,2,536),(2473,1,2,700),(210,1,2,701),(211,1,2,702),(2474,1,2,703),(15064,1,2,771),(15057,1,2,772),(15059,1,2,773),(15061,1,2,774),(15063,1,2,775),(15065,1,2,776),(212,1,2,1001),(213,1,2,1002),(214,1,2,1003),(215,1,2,1004),(216,1,2,1005),(217,1,2,1101),(218,1,2,1102),(219,1,2,1104),(220,1,2,1109),(15073,1,2,1121),(15074,1,2,1122),(15075,1,2,1123),(15076,1,2,1124),(15077,1,2,1125),(15078,1,2,1126),(221,1,2,1181),(222,1,2,1182),(223,1,2,1183),(224,1,2,1184),(225,1,2,1185),(226,1,2,1186),(227,1,2,1187),(228,1,2,1188),(229,1,2,1201),(230,1,2,1202),(231,1,2,1231),(232,1,2,1232),(233,1,2,1233),(234,1,2,1234),(235,1,2,1421),(236,1,2,2401),(237,1,2,2402),(238,1,2,2403),(239,1,2,2411),(240,1,2,2412),(241,1,2,2413),(242,1,2,2500),(2470,1,2,2501),(243,1,2,2515),(10363,1,2,20001),(10364,1,2,20002),(10365,1,2,20003),(10366,1,2,20004),(10367,1,2,20005),(10368,1,2,20006),(15054,1,2,23001),(10362,1,2,50101),(15067,1,2,55001),(15066,1,2,59001),(15068,1,2,63001),(15069,1,2,63002),(15070,1,2,63003),(15071,1,2,63004),(10372,1,2,101250),(1807,1,3,11),(1808,1,3,31),(1809,1,3,36),(1810,1,3,41),(1811,1,3,61),(1812,1,3,71),(1813,1,3,72),(1814,1,3,74),(1815,1,3,75),(1816,1,3,78),(1817,1,3,79),(1818,1,3,91),(1819,1,3,95),(1820,1,3,97),(1821,1,3,111),(1822,1,3,121),(1823,1,3,122),(1824,1,3,125),(1825,1,3,161),(1826,1,3,170),(1827,1,3,171),(1828,1,3,172),(1829,1,3,221),(1830,1,3,222),(1831,1,3,229),(1832,1,3,241),(1833,1,3,242),(1834,1,3,243),(1835,1,3,251),(1836,1,3,255),(1837,1,3,256),(1838,1,3,262),(1839,1,3,281),(1840,1,3,282),(1841,1,3,283),(1842,1,3,331),(1843,1,3,531),(1844,1,3,536),(1845,1,3,700),(1846,1,3,1001),(1847,1,3,1002),(1848,1,3,1003),(1849,1,3,1004),(1850,1,3,1005),(1851,1,3,1181),(1852,1,3,1182),(1853,1,3,1201),(1854,1,3,1202),(1855,1,3,1231),(1856,1,3,2401),(1857,1,3,2402),(1858,1,3,2403),(1859,1,3,2411),(1860,1,3,2412),(1861,1,3,2413),(1862,1,3,2500),(1863,1,3,2515),(8026,1,4,11),(8027,1,4,21),(8028,1,4,31),(8029,1,4,41),(8030,1,4,61),(8031,1,4,71),(8032,1,4,72),(8033,1,4,74),(8034,1,4,75),(8035,1,4,78),(8036,1,4,79),(8037,1,4,81),(8038,1,4,91),(8039,1,4,95),(8040,1,4,97),(8041,1,4,101),(8042,1,4,111),(8043,1,4,121),(8044,1,4,151),(8045,1,4,161),(8046,1,4,171),(8047,1,4,221),(8048,1,4,222),(8049,1,4,229),(8050,1,4,241),(8051,1,4,242),(8052,1,4,243),(8146,1,4,251),(8147,1,4,253),(8053,1,4,262),(8054,1,4,281),(8055,1,4,331),(8056,1,4,341),(8057,1,4,342),(8058,1,4,343),(8059,1,4,344),(8060,1,4,531),(8061,1,4,700),(8062,1,4,1001),(8063,1,4,1002),(8064,1,4,1003),(8065,1,4,1004),(8066,1,4,1005),(8067,1,4,1101),(8068,1,4,1181),(8069,1,4,1182),(8070,1,4,1201),(8071,1,4,1202),(8072,1,4,1231),(8073,1,4,2401),(8074,1,4,2501),(8075,1,4,2503),(8076,1,4,2515),(8077,1,4,20001),(8078,1,4,50101),(8079,1,4,101201),(8080,1,4,101261),(8081,1,4,102000),(8082,1,4,400051),(8083,1,4,400052),(8084,1,4,400053),(8085,1,4,400055),(12608,1,10,11),(12609,1,10,21),(12610,1,10,31),(12611,1,10,41),(12612,1,10,61),(12613,1,10,71),(12614,1,10,72),(12615,1,10,74),(12616,1,10,75),(12617,1,10,78),(12618,1,10,79),(12619,1,10,81),(12620,1,10,91),(12621,1,10,95),(12622,1,10,97),(12623,1,10,101),(12624,1,10,111),(12625,1,10,121),(12626,1,10,151),(12627,1,10,161),(12628,1,10,171),(12629,1,10,221),(12630,1,10,222),(12631,1,10,229),(12632,1,10,241),(12633,1,10,242),(12634,1,10,243),(12635,1,10,262),(12636,1,10,281),(12637,1,10,300),(12638,1,10,331),(12639,1,10,341),(12640,1,10,342),(12641,1,10,343),(12642,1,10,344),(12643,1,10,531),(12644,1,10,700),(12645,1,10,1001),(12646,1,10,1002),(12647,1,10,1003),(12648,1,10,1004),(12649,1,10,1005),(12650,1,10,1101),(12651,1,10,1181),(12652,1,10,1182),(12653,1,10,1201),(12654,1,10,1202),(12655,1,10,1231),(12656,1,10,2401),(12657,1,10,2501),(12658,1,10,2503),(12659,1,10,2515),(12660,1,10,20001),(12661,1,10,20002),(12662,1,10,23001),(12663,1,10,50101),(12664,1,11,11),(12665,1,11,21),(12666,1,11,31),(12667,1,11,41),(12668,1,11,61),(12669,1,11,71),(12670,1,11,72),(12671,1,11,74),(12672,1,11,75),(12673,1,11,78),(12674,1,11,79),(12675,1,11,81),(12676,1,11,91),(12677,1,11,95),(12678,1,11,97),(12679,1,11,101),(12680,1,11,111),(12681,1,11,121),(12682,1,11,151),(12683,1,11,161),(12684,1,11,171),(12685,1,11,221),(12686,1,11,222),(12687,1,11,229),(12688,1,11,241),(12689,1,11,242),(12690,1,11,243),(12691,1,11,262),(12692,1,11,281),(12693,1,11,300),(12694,1,11,331),(12695,1,11,341),(12696,1,11,342),(12697,1,11,343),(12698,1,11,344),(12699,1,11,531),(12700,1,11,700),(12701,1,11,1001),(12702,1,11,1002),(12703,1,11,1003),(12704,1,11,1004),(12705,1,11,1005),(12706,1,11,1101),(12707,1,11,1181),(12708,1,11,1182),(12709,1,11,1201),(12710,1,11,1202),(12711,1,11,1231),(12712,1,11,2401),(12713,1,11,2501),(12714,1,11,2503),(12715,1,11,2515),(12716,1,11,20001),(12717,1,11,20002),(12718,1,11,23001),(12719,1,11,50101),(19727,1,12,11),(19719,1,12,12),(19720,1,12,13),(19721,1,12,14),(19722,1,12,15),(19725,1,12,16),(19728,1,12,19),(14146,1,12,21),(14135,1,12,22),(14137,1,12,24),(14139,1,12,25),(14142,1,12,26),(14145,1,12,27),(14148,1,12,28),(14930,1,12,31),(14926,1,12,32),(14929,1,12,34),(14932,1,12,38),(13816,1,12,41),(13813,1,12,42),(13815,1,12,44),(13817,1,12,45),(14094,1,12,61),(14091,1,12,62),(14093,1,12,64),(14095,1,12,67),(14096,1,12,68),(16203,1,12,71),(16198,1,12,72),(16200,1,12,74),(16204,1,12,75),(16202,1,12,76),(16206,1,12,78),(16207,1,12,79),(19684,1,12,81),(19679,1,12,82),(19680,1,12,84),(19681,1,12,86),(19682,1,12,87),(19683,1,12,88),(19685,1,12,89),(15401,1,12,91),(15397,1,12,92),(15400,1,12,93),(15403,1,12,94),(13990,1,12,95),(12734,1,12,97),(19241,1,12,101),(19237,1,12,102),(19238,1,12,104),(19239,1,12,105),(19240,1,12,106),(19242,1,12,109),(15390,1,12,111),(15377,1,12,112),(15380,1,12,113),(15383,1,12,114),(15386,1,12,115),(15389,1,12,116),(15392,1,12,117),(19796,1,12,121),(19791,1,12,122),(19794,1,12,125),(19797,1,12,126),(13821,1,12,141),(13820,1,12,142),(13822,1,12,144),(13912,1,12,151),(13909,1,12,152),(13911,1,12,153),(13913,1,12,154),(14063,1,12,161),(14056,1,12,162),(14058,1,12,163),(14060,1,12,164),(14062,1,12,165),(14064,1,12,167),(13350,1,12,171),(13345,1,12,172),(13347,1,12,173),(13349,1,12,174),(13351,1,12,178),(13838,1,12,221),(13834,1,12,222),(13837,1,12,223),(13840,1,12,229),(13842,1,12,237),(13844,1,12,238),(13846,1,12,239),(13516,1,12,241),(13515,1,12,242),(13517,1,12,243),(19838,1,12,251),(19819,1,12,252),(19821,1,12,253),(19822,1,12,254),(19824,1,12,255),(19826,1,12,256),(19798,1,12,262),(19808,1,12,281),(19803,1,12,282),(19806,1,12,283),(19809,1,12,286),(19668,1,12,300),(19669,1,12,301),(16194,1,12,331),(16193,1,12,332),(16195,1,12,333),(19827,1,12,341),(19828,1,12,342),(19829,1,12,343),(19830,1,12,344),(19836,1,12,351),(19833,1,12,352),(19835,1,12,353),(19837,1,12,354),(19839,1,12,358),(19249,1,12,430),(16384,1,12,501),(16378,1,12,502),(13865,1,12,510),(19785,1,12,511),(19782,1,12,512),(19784,1,12,514),(19786,1,12,517),(15291,1,12,520),(15286,1,12,522),(15288,1,12,524),(15290,1,12,525),(15292,1,12,527),(19815,1,12,531),(19812,1,12,532),(19814,1,12,534),(19816,1,12,538),(16932,1,12,650),(16931,1,12,651),(16933,1,12,652),(17124,1,12,660),(17123,1,12,661),(17125,1,12,662),(13358,1,12,700),(19693,1,12,701),(19691,1,12,702),(19694,1,12,703),(19713,1,12,771),(19702,1,12,772),(19704,1,12,773),(15085,1,12,774),(19706,1,12,775),(19708,1,12,776),(19710,1,12,777),(19712,1,12,778),(19714,1,12,779),(14917,1,12,1001),(14916,1,12,1002),(14918,1,12,1003),(14920,1,12,1004),(14921,1,12,1005),(19247,1,12,1101),(19245,1,12,1102),(19246,1,12,1104),(19248,1,12,1109),(19233,1,12,1121),(19226,1,12,1122),(19228,1,12,1123),(19230,1,12,1124),(19232,1,12,1125),(19234,1,12,1126),(19731,1,12,1181),(19745,1,12,1182),(19734,1,12,1183),(19735,1,12,1184),(19737,1,12,1185),(19739,1,12,1186),(19741,1,12,1187),(19744,1,12,1188),(19742,1,12,1189),(19746,1,12,1191),(13827,1,12,1201),(13828,1,12,1202),(19754,1,12,1231),(19749,1,12,1232),(19750,1,12,1233),(19752,1,12,1234),(19753,1,12,1235),(19755,1,12,1236),(16302,1,12,1237),(13829,1,12,1251),(19729,1,12,1321),(19730,1,12,1322),(19686,1,12,1421),(19657,1,12,2401),(19655,1,12,2402),(19658,1,12,2403),(19665,1,12,2411),(19663,1,12,2412),(19666,1,12,2413),(19667,1,12,2414),(19698,1,12,2501),(19697,1,12,2503),(19699,1,12,2515),(16386,1,12,3200),(15435,1,12,5001),(15436,1,12,5002),(19845,1,12,10001),(19842,1,12,10002),(19844,1,12,10003),(19846,1,12,10005),(19767,1,12,20001),(19758,1,12,20002),(19760,1,12,20003),(19764,1,12,20004),(19766,1,12,20005),(19768,1,12,20006),(19762,1,12,20007),(19675,1,12,23001),(19672,1,12,23002),(19674,1,12,23003),(19676,1,12,23004),(19019,1,12,50101),(19817,1,12,50151),(19639,1,12,50401),(19647,1,12,50411),(19642,1,12,50412),(19644,1,12,50414),(19646,1,12,50415),(19648,1,12,50418),(19649,1,12,50420),(19650,1,12,50430),(19638,1,12,50440),(19770,1,12,55001),(19771,1,12,55002),(16740,1,12,56001),(16737,1,12,56002),(16739,1,12,56003),(16741,1,12,56004),(16742,1,12,56005),(17135,1,12,59001),(17136,1,12,59002),(17137,1,12,59003),(19778,1,12,63001),(19775,1,12,63002),(19777,1,12,63003),(19779,1,12,63004),(19772,1,12,64001),(17328,1,12,101130),(17327,1,12,101131),(17329,1,12,101132),(16009,1,12,101331),(16010,1,12,101332),(16011,1,12,101333),(19208,1,12,101701),(19209,1,12,101702),(12776,1,13,11),(12777,1,13,21),(12778,1,13,31),(12779,1,13,41),(12780,1,13,61),(12781,1,13,71),(12782,1,13,72),(12783,1,13,74),(12784,1,13,75),(12785,1,13,78),(12786,1,13,79),(12787,1,13,81),(12788,1,13,91),(12789,1,13,95),(12790,1,13,97),(12791,1,13,101),(12792,1,13,111),(12793,1,13,121),(12794,1,13,151),(12795,1,13,161),(12796,1,13,171),(12797,1,13,221),(12798,1,13,222),(12799,1,13,229),(12800,1,13,241),(12801,1,13,242),(12802,1,13,243),(12803,1,13,262),(12804,1,13,281),(12805,1,13,300),(12806,1,13,331),(12807,1,13,341),(12808,1,13,342),(12809,1,13,343),(12810,1,13,344),(12811,1,13,531),(12812,1,13,700),(12813,1,13,1001),(12814,1,13,1002),(12815,1,13,1003),(12816,1,13,1004),(12817,1,13,1005),(12818,1,13,1101),(12819,1,13,1181),(12820,1,13,1182),(12821,1,13,1201),(12822,1,13,1202),(12823,1,13,1231),(12824,1,13,2401),(12825,1,13,2501),(12826,1,13,2503),(12827,1,13,2515),(12828,1,13,20001),(12829,1,13,20002),(12830,1,13,23001),(12831,1,13,50101),(12832,1,14,11),(12833,1,14,21),(12834,1,14,31),(12835,1,14,41),(12836,1,14,61),(12837,1,14,71),(12838,1,14,72),(12839,1,14,74),(12840,1,14,75),(12841,1,14,78),(12842,1,14,79),(12843,1,14,81),(12844,1,14,91),(12845,1,14,95),(12846,1,14,97),(12847,1,14,101),(12848,1,14,111),(12849,1,14,121),(12850,1,14,151),(12851,1,14,161),(12852,1,14,171),(12853,1,14,221),(12854,1,14,222),(12855,1,14,229),(12856,1,14,241),(12857,1,14,242),(12858,1,14,243),(12859,1,14,262),(12860,1,14,281),(12861,1,14,300),(12862,1,14,331),(12863,1,14,341),(12864,1,14,342),(12865,1,14,343),(12866,1,14,344),(12867,1,14,531),(12868,1,14,700),(12869,1,14,1001),(12870,1,14,1002),(12871,1,14,1003),(12872,1,14,1004),(12873,1,14,1005),(12874,1,14,1101),(12875,1,14,1181),(12876,1,14,1182),(12877,1,14,1201),(12878,1,14,1202),(12879,1,14,1231),(12880,1,14,2401),(12881,1,14,2501),(12882,1,14,2503),(12883,1,14,2515),(12884,1,14,20001),(12885,1,14,20002),(12886,1,14,23001),(12887,1,14,50101),(12944,1,16,11),(12945,1,16,21),(12946,1,16,31),(13056,1,16,41),(13057,1,16,42),(13058,1,16,44),(13059,1,16,45),(12948,1,16,61),(12949,1,16,71),(12950,1,16,72),(12951,1,16,74),(12952,1,16,75),(12953,1,16,78),(12954,1,16,79),(12955,1,16,81),(12956,1,16,91),(12957,1,16,95),(12958,1,16,97),(12959,1,16,101),(12960,1,16,111),(12961,1,16,121),(13060,1,16,141),(13061,1,16,142),(13062,1,16,144),(12962,1,16,151),(12963,1,16,161),(12964,1,16,171),(12965,1,16,221),(12966,1,16,222),(12967,1,16,229),(12968,1,16,241),(12969,1,16,242),(12970,1,16,243),(13128,1,16,251),(13064,1,16,262),(12972,1,16,281),(12973,1,16,300),(12974,1,16,331),(12975,1,16,341),(12976,1,16,342),(12977,1,16,343),(12978,1,16,344),(12979,1,16,531),(12980,1,16,700),(12981,1,16,1001),(12982,1,16,1002),(12983,1,16,1003),(12984,1,16,1004),(12985,1,16,1005),(12986,1,16,1101),(12987,1,16,1181),(12988,1,16,1182),(12989,1,16,1201),(12990,1,16,1202),(12991,1,16,1231),(12992,1,16,2401),(12993,1,16,2501),(12994,1,16,2503),(12995,1,16,2515),(12996,1,16,20001),(12997,1,16,20002),(12998,1,16,23001),(12999,1,16,50101),(13000,1,17,11),(13001,1,17,21),(13002,1,17,31),(13065,1,17,41),(13066,1,17,42),(13067,1,17,44),(13068,1,17,45),(13004,1,17,61),(13005,1,17,71),(13006,1,17,72),(13007,1,17,74),(13008,1,17,75),(13009,1,17,78),(13010,1,17,79),(13011,1,17,81),(13012,1,17,91),(13013,1,17,95),(13014,1,17,97),(13015,1,17,101),(13016,1,17,111),(13017,1,17,121),(13069,1,17,141),(13070,1,17,142),(13071,1,17,144),(13018,1,17,151),(13019,1,17,161),(13020,1,17,171),(13021,1,17,221),(13022,1,17,222),(13023,1,17,229),(13024,1,17,241),(13025,1,17,242),(13026,1,17,243),(13028,1,17,281),(13029,1,17,300),(13030,1,17,331),(13031,1,17,341),(13032,1,17,342),(13033,1,17,343),(13034,1,17,344),(13035,1,17,531),(13036,1,17,700),(13037,1,17,1001),(13038,1,17,1002),(13039,1,17,1003),(13040,1,17,1004),(13041,1,17,1005),(13042,1,17,1101),(13043,1,17,1181),(13044,1,17,1182),(13045,1,17,1201),(13046,1,17,1202),(13047,1,17,1231),(13048,1,17,2401),(13049,1,17,2501),(13050,1,17,2503),(13051,1,17,2515),(13052,1,17,20001),(13053,1,17,20002),(13054,1,17,23001),(13055,1,17,50101),(14504,1,18,11),(14505,1,18,21),(14506,1,18,31),(14507,1,18,41),(14508,1,18,61),(14509,1,18,71),(14510,1,18,78),(14511,1,18,81),(14512,1,18,91),(14513,1,18,95),(14514,1,18,101),(14515,1,18,111),(14516,1,18,121),(14517,1,18,151),(14518,1,18,161),(14519,1,18,221),(14520,1,18,241),(14521,1,18,262),(14522,1,18,281),(14523,1,18,300),(14524,1,18,331),(14525,1,18,332),(14526,1,18,333),(14527,1,18,341),(14528,1,18,342),(14529,1,18,343),(14530,1,18,344),(14531,1,18,531),(14532,1,18,701),(14533,1,18,771),(14534,1,18,774),(14535,1,18,1001),(14536,1,18,1004),(14537,1,18,1101),(14538,1,18,1181),(14539,1,18,1182),(14540,1,18,1201),(14541,1,18,1231),(14542,1,18,2401),(14543,1,18,2501),(14544,1,18,2503),(14545,1,18,2515),(14546,1,18,20001),(14547,1,18,20002),(14548,1,18,50101),(14549,1,18,59001),(15242,1,19,21),(15243,1,19,31),(15244,1,19,41),(15245,1,19,61),(15246,1,19,71),(15247,1,19,78),(15248,1,19,81),(15249,1,19,101),(15250,1,19,121),(15251,1,19,151),(15252,1,19,161),(15253,1,19,221),(15254,1,19,241),(15255,1,19,262),(15256,1,19,281),(15257,1,19,300),(15258,1,19,331),(15259,1,19,332),(15260,1,19,341),(15261,1,19,342),(15262,1,19,343),(15263,1,19,344),(15264,1,19,531),(15265,1,19,701),(15266,1,19,771),(15267,1,19,774),(15268,1,19,777),(15269,1,19,1001),(15270,1,19,1004),(15271,1,19,1101),(15272,1,19,1121),(15273,1,19,1181),(15274,1,19,1182),(15275,1,19,1201),(15276,1,19,1231),(15277,1,19,2401),(15278,1,19,2501),(15279,1,19,20001),(15280,1,19,20002),(15281,1,19,50101),(15282,1,19,59001),(15283,1,19,63001); /*!40000 ALTER TABLE `llx_user_rights` ENABLE KEYS */; UNLOCK TABLES; @@ -12524,10 +12903,10 @@ DROP TABLE IF EXISTS `llx_usergroup`; CREATE TABLE `llx_usergroup` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `nom` varchar(255) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `note` text COLLATE utf8_unicode_ci, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_usergroup_name` (`nom`,`entity`) @@ -12553,7 +12932,7 @@ DROP TABLE IF EXISTS `llx_usergroup_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_usergroup_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -12579,7 +12958,7 @@ DROP TABLE IF EXISTS `llx_usergroup_rights`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_usergroup_rights` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_usergroup` int(11) NOT NULL, `fk_id` int(11) NOT NULL, PRIMARY KEY (`rowid`), @@ -12608,7 +12987,7 @@ DROP TABLE IF EXISTS `llx_usergroup_user`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_usergroup_user` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_user` int(11) NOT NULL, `fk_usergroup` int(11) NOT NULL, PRIMARY KEY (`rowid`), @@ -12639,17 +13018,17 @@ DROP TABLE IF EXISTS `llx_webmail_draft`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_webmail_draft` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', - `fk_user` int(11) NOT NULL DEFAULT '0', - `fk_contact` int(11) NOT NULL DEFAULT '0', - `size` int(11) NOT NULL DEFAULT '0', + `entity` int(11) NOT NULL DEFAULT 1, + `fk_user` int(11) NOT NULL DEFAULT 0, + `fk_contact` int(11) NOT NULL DEFAULT 0, + `size` int(11) NOT NULL DEFAULT 0, `subject` mediumtext COLLATE utf8_unicode_ci NOT NULL, `body` longtext COLLATE utf8_unicode_ci NOT NULL, `from` mediumtext COLLATE utf8_unicode_ci NOT NULL, `to` mediumtext COLLATE utf8_unicode_ci NOT NULL, `cc` mediumtext COLLATE utf8_unicode_ci NOT NULL, `bcc` mediumtext COLLATE utf8_unicode_ci NOT NULL, - `files` int(11) NOT NULL DEFAULT '0', + `files` int(11) NOT NULL DEFAULT 0, `cron` datetime DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_webmail_draft_fk_user` (`fk_user`), @@ -12675,12 +13054,12 @@ DROP TABLE IF EXISTS `llx_webmail_files`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_webmail_files` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_mail` int(11) NOT NULL DEFAULT '0', - `fk_user` int(11) NOT NULL DEFAULT '0', + `fk_mail` int(11) NOT NULL DEFAULT 0, + `fk_user` int(11) NOT NULL DEFAULT 0, `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `file_name` mediumtext COLLATE utf8_unicode_ci NOT NULL, `file` mediumtext COLLATE utf8_unicode_ci NOT NULL, - `file_size` int(11) NOT NULL DEFAULT '0', + `file_size` int(11) NOT NULL DEFAULT 0, `file_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `search` longtext COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`), @@ -12707,34 +13086,34 @@ DROP TABLE IF EXISTS `llx_webmail_mail`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_webmail_mail` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', - `fk_user` int(11) NOT NULL DEFAULT '0', - `fk_soc` int(11) NOT NULL DEFAULT '0', - `fk_contact` int(11) NOT NULL DEFAULT '0', + `entity` int(11) NOT NULL DEFAULT 1, + `fk_user` int(11) NOT NULL DEFAULT 0, + `fk_soc` int(11) NOT NULL DEFAULT 0, + `fk_contact` int(11) NOT NULL DEFAULT 0, `uidl` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `size` int(11) NOT NULL DEFAULT '0', + `size` int(11) NOT NULL DEFAULT 0, `subject` mediumtext COLLATE utf8_unicode_ci NOT NULL, `body` longtext COLLATE utf8_unicode_ci NOT NULL, - `state_new` int(11) NOT NULL DEFAULT '0', - `state_reply` int(11) NOT NULL DEFAULT '0', - `state_forward` int(11) NOT NULL DEFAULT '0', - `state_wait` int(11) NOT NULL DEFAULT '0', - `state_spam` int(11) NOT NULL DEFAULT '0', - `id_correo` int(11) NOT NULL DEFAULT '0', - `is_outbox` int(11) NOT NULL DEFAULT '0', - `state_sent` int(11) NOT NULL DEFAULT '0', + `state_new` int(11) NOT NULL DEFAULT 0, + `state_reply` int(11) NOT NULL DEFAULT 0, + `state_forward` int(11) NOT NULL DEFAULT 0, + `state_wait` int(11) NOT NULL DEFAULT 0, + `state_spam` int(11) NOT NULL DEFAULT 0, + `id_correo` int(11) NOT NULL DEFAULT 0, + `is_outbox` int(11) NOT NULL DEFAULT 0, + `state_sent` int(11) NOT NULL DEFAULT 0, `state_error` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', - `state_crt` int(11) NOT NULL DEFAULT '0', - `state_archiv` int(11) NOT NULL DEFAULT '0', - `priority` int(11) NOT NULL DEFAULT '0', - `sensitivity` int(11) NOT NULL DEFAULT '0', + `state_crt` int(11) NOT NULL DEFAULT 0, + `state_archiv` int(11) NOT NULL DEFAULT 0, + `priority` int(11) NOT NULL DEFAULT 0, + `sensitivity` int(11) NOT NULL DEFAULT 0, `from` mediumtext COLLATE utf8_unicode_ci NOT NULL, `to` mediumtext COLLATE utf8_unicode_ci NOT NULL, `cc` mediumtext COLLATE utf8_unicode_ci NOT NULL, `bcc` mediumtext COLLATE utf8_unicode_ci NOT NULL, - `files` int(11) NOT NULL DEFAULT '0', - `state_delete` int(11) NOT NULL DEFAULT '0', + `files` int(11) NOT NULL DEFAULT 0, + `state_delete` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), KEY `idx_webmail_mail_nospam` (`fk_user`,`state_spam`), KEY `idx_webmail_mail_count` (`fk_user`,`state_new`), @@ -12762,12 +13141,12 @@ DROP TABLE IF EXISTS `llx_webmail_users`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_webmail_users` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `fk_user` int(11) NOT NULL, `login` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `password` mediumtext COLLATE utf8_unicode_ci NOT NULL, - `safemail` tinyint(4) DEFAULT '1', - `dayssafe` int(11) DEFAULT '10', + `safemail` tinyint(4) DEFAULT 1, + `dayssafe` int(11) DEFAULT 10, PRIMARY KEY (`rowid`), KEY `fk_webmail_users_fk_user` (`fk_user`), CONSTRAINT `fk_webmail_users_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) @@ -12816,7 +13195,7 @@ DROP TABLE IF EXISTS `llx_website`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_website` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `ref` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) DEFAULT NULL, @@ -12824,13 +13203,15 @@ CREATE TABLE `llx_website` ( `virtualhost` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_creation` datetime DEFAULT NULL, `date_modification` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `maincolor` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `maincolorbis` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `use_manifest` int(11) DEFAULT NULL, + `lang` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, + `otherlang` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_website_ref` (`ref`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -12842,7 +13223,7 @@ CREATE TABLE `llx_website` ( LOCK TABLES `llx_website` WRITE; /*!40000 ALTER TABLE `llx_website` DISABLE KEYS */; -INSERT INTO `llx_website` VALUES (2,1,'mywebsite','My web site',1,4,'','2019-10-08 20:55:48',NULL,'2019-11-28 12:02:46',12,NULL,NULL,NULL,NULL,NULL),(3,1,'mypersonalsite','My personal web site',1,11,NULL,'2019-10-08 20:57:59',NULL,'2020-01-09 15:59:24',12,12,NULL,NULL,NULL,0); +INSERT INTO `llx_website` VALUES (2,1,'mywebsite','My web site',1,4,'','2019-10-08 20:55:48',NULL,'2019-11-28 12:02:46',12,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,1,'mypersonalsite','My personal web site',1,11,NULL,'2019-10-08 20:57:59',NULL,'2020-01-09 15:59:24',12,12,NULL,NULL,NULL,0,NULL,NULL); /*!40000 ALTER TABLE `llx_website` ENABLE KEYS */; UNLOCK TABLES; @@ -12855,7 +13236,7 @@ DROP TABLE IF EXISTS `llx_website_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_website_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -12887,20 +13268,21 @@ CREATE TABLE `llx_website_page` ( `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `keywords` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `content` mediumtext COLLATE utf8_unicode_ci, - `status` int(11) DEFAULT '1', + `content` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, + `status` int(11) DEFAULT 1, `date_creation` datetime DEFAULT NULL, `date_modification` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `type_container` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'page', `lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_page` int(11) DEFAULT NULL, `grabbed_from` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `htmlheader` mediumtext COLLATE utf8_unicode_ci, + `htmlheader` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `author_alias` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_website_page_url` (`fk_website`,`pageurl`), CONSTRAINT `fk_website_page_website` FOREIGN KEY (`fk_website`) REFERENCES `llx_website` (`rowid`) @@ -12913,7 +13295,6 @@ CREATE TABLE `llx_website_page` ( LOCK TABLES `llx_website_page` WRITE; /*!40000 ALTER TABLE `llx_website_page` DISABLE KEYS */; -INSERT INTO `llx_website_page` VALUES (1,3,'blog','','Blog','Blog','blog','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
The latest news...\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n

\n
\n\n

\n\n \n\n
\n',1,'2019-08-15 00:03:30',NULL,'2020-01-17 12:35:30',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(2,3,'blog-our-company-is-now-on-dolibarr','','Our company is now on Dolibarr ERP CRM','Our company has moved on Dolibarr ERP CRM. This is an important step in improving all of our services.','','\n\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
title; ?>\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n


\n Like several thousands of companies, our company (name ?>) has moved all its information system to Dolibarr ERP CRM. More than 20 applications have been replaced by only one, easier to use and fully integrated.\n This is an important step in improving all of our services.\n \n


\n \n
\n \n

\n
Screenshot of our new Open Source solution
\n
\n \n \n \n





\n
\n\n\n\n\n\n',1,'2019-08-15 00:03:30',NULL,'2020-01-17 12:40:39',NULL,NULL,'blogpost','en_US',NULL,'','',NULL,'image/mypersonalsite/background_dolibarr.jpg'),(3,3,'blog-our-new-web-site-has-been-launched','','Our new web site has been launched','Our new website, based on Dolibarr CMS, has been launched. Modern and directly integrated with the internal management tools of the company, many new online services for our customers will be able to see the day...','','\n\n
\n
\n
\n
\n
\n
\n
\n
\n
title; ?>\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n





\n\n\n Our new website, based on Dolibarr CMS, has been launched.
\n Now it is modern and directly integrated with the internal management tools of the company. Many new online services will be available for our customers...\n\n \n


\n \n
\n \n

\n
Theme of our new web site
\n
\n \n\n





\n
\n\n\n\n\n\n\n',1,'2019-08-15 00:03:30',NULL,'2020-01-17 12:42:55',NULL,NULL,'blogpost','en_US',NULL,'','',NULL,'image/template-corporate/background_rough-horn.jpg'),(4,3,'careers','','Careers','Our job opportunities','career','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Job opportunities\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n
\n
\n
\nThere is no job opportunities for the moment...
\n
\n
\n
\n
\n
\n
\n\n\n

\n\n \n\n
\n \n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:24:41',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(5,3,'carriere','','Carrière','Nos opportunités professionnelles','career','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Offres d\'emploi\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n
\n
\n
\nNous n\'avons pas d\'offres d\'emploi ouvertes en ce moment...
\n
\n
\n
\n
\n
\n
\n\n\n

\n\n \n\n
\n \n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:24:57',NULL,NULL,'page','fr_FR',NULL,'','',NULL,''),(6,3,'clients-testimonials','','Clients Testimonials','Client Testimonials','testimonials, use cases, success story','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Testimonials\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n

\n

What they say about us

\n



\n Send us your testimonial (by email to email; ?>\">email; ?>)\n



\n

\n
\n\n

\n\n \n\n
\n \n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:25:18',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(7,3,'contact','','Contact','Privacy Policies','Contact','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Contact\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n

Contact us:



\n email ?>
\n getFullAddress() ?>
\n
\n
\n\n\n \n
\n
\n \n
\n\n


\n\n \n\n
\n \n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:25:38',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(8,3,'faq','','FAQ','Frequently Asked Questions','faq','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
FAQs\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n


Frequently Asked Questions

\n
\n
\n
\n

How can I contact you ?


\nYou can contact us by using this page.\n
\n
\n
\n

What is your privacy policy ?


\nYou may find information about our privacy policy on this page.\n\n\n



\n\n
\n
\n\n\n

\n\n \n\n
\n \n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:25:51',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(9,3,'footer','','Footer','Footer','','\n
\n\n \n \n \n\n
\n\n\n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:28:20',NULL,NULL,'other','en_US',NULL,'','',NULL,''),(10,3,'header','','Header and Top Menu','Header with menu','','\n\n\n\n
\n
\n
\n \n
\n
\n
\n',1,'2019-08-15 00:03:30',NULL,'2020-01-17 11:40:26',NULL,NULL,'other','en_US',NULL,'','',NULL,''),(11,3,'home','','Home','Welcome','','
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
Boost your business\n
\n
\n

We provide powerful solutions for all businesses

\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
 Best prices on the market \n
\n
\n

Our optimized processes allows us to provide you very competitive prices

\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n

Our sales representative are also technicians.

\n
\n
\n
\n
\n
\n \n
\n

Take a look at our offers...

\n
\n
\n
\n
\n
\n \n
\n

Our customer-supplier relationship is very appreciated by our customers

\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n

We continue to follow and assist you after the sale. Contact us at any time.

\n
\n
\n
\n
\n
\n\n\n \n
\n
\n

Looking for

\n

a high quality service?

\n

With a lot of experience, hiring us is a security for your business!

\n
\n
\n
11
\n
Years of Experience
\n
\n
\n
\n query($sql); $obj = $db->fetch_object($resql); print $obj->nb; ?>\n
\n
Experts
\n
\n
\n
\n query($sql); $obj = $db->fetch_object($resql); print $obj->nb; ?>\n
\n
Trusted Clients
\n
\n
\n
\n \n
\n
\n
\n\n \n \n \n
\n
\n
\n \n
\n \n
\n \n
\n

our plans

\n\n \n
\n \n
\n
\n
\n
FREE
\n
The best choice for personal use
\n
The service 1 for free
\n
\n 0/ month\n
\n
\n Available features are : \n
    \n
  • \n \n Service 1 \n
  • \n
\n
\n
\n Subcribe\n
\n
\n
\n \n \n \n
\n
\n
\n
STARTER
\n
For small companiess
\n
The service 1 and product 1 at low price
\n
\n 29/ month\n
\n
\n Available features are : \n
    \n
  • \n \n Service 1\n
  • \n
  • \n \n Product 1\n
  • \n
\n
\n
\n Subscribe\n
\n
\n
\n \n \n \n
\n
\n
\n
PREMIUM
\n
For large companies
\n
The full option package for a one shot price\n
\n
\n 2499\n
\n
\n Available features are :\n
    \n
  • \n \n Service 1
  • \n
  • \n \n Service 2
  • \n
  • \n \n Product 1
  • \n
\n
\n
\n Buy\n
\n
\n
\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n
\n \n \n \n
\n
\n

our team

\n
\n
\n \n
\n
\n
\n
\n\n\n \n
\n
\n
\n
\n
\n

Request a callback

\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n

successful cases

\n
\n
\n
\n
\n
\"\"\n
\n
\n
\n
\"\"\n
\n
\n
\n
\"\"\n
\n
\n
\n
\"\"\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n Albert Einstein\n
\n
Scientist, www.emc2.org
\n
\n
\n
\n
\n
-20%
\n
Expenses
\n
\n
\n
\n
\n
\n
\n \n They did everything, with almost no time or effort for me. The best part was that I could trust their team to represent our company professionally with our clients.\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n Pierre Curie\n
\n
CEO “Cyclonic”
\n
\n
\n
\n
\n
-30%
\n
Expenses
\n
\n
\n
\n
\n
\n
\n \n Their course gave me the confidence to implement new techniques in my work. I learn “how” to write – “what” and “why” also became much clearer.\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n Marie Curie\n
\n
CTO \"Cyclonic\"
\n
\n
\n
\n
\n
+22%
\n
Turnover
\n
\n
\n
\n
\n
\n
\n \n We were skeptical to work with a consultant to optimize our sales emails, but they were highly recommended by many other startups we knew. They helped us to reach our objective of 20% turnover increase, in 4 monthes.\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n John Doe\n
\n
Sale representative
\n
\n
\n
\n
\n
+40%
\n
Quotes
\n
\n
\n
\n
\n
\n
\n \n Their work on our website and Internet marketing has made a significant different to our business. We’ve seen a +40% increase in quote requests from our website.\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n\n \n
\n
\n

Latest News

\n \n
\n
\n\n\n \n\n\n
\n',1,'2019-08-15 00:03:30',NULL,'2020-01-17 12:35:43',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(12,3,'our-team','','Our team','Our team','team','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Our team\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n

\n

The crew...




\n query($sql);\n if (! $resql) dol_print_error($db);\n while ($obj = $db->fetch_object($resql))\n {\n $arrayofusers[]=$obj->rowid;\n }\n \n print \'
\';\n foreach($arrayofusers as $id)\n {\n $fuser->fetch($id);\n\n print \'
\';\n print \'
\';\n print \'
\';\n if ($fuser->photo) print Form::showphoto(\'userphoto\', $fuser, 100, 0, 0, \'photowithmargin\', \'\', 0);\n //print \'photo.\'\" width=\"129\" height=\"129\" alt=\"\">\';\n else print \'\"\"\';\n print \'
\';\n print \'
\';\n print \'
\'.$fuser->firstname.\'
\';\n print \'
    \';\n //print \'
  • September 24, 2018
  • \';\n if ($fuser->job) print \'
  • \'.$fuser->job.\'
  • \';\n else print \'
  • \';\n print \'
\';\n print \'
\';\n print \'
\';\n print \'
\';\n }\n print \'
\';\n\n ?>\n
\n
\n\n

\n\n \n\n
\n \n',1,'2019-08-15 00:03:30',NULL,'2020-01-10 22:50:50',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(13,3,'partners','','Partners','Partners','partners','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Partners\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n

Our partners...

\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n

\n\n \n\n
\n \n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:29:51',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(14,3,'pricing','','Pricing','All the prices of our offers','pricing','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Our plans\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n\n\n \n
\n
\n
\n \n
\n \n
\n \n
\n\n \n
\n \n
\n
\n
\n
FREE
\n
The best choice for personal use
\n
The service 1 for free
\n
\n 0/ month\n
\n
\n Available features are : \n
    \n
  • \n \n Service 1 \n
  • \n
\n
\n
\n Subcribe\n
\n
\n
\n \n \n \n
\n
\n
\n
STARTER
\n
For small companiess
\n
The service 1 and product 1 at low price
\n
\n 29/ month\n
\n
\n Available features are : \n
    \n
  • \n \n Service 1\n
  • \n
  • \n \n Product 1\n
  • \n
\n
\n
\n Subscribe\n
\n
\n
\n \n \n \n
\n
\n
\n
PREMIUM
\n
For large companies
\n
The full option package for a one shot price\n
\n
\n 2499\n
\n
\n Available features are :\n
    \n
  • \n \n Service 1
  • \n
  • \n \n Service 2
  • \n
  • \n \n Product 1
  • \n
\n
\n
\n Buy\n
\n
\n
\n \n
\n \n
\n \n
\n \n
\n \n \n
\n
\n
\n \n \n \n

\n\n \n\n
\n \n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:26:54',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(15,3,'privacy-policies','','Privacy Policies','Privacy Policies','Privacy policies, GDPR','
\n \n \n \n\n\n
\n
\n
\n
\n
\n
\n
\n
\n
Privacy Policy\n
\n
\n
\n
\n
\n
\n
\n
\n\n


\n\n
\n
\n

Information collected and used


\n

* Your customer information (email, phone, business name, first and last name of contact, address, postal code, country and VAT number) are stored when you become a customer. This information allows us to bill you. \n

* If you paid using our online service, we also store the last 4 digits of your card. The full details of your credit card is stored by our payment provider Stripe (the world leader in online payment).

\n

* You have the option to request the deletion of your data and the above information at any time (except data required y fiscal tracking rules, like your invoices).

\n

* The Privacy Policies and GDPR referral contact for our services is: global->MAIN_INFO_GDPR; ?>

\n


\n

Data Storage and Backups


\n

* The storage of collected data (see \'Information collected and used\') is done in a database.

\n

* We made one backup every week. Only 4 weeks are kept.

\n


\n

Subcontractor


\n

* Our services relies on the following subcontractors and service:
\n** The host of computer servers, which is ABC company. These servers are hosted in US. No customer information is communicated to this subcontractor who only provides the hardware and network layer, the installation and operation being carried out by us directly.
\n** The online payment service Stripe, which is used, to ensure regular payment of subscription or your invoices paid online.

\n


\n

Software Protection


\n

* Our services runs on Linux Ubuntu systems and software. They benefit from regular security updates when the operating system editor (Ubuntu Canonical) publishes them.

\n

* Our services are accessible in HTTPS (HTTP encrypted) only, encrypted with SHA256 certificates.

\n

* Our technical platform are protected by various solutions.

\n


\n

Data theft


\n

* In case of suspicion of a theft of the data we have collected (see first point \'Information collected and used\'), customers will be informed by email, at email corresponding to their customer account

\n

 

\n
\n
\n\n\n \n \n \n
\n \n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:27:09',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(16,3,'product-p','','Product P','Product P','','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Product P\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n
\n
\n
\nThis is a description page of our product P...
\n
\n
\n
\n
\n
\n
\n\n\n

\n\n \n\n
\n \n\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:27:20',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(17,3,'search','','Search Page','Search Page','','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Search\n
\n
\n
\n
\n
\n
\n
\n
\n\n


\n\n
\n \n
\n
\n
\n \">\n
\n
\n \n
\n
\n
\n \n load(\"main\");\n \n if (function_exists(\'getPagesFromSearchCriterias\'))\n {\n if (GETPOSTISSET(\'s\'))\n {\n $listofpages = getPagesFromSearchCriterias(\'page\', \'meta\', GETPOST(\'s\', \'none\'));\n if ($listofpages[\'code\'] == \'OK\')\n {\n foreach($listofpages[\'list\'] as $websitepagefound)\n {\n print \'
ref.\'.php\">\'.$websitepagefound->title.\' - \'.$websitepagefound->description.\'
\';\n }\n }\n else\n {\n // If error, show message\n print $listofpages[\'message\'];\n }\n }\n }\n else\n {\n print $weblangs->trans(\"FeatureNotYetAvailable\");\n }\n ?>\n \n





\n
\n\n \n\n
\n',1,'2019-08-15 00:03:30',NULL,'2020-01-17 12:17:47',NULL,NULL,'page','fr_FR',NULL,'','',NULL,''),(18,3,'service-s','','Service S','Service S','','
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
Service S\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n
\n
\n
\n
\n
\nThis is a description page of our service S...
\n
\n
\n
\n
\n
\n
\n\n\n

\n\n \n\n
\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:27:45',NULL,NULL,'page','en_US',NULL,'','',NULL,''),(19,3,'test','','test','Page test','test','Test\n',1,'2019-08-15 00:03:30',NULL,'2019-08-14 22:03:30',NULL,NULL,'page','en_US',NULL,'','',NULL,''); /*!40000 ALTER TABLE `llx_website_page` ENABLE KEYS */; UNLOCK TABLES; @@ -12930,7 +13311,7 @@ CREATE TABLE `llx_websiteaccount` ( `password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_soc` int(11) DEFAULT NULL, `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) NOT NULL, `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -12962,7 +13343,7 @@ DROP TABLE IF EXISTS `llx_websiteaccount_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_websiteaccount_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -12986,26 +13367,26 @@ DROP TABLE IF EXISTS `llx_workstation`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_workstation` ( - `rowid` int(11) NOT NULL DEFAULT '0', + `rowid` int(11) NOT NULL DEFAULT 0, `date_cre` datetime DEFAULT NULL, `date_maj` datetime DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT '0', - `fk_usergroup` int(11) NOT NULL DEFAULT '0', + `entity` int(11) NOT NULL DEFAULT 0, + `fk_usergroup` int(11) NOT NULL DEFAULT 0, `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `background` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `nb_hour_prepare` double NOT NULL DEFAULT '0', - `nb_hour_manufacture` double NOT NULL DEFAULT '0', - `nb_hour_capacity` double NOT NULL DEFAULT '0', - `nb_ressource` double NOT NULL DEFAULT '0', - `thm` double NOT NULL DEFAULT '0', - `thm_machine` double NOT NULL DEFAULT '0', - `thm_overtime` double NOT NULL DEFAULT '0', - `thm_night` double NOT NULL DEFAULT '0', - `nb_hour_before` double NOT NULL DEFAULT '0', - `nb_hour_after` double NOT NULL DEFAULT '0', - `is_parallele` int(11) NOT NULL DEFAULT '0', + `nb_hour_prepare` double NOT NULL DEFAULT 0, + `nb_hour_manufacture` double NOT NULL DEFAULT 0, + `nb_hour_capacity` double NOT NULL DEFAULT 0, + `nb_ressource` double NOT NULL DEFAULT 0, + `thm` double NOT NULL DEFAULT 0, + `thm_machine` double NOT NULL DEFAULT 0, + `thm_overtime` double NOT NULL DEFAULT 0, + `thm_night` double NOT NULL DEFAULT 0, + `nb_hour_before` double NOT NULL DEFAULT 0, + `nb_hour_after` double NOT NULL DEFAULT 0, + `is_parallele` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), KEY `date_cre` (`date_cre`), KEY `date_maj` (`date_maj`), @@ -13032,15 +13413,15 @@ DROP TABLE IF EXISTS `llx_workstation_product`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_workstation_product` ( - `rowid` int(11) NOT NULL DEFAULT '0', + `rowid` int(11) NOT NULL DEFAULT 0, `date_cre` datetime DEFAULT NULL, `date_maj` datetime DEFAULT NULL, - `fk_product` int(11) NOT NULL DEFAULT '0', - `fk_workstation` int(11) NOT NULL DEFAULT '0', - `nb_hour` double NOT NULL DEFAULT '0', - `rang` double NOT NULL DEFAULT '0', - `nb_hour_prepare` double NOT NULL DEFAULT '0', - `nb_hour_manufacture` double NOT NULL DEFAULT '0', + `fk_product` int(11) NOT NULL DEFAULT 0, + `fk_workstation` int(11) NOT NULL DEFAULT 0, + `nb_hour` double NOT NULL DEFAULT 0, + `rang` double NOT NULL DEFAULT 0, + `nb_hour_prepare` double NOT NULL DEFAULT 0, + `nb_hour_manufacture` double NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), KEY `date_cre` (`date_cre`), KEY `date_maj` (`date_maj`), @@ -13066,15 +13447,15 @@ DROP TABLE IF EXISTS `llx_workstation_schedule`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_workstation_schedule` ( - `rowid` int(11) NOT NULL DEFAULT '0', + `rowid` int(11) NOT NULL DEFAULT 0, `date_cre` datetime DEFAULT NULL, `date_maj` datetime DEFAULT NULL, - `fk_workstation` int(11) NOT NULL DEFAULT '0', + `fk_workstation` int(11) NOT NULL DEFAULT 0, `day_moment` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `week_day` int(11) NOT NULL DEFAULT '0', - `nb_ressource` int(11) NOT NULL DEFAULT '0', + `week_day` int(11) NOT NULL DEFAULT 0, + `nb_ressource` int(11) NOT NULL DEFAULT 0, `date_off` datetime DEFAULT NULL, - `nb_hour_capacity` double NOT NULL DEFAULT '0', + `nb_hour_capacity` double NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), KEY `date_cre` (`date_cre`), KEY `date_maj` (`date_maj`), @@ -13101,7 +13482,7 @@ DROP TABLE IF EXISTS `llx_zapier_hook`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_zapier_hook` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `event` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `module` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -13109,7 +13490,7 @@ CREATE TABLE `llx_zapier_hook` ( `status` int(11) DEFAULT NULL, `date_creation` datetime NOT NULL, `fk_user` int(11) NOT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -13133,7 +13514,7 @@ DROP TABLE IF EXISTS `llx_zapier_hook_extrafields`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_zapier_hook_extrafields` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) @@ -13160,7 +13541,7 @@ CREATE TABLE `tmp_links` ( `objectid` int(11) NOT NULL, `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `max_rowid` int(11) DEFAULT NULL, - `count_rowid` bigint(21) NOT NULL DEFAULT '0' + `count_rowid` bigint(21) NOT NULL DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -13182,18 +13563,18 @@ DROP TABLE IF EXISTS `tmp_user`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tmp_user` ( - `rowid` int(11) NOT NULL DEFAULT '0', + `rowid` int(11) NOT NULL DEFAULT 0, `datec` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_creat` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `login` varchar(50) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT '1', + `entity` int(11) NOT NULL DEFAULT 1, `civility` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_ext` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `ref_int` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `employee` smallint(6) DEFAULT '1', - `fk_establishment` int(11) DEFAULT '0', + `employee` smallint(6) DEFAULT 1, + `fk_establishment` int(11) DEFAULT 0, `pass` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `pass_crypted` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `pass_temp` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -13208,21 +13589,21 @@ CREATE TABLE `tmp_user` ( `personal_mobile` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `personal_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `socialnetworks` text COLLATE utf8_unicode_ci, - `signature` text COLLATE utf8_unicode_ci, - `admin` smallint(6) DEFAULT '0', + `socialnetworks` text COLLATE utf8_unicode_ci DEFAULT NULL, + `signature` text COLLATE utf8_unicode_ci DEFAULT NULL, + `admin` smallint(6) DEFAULT 0, `webcal_login` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, - `module_comm` smallint(6) DEFAULT '1', - `module_compta` smallint(6) DEFAULT '1', + `module_comm` smallint(6) DEFAULT 1, + `module_compta` smallint(6) DEFAULT 1, `fk_soc` int(11) DEFAULT NULL, `fk_socpeople` int(11) DEFAULT NULL, `fk_member` int(11) DEFAULT NULL, - `note` text COLLATE utf8_unicode_ci, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, `datelastlogin` datetime DEFAULT NULL, `datepreviouslogin` datetime DEFAULT NULL, `egroupware_id` int(11) DEFAULT NULL, `ldap_sid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `statut` tinyint(4) DEFAULT '1', + `statut` tinyint(4) DEFAULT 1, `photo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `lang` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `openid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -13233,19 +13614,19 @@ CREATE TABLE `tmp_user` ( `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `zip` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL, `town` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_state` int(11) DEFAULT '0', - `fk_country` int(11) DEFAULT '0', + `fk_state` int(11) DEFAULT 0, + `fk_country` int(11) DEFAULT 0, `color` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, `accountancy_code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `barcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_barcode_type` int(11) DEFAULT '0', - `nb_holiday` int(11) DEFAULT '0', + `fk_barcode_type` int(11) DEFAULT 0, + `nb_holiday` int(11) DEFAULT 0, `salary` double(24,8) DEFAULT NULL, `tjm` double(24,8) DEFAULT NULL, `salaryextra` double(24,8) DEFAULT NULL, `weeklyhours` double(16,8) DEFAULT NULL, `gender` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8_unicode_ci, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `dateemployment` datetime DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -13287,4 +13668,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2020-01-21 11:32:00 +-- Dump completed on 2020-06-12 19:29:55 diff --git a/dev/initdemo/sftpget_and_loaddump.php b/dev/initdemo/sftpget_and_loaddump.php index 5b16d3afe9b..4da5ffaad58 100755 --- a/dev/initdemo/sftpget_and_loaddump.php +++ b/dev/initdemo/sftpget_and_loaddump.php @@ -95,8 +95,7 @@ if ($connection) dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password), LOG_ERR); exit(-5); } - else - { + else { //$stream = ssh2_exec($connection, '/usr/bin/php -i'); /* print "Generate dump ".$filesys1.'.bz2'."\n"; @@ -125,14 +124,13 @@ if ($connection) $return_var=0; print strftime("%Y%m%d-%H%M%S").' '.$fullcommand."\n"; exec($fullcommand, $output, $return_var); - foreach($output as $line) print $line."\n"; + foreach ($output as $line) print $line."\n"; //ssh2_sftp_unlink($sftp, $fileinstalllock); //print $output; } } -else -{ +else { print 'Failed to connect to ssh2 to '.$server; exit(-6); } diff --git a/dev/initdemo/updatedemo.php b/dev/initdemo/updatedemo.php index 0cc43a18a9d..5da0d4a2498 100755 --- a/dev/initdemo/updatedemo.php +++ b/dev/initdemo/updatedemo.php @@ -72,8 +72,8 @@ $tables=array( 'bank'=>array(0=>'datev', 1=>'dateo'), 'commande_fournisseur'=>array(0=>'date_commande', 1=>'date_valid', 3=>'date_creation', 4=>'date_approve', 5=>'date_approve2', 6=>'date_livraison'), 'supplier_proposal'=>array(0=>'datec', 1=>'date_valid', 2=>'date_cloture'), - 'expense_report'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 4=>'date_approve', 5=>'date_refuse', 6=>'date_cancel'), - 'leave'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 5=>'date_refuse', 6=>'date_cancel') + 'expensereport'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 4=>'date_approve', 5=>'date_refuse', 6=>'date_cancel'), + 'holiday'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 5=>'date_refuse', 6=>'date_cancel') ); $year=2010; @@ -87,7 +87,7 @@ while ($year <= $currentyear) if ($delta1) { - foreach($tables as $tablekey => $tableval) + foreach ($tables as $tablekey => $tableval) { print "Correct ".$tablekey." for year ".$year." and move them to current year ".$currentyear." "; $sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)"; @@ -105,7 +105,7 @@ while ($year <= $currentyear) print "."; $sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set "; $j=0; - foreach($tableval as $field) + foreach ($tableval as $field) { if ($j) $sql2.=", "; $sql2.= $field." = ".$db->ifsql("DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR) > NOW()", "DATE_ADD(".$field.", INTERVAL ".$delta2." YEAR)", "DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR)"); diff --git a/dev/resources/sepa/sample-credit-transfer.xml b/dev/resources/sepa/sample-credit-transfer.xml new file mode 100644 index 00000000000..087fd2f57d7 --- /dev/null +++ b/dev/resources/sepa/sample-credit-transfer.xml @@ -0,0 +1,172 @@ + + + + + message-id-001 + 2010-09-28T14:07:00 + 1 + 10.1 + + Bedrijfsnaam + + + + 123456789123456 + + + + + + + minimaal gevuld + TRF + 1 + 10.1 + 2009-11-01 + + Naam + + + + NL44RABO0123456789 + + + + + RABONL2U + + + + + non ref + + + 10.1 + + SLEV + + + ABNANL2A + + + + Naam creditor + + + + NL90ABNA0111111111 + + + + vrije tekst + + + + + maximaal gevuld + TRF + true + 1 + 20.2 + + NORM + + SEPA + + + IDEAL + + + SECU + + + 2009-11-01 + + Naam + + NL + Debtor straat 1 + 9999 XX Plaats debtor + + + + + NL44RABO0123456789 + + + + + RABONL2U + + + + + + + 12345678 + + klantnummer + + klantnummer uitgifte instantie + + + + + SLEV + + + debtor-to-debtor-bank-01 + End-to-end-id-debtor-to-creditor-01 + + + 20.2 + + + + ABNANL2A + + + + Naam creditor + + NL + Straat creditor 1 + 9999 XX Plaats creditor + + + + + NL90ABNA0111111111 + + + + + + + 1969-07-03 + PLAATS + NL + + + + + + CHAR + + + + + + + SCOR + + CUR + + 1234567 + + + + + + + diff --git a/dev/resources/sepa/test.xml b/dev/resources/sepa/sample-direct-debit.xml similarity index 100% rename from dev/resources/sepa/test.xml rename to dev/resources/sepa/sample-direct-debit.xml diff --git a/dev/resources/sepa/text.txt b/dev/resources/sepa/text.txt index e6c05276be2..dbcfeded5a4 100644 --- a/dev/resources/sepa/text.txt +++ b/dev/resources/sepa/text.txt @@ -1,2 +1,8 @@ +Spec for credit transfer: +https://docs.oracle.com/cd/E39124_01/doc.91/e60210/fields_sepa_pay_file_appx.htm#EOAEL00515 + +To validate a SEPA file: +xmllint --schema pain.001.001.03.xsd T200801.xml --noout + To test a SEPA file: https://www.mesfluxdepaiement.fr/testez-vos-fichiers-sepa diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index e726df6db7c..03104270dcf 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -27,7 +27,7 @@ - + @@ -101,7 +101,7 @@ - --> + --> 0 @@ -117,7 +117,7 @@ --> - + @@ -188,8 +188,8 @@ - @@ -213,6 +213,10 @@ + + + + @@ -309,16 +313,16 @@ 0 - + 0 - + 0 - + 0 @@ -332,7 +336,7 @@ 0 - + 0 @@ -385,7 +389,7 @@ - + 0 @@ -426,5 +430,5 @@ - + diff --git a/dev/tools/dolibarr-postgres2mysql.php b/dev/tools/dolibarr-postgres2mysql.php index f2794455ca3..c17a73dfe12 100644 --- a/dev/tools/dolibarr-postgres2mysql.php +++ b/dev/tools/dolibarr-postgres2mysql.php @@ -76,14 +76,12 @@ function getfieldname($l) if (preg_match("/`(.*)`/", $l, $regs)) { if ($regs[1]) return $regs[1]; - else - return null; + else return null; } // if its not in quotes, then it should (we hope!) be the first "word" on the line, up to the first space. elseif (preg_match("/([^\ ]*)/", trim($l), $regs)) { if ($regs[1]) return $regs[1]; - else - return null; + else return null; } } @@ -102,8 +100,7 @@ function formatsize($s) return sprintf("%.1f", round($s / 1024, 1)) . "K"; elseif ($s < pow(2, 30)) return sprintf("%.1f", round($s / 1024 / 1024, 1)) . "M"; - else - return sprintf("%.1f", round($s / 1024 / 1024 / 1024, 1)) . "G"; + else return sprintf("%.1f", round($s / 1024 / 1024 / 1024, 1)) . "G"; } /** @@ -146,8 +143,7 @@ function pg2mysql_large($infilename, $outfilename) if ($c % 2 != 0) { if ($inquotes) $inquotes = false; - else - $inquotes = true; + else $inquotes = true; } if ($linenum % 10000 == 0) { @@ -329,8 +325,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) $num = $regs[1]; if ($num <= 255) $line = preg_replace("/ character varying\([0-9]*\)/", " varchar($num)", $line); - else - $line = preg_replace("/ character varying\([0-9]*\)/", " text", $line); + else $line = preg_replace("/ character varying\([0-9]*\)/", " text", $line); } // character varying with no size, we will default to varchar(255) if (preg_match("/ character varying/", $line)) { @@ -352,8 +347,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) $num = $regs[1]; if ($num <= 255) $line = preg_replace("/ character\([0-9]*\)/", " varchar($num)", $line); - else - $line = preg_replace("/ character\([0-9]*\)/", " text", $line); + else $line = preg_replace("/ character\([0-9]*\)/", " text", $line); } // timestamps $line = str_replace(" timestamp with time zone", " datetime", $line); @@ -465,8 +459,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) if ($c % 2 != 0) { if ($inquotes) $inquotes = false; - else - $inquotes = true; + else $inquotes = true; // echo "inquotes=$inquotes\n"; } } while (substr($lines[$linenumber], - 3, - 1) != ");" || $inquotes); diff --git a/dev/tools/test/testperf.php b/dev/tools/test/testperf.php new file mode 100755 index 00000000000..f49e8a4ca0d --- /dev/null +++ b/dev/tools/test/testperf.php @@ -0,0 +1,21 @@ +getTranslationFilesArray($this->_refLang); $counter = 1; - foreach($files as $file) + foreach ($files as $file) { if ($this->_limittofile && $this->_limittofile != $file) continue; $counter++; @@ -94,7 +94,7 @@ class autoTranslator // If we must process all languages $arraytmp=dol_dir_list($this->_langDir, 'directories', 0); - foreach($arraytmp as $dirtmp) + foreach ($arraytmp as $dirtmp) { if ($dirtmp['name'] === $this->_refLang) continue; // We discard source language $tmppart=explode('_', $dirtmp['name']); @@ -112,7 +112,7 @@ class autoTranslator } // Process translation of source file for each target languages - foreach($targetlangs as $my_destlang) + foreach ($targetlangs as $my_destlang) { $this->_translatedFiles = array(); @@ -124,15 +124,14 @@ class autoTranslator echo "File not found: " . $destPath . ". We generate it.
\n"; $this->createTranslationFile($destPath, $my_destlang); } - else - { + else { echo "Updating file: " . $destPath . "
\n"; } // Translate lines $fileContentDest = file($destPath, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); $newlines=0; - foreach($fileContent as $line){ + foreach ($fileContent as $line){ $key = $this->getLineKey($line); $value = $this->getLineValue($line); if ($key && $value) @@ -167,7 +166,7 @@ class autoTranslator fwrite($fp, "\n"); fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n"); fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n"); - foreach($this->_translatedFiles[$file] as $line) { + foreach ($this->_translatedFiles[$file] as $line) { fwrite($fp, $line . "\n"); } fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n"); @@ -209,7 +208,7 @@ class autoTranslator { //print "key =".$key."\n"; - foreach($content as $line) { + foreach ($content as $line) { $destKey = $this->getLineKey($line); $destValue = $this->getLineValue($line); // If translated return @@ -273,8 +272,8 @@ class autoTranslator private function getTranslationFilesArray($lang) { $dir = new DirectoryIterator($this->_langDir.$lang); - while($dir->valid()) { - if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) { + while ($dir->valid()) { + if (!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) { $files[] = $dir->getFilename(); } $dir->next(); diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index f568ba2b04b..0268fc94ed8 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -360,16 +360,14 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a $unused[$value] = $line; echo $line; // $trad contains the \n } - else - { + else { unset($output); //print 'X'.$output.'Y'; } } if (empty($unused)) print "No string not used found.\n"; - else - { + else { $filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang'; print "Strings in en_US that are never used are saved into file ".$filetosave.":\n"; file_put_contents($filetosave, implode("", $unused)); diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php index ce28ca5de63..adc5a706d06 100755 --- a/dev/translation/strip_language_file.php +++ b/dev/translation/strip_language_file.php @@ -80,8 +80,8 @@ $aEnglish = array(); if ($filesToProcess == 'all') { $dir = new DirectoryIterator('htdocs/langs/'.$lPrimary); - while($dir->valid()) { - if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) { + while ($dir->valid()) { + if (!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) { $files[] = $dir->getFilename(); } $dir->next(); @@ -94,7 +94,7 @@ else $filesToProcess=explode(',', $filesToProcess); // Loop on each file -foreach($filesToProcess as $fileToProcess) +foreach ($filesToProcess as $fileToProcess) { $lPrimaryFile = 'htdocs/langs/'.$lPrimary.'/'.$fileToProcess; $lSecondaryFile = 'htdocs/langs/'.$lSecondary.'/'.$fileToProcess; @@ -250,11 +250,11 @@ foreach($filesToProcess as $fileToProcess) { if ( ! $oh = fopen($output, 'w') ) { - print "ERROR in writing to file $output\n"; + print "ERROR in writing to file ".$output."\n"; exit; } - print "Read Primary File $lPrimaryFile and write ".$output.":\n"; + print "Read Primary File ".$lPrimaryFile." and write ".$output.":\n"; fwrite($oh, "# Dolibarr language file - Source file is en_US - ".(preg_replace('/\.lang$/', '', $fileToProcess))."\n"); @@ -285,8 +285,7 @@ foreach($filesToProcess as $fileToProcess) print "Key $key is redundant in file $lPrimaryFile (line: $cnt) - Already found into ".$fileFirstFound[$key]." (line: ".$lineFirstFound[$key].").\n"; continue; } - else - { + else { $fileFirstFound[$key] = $fileToProcess; $lineFirstFound[$key] = $cnt; } diff --git a/dev/translation/txpull.sh b/dev/translation/txpull.sh index fcccae98221..1b0ce7614c5 100755 --- a/dev/translation/txpull.sh +++ b/dev/translation/txpull.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash #------------------------------------------------------ # Script to pull language files to Transifex # @@ -33,8 +33,16 @@ if [ "x$1" = "xall" ] then if [ "x$2" = "x" ] then - echo "tx pull" - tx pull + echo "tx pull -a" + tx pull -a + + echo "Remove some language directories (not enough translated)" + rm -fr htdocs/langs/ach + rm -fr htdocs/langs/br_FR + rm -fr htdocs/langs/en + rm -fr htdocs/langs/frp + rm -fr htdocs/langs/fy_NL + else for dir in `find htdocs/langs/* -type d` do diff --git a/dev/translation/txpush.sh b/dev/translation/txpush.sh index 428f7b8cbc2..ef8da74dde9 100755 --- a/dev/translation/txpush.sh +++ b/dev/translation/txpush.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash #------------------------------------------------------ # Script to push language files to Transifex # diff --git a/doc/images/dolibarr.gif b/doc/images/dolibarr.gif deleted file mode 100644 index 7e6ac330fb1..00000000000 Binary files a/doc/images/dolibarr.gif and /dev/null differ diff --git a/doc/images/dolibarr.ico b/doc/images/dolibarr.ico deleted file mode 100644 index 611e4bf150e..00000000000 Binary files a/doc/images/dolibarr.ico and /dev/null differ diff --git a/doc/images/dolibarr_120x90.png b/doc/images/dolibarr_120x90.png deleted file mode 100644 index 88335ae1849..00000000000 Binary files a/doc/images/dolibarr_120x90.png and /dev/null differ diff --git a/doc/images/dolibarr_124x124.png b/doc/images/dolibarr_124x124.png deleted file mode 100644 index 43608028278..00000000000 Binary files a/doc/images/dolibarr_124x124.png and /dev/null differ diff --git a/doc/images/dolibarr_192x192.png b/doc/images/dolibarr_192x192.png deleted file mode 100644 index 8b4c4a27622..00000000000 Binary files a/doc/images/dolibarr_192x192.png and /dev/null differ diff --git a/doc/images/dolibarr_256x256.png b/doc/images/dolibarr_256x256.png deleted file mode 100644 index 3c3c61008ad..00000000000 Binary files a/doc/images/dolibarr_256x256.png and /dev/null differ diff --git a/doc/images/dolibarr_256x256_black.png b/doc/images/dolibarr_256x256_black.png new file mode 100644 index 00000000000..d89b44bf6ca Binary files /dev/null and b/doc/images/dolibarr_256x256_black.png differ diff --git a/doc/images/dolibarr_256x256_black.svg b/doc/images/dolibarr_256x256_black.svg new file mode 100644 index 00000000000..727387b5068 --- /dev/null +++ b/doc/images/dolibarr_256x256_black.svg @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + D + + diff --git a/doc/images/dolibarr_256x256_color.png b/doc/images/dolibarr_256x256_color.png new file mode 100644 index 00000000000..417387d6a27 Binary files /dev/null and b/doc/images/dolibarr_256x256_color.png differ diff --git a/doc/images/dolibarr_256x256_color.svg b/doc/images/dolibarr_256x256_color.svg new file mode 100644 index 00000000000..5115a8f7b91 --- /dev/null +++ b/doc/images/dolibarr_256x256_color.svg @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/doc/images/dolibarr_256x256_white.jpg b/doc/images/dolibarr_256x256_white.jpg new file mode 100644 index 00000000000..e5c4e260ba7 Binary files /dev/null and b/doc/images/dolibarr_256x256_white.jpg differ diff --git a/doc/images/dolibarr_256x256_white.png b/doc/images/dolibarr_256x256_white.png new file mode 100644 index 00000000000..b8fa1fef076 Binary files /dev/null and b/doc/images/dolibarr_256x256_white.png differ diff --git a/doc/images/dolibarr_256x256_white.svg b/doc/images/dolibarr_256x256_white.svg new file mode 100644 index 00000000000..79a8c9d1241 --- /dev/null +++ b/doc/images/dolibarr_256x256_white.svg @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/doc/images/dolibarr_48x48.png b/doc/images/dolibarr_48x48.png deleted file mode 100644 index 557eed6a7c0..00000000000 Binary files a/doc/images/dolibarr_48x48.png and /dev/null differ diff --git a/doc/images/dolibarr_512x512.png b/doc/images/dolibarr_512x512.png deleted file mode 100644 index bbe16cbc6db..00000000000 Binary files a/doc/images/dolibarr_512x512.png and /dev/null differ diff --git a/doc/images/dolibarr_512x512_color.png b/doc/images/dolibarr_512x512_color.png new file mode 100644 index 00000000000..a1766d07fe3 Binary files /dev/null and b/doc/images/dolibarr_512x512_color.png differ diff --git a/doc/images/dolibarr_73x73.png b/doc/images/dolibarr_73x73.png deleted file mode 100644 index 8c86522a37a..00000000000 Binary files a/doc/images/dolibarr_73x73.png and /dev/null differ diff --git a/doc/images/dolibarr_favicon.ico b/doc/images/dolibarr_favicon.ico new file mode 100644 index 00000000000..b93a86747d6 Binary files /dev/null and b/doc/images/dolibarr_favicon.ico differ diff --git a/doc/images/dolibarr_logo.jpg b/doc/images/dolibarr_logo.jpg index 69de0129523..a4a0611067d 100644 Binary files a/doc/images/dolibarr_logo.jpg and b/doc/images/dolibarr_logo.jpg differ diff --git a/doc/images/dolibarr_logo.png b/doc/images/dolibarr_logo.png old mode 100644 new mode 100755 index 48e71a064cc..9a0781ce2ea Binary files a/doc/images/dolibarr_logo.png and b/doc/images/dolibarr_logo.png differ diff --git a/doc/images/dolibarr_logo.svg b/doc/images/dolibarr_logo.svg new file mode 100644 index 00000000000..9c9259d0b33 --- /dev/null +++ b/doc/images/dolibarr_logo.svg @@ -0,0 +1,209 @@ + + + + + Logo Dolibarr ERP-CRM + + + + + + + + + + + + + + + image/svg+xml + + Logo Dolibarr ERP-CRM + + + + Laurent Destailleur + + + + + Laurent Destailleur + + + + + + + + + + + + + + + + + + + + + + + + + + + ERP/CRM + + + diff --git a/doc/images/dolibarr_screenshot11_1024x768.jpg b/doc/images/dolibarr_screenshot11_1024x768.jpg new file mode 100644 index 00000000000..65c246353a7 Binary files /dev/null and b/doc/images/dolibarr_screenshot11_1024x768.jpg differ diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index cf00519e9d7..e6264648159 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -119,8 +119,7 @@ if (empty($reshook)) { $obj = $db->fetch_object($resql); $country_code = $obj->code; - } - else dol_print_error($db); + } else dol_print_error($db); // Try to load sql file if ($country_code) @@ -143,9 +142,7 @@ if (empty($reshook)) if ($result > 0) { setEventMessages($langs->trans("ChartLoaded"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("ErrorDuringChartLoad"), null, 'warnings'); } } @@ -235,8 +232,7 @@ if (strlen(trim($search_account))) { } $sql .= " AND (aa.account_number LIKE '".$startchar.$search_account_tmp_clean."'"; $sql .= " OR aa.account_number LIKE '".$startchar.$search_account_clean."%')"; - } - else $sql .= natural_search("aa.account_number", $search_account_tmp); + } else $sql .= natural_search("aa.account_number", $search_account_tmp); } } if (strlen(trim($search_label))) $sql .= natural_search("aa.label", $search_label); @@ -267,7 +263,7 @@ if ($resql) { $num = $db->num_rows($resql); - $param = ''; + $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; if ($search_account) $param .= '&search_account='.urlencode($search_account); @@ -328,8 +324,7 @@ if ($resql) $i++; } - } - else dol_print_error($db); + } else dol_print_error($db); print ""; print ajax_combobox("chartofaccounts"); print ''; @@ -395,7 +390,7 @@ if ($resql) if (!empty($arrayfields['aa.account_number']['checked'])) { print ""; - print $accountstatic->getNomUrl(1, 0, 0, '', 0, 1); + print $accountstatic->getNomUrl(1, 0, 0, '', 0, 1, 0, 'accountcard'); print "\n"; if (!$i) $totalarray['nbfield']++; } @@ -431,9 +426,7 @@ if ($resql) print $accountparent->getNomUrl(1); print "\n"; if (!$i) $totalarray['nbfield']++; - } - else - { + } else { print ' '; if (!$i) $totalarray['nbfield']++; } diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index b31cd23dfa4..9794198332e 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -228,8 +228,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU'); - } - elseif ($value == 'entity') { + } elseif ($value == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql .= ","; @@ -245,13 +244,10 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); $_POST = array('id'=>$id); // Clean $_POST array, we keep only - } - else - { + } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); - } - else { + } else { dol_print_error($db); } } @@ -260,8 +256,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) // Si verif ok et action modify, on modifie la ligne if ($ok && GETPOST('actionmodify', 'alpha')) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } // Modify entry $sql = "UPDATE ".$tabname[$id]." SET "; @@ -276,8 +271,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU'); - } - elseif ($field == 'entity') { + } elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql .= ","; @@ -306,8 +300,7 @@ if (GETPOST('actioncancel', 'alpha')) if ($action == 'confirm_delete' && $confirm == 'yes') // delete { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'"; @@ -318,9 +311,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); - } - else - { + } else { dol_print_error($db); } } @@ -329,13 +320,11 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete // activate if ($action == $acts[0]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'"; } @@ -349,13 +338,11 @@ if ($action == $acts[0]) // disable if ($action == $acts[1]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'"; } @@ -369,13 +356,11 @@ if ($action == $acts[1]) // favorite if ($action == 'activate_favorite') { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$code."'"; } @@ -389,13 +374,11 @@ if ($action == 'activate_favorite') // disable favorite if ($action == 'disable_favorite') { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$code."'"; } @@ -581,9 +564,7 @@ if ($id) print ''; print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone'); print ''; - } - else - { + } else { print ''; } } @@ -629,9 +610,7 @@ if ($id) print ' '; print ' '; - } - else - { + } else { $tmpaction = 'view'; $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -652,26 +631,20 @@ if ($id) if ($value == 'element') { $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow; - } - elseif ($value == 'source') + } elseif ($value == 'source') { $valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow; - } - elseif ($valuetoshow == 'all') { + } elseif ($valuetoshow == 'all') { $valuetoshow = $langs->trans('All'); - } - elseif ($fieldlist[$field] == 'country') { + } elseif ($fieldlist[$field] == 'country') { if (empty($obj->country_code)) { $valuetoshow = '-'; - } - else - { + } else { $key = $langs->trans("Country".strtoupper($obj->country_code)); $valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country); } - } - elseif ($fieldlist[$field] == 'country_id') { + } elseif ($fieldlist[$field] == 'country_id') { $showfield = 0; } @@ -708,8 +681,7 @@ if ($id) $i++; } } - } - else { + } else { dol_print_error($db); } @@ -761,8 +733,7 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = $fieldname = 'country'; print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : '')), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone'); print ''; - } - elseif ($fieldlist[$field] == 'country_id') + } elseif ($fieldlist[$field] == 'country_id') { if (!in_array('country', $fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate) { @@ -771,8 +742,7 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = print ''; print ''; } - } - elseif ($fieldlist[$field] == 'type_cdr') { + } elseif ($fieldlist[$field] == 'type_cdr') { if ($fieldlist[$field] == 'type_cdr') print ''; else print ''; if ($fieldlist[$field] == 'type_cdr') { @@ -781,12 +751,9 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1); } print ''; - } - elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { + } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { print ''; - } - else - { + } else { print ''; $size = ''; $class = ''; if ($fieldlist[$field] == 'code') $size = 'size="8" '; diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 708165fc757..4ad131f5170 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -44,6 +44,8 @@ $cancel = GETPOST('cancel', 'alpha'); $accountingaccount = GETPOST('accountingaccount', 'alpha'); // Security check +if ($user->socid > 0) accessforbidden(); +if (!$user->rights->accounting->chartofaccount) accessforbidden(); $object = new AccountingAccount($db); @@ -75,18 +77,14 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) if ($conf->global->ACCOUNTING_MANAGE_ZERO == 1) { $account_number = GETPOST('account_number', 'string'); - } - else - { + } else { $account_number = clean_account(GETPOST('account_number', 'string')); } if (GETPOST('account_parent', 'int') <= 0) { $account_parent = 0; - } - else - { + } else { $account_parent = GETPOST('account_parent', 'int'); } @@ -104,13 +102,11 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) $error = 1; $action = "create"; setEventMessages($object->error, $object->errors, 'errors'); - } - elseif ($res == - 4) { + } elseif ($res == - 4) { $error = 2; $action = "create"; setEventMessages($object->error, $object->errors, 'errors'); - } - elseif ($res < 0) + } elseif ($res < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); @@ -140,18 +136,14 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) if ($conf->global->ACCOUNTING_MANAGE_ZERO == 1) { $account_number = GETPOST('account_number', 'string'); - } - else - { + } else { $account_number = clean_account(GETPOST('account_number', 'string')); } if (GETPOST('account_parent', 'int') <= 0) { $account_parent = 0; - } - else - { + } else { $account_parent = GETPOST('account_parent', 'int'); } @@ -269,8 +261,7 @@ if ($action == 'create') { print '
'; print ''; -} -elseif ($id > 0 || $ref) { +} elseif ($id > 0 || $ref) { $result = $object->fetch($id, $ref, 1); if ($result > 0) { diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 1b2733e2045..ddd4240a073 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -235,13 +235,10 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); $_POST = array('id'=>$id); // Clean $_POST array, we keep only - } - else - { + } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); - } - else { + } else { dol_print_error($db); } } @@ -250,8 +247,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) // Si verif ok et action modify, on modifie la ligne if ($ok && GETPOST('actionmodify', 'alpha')) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } // Modify entry $sql = "UPDATE ".$tabname[$id]." SET "; @@ -266,8 +262,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($field == 'fk_country' && $_POST['country'] > 0) { $_POST[$listfieldvalue[$i]] = $_POST['country']; - } - elseif ($field == 'entity') { + } elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql .= ","; @@ -296,8 +291,7 @@ if (GETPOST('actioncancel', 'alpha')) if ($action == 'confirm_delete' && $confirm == 'yes') // delete { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; @@ -308,9 +302,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); - } - else - { + } else { dol_print_error($db); } } @@ -319,13 +311,11 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete // activate if ($action == $acts[0]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; - } - elseif ($code) { + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code = '".$db->escape($code)."'"; } @@ -339,13 +329,11 @@ if ($action == $acts[0]) // disable if ($action == $acts[1]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; - } - elseif ($code) { + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code = '".$db->escape($code)."'"; } @@ -359,13 +347,11 @@ if ($action == $acts[1]) // favorite if ($action == 'activate_favorite') { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; - } - elseif ($code) { + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code = '".$db->escape($code)."'"; } @@ -379,13 +365,11 @@ if ($action == 'activate_favorite') // disable favorite if ($action == 'disable_favorite') { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; - } - elseif ($code) { + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code = '".$db->escape($code)."'"; } @@ -597,9 +581,7 @@ if ($id) print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone'); print ''; $filterfound++; - } - else - { + } else { print ''; } } @@ -726,10 +708,8 @@ if ($id) print ''; print ''; print ''; - } - else - { - $tmpaction = 'view'; + } else { + $tmpaction = 'view'; $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -745,35 +725,27 @@ if ($id) if ($value == 'category_type') { $valuetoshow = yn($valuetoshow); - } - elseif ($valuetoshow == 'all') { + } elseif ($valuetoshow == 'all') { $valuetoshow = $langs->trans('All'); - } - elseif ($fieldlist[$field] == 'country') { + } elseif ($fieldlist[$field] == 'country') { if (empty($obj->country_code)) { $valuetoshow = '-'; - } - else - { + } else { $key = $langs->trans("Country".strtoupper($obj->country_code)); $valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country); } - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_country') { + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_country') { $key = $langs->trans("Country".strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != "Country".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_availability') { + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_availability') { $langs->loadLangs(array("propal")); $key = $langs->trans("AvailabilityType".strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != "AvailabilityType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_actioncomm') { + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_actioncomm') { $key = $langs->trans("Action".strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != "Action".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { + } elseif ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { $showfield = 0; } @@ -799,8 +771,7 @@ if ($id) // Active print ''; if ($canbedisabled) print ''.$actl[$obj->active].''; - else - { + else { print $langs->trans("AlwaysActive"); } print ""; @@ -816,8 +787,7 @@ if ($id) if ($user->admin) print ''.img_delete().''; //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin print ''; - } - else print ' '; + } else print ' '; // Link to setup the group print ''; @@ -833,8 +803,7 @@ if ($id) $i++; } } - } - else { + } else { dol_print_error($db); } @@ -882,14 +851,11 @@ function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $co { $fieldname = 'country_id'; print $form->select_country(GETPOST('country_id', 'int'), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone'); - } - else - { + } else { print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : $mysoc->country_code)), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone'); } print ''; - } - elseif ($fieldlist[$field] == 'country_id') + } elseif ($fieldlist[$field] == 'country_id') { if (!in_array('country', $fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate) { @@ -898,17 +864,13 @@ function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $co print ''; print ''; } - } - elseif ($fieldlist[$field] == 'category_type') { + } elseif ($fieldlist[$field] == 'category_type') { print ''; print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1); print ''; - } - elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { + } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { print ''; - } - else - { + } else { print ''; $size = ''; $class = ''; if ($fieldlist[$field] == 'code') $class = 'maxwidth100'; diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index ad22a88f415..84ea304a74d 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -75,7 +75,7 @@ if ($mysoc->isInEEC()) { $list_account[] = 'ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT'; } $list_account[] = 'ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT'; -$list_account[] = '---Other---'; +$list_account[] = '---Others---'; $list_account[] = 'ACCOUNTING_VAT_BUY_ACCOUNT'; $list_account[] = 'ACCOUNTING_VAT_SOLD_ACCOUNT'; $list_account[] = 'ACCOUNTING_VAT_PAY_ACCOUNT'; @@ -94,6 +94,9 @@ if ($conf->loan->enabled) { $list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INTEREST'; $list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'; } +if ($conf->societe->enabled) { + $list_account[] = 'ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT'; +} /* * Actions @@ -193,8 +196,7 @@ foreach ($list_account as $key) { $reg = array(); if (preg_match('/---(.*)---/', $key, $reg)) { print ''.$langs->trans($reg[1]).''; - } - else { + } else { print ''; // Param $label = $langs->trans($key); diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index b5cc46a3d0d..89aad6e2d0d 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -79,6 +79,7 @@ $object = new Fiscalyear($db); $max = 100; $form = new Form($db); +$fiscalyearstatic = new Fiscalyear($db); $title = $langs->trans('AccountingPeriods'); $helpurl = ""; @@ -132,13 +133,15 @@ if ($result) print ''; if ($num) { - $fiscalyearstatic = new Fiscalyear($db); - while ($i < $num && $i < $max) { $obj = $db->fetch_object($result); + $fiscalyearstatic->id = $obj->rowid; + print ''; - print ''.img_object($langs->trans("ShowFiscalYear"), "technic").' '.$obj->rowid.''; + print ''; + print $fiscalyearstatic->getNomUrl(1); + print ''; print ''.$obj->label.''; print ''.dol_print_date($db->jdate($obj->date_start), 'day').''; print ''.dol_print_date($db->jdate($obj->date_end), 'day').''; diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 88890aa004f..27ef1ea7bd1 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -71,9 +71,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") { } else { setEventMessages($object->error, $object->errors, 'errors'); } -} - -elseif ($action == 'add') { +} elseif ($action == 'add') { if (!GETPOST('cancel', 'alpha')) { $error = 0; diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 006db08fe9c..f37ff79a1fa 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -31,9 +31,10 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("compta", "bills", "admin", "accountancy")); +$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "other")); // Security access if (empty($user->rights->accounting->chartofaccount)) @@ -45,13 +46,16 @@ $action = GETPOST('action', 'aZ09'); // Parameters ACCOUNTING_* and others $list = array( - 'ACCOUNTING_LENGTH_GACCOUNT', - 'ACCOUNTING_LENGTH_AACCOUNT', + 'ACCOUNTING_LENGTH_GACCOUNT', + 'ACCOUNTING_LENGTH_AACCOUNT', // 'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc // 'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc ); - +$list_binding = array( + 'ACCOUNTING_DATE_START_BINDING', + 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER' +); /* * Actions @@ -64,59 +68,75 @@ if ($action == 'update') { if (!$error) { - foreach ($list as $constname) - { - $constvalue = GETPOST($constname, 'alpha'); + foreach ($list as $constname) + { + $constvalue = GETPOST($constname, 'alpha'); - if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { - $error++; - } - } - if ($error) { - setEventMessages($langs->trans("Error"), null, 'errors'); - } + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; + } + } + if ($error) { + setEventMessages($langs->trans("Error"), null, 'errors'); + } + + foreach ($list_binding as $constname) + { + $constvalue = GETPOST($constname, 'alpha'); + + if ($constname == 'ACCOUNTING_DATE_START_BINDING') { + $constvalue = dol_mktime(12, 0, 0, GETPOST($constname.'month', 'int'), GETPOST($constname.'day', 'int'), GETPOST($constname.'year', 'int')); + } + + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; + } + } + if ($error) { + setEventMessages($langs->trans("Error"), null, 'errors'); + } } - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } } if ($action == 'setlistsorttodo') { - $setlistsorttodo = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity); - if (!$res > 0) - $error++; + $setlistsorttodo = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setlistsortdone') { - $setlistsortdone = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity); - if (!$res > 0) - $error++; - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + $setlistsortdone = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setmanagezero') { - $setmanagezero = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity); - if (!$res > 0) - $error++; - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + $setmanagezero = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setdisabledirectinput') { @@ -144,20 +164,57 @@ if ($action == 'setenabledraftexport') { } if ($action == 'setenablesubsidiarylist') { - $setenablesubsidiarylist = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist, 'yesno', 0, '', $conf->entity); - if (!$res > 0) - $error++; - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + $setenablesubsidiarylist = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } +} + +if ($action == 'setdisablebindingonsales') { + $setdisablebindingonsales = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_SALES", $setdisablebindingonsales, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } +} + +if ($action == 'setdisablebindingonpurchases') { + $setdisablebindingonpurchases = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_PURCHASES", $setdisablebindingonpurchases, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } +} + +if ($action == 'setdisablebindingonexpensereports') { + $setdisablebindingonexpensereports = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS", $setdisablebindingonexpensereports, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } /* * View */ +$form = new Form($db); $title = $langs->trans('ConfigAccountingExpert'); llxHeader('', $title); @@ -200,125 +257,187 @@ print "\n"; print '
'; */ -// Others params - +// Params print ''; print ''; -print ''; +print ''; print "\n"; -if (!empty($user->admin)) -{ - // TO DO Mutualize code for yes/no constants - print ''; - print ''; - if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) { - print ''; - } else { - print ''; - } - print ''; +// TO DO Mutualize code for yes/no constants - print ''; - print ''; - if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) { - print ''; - } else { - print ''; - } - print ''; - - /* Set this option as a hidden option but keep it for some needs. - print ''; - print ''; - if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) { - print ''; - } else { - print ''; - } - print ''; - */ - - print ''; - print ''; - if (!empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) { - print ''; - } else { - print ''; - } - print ''; - - print ''; - print ''; - if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { - print ''; - } else { - print ''; - } - print ''; - - print ''; - print ''; - if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) { - print ''; - } else { - print ''; - } - print ''; +/* Set this option as a hidden option but keep it for some needs. +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) { + print ''; +} else { + print ''; } +print ''; +*/ +print ''; +print ''; +if (!empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) { + print ''; +} else { + print ''; +} +print ''; + +print ''; +print ''; +if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { + print ''; +} else { + print ''; +} +print ''; + +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) { + print ''; +} else { + print ''; +} +print ''; // Param a user $user->rights->accounting->chartofaccount can access foreach ($list as $key) { - print ''; + print ''; - if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue; + if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue; - // Param - $label = $langs->trans($key); - print ''; - // Value - print ''; + // Param + $label = $langs->trans($key); + print ''; + // Value + print ''; + print ''; + print ''; +} +print '
'.$langs->trans('OtherOptions').''.$langs->trans('Options').'
'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("ACCOUNTANCY_COMBO_FOR_AUX").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("ACCOUNTING_MANAGE_ZERO").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("ACCOUNTANCY_COMBO_FOR_AUX").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("ACCOUNTING_MANAGE_ZERO").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$label.''; - print ''; - print ''.$label.''; + print ''; - print '
'; +print '
'; + +// Binding params +print ''; +print ''; +print ''; +print "\n"; + +// TO DO Mutualize code for yes/no constants +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) { + print ''; +} else { + print ''; +} +print ''; + +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) { + print ''; +} else { + print ''; +} +print ''; + +// Param a user $user->rights->accounting->chartofaccount can access +foreach ($list_binding as $key) +{ + print ''; + + // Param + $label = $langs->trans($key); + print ''; + // Value + print ''; + print ''; } +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) { + print ''; +} else { + print ''; +} +print ''; + +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)) { + print ''; +} else { + print ''; +} +print ''; + +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) { + print ''; +} else { + print ''; +} +print ''; print '
'.$langs->trans('BindingOptions').'
'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$label.''; + if ($key == 'ACCOUNTING_DATE_START_BINDING') { + print $form->selectDate(($conf->global->$key ? $db->idate($conf->global->$key) : -1), $key, 0, 0, 1); + } elseif ($key == 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER') { + $array = array(0=>$langs->trans("PreviousMonth"), 1=>$langs->trans("CurrentMonth"), 2=>$langs->trans("Fiscalyear")); + print $form->selectarray($key, $array, (isset($conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER) ? $conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER : 0)); + } else { + print ''; + } + + print '
'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_SALES").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_PURCHASES").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'; print '
'; -print '
'; -print '
'; - -print '
'; print ''; // End of page diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index e34ce8094dd..74247c5fccd 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -238,13 +238,10 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); $_POST = array('id'=>$id); // Clean $_POST array, we keep only - } - else - { + } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); - } - else { + } else { dol_print_error($db); } } @@ -253,8 +250,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) // Si verif ok et action modify, on modifie la ligne if ($ok && GETPOST('actionmodify', 'alpha')) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } // Modify entry $sql = "UPDATE ".$tabname[$id]." SET "; @@ -269,8 +265,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU'); - } - elseif ($field == 'entity') { + } elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql .= ","; @@ -300,8 +295,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) if ($action == 'confirm_delete' && $confirm == 'yes') // delete { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'"; $sql .= " AND entity = ".$conf->entity; @@ -313,9 +307,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); - } - else - { + } else { dol_print_error($db); } } @@ -324,13 +316,11 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete // activate if ($action == $acts[0]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'"; } $sql .= " AND entity = ".$conf->entity; @@ -345,13 +335,11 @@ if ($action == $acts[0]) // disable if ($action == $acts[1]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'"; } $sql .= " AND entity = ".$conf->entity; @@ -595,9 +583,7 @@ if ($id) print ''; print '
'; print ''; - } - else - { + } else { $tmpaction = 'view'; $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -614,12 +600,10 @@ if ($id) $valuetoshow = $obj->{$fieldlist[$field]}; if ($valuetoshow == 'all') { $valuetoshow = $langs->trans('All'); - } - elseif ($fieldlist[$field] == 'nature' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { + } elseif ($fieldlist[$field] == 'nature' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { $key = $langs->trans("AccountingJournalType".strtoupper($obj->nature)); $valuetoshow = ($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature)) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { $valuetoshow = $langs->trans($obj->label); } @@ -667,8 +651,7 @@ if ($id) if ($user->admin) print ''.img_delete().''; //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin print ''; - } - else print ' '; + } else print ' '; print ''; @@ -679,8 +662,7 @@ if ($id) $i++; } } - } - else { + } else { dol_print_error($db); } @@ -724,12 +706,9 @@ function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '') print ''; print $form->selectarray('nature', $sourceList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); print ''; - } - elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { + } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { print ''; - } - else - { + } else { print ''; $size = ''; $class = ''; if ($fieldlist[$field] == 'code') $class = 'maxwidth100'; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index e32e47b169d..b6465b95355 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -252,25 +252,19 @@ $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON"; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { $sql .= " p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; -} -elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') +} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { $sql .= " p.accountancy_code_buy_intra = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; -} -elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') +} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { $sql .= " p.accountancy_code_buy_export = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; -} -elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') +} 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') +} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { $sql .= " p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; -} -else -{ +} else { $sql .= " p.accountancy_code_sell_export = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; } $sql .= ' WHERE p.entity IN ('.getEntity('product').')'; @@ -290,13 +284,11 @@ if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_sell", $search_current_account); } -} -elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { +} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_sell_intra", $search_current_account); } -} -else { +} else { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_sell_export", $search_current_account); } @@ -492,34 +484,27 @@ if ($result) if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell_intra; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell_export; - } - else { + } else { $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell; } - } - else { + } else { if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell_intra; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell_export; - } - else { + } else { $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell; } @@ -530,34 +515,27 @@ if ($result) if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy_intra; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy_export; - } - else { + } else { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy; } - } - else { + } else { if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy_intra; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy_export; - } - else { + } else { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy; } @@ -620,7 +598,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 ''; - } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { // Accounting account buy intra (In EEC) print ''; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code @@ -630,7 +608,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 ''; - } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { // Accounting account buy export (Out of EEC) print ''; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 4de2be6fcbb..a5000dda461 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Florian Henry - * Copyright (C) 2016-2019 Alexandre Spangaro + * Copyright (C) 2016-2020 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -31,6 +31,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; +require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; @@ -244,15 +245,15 @@ if ($action != 'export_csv') print ''; print ''; - print ''; - print ''; @@ -260,7 +261,6 @@ if ($action != 'export_csv') print ''; print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("OpeningBalance", $_SERVER['PHP_SELF'], "", $param, "", 'class="right"', $sortfield, $sortorder); print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder); @@ -274,8 +274,14 @@ if ($action != 'export_csv') $sous_total_credit = 0; $displayed_account = ""; - $sql = "select t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance from ".MAIN_DB_PREFIX."accounting_bookkeeping as t where entity in ".$conf->entity; - $sql .= " AND t.doc_date < '".$db->idate($search_date_start)."' GROUP BY t.numero_compte"; + $accountingaccountstatic = new AccountingAccount($db); + + $sql = "SELECT t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance"; + $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as t"; + $sql .= " WHERE t.entity = ".$conf->entity; // Never do sharing into accounting features + $sql .= " AND t.doc_date < '".$db->idate($search_date_start)."'"; + $sql .= " GROUP BY t.numero_compte"; + $resql = $db->query($sql); $nrows = $resql->num_rows; $opening_balances = array(); @@ -286,12 +292,18 @@ if ($action != 'export_csv') foreach ($object->lines as $line) { + $accountingaccountstatic->fetch(null, $line->numero_compte, true); + if (!empty($accountingaccountstatic->account_number)) { + $accounting_account = $accountingaccountstatic->getNomUrl(0, 1); + } else { + $accounting_account = length_accountg($line->numero_compte); + } + $link = ''; $total_debit += $line->debit; $total_credit += $line->credit; - $description = $object->get_compte_desc($line->numero_compte); // Search description of the account $root_account_description = $object->get_compte_racine($line->numero_compte); - if (empty($description)) { + if (empty($accountingaccountstatic->account_number)) { $link = ''.img_edit_add().''; } print ''; @@ -303,7 +315,7 @@ if ($action != 'export_csv') // Show subtotal per accounting account if ($displayed_account != "") { print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -313,7 +325,7 @@ if ($action != 'export_csv') // Show first line of a break print ''; - print ''; + print ''; print ''; $displayed_account = $root_account_description; @@ -321,10 +333,9 @@ if ($action != 'export_csv') $sous_total_credit = 0; } } - // $object->get_compte_racine($line->numero_compte); - print ''; - print ''; + // $object->get_compte_racine($line->numero_compte); + print ''; print ''; print ''; print ''; @@ -333,19 +344,19 @@ if ($action != 'export_csv') print ''; print "\n"; - // Comptabilise le sous-total + // Records the sub-total $sous_total_debit += $line->debit; $sous_total_credit += $line->credit; } if (!empty($show_subgroup)) { - print ''; + print ''; print "\n"; print ''; } - print ''; + print ''; print "\n"; print ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index f8fa0774400..ef105b6709a 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -41,7 +41,7 @@ $action = GETPOST('action', 'aZ09'); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $id = GETPOST('id', 'int'); // id of record -$mode = GETPOST('mode', 'aZ09'); // '' or 'tmp' +$mode = GETPOST('mode', 'aZ09'); // '' or '_tmp' $piece_num = GETPOST("piece_num", 'int'); // id of transaction (several lines share the same transaction id) // Security check @@ -114,11 +114,13 @@ if ($action == "confirm_update") { $object->credit = $credit; if (floatval($debit) != 0.0) { - $object->montant = $debit; + $object->montant = $debit; // deprecated + $object->amount = $debit; $object->sens = 'D'; } if (floatval($credit) != 0.0) { - $object->montant = $credit; + $object->montant = $credit; // deprecated + $object->amount = $credit; $object->sens = 'C'; } @@ -138,9 +140,7 @@ if ($action == "confirm_update") { } } } -} - -elseif ($action == "add") { +} elseif ($action == "add") { $error = 0; if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) @@ -175,12 +175,14 @@ elseif ($action == "add") { $object->fk_docdet = (int) GETPOST('fk_docdet', 'int'); if (floatval($debit) != 0.0) { - $object->montant = $debit; + $object->montant = $debit; // deprecated + $object->amount = $debit; $object->sens = 'D'; } if (floatval($credit) != 0.0) { - $object->montant = $credit; + $object->montant = $credit; // deprecated + $object->amount = $credit; $object->sens = 'C'; } @@ -199,9 +201,7 @@ elseif ($action == "add") { $action = ''; } } -} - -elseif ($action == "confirm_delete") { +} elseif ($action == "confirm_delete") { $object = new BookKeeping($db); $result = $object->fetch($id, null, $mode); @@ -216,9 +216,7 @@ elseif ($action == "confirm_delete") { } } $action = ''; -} - -elseif ($action == "confirm_create") { +} elseif ($action == "confirm_create") { $error = 0; $object = new BookKeeping($db); @@ -247,7 +245,8 @@ elseif ($action == "confirm_create") { $object->journal_label = $journal_label; $object->fk_doc = 0; $object->fk_docdet = 0; - $object->montant = 0; + $object->montant = 0; // deprecated + $object->amount = 0; $result = $object->createStd($user, 0, $mode); if ($result < 0) { @@ -293,7 +292,7 @@ if ($action == 'setjournal') { } if ($action == 'setdocref') { - $refdoc = trim(GETPOST('doc_ref', 'alpha')); + $refdoc = GETPOST('doc_ref', 'alpha'); $result = $object->updateByMvt($piece_num, 'doc_ref', $refdoc, $mode); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -628,9 +627,7 @@ if ($action == 'create') if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { print $formaccounting->select_auxaccount((GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account), 'subledger_account', 1); - } - else - { + } else { print 'subledger_account).'">'; } print ''; @@ -685,9 +682,7 @@ if ($action == 'create') if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { print $formaccounting->select_auxaccount('', 'subledger_account', 1); - } - else - { + } else { print ''; } print ''; @@ -707,9 +702,7 @@ if ($action == 'create') if ($total_debit == $total_credit) { print ''.$langs->trans("ValidTransaction").''; - } - else - { + } else { print ''; } diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 2889fbf4ef1..9a623287fc2 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -351,18 +351,14 @@ if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouveme $result = $object->deleteByYearAndJournal($delyear, $deljournal, '', ($delmonth > 0 ? $delmonth : 0)); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { setEventMessages("RecordDeleted", null, 'mesgs'); } // Make a redirect to avoid to launch the delete later after a back button header("Location: list.php".($param ? '?'.$param : '')); exit; - } - else - { + } else { setEventMessages("NoRecordDeleted", null, 'warnings'); } } @@ -373,9 +369,7 @@ if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->suppri $result = $object->deleteMvtNum($mvt_num); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); } @@ -418,7 +412,7 @@ $sql .= " t.label_operation,"; $sql .= " t.debit,"; $sql .= " t.credit,"; $sql .= " t.lettering_code,"; -$sql .= " t.montant,"; +$sql .= " t.montant as amount,"; $sql .= " t.sens,"; $sql .= " t.fk_user_author,"; $sql .= " t.import_key,"; @@ -480,9 +474,7 @@ if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { // Export files $accountancyexport = new AccountancyExport($db); $accountancyexport->export($object->lines, $formatexportset); @@ -490,9 +482,7 @@ if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { if (!empty($accountancyexport->errors)) { setEventMessages('', $accountancyexport->errors, 'errors'); - } - else - { + } else { // Specify as export : update field date_export $error = 0; $db->begin(); @@ -521,9 +511,7 @@ if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { { $db->commit(); // setEventMessages($langs->trans("AllExportedMovementsWereRecordedAsExported"), null, 'mesgs'); - } - else - { + } else { $error++; $db->rollback(); setEventMessages($langs->trans("NotAllExportedMovementsCouldBeRecordedAsExported"), null, 'errors'); @@ -559,9 +547,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; -} -else -{ +} else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -721,9 +707,7 @@ if (!empty($arrayfields['t.subledger_account']['checked'])) if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1); - } - else - { + } else { print ''; } print ''; @@ -734,9 +718,7 @@ if (!empty($arrayfields['t.subledger_account']['checked'])) if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1); - } - else - { + } else { print ''; } print ''; @@ -878,7 +860,8 @@ while ($i < min($num, $limit)) $line->label_operation = $obj->label_operation; $line->debit = $obj->debit; $line->credit = $obj->credit; - $line->montant = $obj->montant; + $line->montant = $obj->amount; // deprecated + $line->amount = $obj->amount; $line->sens = $obj->sens; $line->lettering_code = $obj->lettering_code; $line->fk_user_author = $obj->fk_user_author; @@ -929,8 +912,7 @@ while ($i < min($num, $limit)) $filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); - } - elseif ($line->doc_type == 'supplier_invoice') + } elseif ($line->doc_type == 'supplier_invoice') { $langs->loadLangs(array('bills')); @@ -943,8 +925,7 @@ while ($i < min($num, $limit)) $filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($line->fk_doc, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref); $subdir = get_exdir($objectstatic->id, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref); $documentlink = $formfile->getDocumentsLink($objectstatic->element, $subdir, $filedir); - } - elseif ($line->doc_type == 'expense_report') + } elseif ($line->doc_type == 'expense_report') { $langs->loadLangs(array('trips')); @@ -957,9 +938,7 @@ while ($i < min($num, $limit)) $filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); - } - else - { + } else { // Other type } diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 25f664d955e..e5a18626b42 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -2,8 +2,8 @@ /* Copyright (C) 2016 Neil Orley * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2018 Alexandre Spangaro - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2013-2020 Alexandre Spangaro + * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,7 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page @@ -78,6 +80,7 @@ if ($sortfield == "") $sortfield = "t.doc_date,t.rowid"; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new BookKeeping($db); +$formfile = new FormFile($db); $hookmanager->initHooks(array('bookkeepingbyaccountlist')); $formaccounting = new FormAccounting($db); @@ -254,18 +257,14 @@ if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouveme $result = $object->deleteByYearAndJournal($delyear, $deljournal, '', ($delmonth > 0 ? $delmonth : 0)); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { setEventMessages("RecordDeleted", null, 'mesgs'); } // Make a redirect to avoid to launch the delete later after a back button header("Location: listbyaccount.php".($param ? '?'.$param : '')); exit; - } - else - { + } else { setEventMessages("NoRecordDeleted", null, 'warnings'); } } @@ -276,9 +275,7 @@ if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->suppri $result = $object->deleteMvtNum($mvt_num); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); } @@ -293,6 +290,7 @@ if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->suppri */ $formaccounting = new FormAccounting($db); +$formfile = new FormFile($db); $formother = new FormOther($db); $form = new Form($db); @@ -537,9 +535,7 @@ while ($i < min($num, $limit)) print price($sous_total_debit - $sous_total_credit); print ''; print ''; - } - else - { + } else { print ''; print '"; - print ''; @@ -611,8 +607,7 @@ while ($i < min($num, $limit)) $filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); - } - elseif ($line->doc_type == 'supplier_invoice') + } elseif ($line->doc_type == 'supplier_invoice') { $langs->loadLangs(array('bills')); @@ -625,8 +620,7 @@ while ($i < min($num, $limit)) $filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($line->fk_doc, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref); $subdir = get_exdir($objectstatic->id, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref); $documentlink = $formfile->getDocumentsLink($objectstatic->element, $subdir, $filedir); - } - elseif ($line->doc_type == 'expense_report') + } elseif ($line->doc_type == 'expense_report') { $langs->loadLangs(array('trips')); @@ -639,9 +633,7 @@ while ($i < min($num, $limit)) $filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); - } - else - { + } else { // Other type } @@ -742,9 +734,7 @@ if ($balance > 0 ) print price($sous_total_debit - $sous_total_credit); print ''; print ''; -} -else -{ +} else { print ''; print ''; print ''; for ($i = 2; $i <= 12; $i++) { print ''; @@ -333,12 +334,17 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; $sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'"; $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'"; +// Define begin binding date +if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; +} $sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy $sql .= " AND f.fk_statut > 0"; +$sql .= " AND fd.product_type <= 2"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")"; + $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_SITUATION.")"; } else { - $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")"; + $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_DEPOSIT.", ".Facture::TYPE_SITUATION.")"; } $sql .= " AND aa.account_number IS NOT NULL"; $sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label"; @@ -353,16 +359,14 @@ if ($resql) { if ($row[0] == 'tobind') { print $langs->trans("Unknown"); - } - else print length_accountg($row[0]); + } else print length_accountg($row[0]); print ''; print ''; for ($i = 2; $i <= 12; $i++) { @@ -409,12 +413,17 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; $sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'"; $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'"; + // Define begin binding date + if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; + } $sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy $sql .= " AND f.fk_statut > 0"; + $sql .= " AND fd.product_type <= 2"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")"; + $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_SITUATION.")"; } else { - $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")"; + $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_DEPOSIT.", ".Facture::TYPE_SITUATION.")"; } dol_syslog('htdocs/accountancy/customer/index.php'); @@ -461,12 +470,17 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; $sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'"; $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'"; + // Define begin binding date + if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; + } $sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy $sql .= " AND f.fk_statut > 0"; + $sql .= " AND fd.product_type <= 2"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")"; + $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_SITUATION.")"; } else { - $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")"; + $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_DEPOSIT.", ".Facture::TYPE_SITUATION.")"; } dol_syslog('htdocs/accountancy/customer/index.php'); diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 45b0c909016..6b326ec872f 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -64,9 +65,9 @@ $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page < 0) $page = 0; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$offset = $limit * $page; if (!$sortfield) $sortfield = "f.datef, f.ref, fd.rowid"; if (!$sortorder) { @@ -91,8 +92,8 @@ $formaccounting = new FormAccounting($db); // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { - $search_societe=''; - $search_lineid = ''; + $search_societe = ''; + $search_lineid = ''; $search_ref = ''; $search_invoice = ''; $search_label = ''; @@ -175,7 +176,8 @@ print ''."\n"; } - if (is_object($objsoc) && $objsoc->id > 0) - { + if (is_object($objsoc) && $objsoc->id > 0) { $this->tpl['company'] = $objsoc->getNomUrl(1); $this->tpl['company_id'] = $objsoc->id; - } - else - { + } else { $this->tpl['company'] = $form->select_company($this->object->socid, 'socid', '', 1); } @@ -128,8 +122,7 @@ abstract class ActionsAdherentCardCommon $this->tpl['select_civility'] = $formcompany->select_civility($this->object->civility_id); // Predefined with third party - if ((isset($objsoc->typent_code) && $objsoc->typent_code == 'TE_PRIVATE')) - { + if ((isset($objsoc->typent_code) && $objsoc->typent_code == 'TE_PRIVATE')) { if (dol_strlen(trim($this->object->address)) == 0) $this->tpl['address'] = $objsoc->address; if (dol_strlen(trim($this->object->zip)) == 0) $this->object->zip = $objsoc->zip; if (dol_strlen(trim($this->object->town)) == 0) $this->object->town = $objsoc->town; @@ -161,38 +154,30 @@ abstract class ActionsAdherentCardCommon $this->tpl['select_morphy'] = $form->selectarray('morphy', $selectarray, $this->object->morphy, 0); } - if ($action == 'view' || $action == 'edit' || $action == 'delete') - { + if ($action == 'view' || $action == 'edit' || $action == 'delete') { // Emailing - if (!empty($conf->mailing->enabled)) - { + if (!empty($conf->mailing->enabled)) { $langs->load("mails"); $this->tpl['nb_emailing'] = $this->object->getNbOfEMailings(); } // Dolibarr user - if ($this->object->user_id) - { + if ($this->object->user_id) { $dolibarr_user = new User($this->db); $result = $dolibarr_user->fetch($this->object->user_id); $this->tpl['dolibarr_user'] = $dolibarr_user->getLoginUrl(1); - } - else $this->tpl['dolibarr_user'] = $langs->trans("NoDolibarrAccess"); + } else $this->tpl['dolibarr_user'] = $langs->trans("NoDolibarrAccess"); } - if ($action == 'view' || $action == 'delete') - { + if ($action == 'view' || $action == 'delete') { $this->tpl['showrefnav'] = $form->showrefnav($this->object, 'id'); - if ($this->object->socid > 0) - { + if ($this->object->socid > 0) { $objsoc = new Societe($this->db); $objsoc->fetch($this->object->socid); $this->tpl['company'] = $objsoc->getNomUrl(1); - } - else - { + } else { $this->tpl['company'] = $langs->trans("AdherentNotLinkedToThirdParty"); } @@ -214,8 +199,7 @@ abstract class ActionsAdherentCardCommon $this->tpl['note'] = nl2br($this->object->note); } - if ($action == 'create_user') - { + if ($action == 'create_user') { // Full firstname and lastname separated with a dot : firstname.lastname include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; @@ -263,19 +247,15 @@ abstract class ActionsAdherentCardCommon $this->object->canvas = $_POST["canvas"]; // We set country_id, and country_code label of the chosen country - if ($this->object->country_id) - { + if ($this->object->country_id) { $sql = "SELECT code, label FROM ".MAIN_DB_PREFIX."c_country WHERE rowid = ".$this->object->country_id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $this->object->country_code = $obj->code; $this->object->country = $langs->trans("Country".$obj->code) ? $langs->trans("Country".$obj->code) : $obj->libelle; - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index 60bb2ecd034..db2473c55d9 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -90,8 +90,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon $this->tpl['error'] = $this->error; $this->tpl['errors'] = $this->errors; - if ($action == 'view') - { + if ($action == 'view') { // Card header $head = member_prepare_head($this->object); $title = $this->getTitle($action); @@ -105,18 +104,14 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon $this->tpl['actionstodo'] = show_actions_todo($conf, $langs, $db, $objsoc, $this->object, 1); $this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1); - } - else - { + } else { // Confirm delete contact - if ($action == 'delete' && $user->rights->adherent->supprimer) - { + if ($action == 'delete' && $user->rights->adherent->supprimer) { $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id, $langs->trans("DeleteAdherent"), $langs->trans("ConfirmDeleteAdherent"), "confirm_delete", '', 0, 1); } } - if ($action == 'list') - { + if ($action == 'list') { $this->LoadListDatas($limit, $offset, $sortfield, $sortorder); } } diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php index 92f1e11d7a2..b6c0b542d27 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php @@ -17,8 +17,7 @@ */ // Protection to avoid direct call of template -if (empty($conf) || !is_object($conf)) -{ +if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; } diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php index 36e2deab14c..92a4fbddd38 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php @@ -17,8 +17,7 @@ */ // Protection to avoid direct call of template -if (empty($conf) || !is_object($conf)) -{ +if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; } diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php index b738f549247..8789b2fcb34 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php @@ -17,8 +17,7 @@ */ // Protection to avoid direct call of template -if (empty($conf) || !is_object($conf)) -{ +if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; } diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index c913d6a1b49..c3c14171386 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -25,7 +25,7 @@ /** * \file htdocs/adherents/card.php * \ingroup member - * \brief Page of member + * \brief Page of a member */ require '../main.inc.php'; @@ -55,8 +55,7 @@ $typeid = GETPOST('typeid', 'int'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); -if (!empty($conf->mailmanspip->enabled)) -{ +if (!empty($conf->mailmanspip->enabled)) { include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; $langs->load('mailmanspip'); @@ -76,8 +75,7 @@ $socialnetworks = getArrayOfSocialNetworks(); $object->getCanvas($id); $canvas = $object->canvas ? $object->canvas : GETPOST("canvas"); $objcanvas = null; -if (!empty($canvas)) -{ +if (!empty($canvas)) { require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; $objcanvas = new Canvas($db, $action); $objcanvas->getCanvas('adherent', 'membercard', $canvas); @@ -86,16 +84,14 @@ if (!empty($canvas)) // Security check $result = restrictedArea($user, 'adherent', $id, '', '', 'socid', 'rowid', $objcanvas); -if ($id > 0) -{ +if ($id > 0) { // Load member $result = $object->fetch($id); // Define variables to know what current user can do on users $canadduser = ($user->admin || $user->rights->user->user->creer); // Define variables to know what current user can do on properties of user linked to edited member - if ($object->user_id) - { + if ($object->user_id) { // $User is the user who edits, $object->user_id is the id of the related user in the edited member $caneditfielduser = ((($user->id == $object->user_id) && $user->rights->user->self->creer) || (($user->id != $object->user_id) && $user->rights->user->user->creer)); @@ -107,8 +103,7 @@ if ($id > 0) // Define variables to determine what the current user can do on the members $canaddmember = $user->rights->adherent->creer; // Define variables to determine what the current user can do on the properties of a member -if ($id) -{ +if ($id) { $caneditfieldmember = $user->rights->adherent->creer; } @@ -125,34 +120,26 @@ $parameters = array('id'=>$id, 'rowid'=>$id, 'objcanvas'=>$objcanvas, 'confirm'= $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) -{ - if ($cancel) - { - if (!empty($backtopage)) - { +if (empty($reshook)) { + if ($cancel) { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } $action = ''; } - if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights->user->user->creer)) - { + if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights->user->user->creer)) { $error = 0; - if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only - { - if ($userid != $user->id && $userid != $object->user_id) - { + if (empty($user->rights->user->user->creer)) { // If can edit only itself user, we can link to itself only + if ($userid != $user->id && $userid != $object->user_id) { $error++; setEventMessages($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), null, 'errors'); } } - if (!$error) - { - if ($userid != $object->user_id) // If link differs from currently in database - { + if (!$error) { + if ($userid != $object->user_id) { // If link differs from currently in database $result = $object->setUserId($userid); if ($result < 0) dol_print_error($object->db, $object->error); $action = ''; @@ -160,22 +147,17 @@ if (empty($reshook)) } } - if ($action == 'setsocid') - { + if ($action == 'setsocid') { $error = 0; - if (!$error) - { - if ($socid != $object->socid) // If link differs from currently in database - { + if (!$error) { + if ($socid != $object->socid) { // If link differs from currently in database $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent"; $sql .= " WHERE socid = '".$socid."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj && $obj->rowid > 0) - { + if ($obj && $obj->rowid > 0) { $othermember = new Adherent($db); $othermember->fetch($obj->rowid); $thirdparty = new Societe($db); @@ -185,8 +167,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $result = $object->setThirdPartyId($socid); if ($result < 0) dol_print_error($object->db, $object->error); $action = ''; @@ -196,65 +177,52 @@ if (empty($reshook)) } // Create user from a member - if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user->user->creer) - { - if ($result > 0) - { + if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user->user->creer) { + if ($result > 0) { // Creation user $nuser = new User($db); $result = $nuser->create_from_member($object, GETPOST('login', 'alphanohtml')); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); setEventMessages($langs->trans($nuser->error), null, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } // Create third party from a member - if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) - { - if ($result > 0) - { + if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) { + if ($result > 0) { // User creation $company = new Societe($db); $result = $company->create_from_member($object, GETPOST('companyname', 'alpha'), GETPOST('companyalias', 'alpha')); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); setEventMessages($langs->trans($company->error), null, 'errors'); setEventMessages($company->error, $company->errors, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } - if ($action == 'update' && !$cancel && $user->rights->adherent->creer) - { + if ($action == 'update' && !$cancel && $user->rights->adherent->creer) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $birthdate = ''; - if (isset($_POST["birthday"]) && $_POST["birthday"] - && isset($_POST["birthmonth"]) && $_POST["birthmonth"] - && isset($_POST["birthyear"]) && $_POST["birthyear"]) + if (GETPOST("birthday", 'int') && GETPOST("birthmonth", 'int') && GETPOST("birthyear", 'int')) { - $birthdate = dol_mktime(12, 0, 0, $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]); + $birthdate = dol_mktime(12, 0, 0, GETPOST("birthmonth", 'int'), GETPOST("birthday", 'int'), GETPOST("birthyear", 'int')); } - $lastname = $_POST["lastname"]; - $firstname = $_POST["firstname"]; - $gender = $_POST["gender"]; - $societe = $_POST["societe"]; - $morphy = $_POST["morphy"]; - $login = $_POST["login"]; + $lastname = GETPOST("lastname", 'alphanohtml'); + $firstname = GETPOST("firstname", 'alphanohtml'); + $gender = GETPOST("gender", 'alphanohtml'); + $societe = GETPOST("societe", 'alphanohtml'); + $morphy = GETPOST("morphy", 'alphanohtml'); + $login = GETPOST("login", 'alphanohtml'); if ($morphy != 'mor' && empty($lastname)) { $error++; $langs->load("errors"); @@ -271,32 +239,30 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Company")), null, 'errors'); } // Check if the login already exists - if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) - { + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { if (empty($login)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login")), null, 'errors'); } } // Create new object - if ($result > 0 && !$error) - { + if ($result > 0 && !$error) { $object->oldcopy = clone $object; // Change values - $object->civility_id = trim(GETPOST("civility_id", 'alpha')); - $object->firstname = trim(GETPOST("firstname", 'alpha')); - $object->lastname = trim(GETPOST("lastname", 'alpha')); - $object->gender = trim(GETPOST("gender", 'alpha')); + $object->civility_id = trim(GETPOST("civility_id", 'alphanohtml')); + $object->firstname = trim(GETPOST("firstname", 'alphanohtml')); + $object->lastname = trim(GETPOST("lastname", 'alphanohtml')); + $object->gender = trim(GETPOST("gender", 'alphanohtml')); $object->login = trim(GETPOST("login", 'alpha')); $object->pass = trim(GETPOST("pass", 'alpha')); - $object->societe = trim(GETPOST("societe", 'alpha')); // deprecated - $object->company = trim(GETPOST("societe", 'alpha')); + $object->societe = trim(GETPOST("societe", 'alphanohtml')); // deprecated + $object->company = trim(GETPOST("societe", 'alphanohtml')); - $object->address = trim(GETPOST("address", 'alpha')); - $object->zip = trim(GETPOST("zipcode", 'alpha')); - $object->town = trim(GETPOST("town", 'alpha')); + $object->address = trim(GETPOST("address", 'alphanohtml')); + $object->zip = trim(GETPOST("zipcode", 'alphanohtml')); + $object->town = trim(GETPOST("town", 'alphanohtml')); $object->state_id = GETPOST("state_id", 'int'); $object->country_id = GETPOST("country_id", 'int'); @@ -333,32 +299,27 @@ if (empty($reshook)) // Check if we need to also synchronize user information $nosyncuser = 0; - if ($object->user_id) // If linked to a user - { + if ($object->user_id) { // If linked to a user if ($user->id != $object->user_id && empty($user->rights->user->user->creer)) $nosyncuser = 1; // Disable synchronizing } // Check if we need to also synchronize password information $nosyncuserpass = 0; - if ($object->user_id) // If linked to a user - { + if ($object->user_id) { // If linked to a user if ($user->id != $object->user_id && empty($user->rights->user->user->password)) $nosyncuserpass = 1; // Disable synchronizing } $result = $object->update($user, 0, $nosyncuser, $nosyncuserpass); - if ($result >= 0 && !count($object->errors)) - { + if ($result >= 0 && !count($object->errors)) { $categories = GETPOST('memcats', 'array'); $object->setCategories($categories); // Logo/Photo save $dir = $conf->adherent->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member').'/photos'; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); - if ($file_OK) - { - if (GETPOST('deletephoto')) - { + if ($file_OK) { + if (GETPOST('deletephoto')) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $fileimg = $conf->adherent->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member').'/photos/'.$object->photo; $dirthumbs = $conf->adherent->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member').'/photos/thumbs'; @@ -366,33 +327,23 @@ if (empty($reshook)) dol_delete_dir_recursive($dirthumbs); } - if (image_format_supported($_FILES['photo']['name']) > 0) - { + if (image_format_supported($_FILES['photo']['name']) > 0) { dol_mkdir($dir); - if (@is_dir($dir)) - { + if (@is_dir($dir)) { $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); - if (!dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1, 0, $_FILES['photo']['error']) > 0) - { + if (!dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1, 0, $_FILES['photo']['error']) > 0) { setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); - } - else - { - // Create thumbs - $object->addThumbs($newfile); + } else { + // Create thumbs + $object->addThumbs($newfile); } } - } - else - { + } else { setEventMessages("ErrorBadImageFormat", null, 'errors'); } - } - else - { - switch ($_FILES['photo']['error']) - { + } else { + switch ($_FILES['photo']['error']) { case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form $errors[] = "ErrorFileSizeTooLarge"; @@ -403,53 +354,45 @@ if (empty($reshook)) } } - $rowid = $object->id; - $id = $object->id; + $rowid = $object->id; + $id = $object->id; $action = ''; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } - } - else - { + } else { $action = 'edit'; } } - if ($action == 'add' && $user->rights->adherent->creer) - { + if ($action == 'add' && $user->rights->adherent->creer) { if ($canvas) $object->canvas = $canvas; $birthdate = ''; if (isset($_POST["birthday"]) && $_POST["birthday"] && isset($_POST["birthmonth"]) && $_POST["birthmonth"] - && isset($_POST["birthyear"]) && $_POST["birthyear"]) - { + && isset($_POST["birthyear"]) && $_POST["birthyear"]) { $birthdate = dol_mktime(12, 0, 0, $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]); } $datesubscription = ''; - if (isset($_POST["reday"]) && isset($_POST["remonth"]) && isset($_POST["reyear"])) - { + if (isset($_POST["reday"]) && isset($_POST["remonth"]) && isset($_POST["reyear"])) { $datesubscription = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); } $typeid = GETPOST("typeid", 'int'); - $civility_id = GETPOST("civility_id", 'alpha'); - $lastname = GETPOST("lastname", 'alpha'); - $firstname = GETPOST("firstname", 'alpha'); - $gender = GETPOST("gender", 'alpha'); - $societe = GETPOST("societe", 'alpha'); - $address = GETPOST("address", 'alpha'); - $zip = GETPOST("zipcode", 'alpha'); - $town = GETPOST("town", 'alpha'); + $civility_id = GETPOST("civility_id", 'alphanohtml'); + $lastname = GETPOST("lastname", 'alphanohtml'); + $firstname = GETPOST("firstname", 'alphanohtml'); + $gender = GETPOST("gender", 'alphanohtml'); + $societe = GETPOST("societe", 'alphanohtml'); + $address = GETPOST("address", 'alphanohtml'); + $zip = GETPOST("zipcode", 'alphanohtml'); + $town = GETPOST("town", 'alphanohtml'); $state_id = GETPOST("state_id", 'int'); $country_id = GETPOST("country_id", 'int'); @@ -459,15 +402,14 @@ if (empty($reshook)) // $skype=GETPOST("member_skype", 'alpha'); // $twitter=GETPOST("member_twitter", 'alpha'); // $facebook=GETPOST("member_facebook", 'alpha'); - // $linkedin=GETPOST("member_linkedin", 'alpha'); + // $linkedin=GETPOST("member_linkedin", 'alpha'); $email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha')); $login = GETPOST("member_login", 'alpha'); $pass = GETPOST("password", 'alpha'); $photo = GETPOST("photo", 'alpha'); //$comment=GETPOST("comment",'none'); - $morphy = GETPOST("morphy", 'alpha'); - $subscription = GETPOST("subscription", 'alpha'); - $public = GETPOST("public", 'alpha'); + $morphy = GETPOST("morphy", 'alphanohtml'); + $public = GETPOST("public", 'alphanohtml'); $userid = GETPOST("userid", 'int'); $socid = GETPOST("socid", 'int'); @@ -522,13 +464,11 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MemberNature")), null, 'errors'); } // Tests if the login already exists - if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) - { + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { if (empty($login)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login")), null, 'errors'); - } - else { + } else { $sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape($login)."'"; $result = $db->query($sql); if ($result) { @@ -572,14 +512,12 @@ if (empty($reshook)) $public = 0; if (isset($public)) $public = 1; - if (!$error) - { + if (!$error) { $db->begin(); // Email about right and login does not exist $result = $object->create($user); - if ($result > 0) - { + if ($result > 0) { // Foundation categories $memcats = GETPOST('memcats', 'array'); $object->setCategories($memcats); @@ -588,9 +526,7 @@ if (empty($reshook)) $rowid = $object->id; $id = $object->id; $action = ''; - } - else - { + } else { $db->rollback(); if ($object->error) { @@ -601,36 +537,27 @@ if (empty($reshook)) $action = 'create'; } - } - else { + } else { $action = 'create'; } } - if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confirm == 'yes') - { + if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confirm == 'yes') { $result = $object->delete($id, $user); - if ($result > 0) - { - if (!empty($backtopage)) - { + if ($result > 0) { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; - } - else - { + } else { header("Location: list.php"); exit; } - } - else - { + } else { $errmesg = $object->error; } } - if ($user->rights->adherent->creer && $action == 'confirm_valid' && $confirm == 'yes') - { + if ($user->rights->adherent->creer && $action == 'confirm_valid' && $confirm == 'yes') { $error = 0; $db->begin(); @@ -640,11 +567,9 @@ if (empty($reshook)) $result = $object->validate($user); - if ($result >= 0 && !count($object->errors)) - { + if ($result >= 0 && !count($object->errors)) { // Send confirmation email (according to parameters of member type. Otherwise generic) - if ($object->email && GETPOST("send_mail")) - { + if ($object->email && GETPOST("send_mail")) { $subject = ''; $msg = ''; @@ -662,8 +587,7 @@ if (empty($reshook)) if (!empty($labeltouse)) $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); - if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) - { + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { $subject = $arraydefaultmessage->topic; $msg = $arraydefaultmessage->content; } @@ -672,8 +596,7 @@ if (empty($reshook)) //fallback on the old configuration. setEventMessages('WarningMandatorySetupNotComplete', null, 'errors'); $error++; - } - else { + } else { $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); @@ -682,16 +605,13 @@ if (empty($reshook)) $moreinheader = 'X-Dolibarr-Info: send_an_email by adherents/card.php'."\r\n"; $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } } } - } - else - { + } else { $error++; if ($object->error) { setEventMessages($object->error, $object->errors, 'errors'); @@ -700,32 +620,25 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } $action = ''; } - if ($user->rights->adherent->supprimer && $action == 'confirm_resign') - { + if ($user->rights->adherent->supprimer && $action == 'confirm_resign') { $error = 0; - if ($confirm == 'yes') - { + if ($confirm == 'yes') { $adht = new AdherentType($db); $adht->fetch($object->typeid); $result = $object->resiliate($user); - if ($result >= 0 && !count($object->errors)) - { - if ($object->email && GETPOST("send_mail")) - { + if ($result >= 0 && !count($object->errors)) { + if ($object->email && GETPOST("send_mail")) { $subject = ''; $msg = ''; @@ -743,8 +656,7 @@ if (empty($reshook)) if (!empty($labeltouse)) $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); - if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) - { + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { $subject = $arraydefaultmessage->topic; $msg = $arraydefaultmessage->content; } @@ -753,8 +665,7 @@ if (empty($reshook)) //fallback on the old configuration. setEventMessages('WarningMandatorySetupNotComplete', null, 'errors'); $error++; - } - else { + } else { $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); @@ -763,16 +674,13 @@ if (empty($reshook)) $moreinheader = 'X-Dolibarr-Info: send_an_email by adherents/card.php'."\r\n"; $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } } } - } - else - { + } else { $error++; if ($object->error) { @@ -783,31 +691,24 @@ if (empty($reshook)) $action = ''; } } - if (!empty($backtopage) && !$error) - { + if (!empty($backtopage) && !$error) { header("Location: ".$backtopage); exit; } } // SPIP Management - if ($user->rights->adherent->supprimer && $action == 'confirm_del_spip' && $confirm == 'yes') - { - if (!count($object->errors)) - { - if (!$mailmanspip->del_to_spip($object)) - { + if ($user->rights->adherent->supprimer && $action == 'confirm_del_spip' && $confirm == 'yes') { + if (!count($object->errors)) { + if (!$mailmanspip->del_to_spip($object)) { setEventMessages($langs->trans('DeleteIntoSpipError').': '.$mailmanspip->error, null, 'errors'); } } } - if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm == 'yes') - { - if (!count($object->errors)) - { - if (!$mailmanspip->add_to_spip($object)) - { + if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm == 'yes') { + if (!count($object->errors)) { + if (!$mailmanspip->add_to_spip($object)) { setEventMessages($langs->trans('AddIntoSpipError').': '.$mailmanspip->error, null, 'errors'); } } @@ -844,28 +745,23 @@ llxHeader('', $title, $help_url); $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; -if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) -{ +if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // ----------------------------------------- // When used with CANVAS // ----------------------------------------- - if (empty($object->error) && $id) - { + if (empty($object->error) && $id) { $object = new Adherent($db); $result = $object->fetch($id); if ($result <= 0) dol_print_error('', $object->error); } $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates - $objcanvas->display_canvas($action); // Show template -} -else -{ + $objcanvas->display_canvas($action); // Show template +} else { // ----------------------------------------- // When used in standard mode // ----------------------------------------- - if ($action == 'create') - { + if ($action == 'create') { /* ************************************************************************** */ /* */ /* Creation mode */ @@ -876,31 +772,28 @@ else // We set country_id, country_code and country for the selected country $object->country_id = GETPOST('country_id', 'int') ?GETPOST('country_id', 'int') : $mysoc->country_id; - if ($object->country_id) - { + if ($object->country_id) { $tmparray = getCountry($object->country_id, 'all'); $object->country_code = $tmparray['code']; $object->country = $tmparray['label']; } - if (!empty($socid)) { - $object = new Societe($db); - if ($socid > 0) $object->fetch($socid); + if (!empty($socid)) { + $object = new Societe($db); + if ($socid > 0) $object->fetch($socid); - if (!($object->id > 0)) - { - $langs->load("errors"); - print($langs->trans('ErrorRecordNotFound')); - exit; - } - } + if (!($object->id > 0)) { + $langs->load("errors"); + print($langs->trans('ErrorRecordNotFound')); + exit; + } + } $adht = new AdherentType($db); print load_fiche_titre($langs->trans("NewMember"), '', 'members'); - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print "\n".''."\n"; + } + + print ''; + print ''; + print ''; + + dol_fiche_head($head, 'common_ticket', '', -1); + + print ''.$langs->trans("EMailsDesc")."
\n"; + print "
\n"; + + + clearstatcache(); + + print '
'; + print ''; print $langs->trans('From'); print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, ''); print ' '; print $langs->trans('to'); print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, ''); print ''; - $searchpicto = $form->showFilterAndCheckAddButtons(0); + print ''; + $searchpicto = $form->showFilterButtons(); print $searchpicto; print '
'.$langs->trans("SubTotal").':'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_credit - $sous_total_debit)).'
'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').''.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'
'.length_accountg($line->numero_compte).''.$description.''.$accounting_account.''.price($opening_balances["'".$line->numero_compte."'"]).''.price($line->debit).''.price($line->credit).'
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_debit - $sous_total_credit)).'
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_debit - $sous_total_credit)).'
'.$langs->trans("AccountBalance").':'.price($total_debit).''.price($total_credit).''.price(price2num($total_debit - $total_credit)).'
'.$langs->trans("AccountBalance").':'.price($total_debit).''.price($total_credit).''.price(price2num($total_debit - $total_credit)).'
'; print price($sous_total_credit - $sous_total_debit); @@ -551,7 +547,7 @@ while ($i < min($num, $limit)) // Show the break account print "
'; + print ''; if ($line->numero_compte != "" && $line->numero_compte != '-1') print length_accountg($line->numero_compte).' : '.$object->get_compte_desc($line->numero_compte); else print ''.$langs->trans("Unknown").''; print ''; print price($sous_total_credit - $sous_total_debit); diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index cc93232dcdc..c7f7f8cf68c 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -209,9 +209,7 @@ class AccountancyCategory // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -241,8 +239,7 @@ class AccountancyCategory // extends CommonObject $sql .= " t.active"; $sql .= " FROM ".MAIN_DB_PREFIX."c_accounting_category as t"; if ($id) $sql .= " WHERE t.rowid = ".$id; - else - { + else { $sql .= " WHERE t.entity IN (".getEntity('c_accounting_category').")"; // Dont't use entity if you use rowid if ($code) $sql .= " AND t.code = '".$this->db->escape($code)."'"; elseif ($label) $sql .= " AND t.label = '".$this->db->escape($label)."'"; @@ -270,9 +267,7 @@ class AccountancyCategory // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -335,9 +330,7 @@ class AccountancyCategory // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -375,9 +368,7 @@ class AccountancyCategory // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -709,9 +700,7 @@ class AccountancyCategory // extends CommonObject $listofaccount .= "'".$cptcursor."'"; } $sql .= " AND t.numero_compte IN (".$listofaccount.")"; - } - else - { + } else { $sql .= " AND t.numero_compte = '".$this->db->escape($cpt)."'"; } if (!empty($date_start) && !empty($date_end) && (empty($month) || empty($year))) // If month/year provided, it is stronger than filter date_start/date_end @@ -833,9 +822,7 @@ class AccountancyCategory // extends CommonObject $sql .= " WHERE t.fk_accounting_category = ".$cat_id; $sql .= " AND t.entity = ".$conf->entity; $sql .= " ORDER BY t.account_number"; - } - else - { + } else { $sql = "SELECT t.rowid, t.account_number, t.label as account_label"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as t"; $sql .= " WHERE ".$predefinedgroupwhere; diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 3bf41e6326f..130c0e97659 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -362,7 +362,7 @@ class AccountancyExport if ($line->sens == 'D') { print price($line->montant).$separator; print ''.$separator; - }elseif ($line->sens == 'C') { + } elseif ($line->sens == 'C') { print ''.$separator; print price($line->montant).$separator; } @@ -518,11 +518,12 @@ class AccountancyExport $Tab['contrepartie'] = str_repeat(' ', 8); // elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting - if (!empty($data->date_echeance)) + if (!empty($data->date_echeance)) { //$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE); $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y'); // elarifr: format must be ddmmyy - else + } else { $Tab['date_echeance'] = '000000'; + } //elarifr please keep quadra named field lettrage(2) + codestat(3) instead of fake lettrage(5) //$Tab['lettrage'] = str_repeat(' ', 5); @@ -597,12 +598,11 @@ class AccountancyExport $Tab['num_compte'] = str_pad(self::trunc($code_compta, 6), 6, '0'); - if($data->sens == 'D'){ + if ($data->sens == 'D') { $Tab['montant_debit'] = str_pad(number_format(abs($data->montant), 2, ',', ''), 13, ' ', STR_PAD_LEFT); $Tab['montant_crebit'] = str_pad(number_format(0, 2, ',', ''), 13, ' ', STR_PAD_LEFT); - } - else{ + } else { $Tab['montant_debit'] = str_pad(number_format(0, 2, ',', ''), 13, ' ', STR_PAD_LEFT); $Tab['montant_crebit'] = str_pad(number_format(abs($data->montant), 2, ',', ''), 13, ' ', STR_PAD_LEFT); @@ -616,11 +616,12 @@ class AccountancyExport $Tab['code_stat'] = str_repeat(' ', 4); - if (!empty($data->date_echeance)) + if (!empty($data->date_echeance)) { //$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE); $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%Y'); - else + } else { $Tab['date_echeance'] = dol_print_date($data->doc_date, '%d%m%Y'); + } $Tab['monnaie'] = '1'; @@ -808,8 +809,8 @@ class AccountancyExport foreach ($objectLines as $line) { $date_creation = dol_print_date($line->date_creation, '%Y%m%d'); - $date_doc = dol_print_date($line->doc_date, '%Y%m%d'); - $date_valid = dol_print_date($line->date_validated, '%Y%m%d'); + $date_document = dol_print_date($line->doc_date, '%Y%m%d'); + $date_validation = dol_print_date($line->date_validated, '%Y%m%d'); // FEC:JournalCode print $line->code_journal.$separator; @@ -821,25 +822,25 @@ class AccountancyExport print $line->piece_num.$separator; // FEC:EcritureDate - print $date_creation.$separator; + print $date_document . $separator; // FEC:CompteNum print $line->numero_compte.$separator; // FEC:CompteLib - print $line->label_compte.$separator; + print dol_string_unaccent($line->label_compte) . $separator; // FEC:CompAuxNum print $line->subledger_account.$separator; // FEC:CompAuxLib - print $line->subledger_label.$separator; + print dol_string_unaccent($line->subledger_label) . $separator; // FEC:PieceRef print $line->doc_ref.$separator; // FEC:PieceDate - print $date_doc.$separator; + print dol_string_unaccent($date_creation) . $separator; // FEC:EcritureLib print $line->label_operation.$separator; @@ -857,7 +858,7 @@ class AccountancyExport print $line->date_lettering.$separator; // FEC:ValidDate - print $date_valid.$separator; + print $date_validation . $separator; // FEC:Montantdevise print $line->multicurrency_amount.$separator; @@ -897,12 +898,10 @@ class AccountancyExport if ($aIndex - 2 >= 0 && $objectLines[$aIndex - 2]->piece_num == $line->piece_num) { $sammelBuchung = true; - } - elseif ($aIndex + 2 < $aSize && $objectLines[$aIndex + 2]->piece_num == $line->piece_num) + } elseif ($aIndex + 2 < $aSize && $objectLines[$aIndex + 2]->piece_num == $line->piece_num) { $sammelBuchung = true; - } - elseif ($aIndex + 1 < $aSize + } elseif ($aIndex + 1 < $aSize && $objectLines[$aIndex + 1]->piece_num == $line->piece_num && $aIndex - 1 < $aSize && $objectLines[$aIndex - 1]->piece_num == $line->piece_num @@ -924,9 +923,7 @@ class AccountancyExport if ($line->sens == 'D') { print 'S'.$this->separator; - } - else - { + } else { print 'H'.$this->separator; } //Grp @@ -937,14 +934,10 @@ class AccountancyExport if ($line->piece_num == $thisPieceNum) { print length_accounta($thisPieceAccountNr).$this->separator; - } - else - { + } else { print "div".$this->separator; } - } - else - { + } else { print length_accounta($line->code_tiers).$this->separator; } //SId @@ -960,9 +953,7 @@ class AccountancyExport if ($sammelBuchung) { print "2".$this->separator; - } - else - { + } else { print "1".$this->separator; } // Code @@ -971,9 +962,7 @@ class AccountancyExport if ($line->montant >= 0) { print $line->montant.$this->separator; - } - else - { + } else { print ($line->montant * -1).$this->separator; } // Steuer @@ -1085,7 +1074,7 @@ class AccountancyExport print $racine_subledger_account.$separator; // deprecated CPTG & CPTA use instead // MONT - print price(abs($line->montant), 0, '', 1, 2).$separator; + print price(abs($line->montant), 0, '', 1, 2, 2).$separator; // CODC print $line->sens.$separator; // CPTG @@ -1458,7 +1447,9 @@ class AccountancyExport print self::trunc($line->code_journal, 6).$separator; //Journal code if (!empty($line->subledger_account)) $account = $line->subledger_account; - else $account = $line->numero_compte; + else { + $account = $line->numero_compte; + } print self::trunc($account, 15).$separator; //Account number print self::trunc($line->label_compte, 60).$separator; //Account label diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index bcd17793db1..24f14d2ebd2 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -448,9 +448,10 @@ class AccountingAccount extends CommonObject * @param int $notooltip 1=Disable tooltip * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @param int $withcompletelabel 0=Short label (field short label), 1=Complete label (field label) + * @param string $option 'bookkeeping', 'bookkeepinglistbyaccount', 'accountcard' * @return string String with URL */ - public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0) + public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0, $option = '') { global $langs, $conf, $user; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -459,7 +460,16 @@ class AccountingAccount extends CommonObject $result = ''; - $url = DOL_URL_ROOT.'/accountancy/admin/card.php?id='.$this->id; + if (empty($option) || $option == 'bookkeeping') { + $url = DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start=' . $this->account_number . '&search_accountancy_code_end=' . $this->account_number; + $labelurl = $langs->trans("ShowAccountingAccountInBookKeeping"); + } elseif ($option == 'bookkeepinglistbyaccount') { + $url = DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start=' . $this->account_number . '&search_accountancy_code_end=' . $this->account_number; + $labelurl = $langs->trans("ShowAccountingAccountInBookKeepingByAccount"); + } elseif ($option == 'accountcard') { + $url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id; + $labelurl = $langs->trans("ShowAccountingAccount"); + } // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); @@ -476,7 +486,7 @@ class AccountingAccount extends CommonObject $labeltoshow = $this->labelshort; } - $label = ''.$langs->trans("ShowAccountingAccount").''; + $label = ''.$labelurl.''; if (!empty($this->account_number)) $label .= '
'.$langs->trans('AccountAccounting').': '.length_accountg($this->account_number); if (!empty($labeltoshow)) @@ -488,7 +498,7 @@ class AccountingAccount extends CommonObject { if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - $label = $langs->trans("ShowAccoutingAccount"); + $label = $labelurl; $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; @@ -609,8 +619,7 @@ class AccountingAccount extends CommonObject if ($mode == 0) { $fieldtouse = 'active'; - } - elseif ($mode == 1) + } elseif ($mode == 1) { $fieldtouse = 'reconcilable'; } @@ -661,28 +670,23 @@ class AccountingAccount extends CommonObject { if ($status == 1) return $langs->trans('Enabled'); elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 1) + } elseif ($mode == 1) { if ($status == 1) return $langs->trans('Enabled'); elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5'); - } - elseif ($mode == 4) + } elseif ($mode == 4) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 5) + } elseif ($mode == 5) { if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 727e68346fa..6067f557cfb 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -109,8 +109,7 @@ class AccountingJournal extends CommonObject $sql .= " WHERE"; if ($rowid) { $sql .= " rowid = ".(int) $rowid; - } - elseif ($journal_code) + } elseif ($journal_code) { $sql .= " code = '".$this->db->escape($journal_code)."'"; $sql .= " AND entity = ".$conf->entity; @@ -136,9 +135,7 @@ class AccountingJournal extends CommonObject } else { return 0; } - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); $this->errors[] = "Error ".$this->db->lasterror(); } @@ -311,8 +308,7 @@ class AccountingJournal extends CommonObject elseif ($nature == 3) return $langs->trans('AccountingJournalType3'); elseif ($nature == 2) return $langs->trans('AccountingJournalType2'); elseif ($nature == 1) return $langs->trans('AccountingJournalType1'); - } - elseif ($mode == 1) + } elseif ($mode == 1) { if ($nature == 9) return $langs->trans('AccountingJournalType9'); elseif ($nature == 5) return $langs->trans('AccountingJournalType5'); diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 0162a98394e..1c377e70192 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -129,9 +129,15 @@ class BookKeeping extends CommonObject /** * @var float FEC:Amount (Not necessary) + * @deprecated Use $amount */ public $montant; + /** + * @var float FEC:Amount (Not necessary) + */ + public $amount; + /** * @var string FEC:Sens (Not necessary) */ @@ -258,9 +264,7 @@ class BookKeeping extends CommonObject if (in_array($this->doc_type, array('bank', 'expense_report'))) { $this->errors[] = $langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet, $this->doc_type); - } - else - { + } else { //$this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForInvoiceLine', $this->doc_ref, $this->label_compte); $mesg = $this->doc_ref.', '.$langs->trans("AccountAccounting").': '.$this->numero_compte; if ($this->subledger_account && $this->subledger_account != $this->numero_compte) @@ -477,8 +481,7 @@ class BookKeeping extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -1127,7 +1130,7 @@ class BookKeeping extends CommonObject * * @param User $user User that modifies * @param bool $notrigger false=launch triggers after, true=disable triggers - * @param string $mode Mode + * @param string $mode Mode ('' or _tmp') * @return int <0 if KO, >0 if OK */ public function update(User $user, $notrigger = false, $mode = '') @@ -1254,12 +1257,12 @@ class BookKeeping extends CommonObject } /** - * Update movement + * Update accounting movement * * @param string $piece_num Piece num * @param string $field Field * @param string $value Value - * @param string $mode Mode + * @param string $mode Mode ('' or _tmp') * @return number <0 if KO, >0 if OK */ public function updateByMvt($piece_num = '', $field = '', $value = '', $mode = '') @@ -1268,9 +1271,9 @@ class BookKeeping extends CommonObject $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element.$mode." as ab"; - $sql .= ' SET ab.'.$field.'='.(is_numeric($value) ? $value : "'".$this->db->escape($value)."'"); - $sql .= ' WHERE ab.piece_num='.$piece_num; + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element.$mode; + $sql .= ' SET '.$field.'='.(is_numeric($value) ? $value : "'".$this->db->escape($value)."'"); + $sql .= " WHERE piece_num = '".$this->db->escape($piece_num)."'"; $resql = $this->db->query($sql); if (!$resql) { diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 39ed325b5fe..ed8fc8ecc7e 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -42,8 +42,7 @@ if (!$user->rights->accounting->fiscalyear->write) $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); if (GETPOST("year", 'int')) $year_start = GETPOST("year", 'int'); -else -{ +else { $year_start = dol_print_date(dol_now(), '%Y'); if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year } diff --git a/htdocs/accountancy/closure/validate.php b/htdocs/accountancy/closure/validate.php index fe7fda5054f..808ccfba0ef 100644 --- a/htdocs/accountancy/closure/validate.php +++ b/htdocs/accountancy/closure/validate.php @@ -42,8 +42,7 @@ if ($user->socid > 0) $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); if (GETPOST("year", 'int')) $year_start = GETPOST("year", 'int'); -else -{ +else { $year_start = dol_print_date(dol_now(), '%Y'); if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year } diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 0a39fbc8254..34a23b377b9 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -34,8 +34,8 @@ $action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); -$codeventil = GETPOST('codeventil'); -$id = GETPOST('id'); +$codeventil = GETPOST('codeventil', 'int'); +$id = GETPOST('id', 'int'); // Security check if ($user->socid > 0) @@ -59,9 +59,7 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) $resql = $db->query($sql); if (!$resql) { setEventMessages($db->lasterror(), null, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); if ($backtopage) { diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index eff348816fb..69135e75c4d 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -47,8 +47,7 @@ if (!$user->rights->accounting->bind->write) $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); if (GETPOST("year", 'int')) $year_start = GETPOST("year", 'int'); -else -{ +else { $year_start = dol_print_date(dol_now(), '%Y'); if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year } @@ -202,8 +201,7 @@ if ($action == 'validatehistory') { if ($error) { $db->rollback(); - } - else { + } else { $db->commit(); setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs'); } @@ -258,7 +256,12 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; $sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'"; $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'"; +// Define begin binding date +if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; +} $sql .= " AND f.fk_statut > 0"; +$sql .= " AND fd.product_type <= 2"; $sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy $sql .= " AND aa.account_number IS NULL"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { @@ -278,15 +281,13 @@ if ($resql) { if ($row[0] == 'tobind') { print $langs->trans("Unknown"); - } - else print length_accountg($row[0]); + } else print length_accountg($row[0]); print '
'; if ($row[0] == 'tobind') { print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind")); - } - else print $row[1]; + } else print $row[1]; print ''.price($row[$i]).''; if ($row[0] == 'tobind') { print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind")); - } - else print $row[1]; + } else print $row[1]; print '
'; + print ''; + + // Method + + print ''; + + // Host server + + print ''; + + // Port + + print ''; + + // ID + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) + { + $mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_TICKET) ? $conf->global->MAIN_MAIL_SMTPS_ID_TICKET : ''); + print ''; + } + + // PW + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) + { + $mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW_TICKET) ? $conf->global->MAIN_MAIL_SMTPS_PW_TICKET : ''); + print ''; + } + + // TLS + + print ''; + + // STARTTLS + + print ''; + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_MAIL_SENDMODE").''; + + // SuperAdministrator access only + if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) + { + print $form->selectarray('MAIN_MAIL_SENDMODE_TICKET', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_TICKET); + } else { + $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE_TICKET]; + if (empty($text)) $text = $langs->trans("Undefined"); + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + print '
'; + if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') + { + print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); + print ''; + print $langs->trans("SeeLocalSendMailSetup"); + } else { + $mainserver = (!empty($conf->global->MAIN_MAIL_SMTP_SERVER_TICKET) ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : ''); + $smtpserver = ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined"); + if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); + else print $langs->trans("MAIN_MAIL_SMTP_SERVER", $smtpserver); + print ''; + // SuperAdministrator access only + if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) + { + print ''; + print ''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; + } else { + $text = !empty($mainserver) ? $mainserver : $smtpserver; + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + } + print '
'; + if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') + { + print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); + print ''; + print $langs->trans("SeeLocalSendMailSetup"); + } else { + $mainport = (!empty($conf->global->MAIN_MAIL_SMTP_PORT_TICKET) ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : ''); + $smtpport = ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined"); + if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); + else print $langs->trans("MAIN_MAIL_SMTP_PORT", $smtpport); + print ''; + // SuperAdministrator access only + if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) + { + print ''; + print ''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; + } else { + $text = (!empty($mainport) ? $mainport : $smtpport); + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + } + print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; + // SuperAdministrator access only + if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) + { + print ''; + } else { + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_TICKET, $htmltext, 1, 'superadmin'); + print ''; + } + print '
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''; + // SuperAdministrator access only + if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) + { + print ''; + } else { + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_TICKET, $htmltext, 1, 'superadmin'); + print ''; + } + print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) + { + if (function_exists('openssl_open')) + { + print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_TICKET', (!empty($conf->global->MAIN_MAIL_EMAIL_TLS_TICKET) ? $conf->global->MAIN_MAIL_EMAIL_TLS_TICKET : 0), 1); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) + { + if (function_exists('openssl_open')) + { + print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_TICKET', (!empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS_TICKET) ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS_TICKET : 0), 1); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'; + + dol_fiche_end(); + + print '
'; + print ''; + print '     '; + print ''; + print '
'; + + print ''; +} else { + dol_fiche_head($head, 'common_ticket', '', -1); + + print ''.$langs->trans("EMailsDesc")."
\n"; + print "
\n"; + + print ''; + print ''; + + // Method + print ''; + + if (!empty($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET != 'default') + { + // Host server + if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail')) + { + print ''; + } else { + print ''; + } + + // Port + if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail')) + { + print ''; + } else { + print ''; + } + + // SMTPS ID + if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) + { + print ''; + } + + // SMTPS PW + if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) + { + print ''; + } + + // TLS + print ''; + + // STARTTLS + print ''; + } + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_MAIL_SENDMODE").''; + $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE_TICKET]; + if (empty($text)) $text = $langs->trans("Undefined").img_warning(); + print $text; + print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER_TICKET) ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : '').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_PORT_TICKET) ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : '').'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''.$conf->global->MAIN_MAIL_SMTPS_ID_TICKET.'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW_TICKET).'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) + { + if (function_exists('openssl_open')) + { + print yn($conf->global->MAIN_MAIL_EMAIL_TLS_TICKET); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) + { + if (function_exists('openssl_open')) + { + print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS_TICKET); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'; + + dol_fiche_end(); + + + if ($conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)) + { + print '
'; + /* + // Warning 1 + if ($linuxlike) + { + $sendmailoption=ini_get('mail.force_extra_parameters'); + if (empty($sendmailoption) || ! preg_match('/ba/',$sendmailoption)) + { + print info_admin($langs->trans("SendmailOptionNotComplete")); + } + }*/ + // Warning 2 + print info_admin($langs->trans("SendmailOptionMayHurtBuggedMTA")); + } + + + // Buttons for actions + + print '
'; + + print ''.$langs->trans("Modify").''; + + if (!empty($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET != 'default') + { + if ($conf->global->MAIN_MAIL_SENDMODE_TICKET != 'mail' || !$linuxlike) + { + if (function_exists('fsockopen') && $port && $server) + { + print ''.$langs->trans("DoTestServerAvailability").''; + } + } else { + print ''.$langs->trans("DoTestServerAvailability").''; + } + + print ''.$langs->trans("DoTestSend").''; + + if (!empty($conf->fckeditor->enabled)) + { + print ''.$langs->trans("DoTestSendHTML").''; + } + } + + print '
'; + + + if ($conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail' && !in_array($action, array('testconnect', 'test', 'testhtml'))) + { + $text = $langs->trans("WarningPHPMail"); + print info_admin($text); + } + + // Run the test to connect + if ($action == 'testconnect') + { + print load_fiche_titre($langs->trans("DoTestServerAvailability")); + + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext); + + $result = $mail->check_server_port($server, $port); + if ($result) print '
'.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'
'; + else { + $errormsg = $langs->trans("ServerNotAvailableOnIPOrPort", $server, $port); + + if ($mail->error) { + $errormsg .= ' - '.$mail->error; + } + + setEventMessages($errormsg, null, 'errors'); + } + print '
'; + } + + // Show email send test form + if ($action == 'test' || $action == 'testhtml') + { + print '
'; + print load_fiche_titre($action == 'testhtml' ? $langs->trans("DoTestSendHTML") : $langs->trans("DoTestSend")); + + dol_fiche_head(''); + + // Cree l'objet formulaire mail + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + $formmail->fromname = (isset($_POST['fromname']) ? $_POST['fromname'] : $conf->global->MAIN_MAIL_EMAIL_FROM); + $formmail->frommail = (isset($_POST['frommail']) ? $_POST['frommail'] : $conf->global->MAIN_MAIL_EMAIL_FROM); + $formmail->trackid = (($action == 'testhtml') ? "testhtml" : "test"); + $formmail->withfromreadonly = 0; + $formmail->withsubstit = 0; + $formmail->withfrom = 1; + $formmail->witherrorsto = 1; + $formmail->withto = (!empty($_POST['sendto']) ? $_POST['sendto'] : ($user->email ? $user->email : 1)); + $formmail->withtocc = (!empty($_POST['sendtocc']) ? $_POST['sendtocc'] : 1); // ! empty to keep field if empty + $formmail->withtoccc = (!empty($_POST['sendtoccc']) ? $_POST['sendtoccc'] : 1); // ! empty to keep field if empty + $formmail->withtopic = (isset($_POST['subject']) ? $_POST['subject'] : $langs->trans("Test")); + $formmail->withtopicreadonly = 0; + $formmail->withfile = 2; + $formmail->withbody = (isset($_POST['message']) ? $_POST['message'] : ($action == 'testhtml' ? $langs->transnoentities("PredefinedMailTestHtml") : $langs->transnoentities("PredefinedMailTest"))); + $formmail->withbodyreadonly = 0; + $formmail->withcancel = 1; + $formmail->withdeliveryreceipt = 1; + $formmail->withfckeditor = ($action == 'testhtml' ? 1 : 0); + $formmail->ckeditortoolbar = 'dolibarr_mailings'; + // Tableau des substitutions + $formmail->substit = $substitutionarrayfortest; + // Tableau des parametres complementaires du post + $formmail->param["action"] = "send"; + $formmail->param["models"] = "body"; + $formmail->param["mailid"] = 0; + $formmail->param["returnurl"] = $_SERVER["PHP_SELF"]; + + // Init list of files + if (GETPOST("mode") == 'init') + { + $formmail->clear_attached_files(); + } + + print $formmail->get_form('addfile', 'removefile'); + + dol_fiche_end(); + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 856ad50c28b..ff15bbdcd40 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -96,9 +96,7 @@ if ($action == 'update' && !$cancel) if ($result > 0) { $db->commit(); - } - else - { + } else { $error++; setEventMessages($langs->trans("FailedToInitializeMenu").' '.$key, null, 'errors'); $db->rollback(); @@ -153,7 +151,7 @@ print '
'; print ''; print ''; -dol_fiche_head($head, 'handler', $langs->trans("Menus"), -1); +dol_fiche_head($head, 'handler', '', -1); print ''.$langs->trans("MenusDesc")."
\n"; print "
\n"; diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index ef58c1042d4..04c1b79a5bc 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -40,8 +40,8 @@ $dirsmartphone = array(); $dirmenus = array_merge(array("/core/menus/"), (array) $conf->modules_parts['menus']); foreach ($dirmenus as $dirmenu) { - $dirstandard[] = $dirmenu.'standard'; - $dirsmartphone[] = $dirmenu.'smartphone'; + $dirstandard[] = $dirmenu.'standard'; + $dirsmartphone[] = $dirmenu.'smartphone'; } $action = GETPOST('action', 'aZ09'); @@ -66,208 +66,192 @@ if (GETPOST("menu_handler")) $menu_handler = GETPOST("menu_handler"); if ($action == 'update') { - if (!$cancel) - { - $leftmenu = ''; $mainmenu = ''; - if (GETPOST('menuIdParent', 'alpha') && !is_numeric(GETPOST('menuIdParent', 'alpha'))) - { - $tmp = explode('&', GETPOST('menuIdParent', 'alpha')); - foreach ($tmp as $s) - { - if (preg_match('/fk_mainmenu=/', $s)) - { - $mainmenu = preg_replace('/fk_mainmenu=/', '', $s); - } - if (preg_match('/fk_leftmenu=/', $s)) - { - $leftmenu = preg_replace('/fk_leftmenu=/', '', $s); - } - } - } + if (!$cancel) + { + $leftmenu = ''; $mainmenu = ''; + if (GETPOST('menuIdParent', 'alpha') && !is_numeric(GETPOST('menuIdParent', 'alpha'))) + { + $tmp = explode('&', GETPOST('menuIdParent', 'alpha')); + foreach ($tmp as $s) + { + if (preg_match('/fk_mainmenu=/', $s)) + { + $mainmenu = preg_replace('/fk_mainmenu=/', '', $s); + } + if (preg_match('/fk_leftmenu=/', $s)) + { + $leftmenu = preg_replace('/fk_leftmenu=/', '', $s); + } + } + } - $menu = new Menubase($db); - $result = $menu->fetch(GETPOST('menuId', 'int')); - if ($result > 0) - { - $menu->titre = GETPOST('titre', 'alpha'); // deprecated - $menu->title = GETPOST('titre', 'alpha'); - $menu->leftmenu = GETPOST('leftmenu', 'aZ09'); - $menu->url = GETPOST('url', 'alpha'); - $menu->langs = GETPOST('langs', 'alpha'); - $menu->position = GETPOST('position', 'int'); - $menu->enabled = GETPOST('enabled', 'alpha'); - $menu->perms = GETPOST('perms', 'alpha'); - $menu->target = GETPOST('target', 'alpha'); - $menu->user = GETPOST('user', 'alpha'); - $menu->mainmenu = GETPOST('propertymainmenu', 'alpha'); - if (is_numeric(GETPOST('menuIdParent', 'alpha'))) - { - $menu->fk_menu = GETPOST('menuIdParent', 'alpha'); - } - else - { - if (GETPOST('type', 'alpha') == 'top') $menu->fk_menu = 0; - else $menu->fk_menu = -1; - $menu->fk_mainmenu = $mainmenu; - $menu->fk_leftmenu = $leftmenu; - } + $menu = new Menubase($db); + $result = $menu->fetch(GETPOST('menuId', 'int')); + if ($result > 0) + { + $menu->title = GETPOST('titre', 'alpha'); + $menu->leftmenu = GETPOST('leftmenu', 'aZ09'); + $menu->url = GETPOST('url', 'alpha'); + $menu->langs = GETPOST('langs', 'alpha'); + $menu->position = GETPOST('position', 'int'); + $menu->enabled = GETPOST('enabled', 'alpha'); + $menu->perms = GETPOST('perms', 'alpha'); + $menu->target = GETPOST('target', 'alpha'); + $menu->user = GETPOST('user', 'alpha'); + $menu->mainmenu = GETPOST('propertymainmenu', 'alpha'); + if (is_numeric(GETPOST('menuIdParent', 'alpha'))) + { + $menu->fk_menu = GETPOST('menuIdParent', 'alpha'); + } else { + if (GETPOST('type', 'alpha') == 'top') $menu->fk_menu = 0; + else $menu->fk_menu = -1; + $menu->fk_mainmenu = $mainmenu; + $menu->fk_leftmenu = $leftmenu; + } - $result = $menu->update($user); - if ($result > 0) - { - setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); - } - else - { - setEventMessages($menu->error, $menu->errors, 'errors'); - } - } - else - { - setEventMessages($menu->error, $menu->errors, 'errors'); - } - $action = "edit"; + $result = $menu->update($user); + if ($result > 0) + { + setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); + } else { + setEventMessages($menu->error, $menu->errors, 'errors'); + } + } else { + setEventMessages($menu->error, $menu->errors, 'errors'); + } + $action = "edit"; - header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); - exit; - } - else - { - header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); - exit; - } + header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); + exit; + } else { + header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); + exit; + } } if ($action == 'add') { - if ($cancel) - { - header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); - exit; - } + if ($cancel) + { + header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); + exit; + } - $leftmenu = ''; $mainmenu = ''; - if (GETPOST('menuId', 'alpha', 3) && !is_numeric(GETPOST('menuId', 'alpha', 3))) - { - $tmp = explode('&', GETPOST('menuId', 'alpha', 3)); - foreach ($tmp as $s) - { - if (preg_match('/fk_mainmenu=/', $s)) - { + $leftmenu = ''; $mainmenu = ''; + if (GETPOST('menuId', 'alpha', 3) && !is_numeric(GETPOST('menuId', 'alpha', 3))) + { + $tmp = explode('&', GETPOST('menuId', 'alpha', 3)); + foreach ($tmp as $s) + { + if (preg_match('/fk_mainmenu=/', $s)) + { $mainmenu = preg_replace('/fk_mainmenu=/', '', $s); - } - if (preg_match('/fk_leftmenu=/', $s)) - { - $leftmenu = preg_replace('/fk_leftmenu=/', '', $s); - } - } - } + } + if (preg_match('/fk_leftmenu=/', $s)) + { + $leftmenu = preg_replace('/fk_leftmenu=/', '', $s); + } + } + } - $langs->load("errors"); + $langs->load("errors"); - $error = 0; - if (!$error && !$_POST['menu_handler']) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MenuHandler")), null, 'errors'); - $action = 'create'; - $error++; - } - if (!$error && !$_POST['type']) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); - $action = 'create'; - $error++; - } - if (!$error && !$_POST['url']) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("URL")), null, 'errors'); - $action = 'create'; - $error++; - } - if (!$error && !$_POST['titre']) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors'); - $action = 'create'; - $error++; - } - if (!$error && $_POST['menuId'] && $_POST['type'] == 'top') - { - setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors'); - $action = 'create'; - $error++; - } - if (!$error && !$_POST['menuId'] && $_POST['type'] == 'left') - { - setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors'); - $action = 'create'; - $error++; - } + $error = 0; + if (!$error && !$_POST['menu_handler']) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MenuHandler")), null, 'errors'); + $action = 'create'; + $error++; + } + if (!$error && !$_POST['type']) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); + $action = 'create'; + $error++; + } + if (!$error && !$_POST['url']) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("URL")), null, 'errors'); + $action = 'create'; + $error++; + } + if (!$error && !$_POST['titre']) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors'); + $action = 'create'; + $error++; + } + if (!$error && $_POST['menuId'] && $_POST['type'] == 'top') + { + setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors'); + $action = 'create'; + $error++; + } + if (!$error && !$_POST['menuId'] && $_POST['type'] == 'left') + { + setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors'); + $action = 'create'; + $error++; + } - if (!$error) - { - $menu = new Menubase($db); - $menu->menu_handler = preg_replace('/_menu$/', '', GETPOST('menu_handler', 'aZ09')); - $menu->type = GETPOST('type', 'alpha'); - $menu->titre = GETPOST('titre', 'alpha'); // deprecated - $menu->title = GETPOST('titre', 'alpha'); - $menu->url = GETPOST('url', 'alpha'); - $menu->langs = GETPOST('langs', 'alpha'); - $menu->position = GETPOST('position', 'int'); - $menu->enabled = GETPOST('enabled', 'alpha'); - $menu->perms = GETPOST('perms', 'alpha'); - $menu->target = GETPOST('target', 'alpha'); - $menu->user = GETPOST('user', 'alpha'); - $menu->mainmenu = GETPOST('propertymainmenu', 'alpha'); - if (is_numeric(GETPOST('menuId', 'alpha', 3))) - { - $menu->fk_menu = GETPOST('menuId', 'alpha', 3); - } - else - { - if (GETPOST('type', 'alpha') == 'top') $menu->fk_menu = 0; - else $menu->fk_menu = -1; - $menu->fk_mainmenu = $mainmenu; - $menu->fk_leftmenu = $leftmenu; - } + if (!$error) + { + $menu = new Menubase($db); + $menu->menu_handler = preg_replace('/_menu$/', '', GETPOST('menu_handler', 'aZ09')); + $menu->type = GETPOST('type', 'alpha'); + $menu->title = GETPOST('titre', 'alpha'); + $menu->url = GETPOST('url', 'alpha'); + $menu->langs = GETPOST('langs', 'alpha'); + $menu->position = GETPOST('position', 'int'); + $menu->enabled = GETPOST('enabled', 'alpha'); + $menu->perms = GETPOST('perms', 'alpha'); + $menu->target = GETPOST('target', 'alpha'); + $menu->user = GETPOST('user', 'alpha'); + $menu->mainmenu = GETPOST('propertymainmenu', 'alpha'); + if (is_numeric(GETPOST('menuId', 'alpha', 3))) + { + $menu->fk_menu = GETPOST('menuId', 'alpha', 3); + } else { + if (GETPOST('type', 'alpha') == 'top') $menu->fk_menu = 0; + else $menu->fk_menu = -1; + $menu->fk_mainmenu = $mainmenu; + $menu->fk_leftmenu = $leftmenu; + } - $result = $menu->create($user); - if ($result > 0) - { - header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".GETPOST('menu_handler', 'aZ09')); - exit; - } - else - { - $action = 'create'; - setEventMessages($menu->error, $menu->errors, 'errors'); - } - } + $result = $menu->create($user); + if ($result > 0) + { + header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".GETPOST('menu_handler', 'aZ09')); + exit; + } else { + $action = 'create'; + setEventMessages($menu->error, $menu->errors, 'errors'); + } + } } // delete if ($action == 'confirm_delete' && $_POST["confirm"] == 'yes') { - $this->db->begin(); + $this->db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".GETPOST('menuId', 'int'); - $result = $db->query($sql); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".GETPOST('menuId', 'int'); + $result = $db->query($sql); - if ($result == 0) - { - $this->db->commit(); + if ($result == 0) + { + $this->db->commit(); - llxHeader(); - setEventMessages($langs->trans("MenuDeleted"), null, 'mesgs'); - llxFooter(); - exit; - } - else - { - $this->db->rollback(); + llxHeader(); + setEventMessages($langs->trans("MenuDeleted"), null, 'mesgs'); + llxFooter(); + exit; + } else { + $this->db->rollback(); - $reload = 0; - $_GET["action"] = ''; - } + $reload = 0; + $_GET["action"] = ''; + } } @@ -284,7 +268,7 @@ llxHeader('', $langs->trans("Menu")); if ($action == 'create') { - print ''; - print load_fiche_titre($langs->trans("NewMenu"), '', 'title_setup'); + print load_fiche_titre($langs->trans("NewMenu"), '', 'title_setup'); - print ''; - print ''; + print ''; + print ''; - dol_fiche_head(); + dol_fiche_head(); - print ''; + print '
'; - // Id - $parent_rowid = GETPOST('menuId', 'int'); - if (GETPOST('menuId', 'int')) - { - $sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".GETPOST('menuId', 'int'); - $res = $db->query($sql); - if ($res) - { - while ($menu = $db->fetch_array($res)) - { - $parent_rowid = $menu['rowid']; - $parent_mainmenu = $menu['mainmenu']; - $parent_leftmenu = $menu['leftmenu']; - $parent_langs = $menu['langs']; - $parent_level = $menu['level']; - } - } - } + // Id + $parent_rowid = GETPOST('menuId', 'int'); + if (GETPOST('menuId', 'int')) + { + $sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".GETPOST('menuId', 'int'); + $res = $db->query($sql); + if ($res) + { + while ($menu = $db->fetch_array($res)) + { + $parent_rowid = $menu['rowid']; + $parent_mainmenu = $menu['mainmenu']; + $parent_leftmenu = $menu['leftmenu']; + $parent_langs = $menu['langs']; + $parent_level = $menu['level']; + } + } + } - // Handler - print ''; - print ''; - print ''; + // Handler + print ''; + print ''; + print ''; - // User - print ''; - print ''; - print ''; + // User + print ''; + print ''; + print ''; - // Type - print ''; + // Type + print ''; - // Mainmenu code - print ''; + // Mainmenu code + print ''; print ''; - print ''; + print ''; - // MenuId Parent - print ''; - if ($parent_rowid) - { - print ''; - } - else - { - print ''; - } - print ''; + // MenuId Parent + print ''; + if ($parent_rowid) + { + print ''; + } else { + print ''; + } + print ''; - // Title - print ''; + // Title + print ''; - // URL - print ''; + // URL + print ''; - // Langs - print ''; + // Langs + print ''; - // Position - print ''; + // Position + print ''; - // Target - print ''; + // Target + print ''; - // Enabled - print ''; + // Enabled + print ''; - // Perms - print ''; + // Perms + print ''; - print '
'.$langs->trans('MenuHandler').''; - $formadmin->select_menu_families($menu_handler.(preg_match('/_menu/', $menu_handler) ? '' : '_menu'), 'menu_handler', array_merge($dirstandard, $dirsmartphone)); - print ''.$langs->trans('DetailMenuHandler').'
'.$langs->trans('MenuHandler').''; + $formadmin->select_menu_families($menu_handler.(preg_match('/_menu/', $menu_handler) ? '' : '_menu'), 'menu_handler', array_merge($dirstandard, $dirsmartphone)); + print ''.$langs->trans('DetailMenuHandler').'
'.$langs->trans('MenuForUsers').''.$langs->trans('DetailUser').'
'.$langs->trans('MenuForUsers').''.$langs->trans('DetailUser').'
'.$langs->trans('Type').''; - if ($parent_rowid) - { - print $langs->trans('Left'); - print ''; - } - else - { - print ''; - } - print ''.$langs->trans('DetailType').'
'.$langs->trans('Type').''; + if ($parent_rowid) + { + print $langs->trans('Left'); + print ''; + } else { + print ''; + } + print ''.$langs->trans('DetailType').'
'.$langs->trans('MainMenuCode').'
'.$langs->trans('MainMenuCode').''; - print $langs->trans("Example").': mytopmenukey'; - print '
'; + print $langs->trans("Example").': mytopmenukey'; + print '
'.$langs->trans('MenuIdParent').''.$parent_rowid.''.$langs->trans('DetailMenuIdParent'); - print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; - print '
'.$langs->trans('MenuIdParent').''.$parent_rowid.''.$langs->trans('DetailMenuIdParent'); + print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; + print '
'.$langs->trans('Title').''.$langs->trans('DetailTitre').'
'.$langs->trans('Title').''.$langs->trans('DetailTitre').'
'.$langs->trans('URL').''.$langs->trans('DetailUrl').'
'.$langs->trans('URL').''.$langs->trans('DetailUrl').'
'.$langs->trans('LangFile').''.$langs->trans('DetailLangs').'
'.$langs->trans('LangFile').''.$langs->trans('DetailLangs').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('Target').''.$langs->trans('DetailTarget').'
'.$langs->trans('Target').''.$langs->trans('DetailTarget').'
'.$langs->trans('Enabled').''.$langs->trans('DetailEnabled').'
'.$langs->trans('Enabled').''.$langs->trans('DetailEnabled').'
'.$langs->trans('Rights').''.$langs->trans('DetailRight').'
'.$langs->trans('Rights').''.$langs->trans('DetailRight').'
'; + print ''; - dol_fiche_end(); + dol_fiche_end(); - print '
'; + print '
'; print ''; - print '     '; - print ''; + print '     '; + print ''; print '
'; - print ''; -} -elseif ($action == 'edit') + print ''; +} elseif ($action == 'edit') { - print load_fiche_titre($langs->trans("ModifMenu"), '', 'title_setup'); - print '
'; + print load_fiche_titre($langs->trans("ModifMenu"), '', 'title_setup'); + print '
'; - print '
'; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - dol_fiche_head(); + dol_fiche_head(); - print ''; + print '
'; - $menu = new Menubase($db); - $result = $menu->fetch(GETPOST('menuId', 'int')); - //var_dump($menu); + $menu = new Menubase($db); + $result = $menu->fetch(GETPOST('menuId', 'int')); + //var_dump($menu); - // Id - print ''; + // Id + print ''; - // Module - print ''; + // Module + print ''; - // Handler - if ($menu->menu_handler == 'all') $handler = $langs->trans('AllMenus'); - else $handler = $menu->menu_handler; - print ''; + // Handler + if ($menu->menu_handler == 'all') $handler = $langs->trans('AllMenus'); + else $handler = $menu->menu_handler; + print ''; - // User - print ''; + // User + print ''; - // Type - print ''; + // Type + print ''; - // Mainmenu code - if ($menu->type == 'top') - { - print ''; - /*if ($parent_rowid) + // Mainmenu code + if ($menu->type == 'top') + { + print ''; + /*if ($parent_rowid) { print ''; } else {*/ - print ''; - //} - print ''; - } + print ''; + //} + print ''; + } - // MenuId Parent - print ''; - $valtouse = $menu->fk_menu; - if ($menu->fk_mainmenu) $valtouse = 'fk_mainmenu='.$menu->fk_mainmenu; - if ($menu->fk_leftmenu) $valtouse .= '&fk_leftmenu='.$menu->fk_leftmenu; - print ''; - print ''; + // MenuId Parent + print ''; + $valtouse = $menu->fk_menu; + if ($menu->fk_mainmenu) $valtouse = 'fk_mainmenu='.$menu->fk_mainmenu; + if ($menu->fk_leftmenu) $valtouse .= '&fk_leftmenu='.$menu->fk_leftmenu; + print ''; + print ''; - // Niveau - //print ''; + // Niveau + //print ''; - // Title - print ''; + // Title + print ''; - // Url - print ''; + // Url + print ''; - // Langs - print ''; + // Langs + print ''; - // Position - print ''; + // Position + print ''; - // Target - print ''; + // Target + print ''; - // Enabled - print ''; + // Enabled + print ''; - // Perms - print ''; + // Perms + print ''; - print '
'.$langs->trans('Id').''.$menu->id.''.$langs->trans('DetailId').'
'.$langs->trans('Id').''.$menu->id.''.$langs->trans('DetailId').'
'.$langs->trans('MenuModule').''.$menu->module.''.$langs->trans('DetailMenuModule').'
'.$langs->trans('MenuModule').''.$menu->module.''.$langs->trans('DetailMenuModule').'
'.$langs->trans('MenuHandler').''.$handler.''.$langs->trans('DetailMenuHandler').'
'.$langs->trans('MenuHandler').''.$handler.''.$langs->trans('DetailMenuHandler').'
'.$langs->trans('MenuForUsers').''.$langs->trans('DetailUser').'
'.$langs->trans('MenuForUsers').''.$langs->trans('DetailUser').'
'.$langs->trans('Type').''.$langs->trans(ucfirst($menu->type)).''.$langs->trans('DetailType').'
'.$langs->trans('Type').''.$langs->trans(ucfirst($menu->type)).''.$langs->trans('DetailType').'
'.$langs->trans('MainMenuCode').'
'.$langs->trans('MainMenuCode').''.$parent_rowid.'mainmenu).'">'; - print $langs->trans("Example").': mytopmenukey'; - print '
mainmenu).'">'; + print $langs->trans("Example").': mytopmenukey'; + print '
'.$langs->trans('MenuIdParent'); - print ''.$langs->trans('DetailMenuIdParent'); - print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; - print '
'.$langs->trans('MenuIdParent'); + print ''.$langs->trans('DetailMenuIdParent'); + print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; + print '
'.$langs->trans('Level').''.$menu->level.''.$langs->trans('DetailLevel').'
'.$langs->trans('Level').''.$menu->level.''.$langs->trans('DetailLevel').'
'.$langs->trans('Title').''.$langs->trans('DetailTitre').'
'.$langs->trans('Title').''.$langs->trans('DetailTitre').'
'.$langs->trans('URL').''.$langs->trans('DetailUrl').'
'.$langs->trans('URL').''.$langs->trans('DetailUrl').'
'.$langs->trans('LangFile').''.$langs->trans('DetailLangs').'
'.$langs->trans('LangFile').''.$langs->trans('DetailLangs').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('Target').''.$langs->trans('DetailTarget').'
'.$langs->trans('Target').''.$langs->trans('DetailTarget').'
'.$langs->trans('Enabled').''.$langs->trans('DetailEnabled'); - if (!empty($menu->enabled)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->enabled, 1)).')'; - print '
'.$langs->trans('Enabled').''.$langs->trans('DetailEnabled'); + if (!empty($menu->enabled)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->enabled, 1)).')'; + print '
'.$langs->trans('Rights').''.$langs->trans('DetailRight'); - if (!empty($menu->perms)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->perms, 1)).')'; - print '
'.$langs->trans('Rights').''.$langs->trans('DetailRight'); + if (!empty($menu->perms)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->perms, 1)).')'; + print '
'; + print ''; - dol_fiche_end(); + dol_fiche_end(); - // Bouton - print '
'; + // Bouton + print '
'; print ''; - print '     '; - print ''; + print '     '; + print ''; print '
'; - print ''; + print ''; - print '
'; + print '
'; } // End of page diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 97f0246ac88..095905afe8b 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007 Patrick Raguin * Copyright (C) 2007-2012 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -118,9 +118,7 @@ if ($action == 'up') $sql .= " WHERE m.rowid = ".$previous['rowid']; // Descend celui du dessus dol_syslog("admin/menus/index.php ".$sql); $db->query($sql); -} - -elseif ($action == 'down') +} elseif ($action == 'down') { $current = array(); $next = array(); @@ -174,9 +172,7 @@ elseif ($action == 'down') $sql .= " WHERE m.rowid = ".$next['rowid']; dol_syslog("admin/menus/index.php ".$sql); $db->query($sql); -} - -elseif ($action == 'confirm_delete' && $confirm == 'yes') +} elseif ($action == 'confirm_delete' && $confirm == 'yes') { $db->begin(); @@ -191,9 +187,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes') header("Location: ".DOL_URL_ROOT.'/admin/menus/index.php?menu_handler='.$menu_handler); exit; - } - else - { + } else { $db->rollback(); $reload = 0; @@ -235,7 +229,7 @@ $head[$h][1] = $langs->trans("Miscellaneous"); $head[$h][2] = 'misc'; $h++; -dol_fiche_head($head, 'editor', $langs->trans("Menus"), -1); +dol_fiche_head($head, 'editor', '', -1); print ''.$langs->trans("MenusEditorDesc")."
\n"; print "
\n"; @@ -328,18 +322,18 @@ if ($conf->use_javascript_ajax) $entry = '
'; $entry .= '   '.$titre.''; $entry .= ''; - $entry .= ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; - $entry .= ''.img_edit_add('default').' '; - $entry .= ''.img_delete('default').' '; + $entry .= ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; + $entry .= ''.img_edit_add('default').' '; + $entry .= ''.img_delete('default').' '; $entry .= '     '; - $entry .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; + $entry .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; $entry .= '
'; - $buttons = ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; - $buttons .= ''.img_edit_add('default').' '; - $buttons .= ''.img_delete('default').' '; + $buttons = ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; + $buttons .= ''.img_edit_add('default').' '; + $buttons .= ''.img_delete('default').' '; $buttons .= '     '; - $buttons .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; + $buttons .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; $data[] = array( 'rowid'=>$menu['rowid'], @@ -408,9 +402,7 @@ if ($conf->use_javascript_ajax) } print '
'; -} -else -{ +} else { $langs->load("errors"); setEventMessages($langs->trans("ErrorFeatureNeedJavascript"), null, 'errors'); } diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index ed35f48d90e..2fad8491e7a 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -41,8 +41,7 @@ if ($action == 'activate_hidemenu') dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", '1', 'chaine', 0, '', $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]); exit; -} -elseif ($action == 'disable_hidemenu') +} elseif ($action == 'disable_hidemenu') { dolibarr_del_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]); @@ -76,7 +75,7 @@ $head[$h][1] = $langs->trans("Miscellaneous"); $head[$h][2] = 'misc'; $h++; -dol_fiche_head($head, 'misc', $langs->trans("Menus"), -1); +dol_fiche_head($head, 'misc', '', -1); // Other Options @@ -94,9 +93,7 @@ print ''; if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; -} -else -{ +} else { print ''.img_picto($langs->trans("Enabled"), 'switch_on').''; } print ""; diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index d5bf12f1061..2e256f3c5ad 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -105,8 +105,7 @@ foreach ($modulesdir as $dir) continue; } - try - { + try { $res = include_once $dir.$file; if (class_exists($modName)) { @@ -140,9 +139,7 @@ foreach ($modulesdir as $dir) if ($publisher) { $arrayofnatures['external_'.$publisher] = $langs->trans("External").' - '.$publisher; - } - else - { + } else { $arrayofnatures['external_'] = $langs->trans("External").' - '.$langs->trans("UnknownPublishers"); } } @@ -180,20 +177,15 @@ foreach ($modulesdir as $dir) else $categ[$specialstring] = 1; $j++; $i++; - } - else dol_syslog("Module ".get_class($objMod)." not qualified"); - } - catch (Exception $e) + } else dol_syslog("Module ".get_class($objMod)." not qualified"); + } catch (Exception $e) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); } - } - else - { + } else { print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)
"; } - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); } @@ -201,9 +193,7 @@ foreach ($modulesdir as $dir) } } closedir($handle); - } - else - { + } else { dol_syslog("htdocs/admin/modulehelp.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING); } } @@ -272,7 +262,7 @@ print '
'; $picto = 'object_'.$objMod->picto; -print load_fiche_titre(($modulename ? $modulename : $moduledesc), $moreinfo, $picto); +print load_fiche_titre(($modulename ? $modulename : $moduledesc), $moreinfo, $picto, 0, '', 'titlemodulehelp'); print '
'; dol_fiche_head($head, $mode, '', -1); @@ -331,9 +321,7 @@ if ($mode == 'desc') if (!empty($objMod->editor_url) && !preg_match('/dolibarr\.org/i', $objMod->editor_url)) $textexternal .= ($objMod->editor_name != 'dolibarr' ? ' - ' : '').img_picto('', 'globe').' '.$objMod->editor_url.''; $text .= $textexternal; $text .= '
'; - } - else - { + } else { $text .= '
'.$langs->trans("Origin").': '.$langs->trans("Core").'
'; } @@ -353,7 +341,7 @@ if ($mode == 'feature') $text .= '

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

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

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip .= '
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); + $htmltooltip .= '
'.$langs->trans("WatermarkOnDraftMOs").': '.yn($module->option_draft_watermark, 1, 1); - print ''; - print $form->textwithpicto('', $htmltooltip, 1, 0); - print ''; + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; - // Preview - print ''; - if ($module->type == 'pdf') - { - print ''.img_object($langs->trans("Preview"), 'bill').''; - } - else - { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); - } - print ''; + // Preview + print ''; + if ($module->type == 'pdf') + { + print ''.img_object($langs->trans("Preview"), 'bill').''; + } else { + print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + } + print ''; - print "\n"; - } - } - } - } - } - } - } + print "\n"; + } + } + } + } + } + } + } } print ''; @@ -488,13 +458,11 @@ print $form->textwithpicto($langs->trans("FreeLegalTextOnMOs"), $langs->trans("A $variablename = 'MRP_MO_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { - print ''; -} -else -{ - include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); - print $doleditor->Create(); + print ''; +} else { + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); + print $doleditor->Create(); } print ''; print ''; diff --git a/htdocs/admin/mrp_extrafields.php b/htdocs/admin/mrp_extrafields.php new file mode 100644 index 00000000000..cab7232f569 --- /dev/null +++ b/htdocs/admin/mrp_extrafields.php @@ -0,0 +1,113 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2015 Jean-François Ferry + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/mrp_extrafields.php + * \ingroup mrp + * \brief Page to setup extra fields of MOs + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/mrp/lib/mrp.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('mrp', 'admin')); + +$extrafields = new ExtraFields($db); +$form = new Form($db); + +// List of supported format +$tmptype2label = ExtraFields::$type2label; +$type2label = array(''); +foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); + +$action = GETPOST('action', 'alpha'); +$attrname = GETPOST('attrname', 'alpha'); +$elementtype = 'mrp_mo'; + +if (!$user->admin) accessforbidden(); + + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; + + + +/* + * View + */ + + +llxHeader('', $langs->trans("MrpSetupPage"), $help_url); + + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("MrpSetupPage"), $linkback, 'title_setup'); + + +$head = mrpAdminPrepareHead(); + +dol_fiche_head($head, 'mrp_extrafields', $langs->trans("ExtraFields"), -1, 'account'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +dol_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') +{ + print '
'; + print "".$langs->trans("NewAttribute").""; + print "
"; +} + + +/* + * Creation of an optional field + */ +if ($action == 'create') +{ + print '
'; + print load_fiche_titre($langs->trans('NewAttribute')); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +/* + * Edition of an optional field + */ +if ($action == 'edit' && !empty($attrname)) +{ + print "
"; + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 4ba581398ee..a7e073f08d2 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -53,9 +53,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -66,9 +64,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if (dolibarr_del_const($db, $code, 0) > 0) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -96,11 +92,9 @@ if ($action == 'add_currency') { if ($currency->addRate($rate)) setEventMessages($langs->trans('RecordSaved'), array()); else setEventMessages($langs->trans('ErrorAddRateFail'), array(), 'errors'); - } - else setEventMessages($langs->trans('ErrorAddCurrencyFail'), $currency->errors, 'errors'); + } else setEventMessages($langs->trans('ErrorAddCurrencyFail'), $currency->errors, 'errors'); } -} -elseif ($action == 'update_currency') +} elseif ($action == 'update_currency') { $error = 0; @@ -125,8 +119,7 @@ elseif ($action == 'update_currency') } } } - } - elseif (GETPOST('deletecurrency', 'alpha')) + } elseif (GETPOST('deletecurrency', 'alpha')) { $fk_multicurrency = GETPOST('fk_multicurrency', 'int'); $currency = new MultiCurrency($db); @@ -137,17 +130,14 @@ elseif ($action == 'update_currency') else setEventMessages($langs->trans('ErrorDeleteCurrencyFail'), array(), 'errors'); } } -} -elseif ($action == 'setapilayer') +} elseif ($action == 'setapilayer') { if (GETPOSTISSET('modify_apilayer')) { dolibarr_set_const($db, 'MULTICURRENCY_APP_ID', GETPOST('MULTICURRENCY_APP_ID', 'alpha')); dolibarr_set_const($db, 'MULTICURRENCY_APP_SOURCE', GETPOST('MULTICURRENCY_APP_SOURCE', 'alpha')); //dolibarr_set_const($db, 'MULTICURRENCY_ALTERNATE_SOURCE', GETPOST('MULTICURRENCY_ALTERNATE_SOURCE', 'alpha')); - } - else - { + } else { $result = MultiCurrency::syncRates($conf->global->MULTICURRENCY_APP_ID); if ($result > 0) { setEventMessages($langs->trans("CurrencyRateSyncSucceed"), null, "mesgs"); diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index ba92aa1ec21..a32cd0fa1f5 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -84,9 +84,7 @@ if ($action == 'settemplates') $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); @@ -106,9 +104,7 @@ if ($action == 'setvalue' && $user->admin) $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); @@ -140,8 +136,7 @@ if ($action == 'setfixednotif' && $user->admin) $newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount')); $newval = GETPOST($shortkey.'_key'); //print $newkey.' - '.$newval.'
'; - } - elseif (preg_match('/^NOTIF_(.*)_new_key/', $key, $reg)) + } elseif (preg_match('/^NOTIF_(.*)_new_key/', $key, $reg)) { // Add a new entry $newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount')); @@ -160,9 +155,7 @@ if ($action == 'setfixednotif' && $user->admin) $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index 785a77ac043..85cd9284535 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -119,9 +119,7 @@ foreach ($list as $key) print ''.$langs->trans("UseTheFollowingUrlAsRedirectURI").''; print ''; print ''; - } - else - { + } else { print ''; print ''.$langs->trans("UseTheFollowingUrlAsRedirectURI").''; print ''.$langs->trans("FeatureNotYetSupported").''; diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index d8c65f9a2c5..a78913b7e16 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -78,9 +78,7 @@ if ($action == 'setconst' && $user->admin) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -98,9 +96,7 @@ if ($action == 'setvalue' && $user->admin) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -153,8 +149,7 @@ if ($mode == 'setup' && $user->admin) $urltorenew = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltocheckperms = 'https://github.com/settings/applications/'; - } - elseif ($key[0] == 'OAUTH_GOOGLE_NAME') + } elseif ($key[0] == 'OAUTH_GOOGLE_NAME') { $OAUTH_SERVICENAME = 'Google'; // List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service). @@ -164,23 +159,19 @@ if ($mode == 'setup' && $user->admin) $urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltocheckperms = 'https://security.google.com/settings/security/permissions'; - } - elseif ($key[0] == 'OAUTH_STRIPE_TEST_NAME') + } elseif ($key[0] == 'OAUTH_STRIPE_TEST_NAME') { $OAUTH_SERVICENAME = 'StripeTest'; $urltorenew = $urlwithroot.'/core/modules/oauth/stripetest_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = ''; $urltocheckperms = ''; - } - elseif ($key[0] == 'OAUTH_STRIPE_LIVE_NAME') + } elseif ($key[0] == 'OAUTH_STRIPE_LIVE_NAME') { $OAUTH_SERVICENAME = 'StripeLive'; $urltorenew = $urlwithroot.'/core/modules/oauth/stripelive_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = ''; $urltocheckperms = ''; - } - else - { + } else { $urltorenew = ''; $urltodelete = ''; $urltocheckperms = ''; @@ -194,11 +185,9 @@ if ($mode == 'setup' && $user->admin) require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; // Dolibarr storage $storage = new DoliStorage($db, $conf); - try - { + try { $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); - } - catch (Exception $e) + } catch (Exception $e) { // Return an error if token not found } @@ -221,13 +210,10 @@ if ($mode == 'setup' && $user->admin) if ($endoflife == $tokenobj::EOL_NEVER_EXPIRES) { $expiredat = $langs->trans("Never"); - } - elseif ($endoflife == $tokenobj::EOL_UNKNOWN) + } elseif ($endoflife == $tokenobj::EOL_UNKNOWN) { $expiredat = $langs->trans("Unknown"); - } - else - { + } else { $expiredat = dol_print_date($endoflife, "dayhour"); } } @@ -372,8 +358,7 @@ if ($mode == 'test' && $user->admin) } else { setEventMessages($printer->error, $printer->errors, 'errors'); } - } - else { + } else { print $langs->trans('PleaseConfigureDriverfromList'); } } diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index a5b494b62e2..85d7e140a6d 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -56,9 +56,7 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -183,9 +181,7 @@ foreach ($dirmodels as $reldir) if ($conf->global->PAYMENT_ADDON == $file || $conf->global->PAYMENT_ADDON.'.php' == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { + } else { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; } print ''; diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php new file mode 100644 index 00000000000..a19a69c75a5 --- /dev/null +++ b/htdocs/admin/paymentbybanktransfer.php @@ -0,0 +1,482 @@ + + * Copyright (C) 2005-2014 Laurent Destailleur + * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2019 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/credtitransfer.php + * \ingroup paymentbybanktransfer + * \brief Page to setup payments by credit transfer + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("admin", "withdrawals")); + +// Security check +if (!$user->admin) accessforbidden(); + +$action = GETPOST('action', 'alpha'); +$type = 'paymentorder'; + + +/* + * Actions + */ + +if ($action == "set") +{ + $db->begin(); + + $id = GETPOST('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT', 'int'); + $account = new Account($db); + if ($account->fetch($id) > 0) + { + $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity); + if (!$res > 0) $error++; + /* + $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_CODE_GUICHET", $account->code_guichet,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_NUMERO_COMPTE", $account->number,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_NUMBER_KEY", $account->cle_rib,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_IBAN", $account->iban,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_BIC", $account->bic,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + $res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + */ + } else $error++; + + $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ICS", GETPOST("PAYMENTBYBANKTRANSFER_ICS"), 'chaine', 0, '', $conf->entity); + if (!$res > 0) $error++; + + if (GETPOST("PAYMENTBYBANKTRANSFER_USER") > 0) + { + $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USER", GETPOST("PAYMENTBYBANKTRANSFER_USER"), 'chaine', 0, '', $conf->entity); + if (!$res > 0) $error++; + } + /* + if (GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END") || GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END") == "") + { + $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_END_TO_END", GETPOST("PAYMENTBYBANKTRANSFER_END_TO_END"), 'chaine', 0, '', $conf->entity); + if (!$res > 0) $error++; + } + if (GETPOST("PAYMENTBYBANKTRANSFER_USTRD") || GETPOST("PAYMENTBYBANKTRANSFER_USTRD") == "") + { + $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USTRD", GETPOST("PAYMENTBYBANKTRANSFER_USTRD"), 'chaine', 0, '', $conf->entity); + if (!$res > 0) $error++; + } + */ + if (GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS") || GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS") == "") + { + $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ADDDAYS", GETPOST("PAYMENTBYBANKTRANSFER_ADDDAYS"), 'chaine', 0, '', $conf->entity); + if (!$res > 0) $error++; + } elseif (!$error) + { + $db->commit(); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + $db->rollback(); + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + +if ($action == "addnotif") +{ + $bon = new BonPrelevement($db); + $bon->AddNotification($db, GETPOST('user', 'int'), $action); + + header("Location: ".$_SERVER["PHP_SELF"]); + exit; +} + +if ($action == "deletenotif") +{ + $bon = new BonPrelevement($db); + $bon->DeleteNotificationById(GETPOST('notif', 'int')); + + header("Location: ".$_SERVER["PHP_SELF"]); + exit; +} + + +/* + * View + */ + +$form = new Form($db); + +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + +llxHeader('', $langs->trans("CreditTransferSetup")); + +$linkback = ''.$langs->trans("BackToModuleList").''; + +print load_fiche_titre($langs->trans("CreditTransferSetup"), $linkback, 'title_setup'); +print '
'; + +print '
'; +print ''; + +print ''; + +print ''; +print ''; +print ''; +print ""; + +// Bank account (from Banks module) +print ''; +print ''; + +// ICS +print ''; +print ''; +print ''; + +//User +print ''; +print ''; +print ''; + +/* +//EntToEnd +print ''; +print ''; +print ''; + +//USTRD +print ''; +print ''; +print ''; +*/ + +//ADDDAYS +print ''; +print ''; +print ''; +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("BankToPayCreditTransfer").''; +$form->select_comptes($conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT, 'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT', 0, "courant=1", 1); +print '
'.$langs->trans("ICS").''; +print '
'.$langs->trans("ResponsibleUser").''; +print $form->select_dolusers($conf->global->PAYMENTBYBANKTRANSFER_USER, 'PAYMENTBYBANKTRANSFER_USER', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); +print '
'.$langs->trans("END_TO_END").''; +print '
'.$langs->trans("USTRD").''; +print '
'.$langs->trans("ADDDAYS").''; +if (!$conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS) $conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS = 0; +print '
'; +print '
'; + +print '
'; + +print '
'; + + +print '
'; + + +/* + * Document templates generators + */ +/* +print load_fiche_titre($langs->trans("OrdersModelModule"),'',''); + +// Load array def with activated templates +$def = array(); +$sql = "SELECT nom"; +$sql.= " FROM ".MAIN_DB_PREFIX."document_model"; +$sql.= " WHERE type = '".$type."'"; +$sql.= " AND entity = ".$conf->entity; +$resql=$db->query($sql); +if ($resql) +{ + $i = 0; + $num_rows=$db->num_rows($resql); + while ($i < $num_rows) + { + $array = $db->fetch_array($resql); + array_push($def, $array[0]); + $i++; + } +} +else +{ + dol_print_error($db); +} + + +print "\n"; +print "\n"; +print ''; +print ''; +print '\n"; +print '\n"; +print ''; +print ''; +print "\n"; + +clearstatcache(); + +foreach ($dirmodels as $reldir) +{ + foreach (array('','/doc') as $valdir) + { + $dir = dol_buildpath($reldir."core/modules/paymentorders".$valdir); + + if (is_dir($dir)) + { + $handle=opendir($dir); + if (is_resource($handle)) + { + while (($file = readdir($handle))!==false) + { + $filelist[]=$file; + } + closedir($handle); + arsort($filelist); + + foreach($filelist as $file) + { + if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file)) + { + + if (file_exists($dir.'/'.$file)) + { + $name = substr($file, 4, dol_strlen($file) -16); + $classname = substr($file, 0, dol_strlen($file) -12); + + require_once $dir.'/'.$file; + $module = new $classname($db); + + $modulequalified=1; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; + + if ($modulequalified) + { + $var = !$var; + print ''; + + // Active + if (in_array($name, $def)) + { + print ''; + } + else + { + print '"; + } + + // Default + print ''; + + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); + if ($module->type == 'pdf') + { + $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + } + $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); + $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1); + $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1); + $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1); + //$htmltooltip.='
'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1); + //$htmltooltip.='
'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1); + $htmltooltip.='
'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1); + + + print ''; + + // Preview + print ''; + + print "\n"; + } + } + } + } + } + } + } +} + +*/ + + +dol_fiche_end(); + +print '
'; + + +/* + * Notifications + */ + +/* Disable this, there is no trigger with elementtype 'withdraw' +if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) +{ + $langs->load("mails"); + print load_fiche_titre($langs->trans("Notifications")); + + $sql = "SELECT u.rowid, u.lastname, u.firstname, u.fk_soc, u.email"; + $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; + $sql.= " WHERE entity IN (".getEntity('invoice').")"; + + $resql=$db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + if (!$obj->fk_soc) + { + $username=dolGetFirstLastname($obj->firstname,$obj->lastname); + $internalusers[$obj->rowid] = $username; + } + + $i++; + } + $db->free($resql); + } + + // Get list of triggers for module withdraw + $sql = "SELECT rowid, code, label"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger"; + $sql.= " WHERE elementtype = 'withdraw'"; + $sql.= " ORDER BY rang ASC"; + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label); + $actions[$obj->rowid]=$label; + $i++; + } + $db->free($resql); + } + + + print ''; + print ''; + print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
'; + print (empty($module->name)?$name:$module->name); + print "\n"; + if (method_exists($module,'info')) print $module->info($langs); + else print $module->description; + print ''."\n"; + print ''; + print img_picto($langs->trans("Enabled"),'switch_on'); + print ''; + print ''."\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; + print "'; + if ($conf->global->PAYMENTORDER_ADDON_PDF == $name) + { + print img_picto($langs->trans("Default"),'on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; + } + print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + print ''; + if ($module->type == 'pdf') + { + print ''.img_object($langs->trans("Preview"),'bill').''; + } + else + { + print img_object($langs->trans("PreviewNotAvailable"),'generic'); + } + print '
'; + print ''; + print ''; + print ''; + print ''; + print "\n"; + + print ''; + + print ''; + + print ''; + + // List of current notifications for objet_type='withdraw' + $sql = "SELECT u.lastname, u.firstname,"; + $sql.= " nd.rowid, ad.code, ad.label"; + $sql.= " FROM ".MAIN_DB_PREFIX."user as u,"; + $sql.= " ".MAIN_DB_PREFIX."notify_def as nd,"; + $sql.= " ".MAIN_DB_PREFIX."c_action_trigger as ad"; + $sql.= " WHERE u.rowid = nd.fk_user"; + $sql.= " AND nd.fk_action = ad.rowid"; + $sql.= " AND u.entity IN (0,".$conf->entity.")"; + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + + print ''; + print ''; + $label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label); + print ''; + print ''; + print ''; + $i++; + } + $db->free($resql); + } + + print '
'.$langs->trans("User").''.$langs->trans("Value").''.$langs->trans("Action").'
'; + print $form->selectarray('user',$internalusers);// select_dolusers(0,'user',0); + print ''; + print $form->selectarray('action',$actions);// select_dolusers(0,'user',0); + print '
'.dolGetFirstLastname($obj->firstname,$obj->lastname).''.$label.'rowid.'">'.img_delete().'
'; + print ''; +} +*/ + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 496a32923f7..6fb1cb297dd 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -72,6 +72,7 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DESC", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DESC"], 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_REF"], 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_DOCUMENTS_LOGO_HEIGHT", GETPOST("MAIN_DOCUMENTS_LOGO_HEIGHT", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INVERT_SENDER_RECIPIENT", $_POST["MAIN_INVERT_SENDER_RECIPIENT"], 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_PDF_USE_ISO_LOCATION", $_POST["MAIN_PDF_USE_ISO_LOCATION"], 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"], 'chaine', 0, '', $conf->entity); @@ -82,6 +83,7 @@ if ($action == 'update') dolibarr_set_const($db, "PDF_USE_ALSO_LANGUAGE_CODE", GETPOST('PDF_USE_ALSO_LANGUAGE_CODE', 'alpha'), 'chaine', 0, '', $conf->entity); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; @@ -92,8 +94,7 @@ if ($action == 'activate_pdfsecurity') dolibarr_set_const($db, "PDF_SECURITY_ENCRYPTION", "1", 'chaine', 0, '', $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; -} -elseif ($action == 'disable_pdfsecurity') +} elseif ($action == 'disable_pdfsecurity') { dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION", $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); @@ -120,9 +121,41 @@ $arraydetailsforpdffoot = array( 3 => $langs->transnoentitiesnoconv('DisplayCompanyInfoAndManagers') ); +$s = $langs->trans("LibraryToBuildPDF")."
"; +$i = 0; +$pdf = pdf_getInstance('A4'); +if (class_exists('FPDF') && !class_exists('TCPDF')) +{ + if ($i) $s .= ' + '; + $s .= 'FPDF'; + $s .= ' ('.@constant('FPDF_PATH').')'; + $i++; +} +if (class_exists('TCPDF')) +{ + if ($i) $s .= ' + '; + $s .= 'TCPDF'; + $s .= ' ('.@constant('TCPDF_PATH').')'; + $i++; +} +if (class_exists('FPDI')) +{ + if ($i) $s .= ' + '; + $s .= 'FPDI'; + $s .= ' ('.@constant('FPDI_PATH').')'; + $i++; +} +if (class_exists('TCPDI')) +{ + if ($i) $s .= ' + '; + $s .= 'TCPDI'; + $s .= ' ('.@constant('TCPDI_PATH').')'; + $i++; +} + print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); -print ''.$langs->trans("PDFDesc")."
\n"; +print ''.$form->textwithpicto($langs->trans("PDFDesc"), $s)."
\n"; print "
\n"; $noCountryCode = (empty($mysoc->country_code) ? true : false); @@ -189,9 +222,7 @@ for ($i = 1; $i <= 6; $i++) { $pid = $langs->transcountry("ProfId".$i, $mysoc->country_code); if ($pid == '-') $pid = false; - } - else - { + } else { $pid = img_warning().' '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).''; } if ($pid) @@ -264,6 +295,12 @@ print '
'; print ''; print ''; +// Height of logo + +print ''; + //Desc print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DOCUMENTS_LOGO_HEIGHT").''; +print ''; +print '
'.$langs->trans("HideDescOnPDF").''; @@ -312,62 +349,6 @@ print '
'; print '
'; - -/* - * Library - */ - -print '
'; -print load_fiche_titre($langs->trans("Library"), '', ''); - -print '
'; -print ''."\n"; - -print ''."\n"; -print ''."\n"; -print ''."\n"; -print "\n"; - -print ''."\n"; -print ''."\n"; -print ''."\n"; -print ''."\n"; - -print "
'.$langs->trans("Name").''.$langs->trans("Value").'
'.$langs->trans("LibraryToBuildPDF").''; -$i = 0; -$pdf = pdf_getInstance('A4'); -if (class_exists('FPDF') && !class_exists('TCPDF')) -{ - if ($i) print ' + '; - print 'FPDF'; - print ' ('.@constant('FPDF_PATH').')'; - $i++; -} -if (class_exists('TCPDF')) -{ - if ($i) print ' + '; - print 'TCPDF'; - print ' ('.@constant('TCPDF_PATH').')'; - $i++; -} -if (class_exists('FPDI')) -{ - if ($i) print ' + '; - print 'FPDI'; - print ' ('.@constant('FPDI_PATH').')'; - $i++; -} -if (class_exists('TCPDI')) -{ - if ($i) print ' + '; - print 'TCPDI'; - print ' ('.@constant('TCPDI_PATH').')'; - $i++; -} -print '
\n"; -print '
'; - - print '
'; print ''; print '
'; diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 0486edebeec..0662a571cc9 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -116,7 +116,7 @@ $db->commit(); $head = security_prepare_head(); -dol_fiche_head($head, 'default', $langs->trans("Security"), -1); +dol_fiche_head($head, 'default', '', -1); // Show warning about external users @@ -229,9 +229,7 @@ if ($result) print ''; print img_picto($langs->trans("Active"), 'tick'); print ''; - } - else - { + } else { print ''; print ''.img_edit_add().''; print ''; @@ -247,8 +245,7 @@ if ($result) $i++; } -} -else dol_print_error($db); +} else dol_print_error($db); print ''; print '
'; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index e9795304ad3..3419551f627 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -70,8 +70,7 @@ if ($action == "set") $res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; */ - } - else $error++; + } else $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity); if (!$res > 0) $error++; @@ -100,9 +99,7 @@ if ($action == "set") { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); } @@ -113,7 +110,7 @@ if ($action == "addnotif") $bon = new BonPrelevement($db); $bon->AddNotification($db, GETPOST('user', 'int'), $action); - header("Location: prelevement.php"); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } @@ -122,75 +119,10 @@ if ($action == "deletenotif") $bon = new BonPrelevement($db); $bon->DeleteNotificationById(GETPOST('notif', 'int')); - header("Location: prelevement.php"); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } -/* -if ($action == 'specimen') -{ - $modele=GETPOST('module','alpha'); - - $commande = new Commande($db); - $commande->initAsSpecimen(); - - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - $file=dol_buildpath($reldir."core/modules/paymentorders/doc/pdf_".$modele.".modules.php",0); - if (file_exists($file)) - { - $filefound=1; - $classname = "pdf_".$modele; - break; - } - } - - if ($filefound) - { - require_once $file; - - $module = new $classname($db); - - if ($module->write_file($commande,$langs) > 0) - { - header("Location: ".DOL_URL_ROOT."/document.php?modulepart=paymentorders&file=SPECIMEN.pdf"); - return; - } - else - { - setEventMessages($module->error, null, 'errors'); - dol_syslog($module->error, LOG_ERR); - } - } - else - { - setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); - dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); - } -} - -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "PAYMENTORDER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) - { - // The constant that was read before the new set - // We therefore requires a variable to have a coherent view - $conf->global->PAYMENTORDER_ADDON_PDF = $value; - } - - // On active le modele - $ret = delDocumentModel($value, $type); - if ($ret > 0) - { - $ret = addDocumentModel($value, $type, $label, $scandir); - } -} -*/ - /* * View @@ -207,52 +139,62 @@ $linkback = ''; -print '
'; +print ''; print ''; print ''; print ''; -print ''; -print ''; +print ''; +print ''; print ""; // Bank account (from Banks module) -print ''; +print ''; print ''; // ICS -print ''; +print ''; print ''; +print ''; +print ''; print ''; //User -print ''; +print ''; print ''; print ''; //EntToEnd -print ''; +print ''; print ''; print ''; //USTRD -print ''; +print ''; print ''; print ''; //ADDDAYS -print ''; +print ''; print ''; +print ''; print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").''.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("BankToReceiveWithdraw").'
'.$langs->trans("BankToReceiveWithdraw").''; $form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT, 'PRELEVEMENT_ID_BANKACCOUNT', 0, "courant=1", 1); print '
'.$langs->trans("ICS").'
'; +$htmltext = $langs->trans("AskThisIDToYourBank"); +print $form->textwithpicto($langs->trans("ICS"), $htmltext); +print ''; -print '
'.$langs->trans("ResponsibleUser").'
'.$langs->trans("ResponsibleUser").''; print $form->select_dolusers($conf->global->PRELEVEMENT_USER, 'PRELEVEMENT_USER', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'.$langs->trans("END_TO_END").'
'; +$htmltext = $langs->trans("KeepThisEmptyInMostCases"); +print $form->textwithpicto($langs->trans("END_TO_END"), $htmltext); +print ''; print '
'.$langs->trans("USTRD").'
'; +$htmltext = $langs->trans("KeepThisEmptyInMostCases"); +print $form->textwithpicto($langs->trans("USTRD"), $htmltext); +print ''; print '
'.$langs->trans("ADDDAYS").'
'.$langs->trans("ADDDAYS").''; if (!$conf->global->PRELEVEMENT_ADDDAYS) $conf->global->PRELEVEMENT_ADDDAYS = 0; -print '
'; print '
'; @@ -356,7 +298,7 @@ foreach ($dirmodels as $reldir) if (in_array($name, $def)) { print ''."\n"; - print '
'; + print ''; print img_picto($langs->trans("Enabled"),'switch_on'); print ''; print ''; @@ -364,7 +306,7 @@ foreach ($dirmodels as $reldir) else { print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; print ""; } @@ -376,7 +318,7 @@ foreach ($dirmodels as $reldir) } else { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; } print ''; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 73703829b8c..4855a164412 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -52,8 +52,7 @@ $type = 'propal'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; $error = 0; -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconstpropal = GETPOST('maskconstpropal', 'alpha'); $maskpropal = GETPOST('maskpropal', 'alpha'); if ($maskconstpropal) $res = dolibarr_set_const($db, $maskconstpropal, $maskpropal, 'chaine', 0, '', $conf->entity); @@ -63,14 +62,10 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} -elseif ($action == 'specimen') -{ +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); $propal = new Propal($db); @@ -90,8 +85,7 @@ elseif ($action == 'specimen') } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); @@ -100,21 +94,15 @@ elseif ($action == 'specimen') { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=propal&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} -elseif ($action == 'setribchq') -{ +} elseif ($action == 'setribchq') { $rib = GETPOST('rib', 'alpha'); $chq = GETPOST('chq', 'alpha'); @@ -126,14 +114,10 @@ elseif ($action == 'setribchq') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} -elseif ($action == 'set_PROPALE_DRAFT_WATERMARK') -{ +} elseif ($action == 'set_PROPALE_DRAFT_WATERMARK') { $draft = GETPOST('PROPALE_DRAFT_WATERMARK', 'alpha'); $res = dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); @@ -142,14 +126,10 @@ elseif ($action == 'set_PROPALE_DRAFT_WATERMARK') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} -elseif ($action == 'set_PROPOSAL_FREE_TEXT') -{ +} elseif ($action == 'set_PROPOSAL_FREE_TEXT') { $freetext = GETPOST('PROPOSAL_FREE_TEXT', 'none'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); @@ -159,14 +139,10 @@ elseif ($action == 'set_PROPOSAL_FREE_TEXT') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} -elseif ($action == 'setdefaultduration') -{ +} elseif ($action == 'setdefaultduration') { $res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION", $value, 'chaine', 0, '', $conf->entity); if (!$res > 0) $error++; @@ -174,59 +150,38 @@ elseif ($action == 'setdefaultduration') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} - -elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') -{ +} elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') { $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL", $value, 'chaine', 0, '', $conf->entity); if (!$res > 0) $error++; - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} -// Activate a model -elseif ($action == 'set') -{ +} elseif ($action == 'set') { + // Activate a model $ret = addDocumentModel($value, $type, $label, $scandir); -} -elseif ($action == 'del') -{ +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { if ($conf->global->PROPALE_ADDON_PDF == "$value") dolibarr_del_const($db, 'PROPALE_ADDON_PDF', $conf->entity); } -} - -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "PROPALE_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + if (dolibarr_set_const($db, "PROPALE_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { $conf->global->PROPALE_ADDON_PDF = $value; } // On active le modele $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { $ret = addDocumentModel($value, $type, $label, $scandir); } -} - -elseif ($action == 'setmod') -{ +} elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -310,9 +265,7 @@ foreach ($dirmodels as $reldir) if ($conf->global->PROPALE_ADDON == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { + } else { print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; @@ -376,9 +329,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -448,9 +399,7 @@ foreach ($dirmodels as $reldir) print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; print ''; - } - else - { + } else { print "\n"; print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; @@ -461,9 +410,7 @@ foreach ($dirmodels as $reldir) if ($conf->global->PROPALE_ADDON_PDF == "$name") { print img_picto($langs->trans("Default"), 'on'); - } - else - { + } else { print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -496,9 +443,7 @@ foreach ($dirmodels as $reldir) if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'bill').''; - } - else - { + } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } print ''; @@ -571,19 +516,14 @@ if (empty($conf->facture->enabled)) $i++; } print ""; - } - else - { + } else { print "".$langs->trans("NoActiveBankAccountDefined").""; } } - } - else - { + } else { print ''.$langs->trans("BankModuleNotActive").''; } -} -else { +} else { print ''.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).''; } print ""; @@ -620,8 +560,7 @@ if (empty($conf->facture->enabled)) } } print ""; -} -else { +} else { print ''.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).''; } print ""; @@ -685,9 +624,7 @@ $variablename = 'PROPOSAL_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; -} -else -{ +} else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); print $doleditor->Create(); diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index bf1283daa6d..795cbec5ede 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -94,7 +94,7 @@ print ''; $head = security_prepare_head(); -dol_fiche_head($head, 'proxy', $langs->trans("Security"), -1); +dol_fiche_head($head, 'proxy', '', -1); if ($conf->use_javascript_ajax) diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 8730f148c07..4332c4feab0 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -65,13 +65,13 @@ if (!function_exists('gzdecode')) { } } + /* * Action */ if ($action == 'addprinter' && $user->admin) { $error = 0; - $db->begin(); if (empty($printername)) { $error++; setEventMessages($langs->trans("PrinterNameEmpty"), null, 'errors'); @@ -82,16 +82,15 @@ if ($action == 'addprinter' && $user->admin) { } if (!$error) { - $result = $printer->addPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter); + $db->begin(); + $result = $printer->addPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter); if ($result > 0) $error++; if (!$error) { $db->commit(); setEventMessages($langs->trans("PrinterAdded", $printername), null); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -101,23 +100,21 @@ if ($action == 'addprinter' && $user->admin) { if ($action == 'deleteprinter' && $user->admin) { $error = 0; - $db->begin(); if (empty($printerid)) { $error++; setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); } if (!$error) { - $result = $printer->deletePrinter($printerid); + $db->begin(); + $result = $printer->deletePrinter($printerid); if ($result > 0) $error++; if (!$error) { $db->commit(); setEventMessages($langs->trans("PrinterDeleted", $printername), null); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -127,14 +124,14 @@ if ($action == 'deleteprinter' && $user->admin) { if ($action == 'updateprinter' && $user->admin) { $error = 0; - $db->begin(); if (empty($printerid)) { $error++; setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); } if (!$error) { - $result = $printer->updatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid); + $db->begin(); + $result = $printer->updatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid); if ($result > 0) $error++; if (!$error) { @@ -193,14 +190,14 @@ if ($action == 'testtemplate' && $user->admin) { if ($action == 'updatetemplate' && $user->admin) { $error = 0; - $db->begin(); if (empty($templateid)) { $error++; setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors'); } if (!$error) { - $result = $printer->updateTemplate($templatename, $template, $templateid); + $db->begin(); + $result = $printer->updateTemplate($templatename, $template, $templateid); if ($result > 0) $error++; if (!$error) { @@ -216,14 +213,14 @@ if ($action == 'updatetemplate' && $user->admin) { if ($action == 'addtemplate' && $user->admin) { $error = 0; - $db->begin(); if (empty($templatename)) { $error++; setEventMessages($langs->trans("TemplateNameEmpty"), null, 'errors'); } if (!$error) { - $result = $printer->addTemplate($templatename, $template); + $db->begin(); + $result = $printer->addTemplate($templatename, $template); if ($result > 0) $error++; if (!$error) { @@ -237,6 +234,29 @@ if ($action == 'addtemplate' && $user->admin) { $action = ''; } +if ($action == 'deletetemplate' && $user->admin) { + $error = 0; + if (empty($templateid)) { + $error++; + setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors'); + } + + if (!$error) { + $db->begin(); + $result = $printer->deleteTemplate($templateid); + if ($result > 0) $error++; + + if (!$error) { + $db->commit(); + setEventMessages($langs->trans("TemplateDeleted", $templatename), null); + } else { + $db->rollback(); + dol_print_error($db); + } + } + $action = ''; +} + /* * View @@ -251,6 +271,7 @@ print load_fiche_titre($langs->trans("ReceiptPrinterSetup"), $linkback, 'title_s $head = receiptprinteradmin_prepare_head($mode); +// mode = config if ($mode == 'config' && $user->admin) { print ''; print ''; @@ -260,9 +281,10 @@ if ($mode == 'config' && $user->admin) { print ''; } - dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic'); - print $langs->trans("ReceiptPrinterDesc")."

\n"; + dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic'); + + print ''.$langs->trans("ReceiptPrinterDesc")."

\n"; print ''."\n"; print ''; @@ -275,6 +297,22 @@ if ($mode == 'config' && $user->admin) { $ret = $printer->listprinters(); $nbofprinters = count($printer->listprinters); + if ($action != 'editprinter') { + print ''; + print ''; + $ret = $printer->selectTypePrinter(); + print ''; + $ret = $printer->selectProfilePrinter(); + print ''; + print ''; + print ''; + print ''; + } + if ($ret > 0) { setEventMessages($printer->error, $printer->errors, 'errors'); } else { @@ -288,7 +326,9 @@ if ($mode == 'config' && $user->admin) { $ret = $printer->selectProfilePrinter($printer->listprinters[$line]['fk_profile']); print ''; print ''; - print ''; + print ''; print ''; } else { print ''; @@ -296,15 +336,15 @@ if ($mode == 'config' && $user->admin) { print ''; print ''; // edit icon - print ''; print ''; @@ -312,45 +352,17 @@ if ($mode == 'config' && $user->admin) { } } - if ($action != 'editprinter') { - if ($nbofprinters > 0) { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - } - - print ''; - print ''; - $ret = $printer->selectTypePrinter(); - print ''; - $ret = $printer->selectProfilePrinter(); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } print '
'.$printer->resprint.''.$printer->profileresprint.''; + if ($action != 'editprinter') { + print '
'; + } + print '
'.$printer->profileresprint.''; + print '
'; + print '
'.$printer->listprinters[$line]['name'].''.$langs->trans($printer->listprinters[$line]['fk_profile_name']).''.$printer->listprinters[$line]['parameter'].''; + print ''; print img_picto($langs->trans("Edit"), 'edit'); print ''; // delete icon - print ''; + print ''; print img_picto($langs->trans("Delete"), 'delete'); print ''; // test icon - print ''; + print ''; print img_picto($langs->trans("TestPrinter"), 'printer'); print '
'.$langs->trans("Name").''.$langs->trans("Type").''.$langs->trans("Profile").''.$langs->trans("Parameters").'
'.$printer->resprint.''.$printer->profileresprint.'
'; dol_fiche_end(); - if ($action != 'editprinter') { - print '
'; - } else { - print '
'; - } print '
'; - print '

'; + print '
'; - dol_fiche_head(); - print $langs->trans("ReceiptPrinterTypeDesc")."

\n"; + print load_fiche_titre($langs->trans("ReceiptPrinterTypeDesc"), '', '')."\n"; + print ''."\n"; print ''; print ''; @@ -358,12 +370,12 @@ if ($mode == 'config' && $user->admin) { print ''; print ''; print '
'.$langs->trans("CONNECTOR_DUMMY").':'.$langs->trans("CONNECTOR_DUMMY_HELP").'
'.$langs->trans("CONNECTOR_NETWORK_PRINT").':'.$langs->trans("CONNECTOR_NETWORK_PRINT_HELP").'
'.$langs->trans("CONNECTOR_WINDOWS_PRINT").':'.$langs->trans("CONNECTOR_WINDOWS_PRINT_HELP").'
'.$langs->trans("CONNECTOR_CUPS_PRINT").':'.$langs->trans("CONNECTOR_CUPS_PRINT_HELP").'
'; - dol_fiche_end(); - print '

'; + print '
'; + + + print load_fiche_titre($langs->trans("ReceiptPrinterProfileDesc"), '', '')."\n"; - dol_fiche_head(); - print $langs->trans("ReceiptPrinterProfileDesc")."

\n"; print ''."\n"; print ''; print ''; @@ -371,11 +383,13 @@ if ($mode == 'config' && $user->admin) { print ''; print ''; print '
'.$langs->trans("PROFILE_DEFAULT").':'.$langs->trans("PROFILE_DEFAULT_HELP").'
'.$langs->trans("PROFILE_SIMPLE").':'.$langs->trans("PROFILE_SIMPLE_HELP").'
'.$langs->trans("PROFILE_P822D").':'.$langs->trans("PROFILE_P822D_HELP").'
'.$langs->trans("PROFILE_STAR").':'.$langs->trans("PROFILE_STAR_HELP").'
'; - dol_fiche_end(); } +// mode = template if ($mode == 'template' && $user->admin) { - print '
'; + dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic'); + + print ''; print ''; if ($action != 'edittemplate') { print ''; @@ -383,16 +397,11 @@ if ($mode == 'template' && $user->admin) { print ''; } - dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic'); - - print $langs->trans("ReceiptPrinterTemplateDesc")."

\n"; print ''."\n"; print ''; print ''; print ''; print ''; - print ''; - print ''; print "\n"; $ret = $printer->listPrintersTemplates(); //print '
'.print_r($printer->listprinterstemplates, true).'
'; @@ -405,22 +414,23 @@ if ($mode == 'template' && $user->admin) { if ($action == 'edittemplate' && $printer->listprinterstemplates[$line]['rowid'] == $templateid) { print ''; print ''; - print ''; print ''; } else { print ''; print ''; // edit icon - print ''; } @@ -428,34 +438,45 @@ if ($mode == 'template' && $user->admin) { } } - print '
'.$langs->trans("Name").''.$langs->trans("Template").'
'; + print ''; + print ''; print ''.$printer->listprinterstemplates[$line]['name'].''.nl2br(htmlentities($printer->listprinterstemplates[$line]['template'])).''; + print ''; print img_picto($langs->trans("Edit"), 'edit'); print ''; // delete icon - print ''; + print ''; print img_picto($langs->trans("Delete"), 'delete'); print ''; // test icon - print ''; + print ''; print img_picto($langs->trans("TestPrinterTemplate"), 'printer'); print '
'; if ($action != 'edittemplate') { - print ''; + print ''; print ''; - print ''; + print ''; + print ''; print ''; print ''; + print ''; + } - print '
'; + print ''; + + if ($action != 'edittemplate') { + print ''; + print '
'; } else { print '
'; } print '
'; - print '

'; + + dol_fiche_end(); + + print '
'; + print ''."\n"; print ''; print ''; print ''; print "\n"; - $max = count($printer->tags); - for ($tag = 0; $tag < $max; $tag++) { + + $langs->loadLangs(array("bills", "companies")); + foreach ($printer->tags as $key => $val) { print ''; - print ''; + print ''; print ''; } print '
'.$langs->trans("Tag").''.$langs->trans("Description").'
<'.$printer->tags[$tag].'>'.$langs->trans(strtoupper($printer->tags[$tag])).'<'.$key.'>'.$langs->trans($val).'
'; - - dol_fiche_end(); } // End of page diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index 312038d3fcc..3d0b591af10 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -45,13 +45,13 @@ $type = 'reception'; if (!empty($conf->reception->enabled) && empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { - // This option should always be set to on when module is on. - dolibarr_set_const($db, "MAIN_SUBMODULE_RECEPTION", "1", 'chaine', 0, '', $conf->entity); + // This option should always be set to on when module is on. + dolibarr_set_const($db, "MAIN_SUBMODULE_RECEPTION", "1", 'chaine', 0, '', $conf->entity); } if (empty($conf->global->RECEPTION_ADDON_NUMBER)) { - $conf->global->RECEPTION_ADDON_NUMBER = 'mod_reception_beryl'; + $conf->global->RECEPTION_ADDON_NUMBER = 'mod_reception_beryl'; } @@ -72,12 +72,9 @@ if ($action == 'updateMask') { if ($res > 0) setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - else - setEventMessages($langs->trans("Error"), null, 'errors'); + else setEventMessages($langs->trans("Error"), null, 'errors'); } -} - -elseif ($action == 'set_param') +} elseif ($action == 'set_param') { $freetext = GETPOST('RECEPTION_FREE_TEXT', 'none'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "RECEPTION_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); @@ -99,9 +96,7 @@ elseif ($action == 'set_param') { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } -} - -elseif ($action == 'specimen') +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); @@ -113,7 +108,7 @@ elseif ($action == 'specimen') $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $file = dol_buildpath($reldir."core/modules/reception/doc/pdf_".$modele.".modules.php", 0); + $file = dol_buildpath($reldir."core/modules/reception/doc/pdf_".$modele.".modules.php", 0); if (file_exists($file)) { $filefound = 1; @@ -132,15 +127,11 @@ elseif ($action == 'specimen') { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=reception&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } @@ -150,14 +141,12 @@ elseif ($action == 'specimen') elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); -} - -elseif ($action == 'del') +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->RECEPTION_ADDON_PDF == "$value") dolibarr_del_const($db, 'RECEPTION_ADDON_PDF', $conf->entity); + if ($conf->global->RECEPTION_ADDON_PDF == "$value") dolibarr_del_const($db, 'RECEPTION_ADDON_PDF', $conf->entity); } } @@ -177,9 +166,7 @@ elseif ($action == 'setdoc') { $ret = addDocumentModel($value, $type, $label, $scandir); } -} - -elseif ($action == 'setmodel') +} elseif ($action == 'setmodel') { dolibarr_set_const($db, "RECEPTION_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity); } @@ -249,23 +236,20 @@ foreach ($dirmodels as $reldir) print $module->info(); print ''; - // Show example of numbering module - print ''; - $tmp = $module->getExample(); - if (preg_match('/^Error/', $tmp)) { + // Show example of numbering module + print ''; + $tmp = $module->getExample(); + if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; - } - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; - print ''."\n"; + } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + else print $tmp; + print ''."\n"; print ''; if ($conf->global->RECEPTION_ADDON_NUMBER == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { + } else { print 'scandir.'&label='.urlencode($module->name).'">'; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; @@ -279,16 +263,16 @@ foreach ($dirmodels as $reldir) $htmltooltip = ''; $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().'
'; $nextval = $module->getNextValue($mysoc, $reception); - if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval - $htmltooltip .= ''.$langs->trans("NextValue").': '; - if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') - $nextval = $langs->trans($nextval); - $htmltooltip .= $nextval.'
'; - } else { - $htmltooltip .= $langs->trans($module->error).'
'; - } - } + if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval + $htmltooltip .= ''.$langs->trans("NextValue").': '; + if ($nextval) { + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + $nextval = $langs->trans($nextval); + $htmltooltip .= $nextval.'
'; + } else { + $htmltooltip .= $langs->trans($module->error).'
'; + } + } print ''; print $form->textwithpicto('', $htmltooltip, 1, 0); @@ -331,9 +315,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -351,116 +333,110 @@ clearstatcache(); foreach ($dirmodels as $reldir) { - foreach (array('', '/doc') as $valdir) - { - $realpath = $reldir."core/modules/reception".$valdir; - $dir = dol_buildpath($realpath); + foreach (array('', '/doc') as $valdir) + { + $realpath = $reldir."core/modules/reception".$valdir; + $dir = dol_buildpath($realpath); - if (is_dir($dir)) - { - $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - $filelist[] = $file; - } - closedir($handle); - arsort($filelist); + if (is_dir($dir)) + { + $handle = opendir($dir); + if (is_resource($handle)) + { + while (($file = readdir($handle)) !== false) + { + $filelist[] = $file; + } + closedir($handle); + arsort($filelist); - foreach ($filelist as $file) - { - if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) - { - if (file_exists($dir.'/'.$file)) - { - $name = substr($file, 4, dol_strlen($file) - 16); - $classname = substr($file, 0, dol_strlen($file) - 12); + foreach ($filelist as $file) + { + if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) + { + if (file_exists($dir.'/'.$file)) + { + $name = substr($file, 4, dol_strlen($file) - 16); + $classname = substr($file, 0, dol_strlen($file) - 12); - require_once $dir.'/'.$file; - $module = new $classname($db); + require_once $dir.'/'.$file; + $module = new $classname($db); - $modulequalified = 1; - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0; + $modulequalified = 1; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0; - if ($modulequalified) - { - print ''; - print (empty($module->name) ? $name : $module->name); - print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; - print ''; + if ($modulequalified) + { + print ''; + print (empty($module->name) ? $name : $module->name); + print "\n"; + if (method_exists($module, 'info')) print $module->info($langs); + else print $module->description; + print ''; - // Active - if (in_array($name, $def)) - { - print ''."\n"; - print ''; - print img_picto($langs->trans("Enabled"), 'switch_on'); - print ''; - print ''; - } - else - { - print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; - print ""; - } + // Active + if (in_array($name, $def)) + { + print ''."\n"; + print ''; + print img_picto($langs->trans("Enabled"), 'switch_on'); + print ''; + print ''; + } else { + print ''."\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print ""; + } - // Defaut - print ''; - if ($conf->global->RECEPTION_ADDON_PDF == $name) - { - print img_picto($langs->trans("Default"), 'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; - } - print ''; + // Defaut + print ''; + if ($conf->global->RECEPTION_ADDON_PDF == $name) + { + print img_picto($langs->trans("Default"), 'on'); + } else { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } + print ''; - // Info - $htmltooltip = ''.$langs->trans("Name").': '.$module->name; - $htmltooltip .= '
'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { - $htmltooltip .= '
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; - } - $htmltooltip .= '
'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file; + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip .= '
'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); + if ($module->type == 'pdf') + { + $htmltooltip .= '
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + } + $htmltooltip .= '
'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file; - $htmltooltip .= '

'.$langs->trans("FeaturesSupported").':'; - $htmltooltip .= '
'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); - $htmltooltip .= '
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1); - $htmltooltip .= '
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1); - $htmltooltip .= '
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); - $htmltooltip .= '
'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1); + $htmltooltip .= '

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip .= '
'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); + $htmltooltip .= '
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1); + $htmltooltip .= '
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1); + $htmltooltip .= '
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); + $htmltooltip .= '
'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1); - print ''; - print $form->textwithpicto('', $htmltooltip, 1, 0); - print ''; + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; - // Preview - print ''; - if ($module->type == 'pdf') - { - print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'reception').''; - } - else - { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); - } - print ''; + // Preview + print ''; + if ($module->type == 'pdf') + { + print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'reception').''; + } else { + print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + } + print ''; - print "\n"; - } - } - } - } - } - } - } + print "\n"; + } + } + } + } + } + } + } } print ''; @@ -511,7 +487,7 @@ print "\n"; */ print ''; -print '
'; +//print '
'; print ''; diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php index 3efdd05bdc7..288f338941c 100644 --- a/htdocs/admin/resource.php +++ b/htdocs/admin/resource.php @@ -28,7 +28,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php'; -if (!empty($conf->resouce->enabled)) require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php'; +require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "resource")); @@ -91,9 +91,7 @@ if (empty($conf->use_javascript_ajax)) print ''; print $langs->trans("NotAvailableWhenAjaxDisabled"); print ''; -} -else -{ +} else { print ''; $arrval = array( '0'=>$langs->trans("No"), diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index d9d61673c5e..aa23a24c526 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -45,9 +45,7 @@ if ($action == 'setgeneraterule') if (!dolibarr_set_const($db, 'USER_PASSWORD_GENERATED', $_GET["value"], 'chaine', 0, '', $conf->entity)) { dol_print_error($db); - } - else - { + } else { header("Location: ".$_SERVER["PHP_SELF"]); exit; } @@ -91,8 +89,7 @@ if ($action == 'activate_encrypt') $i++; } } - } - else dol_print_error($db); + } else dol_print_error($db); //print $error." ".$sql; //exit; @@ -101,14 +98,11 @@ if ($action == 'activate_encrypt') $db->commit(); header("Location: security.php"); exit; - } - else - { + } else { $db->rollback(); dol_print_error($db, ''); } -} -elseif ($action == 'disable_encrypt') +} elseif ($action == 'disable_encrypt') { //On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas etre decodes //Do not allow "disable encryption" as passwords cannot be decrypted @@ -131,13 +125,10 @@ if ($action == 'activate_encryptdbpassconf') //dolibarr_set_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED", "1"); header("Location: security.php"); exit; - } - else - { + } else { setEventMessages($langs->trans('InstrucToEncodePass', dol_encode($dolibarr_main_db_pass)), null, 'warnings'); } -} -elseif ($action == 'disable_encryptdbpassconf') +} elseif ($action == 'disable_encryptdbpassconf') { $result = encodedecode_dbpassconf(0); if ($result > 0) @@ -148,9 +139,7 @@ elseif ($action == 'disable_encryptdbpassconf') //dolibarr_del_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED",$conf->entity); header("Location: security.php"); exit; - } - else - { + } else { setEventMessages($langs->trans('InstrucToClearPass', $dolibarr_main_db_pass), null, 'warnings'); } } @@ -160,8 +149,7 @@ if ($action == 'activate_MAIN_SECURITY_DISABLEFORGETPASSLINK') dolibarr_set_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK", '1', 'chaine', 0, '', $conf->entity); header("Location: security.php"); exit; -} -elseif ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK') +} elseif ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK') { dolibarr_del_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK", $conf->entity); header("Location: security.php"); @@ -209,7 +197,7 @@ print "
\n"; $head = security_prepare_head(); -dol_fiche_head($head, 'passwords', $langs->trans("Security"), -1); +dol_fiche_head($head, 'passwords', '', -1); // Choix du gestionnaire du generateur de mot de passe @@ -268,8 +256,7 @@ foreach ($arrayhandler as $key => $module) // Show example of numbering module print ''; $tmp = $module->getExample(); - if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; } - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); else print $tmp; print ''."\n"; @@ -277,9 +264,7 @@ foreach ($arrayhandler as $key => $module) if ($conf->global->USER_PASSWORD_GENERATED == $key) { print img_picto('', 'tick'); - } - else - { + } else { print ''.$langs->trans("Activate").''; } print "\n"; @@ -435,9 +420,7 @@ if (!empty($conf->global->DATABASE_PWD_ENCRYPTED)) //On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas etre decodes //Do not allow "disable encryption" as passwords cannot be decrypted print ''.$langs->trans("Disable").''; - } - else - { + } else { print '-'; } print ""; @@ -462,9 +445,7 @@ if (empty($dolibarr_main_db_pass) && empty($dolibarr_main_db_encrypted_pass)) { $langs->load("errors"); print img_warning($langs->trans("WarningPassIsEmpty")); -} -else -{ +} else { if (empty($dolibarr_main_db_encrypted_pass)) { print ''.$langs->trans("Activate").''; @@ -515,9 +496,7 @@ if (GETPOST('info', 'int') > 0) if (function_exists('password_hash')) { print $langs->trans("Note: The function password_hash exists on your PHP")."
\n"; - } - else - { + } else { print $langs->trans("Note: The function password_hash does not exists on your PHP")."
\n"; } print 'MAIN_SECURITY_HASH_ALGO = '.$conf->global->MAIN_SECURITY_HASH_ALGO."
\n"; diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index 0f3c5e4a851..d4d8b0718ae 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -47,7 +47,7 @@ if (GETPOST('sendit') && !empty($conf->global->MAIN_UPLOAD_DOC)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_add_file_process($upload_dir, 0, 0, 'userfile'); + dol_add_file_process($upload_dir, 1, 0, 'userfile'); } if ($action == 'updateform') @@ -100,7 +100,7 @@ print ''; $head = security_prepare_head(); -dol_fiche_head($head, 'file', $langs->trans("Security"), -1); +dol_fiche_head($head, 'file', '', -1); // Upload options diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index f642cd64182..2bc477f6e39 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -50,9 +50,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } elseif (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { @@ -61,14 +59,10 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } -} - -elseif ($action == 'updateform') +} elseif ($action == 'updateform') { $res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); $res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity); @@ -99,7 +93,7 @@ print ''; $head = security_prepare_head(); -dol_fiche_head($head, 'misc', $langs->trans("Security"), -1); +dol_fiche_head($head, 'misc', '', -1); // Other Options @@ -118,21 +112,15 @@ if (function_exists("imagecreatefrompng")) if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('MAIN_SECURITY_ENABLECAPTCHA'); - } - else - { + } else { if (empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) { print ''.img_picto($langs->trans("Disabled"), 'off').''; - } - else - { + } else { print ''.img_picto($langs->trans("Enabled"), 'on').''; } } -} -else -{ +} else { $desc = $form->textwithpicto('', $langs->transnoentities("EnableGDLibraryDesc"), 1, 'warning'); print $desc; } @@ -145,15 +133,11 @@ print ''; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('MAIN_USE_ADVANCED_PERMS'); -} -else -{ +} else { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { print ''.img_picto($langs->trans("Disabled"), 'off').''; - } - else - { + } else { print ''.img_picto($langs->trans("Enabled"), 'on').''; } } diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 09cc0debfd5..e09304a4921 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -52,7 +52,7 @@ if ($action == 'update' && !$cancel) { dolibarr_set_const($db, "MAIN_DISABLE_ALL_SMS", GETPOST("MAIN_DISABLE_ALL_SMS", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_SMS_SENDMODE", GETPOST("MAIN_SMS_SENDMODE", 'alphahtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_SMS_SENDMODE", GETPOST("MAIN_SMS_SENDMODE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMS_FROM", GETPOST("MAIN_MAIL_SMS_FROM", 'alphanohtml'), 'chaine', 0, '', $conf->entity); @@ -122,9 +122,7 @@ if ($action == 'send' && !$_POST['cancel']) { setEventMessages($langs->trans("SmsSuccessfulySent", $smsfrom, $sendto), null, 'mesgs'); setEventMessages($smsfile->error, $smsfile->errors, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("ResultKo"), null, 'errors'); setEventMessages($smsfile->error, $smsfile->errors, 'errors'); } @@ -205,9 +203,7 @@ if ($action == 'edit') print ''; print '
'; -} -else -{ +} else { if (!count($listofmethods)) print '
'.$langs->trans("NoSmsEngine", 'DoliStore').'
'; print ''; @@ -264,9 +260,7 @@ else if (count($listofmethods) && !empty($conf->global->MAIN_SMS_SENDMODE)) { print ''.$langs->trans("DoTestSend").''; - } - else - { + } else { print ''.$langs->trans("DoTestSend").''; } print ''; @@ -306,12 +300,12 @@ else $formsms = new FormSms($db); $formsms->fromtype = 'user'; $formsms->fromid = $user->id; - $formsms->fromsms = (isset($_POST['fromsms']) ? $_POST['fromsms'] : ($conf->global->MAIN_MAIL_SMS_FROM ? $conf->global->MAIN_MAIL_SMS_FROM : $user->user_mobile)); + $formsms->fromsms = (GETPOSTISSET('fromsms') ? $_POST['fromsms'] : ($conf->global->MAIN_MAIL_SMS_FROM ? $conf->global->MAIN_MAIL_SMS_FROM : $user->user_mobile)); $formsms->withfromreadonly = 0; $formsms->withsubstit = 0; $formsms->withfrom = 1; - $formsms->withto = (isset($_POST['sendto']) ? $_POST['sendto'] : $user->user_mobile ? $user->user_mobile : 1); - $formsms->withbody = (isset($_POST['message']) ? (empty($_POST['message']) ? 1 : $_POST['message']) : $langs->trans("ThisIsATestMessage")); + $formsms->withto = (GETPOSTISSET('sendto') ? $_POST['sendto'] : ($user->user_mobile ? $user->user_mobile : 1)); + $formsms->withbody = (GETPOSTISSET('message') ? (empty($_POST['message']) ? 1 : $_POST['message']) : $langs->trans("ThisIsATestMessage")); $formsms->withbodyreadonly = 0; $formsms->withcancel = 1; // Tableau des substitutions diff --git a/htdocs/admin/socialnetworks.php b/htdocs/admin/socialnetworks.php index d2a92aed9e8..b848dccd998 100644 --- a/htdocs/admin/socialnetworks.php +++ b/htdocs/admin/socialnetworks.php @@ -48,9 +48,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } @@ -62,9 +60,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/admin/spip.php b/htdocs/admin/spip.php index 2ed43e97efd..34c83dbd434 100644 --- a/htdocs/admin/spip.php +++ b/htdocs/admin/spip.php @@ -73,9 +73,7 @@ if ($action == 'update' || $action == 'add') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -153,9 +151,7 @@ if (!empty($conf->global->ADHERENT_USE_SPIP)) print '
'; print ''; -} -else -{ +} else { dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user'); $link = ''; diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 43e610c3052..4edff5e93b3 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -28,6 +28,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "stocks")); @@ -36,43 +37,146 @@ $langs->loadLangs(array("admin", "stocks")); if (!$user->admin) accessforbidden(); $action = GETPOST('action', 'alpha'); +$value = GETPOST('value', 'alpha'); +$label = GETPOST('label', 'alpha'); +$scandir = GETPOST('scan_dir', 'alpha'); +$type = 'stock'; /* * Action */ + +$reg = array(); + if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { - $code = $reg[1]; - if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - dol_print_error($db); - } + $code = $reg[1]; + + // If constant is for a unique choice, delete other choices + if (in_array($code, array('STOCK_CALCULATE_ON_BILL', 'STOCK_CALCULATE_ON_VALIDATE_ORDER', 'STOCK_CALCULATE_ON_SHIPMENT', 'STOCK_CALCULATE_ON_SHIPMENT_CLOSE'))) { + dolibarr_del_const($db, 'STOCK_CALCULATE_ON_BILL', $conf->entity); + dolibarr_del_const($db, 'STOCK_CALCULATE_ON_VALIDATE_ORDER', $conf->entity); + dolibarr_del_const($db, 'STOCK_CALCULATE_ON_SHIPMENT', $conf->entity); + dolibarr_del_const($db, 'STOCK_CALCULATE_ON_SHIPMENT_CLOSE', $conf->entity); + } + if (in_array($code, array('STOCK_CALCULATE_ON_SUPPLIER_BILL', 'STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER', 'STOCK_CALCULATE_ON_RECEPTION', 'STOCK_CALCULATE_ON_RECEPTION_CLOSE', 'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER'))) { + dolibarr_del_const($db, 'STOCK_CALCULATE_ON_SUPPLIER_BILL', $conf->entity); + dolibarr_del_const($db, 'STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER', $conf->entity); + dolibarr_del_const($db, 'STOCK_CALCULATE_ON_RECEPTION', $conf->entity); + dolibarr_del_const($db, 'STOCK_CALCULATE_ON_RECEPTION_CLOSE', $conf->entity); + dolibarr_del_const($db, 'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER', $conf->entity); + } + + if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } else { + dol_print_error($db); + } } if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { - $code = $reg[1]; - if (dolibarr_del_const($db, $code, $conf->entity) > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - dol_print_error($db); - } + $code = $reg[1]; + if (dolibarr_del_const($db, $code, $conf->entity) > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } else { + dol_print_error($db); + } } +if ($action == 'warehouse') +{ + $value = GETPOST('default_warehouse', 'alpha'); + $res = dolibarr_set_const($db, "MAIN_DEFAULT_WAREHOUSE", $value, 'chaine', 0, '', $conf->entity); + if ($value == -1 || empty($value) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)){ + $res = dolibarr_del_const($db, "MAIN_DEFAULT_WAREHOUSE", $conf->entity); + } + if (!$res > 0) $error++; +} + +if ($action == 'specimen') +{ + $modele = GETPOST('module', 'alpha'); + + $object = new Entrepot($db); + $object->initAsSpecimen(); + + // Search template files + $file = ''; $classname = ''; $filefound = 0; + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) + { + $file = dol_buildpath($reldir."core/modules/stock/doc/pdf_".$modele.".modules.php", 0); + if (file_exists($file)) + { + $filefound = 1; + $classname = "pdf_".$modele; + break; + } + } + + if ($filefound) + { + require_once $file; + + $module = new $classname($db); + + if ($module->write_file($object, $langs) > 0) + { + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=stock&file=SPECIMEN.pdf"); + return; + } else { + setEventMessages($module->error, null, 'errors'); + dol_syslog($module->error, LOG_ERR); + } + } else { + setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + } +} + +// Activate a model +elseif ($action == 'set') { + $ret = addDocumentModel($value, $type, $label, $scandir); +} elseif ($action == 'del') { + $ret = delDocumentModel($value, $type); + if ($ret > 0) + { + if ($conf->global->STOCK_ADDON_PDF == "$value") dolibarr_del_const($db, 'STOCK_ADDON_PDF', $conf->entity); + } +} + +// Set default model +elseif ($action == 'setdoc') +{ + if (dolibarr_set_const($db, "STOCK_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) + { + // The constant that was read before the new set + // We therefore requires a variable to have a coherent view + $conf->global->STOCK_ADDON_PDF = $value; + } + + // On active le modele + $ret = delDocumentModel($value, $type); + if ($ret > 0) + { + $ret = addDocumentModel($value, $type, $label, $scandir); + } +} + + /* * View */ +$form = new Form($db); +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + llxHeader('', $langs->trans("StockSetup")); $linkback = ''.$langs->trans("BackToModuleList").''; @@ -83,6 +187,8 @@ $head = stock_admin_prepare_head(); dol_fiche_head($head, 'general', $langs->trans("StockSetup"), -1, 'stock'); $form = new Form($db); +$formproduct = new FormProduct($db); + $disabled = ''; @@ -99,6 +205,11 @@ print info_admin($langs->trans("IfYouUsePointOfSaleCheckModule")); print '
'; //} + +print ''; +print ''; +print ''; + // Title rule for stock decrease print '
'; print ''; @@ -113,16 +224,14 @@ print ''; print '\n\n"; $found++; @@ -133,16 +242,14 @@ print ''; print '\n\n"; $found++; @@ -155,16 +262,14 @@ print ''; print '\n\n"; $found++; @@ -175,32 +280,24 @@ print ''; print '\n\n"; $found++; -/*if (! $found) -{ - - print ''; - print ''; - print "\n"; -}*/ - print '
'.$langs->trans("DeStockOnBill").''; if (!empty($conf->facture->enabled)) { - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_BILL'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_BILL); - } -} -else -{ - print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module30Name")); + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_BILL', array(), null, 0, 0, 0, 2, 1); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_BILL); + } +} else { + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module30Name")); } print "
'.$langs->trans("DeStockOnValidateOrder").''; if (!empty($conf->commande->enabled)) { - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_VALIDATE_ORDER'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER); - } -} -else -{ - print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module25Name")); + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_VALIDATE_ORDER', array(), null, 0, 0, 0, 2, 1); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER); + } +} else { + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module25Name")); } print "
'.$langs->trans("DeStockOnShipment").''; if (!empty($conf->expedition->enabled)) { - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_SHIPMENT'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_SHIPMENT", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT); - } -} -else -{ - print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module80Name")); + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_SHIPMENT', array(), null, 0, 0, 0, 2, 1); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_SHIPMENT", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT); + } +} else { + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module80Name")); } print "
'.$langs->trans("DeStockOnShipmentOnClosing").''; if (!empty($conf->expedition->enabled)) { - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_SHIPMENT_CLOSE'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_SHIPMENT_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE); - } -} -else -{ - print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module80Name")); + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_SHIPMENT_CLOSE', array(), null, 0, 0, 0, 2, 1); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_SHIPMENT_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE); + } +} else { + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module80Name")); } print "
'.$langs->trans("NoModuleToManageStockDecrease").'
'; + print '
'; + // Title rule for stock increase print ''; print ''; @@ -215,16 +312,14 @@ print ''; print '\n\n"; $found++; @@ -236,16 +331,14 @@ print ''; print '\n\n"; $found++; @@ -254,62 +347,50 @@ if (!empty($conf->reception->enabled)) { print ''; print ''; - print '\n\n"; $found++; - print ''; + print ''; print ''; - print '\n\n"; $found++; -} -else -{ +} else { print ''; print ''; - print '\n\n"; $found++; } -/*if (! $found) -{ - - print ''; - print ''; - print "\n"; -}*/ - print '
'.$langs->trans("ReStockOnBill").''; if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_BILL'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL); - } -} -else -{ - print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name")); + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_BILL', array(), null, 0, 0, 0, 2, 1); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL); + } +} else { + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name")); } print "
'.$langs->trans("ReStockOnValidateOrder").''; if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER); - } -} -else -{ - print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name")); + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER', array(), null, 0, 0, 0, 2, 1); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER); + } +} else { + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name")); } print "
'.$langs->trans("StockOnReception").''; + print ''; - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_RECEPTION'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_RECEPTION", $arrval, $conf->global->STOCK_CALCULATE_ON_RECEPTION); - } + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_RECEPTION', array(), null, 0, 0, 0, 2, 1); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_RECEPTION", $arrval, $conf->global->STOCK_CALCULATE_ON_RECEPTION); + } print "
'.$langs->trans("StockOnReceptionOnClosing").''; + print ''; - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_RECEPTION_CLOSE'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_RECEPTION_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE); - } + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_RECEPTION_CLOSE', array(), null, 0, 0, 0, 2, 1); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_RECEPTION_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE); + } print "
'.$langs->trans("ReStockOnDispatchOrder").''; + print ''; if (!empty($conf->fournisseur->enabled)) { - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER); - } - } - else - { + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER', array(), null, 0, 0, 0, 2, 1); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER); + } + } else { print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name")); } print "
'.$langs->trans("NoModuleToManageStockIncrease").'
'; print '
'; @@ -325,10 +406,10 @@ print ''; print ''.$langs->trans("WarehouseAllowNegativeTransfer").''; print ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_ALLOW_NEGATIVE_TRANSFER'); + print ajax_constantonoff('STOCK_ALLOW_NEGATIVE_TRANSFER'); } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_ALLOW_NEGATIVE_TRANSFER", $arrval, $conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER); + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_ALLOW_NEGATIVE_TRANSFER", $arrval, $conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER); } print "\n"; print "\n"; @@ -338,28 +419,28 @@ if ($conf->invoice->enabled) { print ''; print ''.$langs->trans("StockMustBeEnoughForInvoice").''; - print ''; - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_INVOICE'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_INVOICE", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE); - } - print "\n"; - print "\n"; + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_INVOICE'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_INVOICE", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE); + } + print "\n"; + print "\n"; } if ($conf->order->enabled) { print ''; print ''.$langs->trans("StockMustBeEnoughForOrder").''; - print ''; - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_ORDER'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_ORDER", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER); - } + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_ORDER'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_ORDER", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER); + } print "\n"; print "\n"; } @@ -368,13 +449,13 @@ if ($conf->expedition->enabled) { print ''; print ''.$langs->trans("StockMustBeEnoughForShipment").''; - print ''; - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT); - } + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT", $arrval, $conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT); + } print "\n"; print "\n"; } @@ -383,36 +464,206 @@ print ''; print '
'; $virtualdiffersfromphysical = 0; -if ( - !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) - || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) -) { - $virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs. +if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) + || !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) + || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) + || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) + || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) + || !empty($conf->mrp->enabled)) +{ + $virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs. } if ($virtualdiffersfromphysical) { - print ''; - print ''; + print '
'; + print ''; print "\n"; - print ''."\n"; + print ''."\n"; print ''."\n"; print ''; print ''; - print '\n"; print "\n"; print '
".$langs->trans("RuleForStockReplenishment")." ".img_help('help', $langs->trans("VirtualDiffersFromPhysical"))."'.$langs->trans("Status").''.$langs->trans("Status").'
'.$langs->trans("UseVirtualStockByDefault").''; - if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_USE_VIRTUAL_STOCK'); - } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_USE_VIRTUAL_STOCK", $arrval, $conf->global->STOCK_USE_VIRTUAL_STOCK); - } + print ''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_USE_VIRTUAL_STOCK'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_USE_VIRTUAL_STOCK", $arrval, $conf->global->STOCK_USE_VIRTUAL_STOCK); + } print "
'; + print '
'; } +print ''; + + +print ''; +print ''; +print ''; + + +/* + * Document templates generators + */ + +print load_fiche_titre($langs->trans("WarehouseModelModules"), '', ''); + +// Load array def with activated templates +$def = array(); +$sql = "SELECT nom"; +$sql .= " FROM ".MAIN_DB_PREFIX."document_model"; +$sql .= " WHERE type = '".$type."'"; +$sql .= " AND entity = ".$conf->entity; +$resql = $db->query($sql); +if ($resql) +{ + $i = 0; + $num_rows = $db->num_rows($resql); + while ($i < $num_rows) + { + $array = $db->fetch_array($resql); + array_push($def, $array[0]); + $i++; + } +} else { + dol_print_error($db); +} + + +print "\n"; +print "\n"; +print ''; +print ''; +print '\n"; +print '\n"; +print ''; +print ''; +print "\n"; + +clearstatcache(); + +foreach ($dirmodels as $reldir) +{ + foreach (array('', '/doc') as $valdir) + { + $realpath = $reldir."core/modules/stock".$valdir; + $dir = dol_buildpath($realpath); + + if (is_dir($dir)) + { + $handle = opendir($dir); + if (is_resource($handle)) + { + while (($file = readdir($handle)) !== false) + { + $filelist[] = $file; + } + closedir($handle); + arsort($filelist); + + foreach ($filelist as $file) + { + if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) + { + if (file_exists($dir.'/'.$file)) + { + $name = substr($file, 4, dol_strlen($file) - 16); + $classname = substr($file, 0, dol_strlen($file) - 12); + + require_once $dir.'/'.$file; + $module = new $classname($db); + + $modulequalified = 1; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0; + + if ($modulequalified) + { + print ''; + + // Active + if (in_array($name, $def)) + { + print ''; + } else { + print '"; + } + + // Default + print ''; + + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip .= '
'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); + if ($module->type == 'pdf') + { + $htmltooltip .= '
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + } + $htmltooltip .= '
'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file; + + $htmltooltip .= '

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip .= '
'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); + $htmltooltip .= '
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); + + + print ''; + + // Preview + print ''; + + print "\n"; + } + } + } + } + } + } + } +} + +print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
'; + print (empty($module->name) ? $name : $module->name); + print "\n"; + if (method_exists($module, 'info')) print $module->info($langs); + else print $module->description; + print ''."\n"; + print ''; + print img_picto($langs->trans("Enabled"), 'switch_on'); + print ''; + print ''."\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print "'; + if ($conf->global->STOCK_ADDON_PDF == $name) + { + print img_picto($langs->trans("Default"), 'on'); + } else { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; + if ($module->type == 'pdf') + { + print ''.img_object($langs->trans("Preview"), 'bill').''; + } else { + print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + } + print '
'; + +print ''; + + +// Other + +print '
'; +print ''; +print ''; + +print load_fiche_titre($langs->trans("Other"), '', ''); print ''; @@ -422,27 +673,62 @@ print ''."\n"; print ''."\n"; print ''; -print ''; +print ''; +print '"; +print "\n"; + +print ''; +print ''; print '\n"; print "\n"; +if (! empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) { + print ''; + print ''; + print '\n"; + print "\n"; +} + +print ''; +print ''; +print '"; +print ''; +print "\n"; + print ''; print ''; print '\n"; print "\n"; @@ -451,16 +737,29 @@ print ''; print ''; print '\n"; print "\n"; +print ''; +print ''; +print '\n"; +print "\n"; print '
'.$langs->trans("Status").'
'.$langs->trans("UserWarehouseAutoCreate").''.$langs->trans("MainDefaultWarehouse").''; +print $formproduct->selectWarehouses($conf->global->MAIN_DEFAULT_WAREHOUSE, 'default_warehouse', '', 1, 0, 0, '', 0, 0, array(), 'left reposition'); +print ''; +print "
'.$langs->trans("UserDefaultWarehouse").''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_USERSTOCK_AUTOCREATE'); + print ajax_constantonoff('MAIN_DEFAULT_WAREHOUSE_USER', array(), null, 0, 0, 1); } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_USERSTOCK_AUTOCREATE", $arrval, $conf->global->STOCK_USERSTOCK_AUTOCREATE); + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("MAIN_DEFAULT_WAREHOUSE_USER", $arrval, $conf->global->MAIN_DEFAULT_WAREHOUSE_USER); } print "
'.$langs->trans("UserWarehouseAutoCreate").''; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_USERSTOCK_AUTOCREATE'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_USERSTOCK_AUTOCREATE", $arrval, $conf->global->STOCK_USERSTOCK_AUTOCREATE); + } + print "
'.$langs->trans("WarehouseAskWarehouseDuringOrder").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER", $arrval, $conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER); +} +print "
'; print $form->textwithpicto($langs->trans("StockSupportServices"), $langs->trans("StockSupportServicesDesc")); print ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_SUPPORTS_SERVICES'); + print ajax_constantonoff('STOCK_SUPPORTS_SERVICES'); } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_SUPPORTS_SERVICES", $arrval, $conf->global->STOCK_SUPPORTS_SERVICES); + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_SUPPORTS_SERVICES", $arrval, $conf->global->STOCK_SUPPORTS_SERVICES); } print "
'.$langs->trans("AllowAddLimitStockByWarehouse").''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE'); + print ajax_constantonoff('STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE'); } else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE", $arrval, $conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE); + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE", $arrval, $conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE); } print "
'.$langs->trans("AlwaysShowFullArbo").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_ALWAYS_SHOW_FULL_ARBO'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_ALWAYS_SHOW_FULL_ARBO", $arrval, $conf->global->STOCK_ALWAYS_SHOW_FULL_ARBO); +} +print "
'; +print '
'; + /* print '
'; if ($conf->global->MAIN_FEATURES_LEVEL >= 2) diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 977b99d0c99..59613f6af5b 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -70,9 +70,7 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -109,15 +107,11 @@ if ($action == 'specimen') // For invoices { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } @@ -127,9 +121,7 @@ if ($action == 'specimen') // For invoices elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); -} - -elseif ($action == 'del') +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -154,8 +146,7 @@ elseif ($action == 'setdoc') { $ret = addDocumentModel($value, $type, $label, $scandir); } -} -elseif ($action == 'unsetdoc') +} elseif ($action == 'unsetdoc') { dolibarr_del_const($db, "INVOICE_SUPPLIER_ADDON_PDF", $conf->entity); } @@ -185,9 +176,7 @@ if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -263,8 +252,7 @@ foreach ($dirmodels as $reldir) $tmp = $module->getExample(); if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; - } - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); else print $tmp; print ''."\n"; @@ -272,9 +260,7 @@ foreach ($dirmodels as $reldir) if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { + } else { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; } print ''; @@ -340,9 +326,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -409,9 +393,7 @@ foreach ($dirmodels as $reldir) print img_picto($langs->trans("Enabled"),'switch_on'); }*/ print ""; - } - else - { + } else { print ''."\n"; print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; @@ -424,9 +406,7 @@ foreach ($dirmodels as $reldir) //print img_picto($langs->trans("Default"),'on'); // Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').''; - } - else - { + } else { print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -487,9 +467,7 @@ $variablename = 'SUPPLIER_INVOICE_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; -} -else -{ +} else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); print $doleditor->Create(); diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index db9b3e257f6..a390e4a4522 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -68,14 +68,10 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} - -elseif ($action == 'specimen') // For orders +} elseif ($action == 'specimen') // For orders { $modele = GETPOST('module', 'alpha'); @@ -107,15 +103,11 @@ elseif ($action == 'specimen') // For orders { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } @@ -125,9 +117,7 @@ elseif ($action == 'specimen') // For orders elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); -} - -elseif ($action == 'del') +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -152,23 +142,17 @@ elseif ($action == 'setdoc') { $ret = addDocumentModel($value, $type, $label, $scandir); } -} - -elseif ($action == 'setmod') +} elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity); -} - -elseif ($action == 'addcat') +} elseif ($action == 'addcat') { $fourn = new Fournisseur($db); $fourn->CreateCategory($user, GETPOST('cat', 'alphanohtml')); -} - -elseif ($action == 'set_SUPPLIER_ORDER_OTHER') +} elseif ($action == 'set_SUPPLIER_ORDER_OTHER') { $freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT', 'none'); // No alpha here, we want exact string $doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED', 'alpha'); @@ -196,9 +180,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER') // Insert $newmodule->insert_permissions(1); - } - else - { + } else { // Remove all rights with Permission1190 $newmodule->delete_permissions(); @@ -217,9 +199,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -295,8 +275,7 @@ foreach ($dirmodels as $reldir) $tmp = $module->getExample(); if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; - } - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); else print $tmp; print ''."\n"; @@ -304,9 +283,7 @@ foreach ($dirmodels as $reldir) if ($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { + } else { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; } print ''; @@ -370,9 +347,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -429,15 +404,11 @@ foreach ($dirmodels as $reldir) print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier">'; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; - } - else - { + } else { print img_picto($langs->trans("Enabled"), 'switch_on'); } print ""; - } - else - { + } else { print ''."\n"; print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; @@ -448,9 +419,7 @@ foreach ($dirmodels as $reldir) if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") { print img_picto($langs->trans("Default"), 'on'); - } - else - { + } else { print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -553,9 +522,7 @@ $variablename = 'SUPPLIER_ORDER_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; -} -else -{ +} else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); print $doleditor->Create(); @@ -572,9 +539,7 @@ print ''; if ($conf->reception->enabled) { print ''.$langs->trans("FeatureNotAvailableWithReceptionModule").''; -} -else -{ +} else { if ($conf->use_javascript_ajax) { print ajax_constantonoff('SUPPLIER_ORDER_USE_DISPATCH_STATUS'); } else { diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 5d7a0d0b8d5..da74784505a 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -57,12 +57,10 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -}elseif ($action == 'setmod') +} elseif ($action == 'setmod') { dolibarr_set_const($db, "SUPPLIER_PAYMENT_ADDON", $value, 'chaine', 0, '', $conf->entity); } @@ -71,9 +69,7 @@ if ($action == 'updateMask') elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); -} - -elseif ($action == 'del') +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -98,9 +94,7 @@ elseif ($action == 'setdoc') { $ret = addDocumentModel($value, $type, $label, $scandir); } -} - -elseif ($action == 'specimen') +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); @@ -131,23 +125,15 @@ elseif ($action == 'specimen') { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_payment&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - - - -elseif ($action == 'setparams') +} elseif ($action == 'setparams') { $res = dolibarr_set_const($db, "PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity); if (!$res > 0) $error++; @@ -206,9 +192,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -282,9 +266,7 @@ foreach ($dirmodels as $reldir) if ($conf->global->SUPPLIER_PAYMENT_ADDON == $file || $conf->global->SUPPLIER_PAYMENT_ADDON.'.php' == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { + } else { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; } print ''; @@ -398,9 +380,7 @@ foreach ($dirmodels as $reldir) print img_picto($langs->trans("Enabled"),'switch_on'); }*/ print ""; - } - else - { + } else { print ''."\n"; print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; @@ -413,9 +393,7 @@ foreach ($dirmodels as $reldir) //print img_picto($langs->trans("Default"),'on'); // Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').''; - } - else - { + } else { print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index c1007623a54..5f35f3af310 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -60,9 +60,7 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -98,15 +96,11 @@ if ($action == 'specimen') { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_proposal&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, null, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } @@ -122,9 +116,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -140,9 +132,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -156,9 +146,7 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -167,18 +155,14 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL') if ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); -} - -elseif ($action == 'del') +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$value") dolibarr_del_const($db, 'SUPPLIER_PROPOSAL_ADDON_PDF', $conf->entity); } -} - -elseif ($action == 'setdoc') +} elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { @@ -191,9 +175,7 @@ elseif ($action == 'setdoc') { $ret = addDocumentModel($value, $type, $label, $scandir); } -} - -elseif ($action == 'setmod') +} elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -278,9 +260,7 @@ foreach ($dirmodels as $reldir) if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { + } else { print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; @@ -343,9 +323,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -414,9 +392,7 @@ foreach ($dirmodels as $reldir) print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; print ''; - } - else - { + } else { print "\n"; print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; @@ -427,9 +403,7 @@ foreach ($dirmodels as $reldir) if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name") { print img_picto($langs->trans("Default"), 'on'); - } - else - { + } else { print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -462,9 +436,7 @@ foreach ($dirmodels as $reldir) if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'bill').''; - } - else - { + } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } print ''; @@ -511,9 +483,7 @@ $variablename = 'SUPPLIER_PROPOSAL_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; -} -else -{ +} else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); print $doleditor->Create(); @@ -543,22 +513,16 @@ if ($conf->banque->enabled) if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL'); - } - else - { + } else { if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL)) { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; - } - else - { + } else { print ''.img_picto($langs->trans("Enabled"), 'switch_on').''; } } print ''; -} -else -{ +} else { print ''; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '.$langs->trans('NotAvailable').''; } diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 16b273cd6db..079fb3a6052 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -126,9 +126,7 @@ if ($action == 'set') { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($error, $errors, 'errors'); } @@ -155,18 +153,17 @@ if ($action == 'setlevel') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } + /* * View */ -llxHeader(); +llxHeader('', $langs->trans("SyslogSetup")); $form = new Form($db); @@ -174,8 +171,6 @@ $linkback = ''; -$def = array(); - $syslogfacility = $defaultsyslogfacility = dolibarr_get_const($db, "SYSLOG_FACILITY", 0); $syslogfile = $defaultsyslogfile = dolibarr_get_const($db, "SYSLOG_FILE", 0); @@ -192,7 +187,7 @@ if ($conf->global->MAIN_MODULE_MULTICOMPANY && $user->entity) //print "conf->global->MAIN_FEATURES_LEVEL = ".$conf->global->MAIN_FEATURES_LEVEL."

\n"; // Output mode -print load_fiche_titre($langs->trans("SyslogOutput")); +print load_fiche_titre($langs->trans("SyslogOutput"), '', ''); // Mode print '
'; @@ -230,8 +225,7 @@ foreach ($syslogModules as $moduleName) { if (isset($_POST[$tmpoption])) $value = $_POST[$tmpoption]; elseif (!empty($conf->global->$tmpoption)) $value = $conf->global->$tmpoption; - } - else $value = (isset($option['default']) ? $option['default'] : ''); + } else $value = (isset($option['default']) ? $option['default'] : ''); print $option['name'].': '; if (!empty($option['example'])) print '
'.$langs->trans("Example").': '.$option['example']; @@ -265,7 +259,7 @@ print "
\n"; print '
'."\n\n"; -print load_fiche_titre($langs->trans("SyslogLevel")); +print load_fiche_titre($langs->trans("SyslogLevel"), '', ''); // Level print '
'; diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index 3d0dddd6d10..615d353bbf1 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -200,9 +200,7 @@ if ($showpromotemessage) print ''; - } - else - { + } else { print $langs->trans("TitleExampleForMaintenanceRelease").':
'; print '', null, 'warnings'); setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); $action = ''; - } - elseif ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) + } elseif ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) { setEventMessages($langs->trans("NotEnoughPermissions"), null, 'warnings'); $action = ''; - } - else - { + } else { $upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing'); if ($object->statut == 0) @@ -218,7 +211,6 @@ if (empty($reshook)) $substitutionarray['__OTHER4__'] = $other4; $substitutionarray['__OTHER5__'] = $other5; $substitutionarray['__USER_SIGNATURE__'] = $signature; // Signature is empty when ran from command line or taken from user in parameter) - $substitutionarray['__SIGNATURE__'] = $signature; // For backward compatibility $substitutionarray['__CHECK_READ__'] = ''; $substitutionarray['__UNSUBSCRIBE__'] = '
'.$langs->trans("MailUnsubcribe").''; @@ -235,9 +227,7 @@ if (empty($reshook)) $substitutionarray['__SECUREKEYPAYMENT_ORDER__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); $substitutionarray['__SECUREKEYPAYMENT_INVOICE__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); $substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); - } - else - { + } else { $substitutionarray['__SECUREKEYPAYMENT_MEMBER__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$obj->source_id, 2); $substitutionarray['__SECUREKEYPAYMENT_ORDER__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'order'.$obj->source_id, 2); $substitutionarray['__SECUREKEYPAYMENT_INVOICE__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'invoice'.$obj->source_id, 2); @@ -316,9 +306,7 @@ if (empty($reshook)) if (!$resql2) { dol_print_error($db); - } - else - { + } else { //if cheack read is use then update prospect contact status if (strpos($message, '__CHECK_READ__') !== false) { @@ -350,9 +338,7 @@ if (empty($reshook)) } //test if CHECK READ change statut prospect contact - } - else - { + } else { // Mail failed $nbko++; @@ -369,9 +355,7 @@ if (empty($reshook)) $i++; } - } - else - { + } else { setEventMessages($langs->transnoentitiesnoconv("NoMoreRecipientToSendTo"), null, 'mesgs'); } @@ -381,16 +365,12 @@ if (empty($reshook)) $statut = 2; // Status 'sent partially' (because at least one error) if ($nbok > 0) setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients", $nbok), null, 'mesgs'); else setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients", $nbok), null, 'mesgs'); - } - else - { + } else { if ($nbok >= $num) { $statut = 3; // Send to everybody setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients", $nbok), null, 'mesgs'); - } - else - { + } else { $statut = 2; // Status 'sent partially' (because not send to everybody) setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients", $nbok), null, 'mesgs'); } @@ -403,9 +383,7 @@ if (empty($reshook)) { dol_print_error($db); } - } - else - { + } else { dol_syslog($db->error()); dol_print_error($db); } @@ -472,9 +450,7 @@ if (empty($reshook)) { setEventMessages($langs->trans("MailSuccessfulySent", $mailfile->getValidAddress($object->email_from, 2), $mailfile->getValidAddress($object->sendto, 2)), null, 'mesgs'); $action = ''; - } - else - { + } else { setEventMessages($langs->trans("ResultKo").'
'.$mailfile->error.' '.$result, null, 'errors'); $action = 'test'; } @@ -611,9 +587,7 @@ if (empty($reshook)) setEventMessages($mesg, $mesgs, 'errors'); $action = "edit"; - } - else - { + } else { $action = "edit"; } } @@ -627,9 +601,7 @@ if (empty($reshook)) setEventMessages($langs->trans("MailingSuccessfullyValidated"), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { dol_print_error($db); } } @@ -645,14 +617,10 @@ if (empty($reshook)) //setEventMessages($langs->trans("MailingSuccessfullyValidated"), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { dol_print_error($db); } } @@ -675,15 +643,11 @@ if (empty($reshook)) $db->commit(); header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } - } - else - { + } else { dol_print_error($db); } } @@ -783,9 +747,7 @@ if ($action == 'create') print '
'; print '
'; -} -else -{ +} else { if ($object->id > 0) { $upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing'); @@ -801,13 +763,11 @@ else if ($action == 'valid') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("ValidMailing"), $langs->trans("ConfirmValidMailing"), "confirm_valid", '', '', 1); - } - // Confirm reset + } // Confirm reset elseif ($action == 'reset') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("ResetMailing"), $langs->trans("ConfirmResetMailing", $object->ref), "confirm_reset", '', '', 2); - } - // Confirm delete + } // Confirm delete elseif ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(!empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''), $langs->trans("DeleteAMailing"), $langs->trans("ConfirmDeleteMailing"), "confirm_delete", '', '', 1); @@ -841,8 +801,7 @@ else setEventMessages($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), null, 'warnings'); if (!empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings'); $_GET["action"] = ''; - } - elseif ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) + } elseif ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) { if (!empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings'); if (!empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL), null, 'warnings'); @@ -855,9 +814,7 @@ else setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); // You can send online with constant... } $_GET["action"] = ''; - } - else - { + } else { if (!empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings'); if (!empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL), null, 'warnings'); @@ -939,9 +896,7 @@ else if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) { $text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB); - } - else - { + } else { $text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed'); } } @@ -949,9 +904,7 @@ else if ($text) { print $form->textwithpicto($nbemail, $text, 1, 'warning'); - } - else - { + } else { print $nbemail; } } @@ -998,9 +951,7 @@ else if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_MAILING)) { print ''.$langs->trans("EditWithEditor").''; - } - else - { + } else { print ''.$langs->trans("EditWithTextEditor").''; } @@ -1012,9 +963,7 @@ else if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !$user->rights->mailing->mailing_advance->send) { print ''.$langs->trans("TestMailing").''; - } - else - { + } else { print ''.$langs->trans("TestMailing").''; } @@ -1023,13 +972,10 @@ else if ($object->nbemail <= 0) { print ''.$langs->trans("ValidMailing").''; - } - elseif (empty($user->rights->mailing->valider)) + } elseif (empty($user->rights->mailing->valider)) { print ''.$langs->trans("ValidMailing").''; - } - else - { + } else { print ''.$langs->trans("ValidMailing").''; } } @@ -1039,13 +985,10 @@ else if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) { print ''.$langs->trans("SendMailing").''; - } - elseif (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !$user->rights->mailing->mailing_advance->send) + } elseif (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !$user->rights->mailing->mailing_advance->send) { print ''.$langs->trans("SendMailing").''; - } - else - { + } else { print ''.$langs->trans("SendMailing").''; } } @@ -1060,9 +1003,7 @@ else if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !$user->rights->mailing->mailing_advance->send) { print ''.$langs->trans("ResetMailing").''; - } - else - { + } else { print ''.$langs->trans("ResetMailing").''; } } @@ -1072,9 +1013,7 @@ else if ($object->statut > 0 && (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !$user->rights->mailing->mailing_advance->delete)) { print ''.$langs->trans("DeleteMailing").''; - } - else - { + } else { print ''.$langs->trans("DeleteMailing").''; } } @@ -1153,9 +1092,7 @@ else print img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name']; print '
'; } - } - else - { + } else { print ''.$langs->trans("NoAttachedFiles").'
'; } print ''; @@ -1176,14 +1113,11 @@ else require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor('bodyemail', $object->body, '', 600, 'dolibarr_mailings', '', false, true, empty($conf->global->FCKEDITOR_ENABLE_MAILING) ? 0 : 1, 20, '90%', $readonly); $doleditor->Create(); - } - else print dol_htmlentitiesbr($object->body); + } else print dol_htmlentitiesbr($object->body); print '
'; dol_fiche_end(); - } - else - { + } else { /* * Mailing en mode edition (CKeditor or HTML source) */ @@ -1229,9 +1163,7 @@ else if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) { $text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB); - } - else - { + } else { $text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed'); } } @@ -1239,9 +1171,7 @@ else if ($text) { print $form->textwithpicto($nbemail, $text, 1, 'warning'); - } - else - { + } else { print $nbemail; } } @@ -1315,9 +1245,7 @@ else $out .= ' '; $out .= '
'; } - } - else - { + } else { $out .= $langs->trans("NoAttachedFiles").'
'; } // Add link to add file @@ -1366,9 +1294,7 @@ else print ''; print '
'; } - } - else - { + } else { dol_print_error($db, $object->error); } } diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index d8d9873b88b..27e0c2e5b0c 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -160,9 +160,7 @@ if (GETPOST('exportcsv', 'int')) } exit; - } - else - { + } else { dol_print_error($db); } exit; @@ -181,15 +179,11 @@ if ($action == 'delete') $obj->update_nb($id); setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); - } - else - { + } else { header("Location: list.php"); exit; } - } - else - { + } else { dol_print_error($db); } } @@ -293,9 +287,7 @@ if ($object->fetch($id) >= 0) if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) { $text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB); - } - else - { + } else { $text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed'); } } @@ -303,9 +295,7 @@ if ($object->fetch($id) >= 0) if ($text) { print $form->textwithpicto($nbemail, $text, 1, 'warning'); - } - else - { + } else { print $nbemail; } } @@ -405,9 +395,7 @@ if ($object->fetch($id) >= 0) { print '
'; print ''; - } - else - { + } else { print '
'; } @@ -420,8 +408,7 @@ if ($object->fetch($id) >= 0) try { $nbofrecipient = $obj->getNbOfRecipients(''); - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } @@ -430,9 +417,7 @@ if ($object->fetch($id) >= 0) if ($nbofrecipient >= 0) { print $nbofrecipient; - } - else - { + } else { print $langs->trans("Error").' '.img_error($obj->error); } print '
'; @@ -442,8 +427,7 @@ if ($object->fetch($id) >= 0) { try { $filter = $obj->formFilter(); - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } @@ -456,9 +440,7 @@ if ($object->fetch($id) >= 0) if ($allowaddtarget) { print ''; - } - else - { + } else { print ''; //print $langs->trans("MailNoChangePossible"); print " "; @@ -632,31 +614,24 @@ if ($object->fetch($id) >= 0) if (empty($obj->source_id) || empty($obj->source_type)) { print empty($obj->source_url) ? '' : $obj->source_url; // For backward compatibility - } - else - { + } else { if ($obj->source_type == 'member') { $objectstaticmember->fetch($obj->source_id); print $objectstaticmember->getNomUrl(1); - } - elseif ($obj->source_type == 'user') + } elseif ($obj->source_type == 'user') { $objectstaticuser->fetch($obj->source_id); print $objectstaticuser->getNomUrl(1); - } - elseif ($obj->source_type == 'thirdparty') + } elseif ($obj->source_type == 'thirdparty') { $objectstaticcompany->fetch($obj->source_id); print $objectstaticcompany->getNomUrl(1); - } - elseif ($obj->source_type == 'contact') + } elseif ($obj->source_type == 'contact') { $objectstaticcontact->fetch($obj->source_id); print $objectstaticcontact->getNomUrl(1); - } - else - { + } else { print $obj->source_url; } } @@ -676,9 +651,7 @@ if ($object->fetch($id) >= 0) print ''; print $object::libStatutDest($obj->statut, 2, ''); print ''; - } - else - { + } else { // Date sent print ''.$obj->date_envoi.''; @@ -704,9 +677,7 @@ if ($object->fetch($id) >= 0) $i++; } - } - else - { + } else { if ($object->statut < 2) { print ''; @@ -720,9 +691,7 @@ if ($object->fetch($id) >= 0) print '
'; $db->free($resql); - } - else - { + } else { dol_print_error($db); } diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 7700ca6ee43..983ad374980 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -165,9 +165,7 @@ class AdvanceTargetingMailing extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -221,9 +219,7 @@ class AdvanceTargetingMailing extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; @@ -284,9 +280,7 @@ class AdvanceTargetingMailing extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; @@ -351,9 +345,7 @@ class AdvanceTargetingMailing extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; @@ -411,9 +403,7 @@ class AdvanceTargetingMailing extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -453,9 +443,7 @@ class AdvanceTargetingMailing extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -689,9 +677,7 @@ class AdvanceTargetingMailing extends CommonObject if (!empty($arrayquery['contact_no_email'])) { $tmpwhere .= "(t.email IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE t.entity IN (".getEntity('mailing').") AND email = '".$this->db->escape($arrayquery['contact_no_email'])."'))"; - } - else - { + } else { $tmpwhere .= "(t.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE t.entity IN (".getEntity('mailing').") AND email = '".$this->db->escape($arrayquery['contact_no_email'])."'))"; } $sqlwhere[] = $tmpwhere; diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index b9782515735..53fafb0ce61 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -314,9 +314,7 @@ class FormAdvTargetEmailing extends Form $i++; } } - } - else - { + } else { dol_print_error($this->db); } @@ -341,74 +339,6 @@ class FormAdvTargetEmailing extends Form return $return; } - /** - * Return combo list with customer categories - * - * @param string $htmlname Name of categorie - * @param array $selected_array value selected - * @return string HTML combo - */ - public function multiselectCustomerCategories($htmlname = 'cust_cat', $selected_array = array()) - { - return $this->multiselectCategories($htmlname, $selected_array, 2); - } - - /** - * Return combo list with customer contact - * - * @param string $htmlname Name of categorie - * @param array $selected_array value selected - * @return string HTML combo - */ - public function multiselectContactCategories($htmlname = 'contact_cat', $selected_array = array()) - { - return $this->multiselectCategories($htmlname, $selected_array, 4); - } - - /** - * Return combo list of categories - * - * @param string $htmlname Name of categorie - * @param array $selected_array Value selected - * @param int $type Type - * @return string HTML combo - */ - public function multiselectCategories($htmlname = '', $selected_array = array(), $type = 0) - { - global $conf, $langs, $user; - $langs->load("dict"); - - $options_array = array(); - - $sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."categorie"; - $sql .= " WHERE type=".$type; - - dol_syslog(__METHOD__, LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - $i = 0; - if ($num) - { - while ($i < $num) - { - $obj = $this->db->fetch_object($resql); - - $options_array[$obj->rowid] = $obj->label; - - $i++; - } - } - } - else - { - dol_print_error($this->db); - } - - return $this->advMultiselectarray($htmlname, $options_array, $selected_array); - } - /** * Return a combo list to select emailing target selector * diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 56a115a2fea..1bb4864876c 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -144,18 +144,14 @@ class Mailing extends CommonObject if ($this->update($user) > 0) { $this->db->commit(); - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } return $this->id; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -186,9 +182,7 @@ class Mailing extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -253,15 +247,11 @@ class Mailing extends CommonObject $this->extraparams = (array) json_decode($obj->extraparams, true); return 1; - } - else - { + } else { dol_syslog(get_class($this)."::fetch Erreur -1"); return -1; } - } - else - { + } else { dol_syslog(get_class($this)."::fetch Erreur -2"); return -2; } @@ -368,9 +358,7 @@ class Mailing extends CommonObject ); } } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -386,9 +374,7 @@ class Mailing extends CommonObject { $this->db->commit(); return $object->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -412,9 +398,7 @@ class Mailing extends CommonObject if ($this->db->query($sql)) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -437,9 +421,7 @@ class Mailing extends CommonObject if ($resql) { return $this->delete_targets(); - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -462,9 +444,7 @@ class Mailing extends CommonObject if ($resql) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return 0; } @@ -490,9 +470,7 @@ class Mailing extends CommonObject if ($resql) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -512,8 +490,7 @@ class Mailing extends CommonObject if ($mode == 'alreadysent') $sql .= " AND statut <> 0"; elseif ($mode == 'alreadysentok') $sql .= " AND statut > 0"; elseif ($mode == 'alreadysentko') $sql .= " AND statut = -1"; - else - { + else { $this->error = 'BadValueForParameterMode'; return -2; } @@ -523,9 +500,7 @@ class Mailing extends CommonObject { $obj = $this->db->fetch_object($resql); if ($obj) return $obj->nb; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -585,8 +560,7 @@ class Mailing extends CommonObject $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $linkclose = $hookmanager->resPrint; */ - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 6b765d9451f..cf439e4314b 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -129,9 +129,7 @@ if (is_resource($handle)) } $db->free($result); - } - else - { + } else { dol_print_error($db); } print ''; @@ -191,16 +189,12 @@ if ($result) { print ''; $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; } print "

"; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index 3dfe0c4264c..070d46f6104 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php'; -$id = GETPOST('id'); +$id = GETPOST('id', 'int'); // Load translation files required by the page $langs->load("mails"); diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 8119224bbfa..d22dd130507 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -130,9 +130,7 @@ if ($filteremail) if ($search_all) $sql .= " AND (m.titre like '%".$db->escape($search_all)."%' OR m.sujet like '%".$db->escape($search_all)."%' OR m.body like '%".$db->escape($search_all)."%')"; if (!$sortorder) $sortorder = "ASC"; if (!$sortfield) $sortfield = "m.rowid"; -} -else -{ +} else { $sql = "SELECT m.rowid, m.titre, m.nbemail, m.statut, m.date_creat as datec, m.date_envoi as date_envoi"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing as m"; $sql .= " WHERE m.entity = ".$conf->entity; @@ -274,9 +272,7 @@ if ($resql) if ($filteremail) { print $email::libStatutDest($obj->sendstatut, 2); - } - else - { + } else { print $email->LibStatut($obj->statut, 5); } print ''; @@ -297,9 +293,7 @@ if ($resql) print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index 6d80626242d..cd5d5c9ace9 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -152,9 +152,7 @@ if ($_socid > 0) } $db->free($resql); print ""; - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index bd5430c440a..5c53f6715a2 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -161,9 +161,7 @@ if (empty($reshook)) if (!GETPOST('socid', 3)) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); - } - else - { + } else { if ($object->id > 0) { if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY)) { //Get difference between old and new delivery date and change lines according to difference @@ -194,7 +192,7 @@ if (empty($reshook)) } } - $result = $object->createFromClone($user, $socid); + $result = $object->createFromClone($user, $socid, (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : null)); if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit(); @@ -204,9 +202,7 @@ if (empty($reshook)) } } } - } - - // Delete proposal + } // Delete proposal elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) { $result = $object->delete($user); @@ -217,9 +213,7 @@ if (empty($reshook)) $langs->load("errors"); setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Remove line + } // Remove line elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $result = $object->deleteline($lineid); @@ -236,14 +230,13 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($ret > 0) $object->fetch_thirdparty(); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit(); - } - - // Validation + } // Validation elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { $result = $object->valid($user); @@ -259,8 +252,11 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records + if ($ret > 0) { + $object->fetch_thirdparty(); + } $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } @@ -269,9 +265,7 @@ if (empty($reshook)) if (count($object->errors) > 0) setEventMessages($object->error, $object->errors, 'errors'); else setEventMessages($langs->trans($object->error), null, 'errors'); } - } - - elseif ($action == 'setdate' && $usercancreate) + } elseif ($action == 'setdate' && $usercancreate) { $datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); @@ -285,21 +279,17 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - } - elseif ($action == 'setecheance' && $usercancreate) + } elseif ($action == 'setecheance' && $usercancreate) { $result = $object->set_echeance($user, dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear'])); if ($result < 0) dol_print_error($db, $object->error); - } - elseif ($action == 'setdate_livraison' && $usercancreate) + } elseif ($action == 'setdate_livraison' && $usercancreate) { $result = $object->set_date_livraison($user, dol_mktime(12, 0, 0, $_POST['date_livraisonmonth'], $_POST['date_livraisonday'], $_POST['date_livraisonyear'])); if ($result < 0) dol_print_error($db, $object->error); - } - - // Positionne ref client + } // Positionne ref client elseif ($action == 'setref_client' && $usercancreate) { $result = $object->set_ref_client($user, GETPOST('ref_client')); @@ -307,15 +297,11 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Set incoterm + } // Set incoterm elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled) && $usercancreate) { $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); - } - - // Create proposal + } // Create proposal elseif ($action == 'add' && $usercancreate) { $object->socid = $socid; @@ -365,9 +351,9 @@ if (empty($reshook)) $object->remise_percent = GETPOST('remise_percent'); $object->remise_absolue = GETPOST('remise_absolue'); $object->socid = GETPOST('socid', 'int'); - $object->contactid = GETPOST('contactid', 'int'); + $object->contact_id = GETPOST('contactid', 'int'); $object->fk_project = GETPOST('projectid', 'int'); - $object->modelpdf = GETPOST('model'); + $object->model_pdf = GETPOST('model'); $object->author = $user->id; // deprecated $object->note_private = GETPOST('note_private', 'none'); $object->note_public = GETPOST('note_public', 'none'); @@ -393,9 +379,9 @@ if (empty($reshook)) $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); $object->fk_account = GETPOST('fk_account', 'int'); - $object->contactid = GETPOST('contactid', 'int'); + $object->contact_id = GETPOST('contactid', 'int'); $object->fk_project = GETPOST('projectid', 'int'); - $object->modelpdf = GETPOST('model'); + $object->model_pdf = GETPOST('model'); $object->author = $user->id; // deprecated $object->note_private = GETPOST('note_private', 'none'); $object->note_public = GETPOST('note_public', 'none'); @@ -549,9 +535,8 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } // Standard creation - else - { + } // Standard creation + else { $id = $object->create($user); } @@ -593,7 +578,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -602,29 +587,23 @@ if (empty($reshook)) header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit(); - } - else - { + } else { $db->rollback(); $action = 'create'; } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); $action = 'create'; } } } - } - - // Classify billed + } // Classify billed elseif ($action == 'classifybilled' && $usercanclose) { $db->begin(); - $result = $object->cloture($user, Propal::STATUS_BILLED, ''); + $result = $object->cloture($user, $object::STATUS_BILLED, ''); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -634,21 +613,17 @@ if (empty($reshook)) if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - - // Close proposal - elseif ($action == 'setstatut' && $usercanclose && !GETPOST('cancel', 'alpha')) { + } // Close proposal + elseif ($action == 'confirm_closeas' && $usercanclose && !GETPOST('cancel', 'alpha')) { if (!(GETPOST('statut', 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors'); - $action = 'statut'; + $action = 'closeas'; } else { // prevent browser refresh from closing proposal several times - if ($object->statut == Propal::STATUS_VALIDATED) + if ($object->statut == $object::STATUS_VALIDATED) { $db->begin(); @@ -662,16 +637,12 @@ if (empty($reshook)) if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } } } - } - - // Reopen proposal + } // Reopen proposal elseif ($action == 'confirm_reopen' && $usercanclose && !GETPOST('cancel', 'alpha')) { // prevent browser refresh from reopening proposal several times if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) @@ -688,15 +659,11 @@ if (empty($reshook)) if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } } - } - - // add lines from objectlinked + } // add lines from objectlinked elseif ($action == 'import_lines_from_object' && $user->rights->propal->creer && $object->statut == Propal::STATUS_DRAFT @@ -712,8 +679,7 @@ if (empty($reshook)) { dol_include_once('/'.$fromElement.'/class/'.$fromElement.'.class.php'); $lineClassName = 'OrderLine'; - } - elseif ($fromElement == 'propal') + } elseif ($fromElement == 'propal') { dol_include_once('/comm/'.$fromElement.'/class/'.$fromElement.'.class.php'); $lineClassName = 'PropaleLigne'; @@ -765,8 +731,7 @@ if (empty($reshook)) } else { $error++; } - } - else { + } else { $error++; } } @@ -803,11 +768,10 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($ret > 0) $object->fetch_thirdparty(); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } - } - - elseif ($action == "setabsolutediscount" && $usercancreate) { + } elseif ($action == "setabsolutediscount" && $usercancreate) { if ($_POST["remise_id"]) { if ($object->id > 0) { $result = $object->insert_discount($_POST["remise_id"]); @@ -816,13 +780,19 @@ if (empty($reshook)) } } } - } - - // Add line - elseif ($action == 'addline' && $usercancreate) { + } elseif ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && GETPOST('vatforalllines', 'alpha')) { + // Define vat_rate + $vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0); + $vat_rate = str_replace('*', '', $vat_rate); + $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty, $mysoc); + $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty, $mysoc); + foreach ($object->lines as $line) { + $result = $object->updateline($line->id, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); + } + } elseif ($action == 'addline' && $usercancreate) { // Add line // Set if we used free entry or predefined product $predef = ''; - $product_desc = (GETPOST('dp_desc') ?GETPOST('dp_desc') : ''); + $product_desc = (GETPOST('dp_desc', 'none') ?GETPOST('dp_desc', 'none') : ''); $price_ht = GETPOST('price_ht'); $price_ht_devise = GETPOST('multicurrency_price_ht'); $prod_entry_mode = GETPOST('prod_entry_mode'); @@ -830,9 +800,7 @@ if (empty($reshook)) { $idprod = 0; $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - } - else - { + } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } @@ -924,8 +892,7 @@ if (empty($reshook)) if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx = $prod->multiprices_tva_tx[$object->thirdparty->price_level]; if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr = $prod->multiprices_recuperableonly[$object->thirdparty->price_level]; } - } - // If price per customer + } // If price per customer elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; @@ -947,8 +914,7 @@ if (empty($reshook)) if (empty($tva_tx)) $tva_npr = 0; } } - } - // If price per quantity + } // If price per quantity elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) { if ($prod->prices_by_qty[0]) // yes, this product has some prices per quantity @@ -964,17 +930,14 @@ if (empty($reshook)) if ($priceforthequantityarray['price_base_type'] == 'HT') { $pu_ht = $priceforthequantityarray['unitprice']; - } - else - { + } else { $pu_ttc = $priceforthequantityarray['unitprice']; } // Note: the remise_percent or price by qty is used to set data on form, so we will use value from POST. break; } } - } - // If price per quantity and customer + } // If price per quantity and customer elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { if ($prod->prices_by_qty[$object->thirdparty->price_level]) // yes, this product has some prices per quantity @@ -990,9 +953,7 @@ if (empty($reshook)) if ($priceforthequantityarray['price_base_type'] == 'HT') { $pu_ht = $priceforthequantityarray['unitprice']; - } - else - { + } else { $pu_ttc = $priceforthequantityarray['unitprice']; } // Note: the remise_percent or price by qty is used to set data on form, so we will use value from POST. @@ -1008,8 +969,7 @@ if (empty($reshook)) if (!empty($price_ht)) { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); - } - // On reevalue prix selon taux tva car taux tva transaction peut etre different + } // On reevalue prix selon taux tva car taux tva transaction peut etre different // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). elseif ($tmpvat != $tmpprodvat) { if ($price_base_type != 'HT') { @@ -1138,7 +1098,10 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($ret > 0) { + $object->fetch_thirdparty(); + } + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST['prod_entry_mode']); @@ -1180,9 +1143,7 @@ if (empty($reshook)) } } } - } - - // Update a line within proposal + } // Update a line within proposal elseif ($action == 'updateline' && $usercancreate && GETPOST('save')) { // Define info_bits @@ -1281,7 +1242,8 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($ret > 0) $object->fetch_thirdparty(); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST['qty']); @@ -1319,62 +1281,38 @@ if (empty($reshook)) } elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha')) { header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // Pour reaffichage de la fiche en cours d'edition exit(); - } - - elseif ($action == 'classin' && $usercancreate) { + } elseif ($action == 'classin' && $usercancreate) { // Set project $object->setProject(GETPOST('projectid', 'int')); - } - - // Delivery time + } // Delivery time elseif ($action == 'setavailability' && $usercancreate) { $result = $object->set_availability($user, GETPOST('availability_id', 'int')); - } - - // Origin of the commercial proposal + } // Origin of the commercial proposal elseif ($action == 'setdemandreason' && $usercancreate) { $result = $object->set_demand_reason($user, GETPOST('demand_reason_id', 'int')); - } - - // Terms of payment + } // Terms of payment elseif ($action == 'setconditions' && $usercancreate) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); - } - - elseif ($action == 'setremisepercent' && $usercancreate) { + } elseif ($action == 'setremisepercent' && $usercancreate) { $result = $object->set_remise_percent($user, $_POST['remise_percent']); - } - - elseif ($action == 'setremiseabsolue' && $usercancreate) { + } elseif ($action == 'setremiseabsolue' && $usercancreate) { $result = $object->set_remise_absolue($user, $_POST['remise_absolue']); - } - - // Payment choice + } // Payment choice elseif ($action == 'setmode' && $usercancreate) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); - } - - // Multicurrency Code + } // Multicurrency Code elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); - } - - // Multicurrency rate + } // Multicurrency rate elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); - } - - // bank account + } // bank account elseif ($action == 'setbankaccount' && $usercancreate) { $result = $object->setBankAccount(GETPOST('fk_account', 'int')); - } - - // shipping method + } // shipping method elseif ($action == 'setshippingmethod' && $usercancreate) { $result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int')); - } - - elseif ($action == 'update_extras') { + } elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form @@ -1412,18 +1350,14 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Toggle the status of a contact + } // Toggle the status of a contact elseif ($action == 'swapstatut') { if ($object->fetch($id) > 0) { $result = $object->swapContactStatus(GETPOST('ligne')); } else { dol_print_error($db); } - } - - // Delete a contact + } // Delete a contact elseif ($action == 'deletecontact') { $object->fetch($id); $result = $object->delete_contact($lineid); @@ -1533,9 +1467,7 @@ if ($action == 'create') if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; } } - } - else - { + } else { if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; } @@ -1624,12 +1556,12 @@ if ($action == 'create') // Terms of payment print ''.$langs->trans('PaymentConditionsShort').''; - $form->select_conditions_paiements($soc->cond_reglement_id, 'cond_reglement_id', -1, 1); + $form->select_conditions_paiements((GETPOSTISSET('cond_reglement_id') ? GETPOST('cond_reglement_id', 'int') : $soc->cond_reglement_id), 'cond_reglement_id', -1, 1); print ''; // Mode of payment print ''.$langs->trans('PaymentMode').''; - $form->select_types_paiements($soc->mode_reglement_id, 'mode_reglement_id'); + $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') ? GETPOST('mode_reglement_id', 'int') : $soc->mode_reglement_id), 'mode_reglement_id'); print ''; // Bank Account @@ -1645,7 +1577,10 @@ if ($action == 'create') print ''; // Delivery delay - print ''.$langs->trans('AvailabilityPeriod').''; + print ''.$langs->trans('AvailabilityPeriod'); + if (!empty($conf->commande->enabled)) + print ' ('.$langs->trans('AfterOrder').')'; + print ''; $form->selectAvailabilityDelay('', 'availability_id', '', 1); print ''; @@ -1832,10 +1767,9 @@ if ($action == 'create') print ''; print ''.$langs->trans("CreateEmptyPropal").''; + print ''; } - if (!empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) print ''; - dol_fiche_end(); $langs->load("bills"); @@ -1878,11 +1812,11 @@ if ($action == 'create') if ($action == 'clone') { // Create an array for form $formquestion = array( - // 'text' => $langs->trans("ConfirmClone"), - // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => - // 1), - array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)'))); + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)')) + ); if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY) && !empty($object->date_livraison)) { $formquestion[] = array('type' => 'date', 'name' => 'date_delivery', 'label' => $langs->trans("DeliveryDate"), 'value' => $object->date_livraison); } @@ -1890,11 +1824,11 @@ if ($action == 'create') $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } - if ($action == 'statut') + if ($action == 'closeas') { //Form to close proposal (signed or not) $formquestion = array( - array('type' => 'select', 'name' => 'statut', 'label' => ''.$langs->trans("CloseAs").'', 'values' => array(2=>$object->LibStatut(Propal::STATUS_SIGNED), 3=>$object->LibStatut(Propal::STATUS_NOTSIGNED))), + array('type' => 'select', 'name' => 'statut', 'label' => ''.$langs->trans("CloseAs").'', 'values' => array(2=>$object->LibStatut($object::STATUS_SIGNED), 3=>$object->LibStatut($object::STATUS_NOTSIGNED))), array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => '') // Field to complete private note (not replace) ); @@ -1907,25 +1841,17 @@ if ($action == 'create') )); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), $text, 'setstatut', $formquestion, '', 1, 250); - } - - // Confirm delete + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), $text, 'confirm_closeas', $formquestion, '', 1, 250); + } // Confirm delete elseif ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); - } - - // Confirm reopen + } // Confirm reopen elseif ($action == 'reopen') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); - } - - // Confirmation delete product/service line + } // Confirmation delete product/service line elseif ($action == 'ask_deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); - } - - // Confirm validate proposal + } // Confirm validate proposal elseif ($action == 'validate') { $error = 0; @@ -2309,9 +2235,7 @@ if ($action == 'create') if ($action != 'editincoterm') { print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); - } - else - { + } else { print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); } print ''; @@ -2478,9 +2402,7 @@ if ($action == 'create') if ($usercanvalidate) { print '
'.$langs->trans('Validate').''; - } - else - print ''.$langs->trans('Validate').''; + } else print ''.$langs->trans('Validate').''; } // Create event /*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page. @@ -2503,8 +2425,7 @@ if ($action == 'create') if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { print ''.$langs->trans('SendMail').''; - } else - print ''.$langs->trans('SendMail').''; + } else print ''.$langs->trans('SendMail').''; } } @@ -2556,17 +2477,15 @@ if ($action == 'create') if ($usercanclose) { print 'socid.'">'.$langs->trans("ClassifyBilled").''; - } - else - { + } else { print ''.$langs->trans("ClassifyBilled").''; } } } - // Set accepted/refused + // Close as accepted/refused if ($object->statut == Propal::STATUS_VALIDATED && $usercanclose) { - print 'global->MAIN_JUMP_TAG) ? '' : '#close').'"'; + print 'global->MAIN_JUMP_TAG) ? '' : '#close').'"'; print '>'.$langs->trans('SetAcceptedRefused').''; } @@ -2596,13 +2515,13 @@ if ($action == 'create') /* * Documents generes */ - $filename = dol_sanitizeFileName($object->ref); + $objref = dol_sanitizeFileName($object->ref); $filedir = $conf->propal->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref); $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed = $usercanread; $delallowed = $usercancreate; - print $formfile->showdocuments('propal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object); + print $formfile->showdocuments('propal', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object, null, array('propal')); diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index 87c91d0f621..8efc4aa5c19 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -220,8 +220,7 @@ class Proposals extends DolibarrApi } $i++; } - } - else { + } else { throw new RestException(503, 'Error when retrieve propal list : '.$db->lasterror()); } if (!count($obj_ret)) { @@ -456,9 +455,7 @@ class Proposals extends DolibarrApi $updateRes = $this->propal->deleteline($lineid); if ($updateRes > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(405, $this->propal->error); } } @@ -588,9 +585,7 @@ class Proposals extends DolibarrApi if ($this->propal->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(500, $this->propal->error); } } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 3c7cfe0006c..d1936d9d17e 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2008 Raphael Bertrand - * Copyright (C) 2010-2019 Juanjo Menent + * Copyright (C) 2010-2020 Juanjo Menent * Copyright (C) 2010-2017 Philippe Grand * Copyright (C) 2012-2014 Christophe Battarel * Copyright (C) 2012 Cedric Salvador @@ -390,9 +390,7 @@ class Propal extends CommonObject if ($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level) { $price = $prod->multiprices[$this->thirdparty->price_level]; - } - else - { + } else { $price = $prod->price; } @@ -473,22 +471,16 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $line->error; $this->db->rollback(); return -2; } - } - else - { + } else { $this->db->rollback(); return -2; } @@ -561,9 +553,7 @@ class Propal extends CommonObject if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } @@ -715,23 +705,17 @@ class Propal extends CommonObject { $this->db->commit(); return $this->line->id; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->line->error; $this->db->rollback(); return -2; } - } - else - { + } else { dol_syslog(get_class($this)."::addline status of proposal must be Draft to allow use of ->addline()", LOG_ERR); return -3; } @@ -741,15 +725,15 @@ class Propal extends CommonObject /** * Update a proposal line * - * @param int $rowid Id de la ligne - * @param float $pu Prix unitaire (HT ou TTC selon price_base_type) + * @param int $rowid Id of line + * @param float $pu Unit price (HT or TTC depending on price_base_type) * @param float $qty Quantity - * @param float $remise_percent Remise effectuee sur le produit - * @param float $txtva Taux de TVA + * @param float $remise_percent Discount on line + * @param float $txtva VAT Rate (Can be '1.23' or '1.23 (ABC)') * @param float $txlocaltax1 Local tax 1 rate * @param float $txlocaltax2 Local tax 2 rate * @param string $desc Description - * @param string $price_base_type HT ou TTC + * @param string $price_base_type HT or TTC * @param int $info_bits Miscellaneous informations * @param int $special_code Special code (also used by externals modules!) * @param int $fk_parent_line Id of parent line (0 in most cases, used by modules adding sublevels into lines). @@ -841,7 +825,6 @@ class Propal extends CommonObject //Fetch current line from the database and then clone the object and set it in $oldline property $line = new PropaleLigne($this->db); $line->fetch($rowid); - $line->fetch_optionals(); $staticline = clone $line; @@ -917,17 +900,13 @@ class Propal extends CommonObject $this->db->commit(); return $result; - } - else - { + } else { $this->error = $this->line->error; $this->db->rollback(); return -1; } - } - else - { + } else { dol_syslog(get_class($this)."::updateline Erreur -2 Propal en mode incompatible pour cette action"); return -2; } @@ -959,15 +938,11 @@ class Propal extends CommonObject $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; return -2; } @@ -1086,7 +1061,7 @@ class Propal extends CommonObject $sql .= ", ".($user->id > 0 ? "'".$user->id."'" : "NULL"); $sql .= ", '".$this->db->escape($this->note_private)."'"; $sql .= ", '".$this->db->escape($this->note_public)."'"; - $sql .= ", '".$this->db->escape($this->modelpdf)."'"; + $sql .= ", '".$this->db->escape($this->model_pdf)."'"; $sql .= ", ".($this->fin_validite != '' ? "'".$this->db->idate($this->fin_validite)."'" : "NULL"); $sql .= ", ".($this->cond_reglement_id > 0 ? $this->cond_reglement_id : 'NULL'); $sql .= ", ".($this->mode_reglement_id > 0 ? $this->mode_reglement_id : 'NULL'); @@ -1141,8 +1116,7 @@ class Propal extends CommonObject $error++; } } - } - else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + } else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); @@ -1169,9 +1143,7 @@ class Propal extends CommonObject if (!is_object($this->lines[$i])) // If this->lines is not array of objects, coming from REST API { // Convert into object this->lines[$i]. $line = (object) $this->lines[$i]; - } - else - { + } else { $line = $this->lines[$i]; } // Reset fk_parent_line for line that are not child lines or special product @@ -1267,16 +1239,12 @@ class Propal extends CommonObject if ($result < 0) { $error++; } // End call triggers } - } - else - { + } else { $this->error = $this->db->lasterror(); $error++; } } - } - else - { + } else { $this->error = $this->db->lasterror(); $error++; } @@ -1286,15 +1254,11 @@ class Propal extends CommonObject $this->db->commit(); dol_syslog(get_class($this)."::create done id=".$this->id); return $this->id; - } - else - { + } else { $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -1324,9 +1288,10 @@ class Propal extends CommonObject * * @param User $user User making the clone * @param int $socid Id of thirdparty + * @param int $forceentity Entity id to force * @return int New id of clone */ - public function createFromClone(User $user, $socid = 0) + public function createFromClone(User $user, $socid = 0, $forceentity = null) { global $conf, $hookmanager; @@ -1374,14 +1339,13 @@ class Propal extends CommonObject $object->ref_client = ''; // TODO Change product price if multi-prices - } - else - { + } else { $objsoc->fetch($object->socid); } $object->id = 0; $object->ref = ''; + $object->entity = (! empty($forceentity) ? $forceentity : $object->entity); $object->statut = self::STATUS_DRAFT; // Clear fields @@ -1444,9 +1408,7 @@ class Propal extends CommonObject { $this->db->commit(); return $object->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1500,8 +1462,7 @@ class Propal extends CommonObject if ($ref) { $sql .= " WHERE p.entity IN (".getEntity('propal').")"; // Dont't use entity if you use rowid $sql .= " AND p.ref='".$this->db->escape($ref)."'"; - } - else $sql .= " WHERE p.rowid=".$rowid; + } else $sql .= " WHERE p.rowid=".$rowid; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); @@ -1532,12 +1493,15 @@ class Propal extends CommonObject $this->fk_project = $obj->fk_project; $this->project = null; // Clear if another value was already set by fetch_projet - $this->modelpdf = $obj->model_pdf; + $this->model_pdf = $obj->model_pdf; + $this->modelpdf = $obj->model_pdf; // deprecated $this->last_main_doc = $obj->last_main_doc; $this->note = $obj->note_private; // TODO deprecated $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; - $this->statut = (int) $obj->fk_statut; + + $this->status = (int) $obj->fk_statut; + $this->statut = $this->status; // deprecated $this->statut_libelle = $obj->statut_label; $this->datec = $this->db->jdate($obj->datec); // TODO deprecated @@ -1611,9 +1575,7 @@ class Propal extends CommonObject $this->error = "Record Not Found"; return 0; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -1637,7 +1599,7 @@ class Propal extends CommonObject if (isset($this->ref_client)) $this->ref_client = trim($this->ref_client); if (isset($this->note) || isset($this->note_private)) $this->note_private = (isset($this->note_private) ? trim($this->note_private) : trim($this->note)); if (isset($this->note_public)) $this->note_public = trim($this->note_public); - if (isset($this->modelpdf)) $this->modelpdf = trim($this->modelpdf); + if (isset($this->model_pdf)) $this->model_pdf = trim($this->model_pdf); if (isset($this->import_key)) $this->import_key = trim($this->import_key); if (!empty($this->duree_validite)) $this->fin_validite = $this->date + ($this->duree_validite * 24 * 3600); @@ -1707,9 +1669,7 @@ class Propal extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -1837,9 +1797,7 @@ class Propal extends CommonObject $this->db->free($result); return $num; - } - else - { + } else { $this->error = $this->db->lasterror(); return -3; } @@ -1887,9 +1845,7 @@ class Propal extends CommonObject if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef($soc); - } - else - { + } else { $num = $this->ref; } $this->newref = dol_sanitizeFileName($num); @@ -1962,9 +1918,7 @@ class Propal extends CommonObject $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -2026,9 +1980,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2088,9 +2040,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2150,9 +2100,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2213,9 +2161,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2224,9 +2170,7 @@ class Propal extends CommonObject $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $error_str = 'Propal status do not meet requirement '.$this->statut; dol_syslog(__METHOD__.$error_str, LOG_ERR); $this->error = $error_str; @@ -2286,9 +2230,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2297,9 +2239,7 @@ class Propal extends CommonObject $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $error_str = 'Propal status do not meet requirement '.$this->statut; dol_syslog(__METHOD__.$error_str, LOG_ERR); $this->error = $error_str; @@ -2355,9 +2295,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2366,9 +2304,7 @@ class Propal extends CommonObject $this->db->rollback(); return -1 * $error; } - } - else - { + } else { return -1; } } @@ -2425,9 +2361,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2493,9 +2427,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2561,9 +2493,7 @@ class Propal extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -2574,12 +2504,12 @@ class Propal extends CommonObject * Close the commercial proposal * * @param User $user Object user that close - * @param int $statut Statut + * @param int $status Status * @param string $note Complete private note with this note * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int <0 if KO, >0 if OK */ - public function cloture($user, $statut, $note = "", $notrigger = 0) + public function cloture($user, $status, $note = "", $notrigger = 0) { global $langs, $conf; @@ -2591,19 +2521,19 @@ class Propal extends CommonObject $newprivatenote = dol_concatdesc($this->note_private, $note); $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; - $sql .= " SET fk_statut = ".$statut.", note_private = '".$this->db->escape($newprivatenote)."', date_cloture='".$this->db->idate($now)."', fk_user_cloture=".$user->id; + $sql .= " SET fk_statut = ".$status.", note_private = '".$this->db->escape($newprivatenote)."', date_cloture='".$this->db->idate($now)."', fk_user_cloture=".$user->id; $sql .= " WHERE rowid = ".$this->id; $resql = $this->db->query($sql); if ($resql) { - $modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED ? $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED : $this->modelpdf; + $modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED ? $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED : $this->model_pdf; $triggerName = 'PROPAL_CLOSE_REFUSED'; - if ($statut == self::STATUS_SIGNED) + if ($status == self::STATUS_SIGNED) { $triggerName = 'PROPAL_CLOSE_SIGNED'; - $modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL ? $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL : $this->modelpdf; + $modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL ? $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL : $this->model_pdf; // The connected company is classified as a client $soc = new Societe($this->db); @@ -2617,7 +2547,7 @@ class Propal extends CommonObject return -2; } } - if ($statut == self::STATUS_BILLED) // Why this ? + if ($status == self::STATUS_BILLED) // ->cloture() can also be called when we set it to billed, after setting it to signed { $triggerName = 'PROPAL_CLASSIFY_BILLED'; } @@ -2639,7 +2569,7 @@ class Propal extends CommonObject if (!$error) { $this->oldcopy = clone $this; - $this->statut = $statut; + $this->statut = $status; $this->date_cloture = $now; $this->note_private = $newprivatenote; } @@ -2656,9 +2586,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->statut = $this->oldcopy->statut; $this->date_cloture = $this->oldcopy->date_cloture; $this->note_private = $this->oldcopy->note_private; @@ -2666,9 +2594,7 @@ class Propal extends CommonObject $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -2717,9 +2643,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2784,9 +2708,7 @@ class Propal extends CommonObject $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2852,13 +2774,10 @@ class Propal extends CommonObject if ($shortlist == 1) { $ga[$obj->propalid] = $obj->ref; - } - elseif ($shortlist == 2) + } elseif ($shortlist == 2) { $ga[$obj->propalid] = $obj->ref.' ('.$obj->name.')'; - } - else - { + } else { $ga[$i]['id'] = $obj->propalid; $ga[$i]['ref'] = $obj->ref; $ga[$i]['name'] = $obj->name; @@ -2868,9 +2787,7 @@ class Propal extends CommonObject } } return $ga; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -2910,10 +2827,8 @@ class Propal extends CommonObject if ($objecttype == 'facture') { $linkedInvoices[] = $object; - } - // Cas des factures liees par un autre objet (ex: commande) - else - { + } // Cas des factures liees par un autre objet (ex: commande) + else { $this->fetchObjectLinked($object, $objecttype); foreach ($this->linkedObjectsIds as $subobjecttype => $subobjectid) { @@ -2964,13 +2879,10 @@ class Propal extends CommonObject } } return $ga; - } - else - { + } else { return -1; } - } - else return $ga; + } else return $ga; } /** @@ -2999,9 +2911,9 @@ class Propal extends CommonObject if (!$error) { - $main = MAIN_DB_PREFIX.'propaldet'; - $ef = $main."_extrafields"; - $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_propal = ".$this->id.")"; + $main = MAIN_DB_PREFIX.'propaldet'; + $ef = $main."_extrafields"; + $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_propal = ".$this->id.")"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal = ".$this->id; if ($this->db->query($sqlef) && $this->db->query($sql)) { @@ -3018,6 +2930,9 @@ class Propal extends CommonObject if (!$error) { + // Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive + $this->deleteEcmFiles(); + // We remove directory $ref = dol_sanitizeFileName($this->ref); if ($conf->propal->multidir_output[$this->entity] && !empty($this->ref)) @@ -3067,30 +2982,22 @@ class Propal extends CommonObject dol_syslog(get_class($this)."::delete ".$this->id." by ".$user->id, LOG_DEBUG); $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return 0; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -3; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; } - } - else - { + } else { $this->db->rollback(); return -1; } @@ -3144,9 +3051,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -3155,9 +3060,7 @@ class Propal extends CommonObject $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $error_str = 'Propal status do not meet requirement '.$this->statut; dol_syslog(__METHOD__.$error_str, LOG_ERR); $this->error = $error_str; @@ -3216,9 +3119,7 @@ class Propal extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -3227,9 +3128,7 @@ class Propal extends CommonObject $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $error_str = 'Propal status do not meet requirement '.$this->statut; dol_syslog(__METHOD__.$error_str, LOG_ERR); $this->error = $error_str; @@ -3286,9 +3185,7 @@ class Propal extends CommonObject } } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -3423,9 +3320,7 @@ class Propal extends CommonObject } return $response; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -3449,6 +3344,8 @@ class Propal extends CommonObject $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; + $sql .= $this->db->plimit(100); + $resql = $this->db->query($sql); if ($resql) { @@ -3503,9 +3400,7 @@ class Propal extends CommonObject $line->total_ttc = 60; $line->total_tva = 10; $line->remise_percent = 50; - } - else - { + } else { $line->total_ht = 100; $line->total_ttc = 120; $line->total_tva = 20; @@ -3564,9 +3459,7 @@ class Propal extends CommonObject } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -3616,16 +3509,12 @@ class Propal extends CommonObject if ($numref != "") { return $numref; - } - else - { + } else { $this->error = $obj->error; //dol_print_error($db,"Propale::getNextNumRef ".$obj->error); return ""; } - } - else - { + } else { $langs->load("errors"); print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Proposal")); return ""; @@ -3655,7 +3544,7 @@ class Propal extends CommonObject if ($user->rights->propal->lire) { - $label = ''.$langs->trans("Proposal").''; + $label = img_picto('', $this->picto).' '.$langs->trans("Proposal").''; if (!empty($this->ref)) $label .= '
'.$langs->trans('Ref').': '.$this->ref; if (!empty($this->ref_client)) @@ -3673,14 +3562,11 @@ class Propal extends CommonObject if ($option == '') { $url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id.$get_params; - } - elseif ($option == 'compta') { // deprecated + } elseif ($option == 'compta') { // deprecated $url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id.$get_params; - } - elseif ($option == 'expedition') { + } elseif ($option == 'expedition') { $url = DOL_URL_ROOT.'/expedition/propal.php?id='.$this->id.$get_params; - } - elseif ($option == 'document') { + } elseif ($option == 'document') { $url = DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id.$get_params; } @@ -3783,12 +3669,13 @@ class Propal extends CommonObject global $conf, $langs; $langs->load("propale"); + $outputlangs->load("products"); if (!dol_strlen($modele)) { $modele = 'azur'; - if ($this->modelpdf) { - $modele = $this->modelpdf; + if ($this->model_pdf) { + $modele = $this->model_pdf; } elseif (!empty($conf->global->PROPALE_ADDON_PDF)) { $modele = $conf->global->PROPALE_ADDON_PDF; } @@ -4028,14 +3915,10 @@ class PropaleLigne extends CommonObjectLine $this->db->free($result); return 1; - } - else - { + } else { return 0; } - } - else - { + } else { return -1; } } @@ -4084,9 +3967,7 @@ class PropaleLigne extends CommonObjectLine if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; - } - else - { + } else { $this->pa_ht = $result; } } @@ -4173,9 +4054,7 @@ class PropaleLigne extends CommonObjectLine $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; @@ -4227,9 +4106,7 @@ class PropaleLigne extends CommonObjectLine $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; @@ -4250,6 +4127,8 @@ class PropaleLigne extends CommonObjectLine $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. + if (empty($this->id) && ! empty($this->rowid)) $this->id = $this->rowid; + // Clean parameters if (empty($this->tva_tx)) $this->tva_tx = 0; if (empty($this->localtax1_tx)) $this->localtax1_tx = 0; @@ -4276,9 +4155,7 @@ class PropaleLigne extends CommonObjectLine if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; - } - else - { + } else { $this->pa_ht = $result; } } @@ -4325,7 +4202,7 @@ class PropaleLigne extends CommonObjectLine $sql .= ", multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; $sql .= ", multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; - $sql .= " WHERE rowid = ".$this->rowid; + $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); @@ -4333,7 +4210,6 @@ class PropaleLigne extends CommonObjectLine { if (!$error) { - $this->id = $this->rowid; $result = $this->insertExtraFields(); if ($result < 0) { @@ -4355,9 +4231,7 @@ class PropaleLigne extends CommonObjectLine $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; @@ -4390,9 +4264,7 @@ class PropaleLigne extends CommonObjectLine { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index da86625b78f..c2f60516f1c 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -55,8 +55,7 @@ if ($id > 0 || !empty($ref)) $langs->load("errors"); setEventMessages($langs->trans('ErrorRecordNotFound'), null, 'errors'); $error++; - } - elseif ($ret < 0) + } elseif ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -65,9 +64,7 @@ if ($id > 0 || !empty($ref)) if (!$error) { $object->fetch_thirdparty(); -} -else -{ +} else { header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php'); exit; } @@ -89,31 +86,23 @@ if ($action == 'addcontact' && $user->rights->propale->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} - -// Toggle the status of a contact +} // Toggle the status of a contact elseif ($action == 'swapstatut' && $user->rights->propale->creer) { if ($object->id > 0) { $result = $object->swapContactStatus(GETPOST('ligne')); } -} - -// Deletes a contact +} // Deletes a contact elseif ($action == 'deletecontact' && $user->rights->propale->creer) { $result = $object->delete_contact($lineid); @@ -122,9 +111,7 @@ elseif ($action == 'deletecontact' && $user->rights->propale->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index d9d12c5efb4..70c67566091 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -179,9 +179,7 @@ if ($object->id > 0) $permtoedit = $user->rights->propal->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index a320d2b83b9..9e138c52cbe 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -163,9 +163,7 @@ if ($resql) //print ''.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')'.$totalinprocess.''; print ''.$langs->trans("Total").''.$total.''; print "

"; -} -else -{ +} else { dol_print_error($db); } @@ -220,8 +218,7 @@ if (!empty($conf->propal->enabled)) if ($num > $nbofloop) { print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; - } - elseif ($total > 0) + } elseif ($total > 0) { print ''.$langs->trans("Total").''.price($total).""; } @@ -310,8 +307,7 @@ if ($resql) } print ""; print "

"; -} -else dol_print_error($db); +} else dol_print_error($db); /* @@ -394,17 +390,14 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) if ($num > $nbofloop) { print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; - } - elseif ($total > 0) + } elseif ($total > 0) { print ''.$langs->trans("Total")."".price($total)." "; } print ""; print "
"; } - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 76914e2c13a..7bce96633fc 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -78,7 +78,7 @@ $search_login = GETPOST('search_login', 'alpha'); $search_product_category = GETPOST('search_product_category', 'int'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); -$search_state = trim(GETPOST("search_state")); +$search_state = GETPOST("search_state"); $search_country = GETPOST("search_country", 'int'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); $search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); @@ -88,7 +88,7 @@ $search_dateend_end = dol_mktime(23, 59, 59, GETPOST('search_dateend_endmonth', $search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_startmonth', 'int'), GETPOST('search_datedelivery_startday', 'int'), GETPOST('search_datedelivery_startyear', 'int')); $search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_endmonth', 'int'), GETPOST('search_datedelivery_endday', 'int'), GETPOST('search_datedelivery_endyear', 'int')); $search_availability = GETPOST('search_availability', 'int'); -$search_categ_cus = trim(GETPOST("search_categ_cus", 'int')); +$search_categ_cus = GETPOST("search_categ_cus", 'int'); $search_btn = GETPOST('button_search', 'alpha'); $search_remove_btn = GETPOST('button_removefilter', 'alpha'); @@ -414,9 +414,7 @@ if ($resql) $soc->fetch($socid); $title = $langs->trans('ListOfProposals').' - '.$soc->name; if (empty($search_societe)) $search_societe = $soc->name; - } - else - { + } else { $title = $langs->trans('ListOfProposals'); } @@ -474,6 +472,8 @@ if ($resql) 'generate_doc'=>$langs->trans("ReGeneratePDF"), 'builddoc'=>$langs->trans("PDFMerge"), 'presend'=>$langs->trans("SendByMail"), + 'prevalidate'=>$langs->trans("Validate"), + 'presign'=>$langs->trans("Sign"), ); if ($user->rights->propal->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); if ($user->rights->propal->cloturer) $arrayofmassactions['closed'] = $langs->trans("Close"); @@ -504,6 +504,16 @@ if ($resql) $trackid = 'pro'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + if ($massaction == 'prevalidate') + { + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassValidation"), $langs->trans("ConfirmMassValidationQuestion"), "validate", null, '', 0, 200, 500, 1); + } + + if ($massaction == 'presign') + { + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassSignature"), $langs->trans("ConfirmMassSignatureQuestion"), "sign", null, '', 0, 200, 500, 1); + } + if ($sall) { foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); @@ -1028,9 +1038,7 @@ if ($resql) { print ''.dol_print_date($db->jdate($obj->dfv), 'day'); print ''; - } - else - { + } else { print ' '; } if (!$i) $totalarray['nbfield']++; @@ -1042,9 +1050,7 @@ if ($resql) { print ''.dol_print_date($db->jdate($obj->ddelivery), 'day'); print ''; - } - else - { + } else { print ' '; } if (!$i) $totalarray['nbfield']++; @@ -1169,8 +1175,7 @@ if ($resql) if ($nbofsalesrepresentative > 3) // We print only number { print $nbofsalesrepresentative; - } - elseif ($nbofsalesrepresentative > 0) + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($db); $j = 0; @@ -1192,9 +1197,7 @@ if ($resql) } } //else print $langs->trans("NoSalesRepresentativeAffected"); - } - else - { + } else { print ' '; } print ''; @@ -1279,12 +1282,72 @@ if ($resql) $delallowed = $user->rights->propal->creer; print $formfile->showdocuments('massfilesarea_proposals', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); -} -else -{ - dol_print_error($db); + + if ($action == 'validate') { + if (GETPOST('confirm') == 'yes') { + $tmpproposal = new Propal($db); + $db->begin(); + $error = 0; + foreach ($toselect as $checked) { + if ($tmpproposal->fetch($checked)) { + if ($tmpproposal->statut == 0) { + if ($tmpproposal->valid($user)) { + setEventMessage($tmpproposal->ref." ".$langs->trans('PassedInOpenStatus'), 'mesgs'); + } else { + setEventMessage($langs->trans('CantBeValidated'), 'errors'); + $error++; + } + } else { + setEventMessage($tmpproposal->ref." ".$langs->trans('IsNotADraft'), 'errors'); + $error++; + } + } + dol_print_error($db); + $error++; + } + if ($error) { + $db->rollback(); + } else { + $db->commit(); + } + } + } + + if ($action == "sign") { + if (GETPOST('confirm') == 'yes') { + $tmpproposal = new Propal($db); + $db->begin(); + $error = 0; + foreach ($toselect as $checked) { + if ($tmpproposal->fetch($checked)) { + if ($tmpproposal->statut == 1) { + $tmpproposal->statut = 2; + if ($tmpproposal->update($user)) { + setEventMessage($tmpproposal->ref." ".$langs->trans('Signed'), 'mesgs'); + } else { + dol_print_error($db); + $error++; + } + } else { + setEventMessage($tmpproposal->ref." ".$langs->trans('CantBeSign'), 'errors'); + $error++; + } + } else { + dol_print_error($db); + $error++; + } + } + if ($error) { + $db->rollback(); + } else { + $db->commit(); + } + } + } +} else { + dol_print_error($db); } -// End of page -llxFooter(); -$db->close(); + // End of page + llxFooter(); + $db->close(); diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index add31f13f08..00a79f3c1be 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -112,9 +112,7 @@ if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/proposalsnbinyear-'.$user->id.'-'.$year.'.png'; $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsnbinyear-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filenamenb = $dir.'/proposalsnbinyear-'.$year.'.png'; $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsnbinyear-'.$year.'.png'; } @@ -152,9 +150,7 @@ if (!$user->rights->societe->client->voir || $user->socid) { $filenameamount = $dir.'/proposalsamountinyear-'.$user->id.'-'.$year.'.png'; $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsamountinyear-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filenameamount = $dir.'/proposalsamountinyear-'.$year.'.png'; $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsamountinyear-'.$year.'.png'; } @@ -192,9 +188,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filename_avg = $dir.'/ordersaverage-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$year.'.png'; @@ -347,8 +341,7 @@ print '
'; // Show graphs print ''; $i++; @@ -223,9 +224,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) } print "
'; -if ($mesg) { print $mesg; } -else { +if ($mesg) { print $mesg; } else { print $px1->show(); print "
\n"; print $px2->show(); diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index ff0beef4037..d99b3509b26 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2020 Open-Dsi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -71,7 +72,7 @@ if (!empty($conf->propal->enabled)) * */ -$sql = "SELECT count(*) as cc, st.libelle, st.id"; +$sql = "SELECT count(*) as cc, st.libelle, st.picto, st.id"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st "; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -98,7 +99,7 @@ if ($resql) print '
'; print ''; - print img_action($langs->trans("Show"), $obj->id).' '; + print img_action($langs->trans("Show"), $obj->id, $obj->picto).' '; print $langs->trans("StatusProspect".$obj->id); print ''.$obj->cc.'

"; } - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/comm/prospect/recap-prospect.php b/htdocs/comm/prospect/recap-prospect.php index b3b852c591a..e393f5fce56 100644 --- a/htdocs/comm/prospect/recap-prospect.php +++ b/htdocs/comm/prospect/recap-prospect.php @@ -83,9 +83,7 @@ if ($socid > 0) print $langs->trans("FeatureNotYetAvailable"); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index 09f5e46f94b..284c248f1f0 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -83,9 +83,7 @@ if ($socid > 0) print $langs->trans("FeatureNotYetAvailable"); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index dc41845516a..cab1a311dbb 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -59,9 +59,9 @@ if (GETPOST('action', 'aZ09') == 'setremise') $discount_type = GETPOST('discount_type', 'int'); if (!empty($discount_type)) { - $result = $object->set_remise_supplier(price2num(GETPOST("remise")), GETPOST("note"), $user); + $result = $object->set_remise_supplier(price2num(GETPOST("remise")), GETPOST("note", "alphanohtml"), $user); } else { - $result = $object->set_remise_client(price2num(GETPOST("remise")), GETPOST("note"), $user); + $result = $object->set_remise_client(price2num(GETPOST("remise")), GETPOST("note", "alphanohtml"), $user); } if ($result > 0) @@ -70,15 +70,11 @@ if (GETPOST('action', 'aZ09') == 'setremise') { header("Location: ".$backtopage); exit; - } - else - { + } else { header("Location: remise.php?id=".$_GET["id"]); exit; } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -187,7 +183,7 @@ if ($socid > 0) // Motif/Note print ''; - print $langs->trans("NoteReason").''; + print $langs->trans("NoteReason").''; print ""; @@ -252,16 +248,12 @@ if ($socid > 0) print ''; $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; } $db->free($resql); print ""; - } - else - { + } else { dol_print_error($db); } } @@ -311,16 +303,12 @@ if ($socid > 0) print ''; $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; } $db->free($resql); print ""; - } - else - { + } else { dol_print_error($db); } diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index c312591aeec..ffd4c1738c0 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -105,9 +105,7 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes') { $newdiscount1->description = $discount->description; $newdiscount2->description = $discount->description; - } - else - { + } else { $newdiscount1->description = $discount->description.' (1)'; $newdiscount2->description = $discount->description.' (2)'; } @@ -150,9 +148,7 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes') $db->commit(); header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id.($backtopage ? '&backtopage='.urlencode($backtopage) : '')); // To avoid pb whith back exit; - } - else - { + } else { $db->rollback(); } } @@ -189,22 +185,16 @@ if ($action == 'setremise' && $user->rights->societe->creer) { header("Location: ".$backtopage.'&discountid='.$discountid); exit; - } - else - { + } else { header("Location: remx.php?id=".$id); exit; } - } - else - { + } else { $error++; setEventMessages($soc->error, $soc->errors, 'errors'); } } - } - else - { + } else { setEventMessages($langs->trans("ErrorFieldFormat", $langs->transnoentitiesnoconv("AmountHT")), null, 'errors'); } } @@ -224,9 +214,7 @@ if (GETPOST('action', 'aZ09') == 'confirm_remove' && GETPOST("confirm") == 'yes' $db->commit(); header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id); // To avoid pb whith back exit; - } - else - { + } else { setEventMessages($discount->error, $discount->errors, 'errors'); $db->rollback(); } @@ -300,9 +288,7 @@ if ($socid > 0) $obj = $db->fetch_object($resql); $remise_all += $obj->amount; if ($obj->fk_user == $user->id) $remise_user += $obj->amount; - } - else - { + } else { dol_print_error($db); } @@ -332,9 +318,7 @@ if ($socid > 0) $obj = $db->fetch_object($resql); $remise_all += $obj->amount; if ($obj->fk_user == $user->id) $remise_user += $obj->amount; - } - else - { + } else { dol_print_error($db); } @@ -489,8 +473,7 @@ if ($socid > 0) $facturestatic->type = $obj->type; print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturestatic->getNomURl(1); print ''; - } - elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) + } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) { print ''; $facturestatic->id = $obj->fk_facture_source; @@ -498,8 +481,7 @@ if ($socid > 0) $facturestatic->type = $obj->type; print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturestatic->getNomURl(1); print ''; - } - elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description)) + } elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description)) { print ''; $facturestatic->id = $obj->fk_facture_source; @@ -507,9 +489,7 @@ if ($socid > 0) $facturestatic->type = $obj->type; print preg_replace('/\(EXCESS RECEIVED\)/', $langs->trans("ExcessReceived"), $obj->description).' '.$facturestatic->getNomURl(1); print ''; - } - else - { + } else { print ''; print $obj->description; print ''; @@ -535,8 +515,7 @@ if ($socid > 0) print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).''; print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).''; print ''; - } - else print ' '; + } else print ' '; print ''; if ($_GET["action"] == 'split' && GETPOST('remid') == $obj->rowid) @@ -546,9 +525,7 @@ if ($socid > 0) } $i++; } - } - else - { + } else { $colspan = 8; if (!empty($conf->multicurrency->enabled)) $colspan += 2; print ''.$langs->trans("None").''; @@ -569,9 +546,7 @@ if ($socid > 0) $langs->load("dict"); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, '', 0); } - } - else - { + } else { dol_print_error($db); } } @@ -646,8 +621,7 @@ if ($socid > 0) $facturefournstatic->type = $obj->type; print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturefournstatic->getNomURl(1); print ''; - } - elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) + } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) { print ''; $facturefournstatic->id = $obj->fk_invoice_supplier_source; @@ -655,8 +629,7 @@ if ($socid > 0) $facturefournstatic->type = $obj->type; print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturefournstatic->getNomURl(1); print ''; - } - elseif (preg_match('/\(EXCESS PAID\)/', $obj->description)) + } elseif (preg_match('/\(EXCESS PAID\)/', $obj->description)) { print ''; $facturefournstatic->id = $obj->fk_invoice_supplier_source; @@ -664,9 +637,7 @@ if ($socid > 0) $facturefournstatic->type = $obj->type; print preg_replace('/\(EXCESS PAID\)/', $langs->trans("ExcessPaid"), $obj->description).' '.$facturefournstatic->getNomURl(1); print ''; - } - else - { + } else { print ''; print $obj->description; print ''; @@ -692,8 +663,7 @@ if ($socid > 0) print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).''; print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).''; print ''; - } - else print ' '; + } else print ' '; print ''; if ($_GET["action"] == 'split' && GETPOST('remid') == $obj->rowid) @@ -703,9 +673,7 @@ if ($socid > 0) } $i++; } - } - else - { + } else { $colspan = 8; if (!empty($conf->multicurrency->enabled)) $colspan += 2; print ''.$langs->trans("None").''; @@ -726,9 +694,7 @@ if ($socid > 0) $langs->load("dict"); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); } - } - else - { + } else { dol_print_error($db); } @@ -857,8 +823,7 @@ if ($socid > 0) $facturestatic->type = $obj->type; print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturestatic->getNomURl(1); print ''; - } - elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) + } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) { print ''; $facturestatic->id = $obj->fk_facture_source; @@ -866,8 +831,7 @@ if ($socid > 0) $facturestatic->type = $obj->type; print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturestatic->getNomURl(1); print ''; - } - elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description)) + } elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description)) { print ''; $facturestatic->id = $obj->fk_facture_source; @@ -875,9 +839,7 @@ if ($socid > 0) $facturestatic->type = $obj->type; print preg_replace('/\(EXCESS RECEIVED\)/', $langs->trans("Invoice"), $obj->description).' '.$facturestatic->getNomURl(1); print ''; - } - else - { + } else { print ''; print $obj->description; print ''; @@ -906,9 +868,7 @@ if ($socid > 0) print ''; $i++; } - } - else - { + } else { $colspan = 8; if (!empty($conf->multicurrency->enabled)) $colspan += 2; print ''.$langs->trans("None").''; @@ -916,9 +876,7 @@ if ($socid > 0) print ""; print '
'; - } - else - { + } else { dol_print_error($db); } } @@ -1035,8 +993,7 @@ if ($socid > 0) $facturefournstatic->type = $obj->type; print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturefournstatic->getNomURl(1); print ''; - } - elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) + } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) { print ''; $facturefournstatic->id = $obj->fk_invoice_supplier_source; @@ -1044,8 +1001,7 @@ if ($socid > 0) $facturefournstatic->type = $obj->type; print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturefournstatic->getNomURl(1); print ''; - } - elseif (preg_match('/\(EXCESS PAID\)/', $obj->description)) + } elseif (preg_match('/\(EXCESS PAID\)/', $obj->description)) { print ''; $facturefournstatic->id = $obj->fk_invoice_supplier_source; @@ -1053,9 +1009,7 @@ if ($socid > 0) $facturefournstatic->type = $obj->type; print preg_replace('/\(EXCESS PAID\)/', $langs->trans("Invoice"), $obj->description).' '.$facturefournstatic->getNomURl(1); print ''; - } - else - { + } else { print ''; print $obj->description; print ''; @@ -1083,9 +1037,7 @@ if ($socid > 0) print ''; $i++; } - } - else - { + } else { $colspan = 8; if (!empty($conf->multicurrency->enabled)) $colspan += 2; print ''.$langs->trans("None").''; @@ -1093,9 +1045,7 @@ if ($socid > 0) print ""; print '
'; - } - else - { + } else { dol_print_error($db); } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 4764b53a5c9..c2536ee59d6 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -154,9 +154,7 @@ if (empty($reshook)) if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); - } - else - { + } else { if ($object->id > 0) { // Because createFromClone modifies the object, we must clone it so that we can restore it later @@ -167,9 +165,7 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $object = $orig; $action = ''; @@ -187,9 +183,7 @@ if (empty($reshook)) if ($result > 0) { setEventMessages($langs->trans('OrderReopened', $object->ref), null); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -203,9 +197,7 @@ if (empty($reshook)) { header('Location: list.php?restore_lastsearch_values=1'); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -229,14 +221,12 @@ if (empty($reshook)) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($object->id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -278,7 +268,7 @@ if (empty($reshook)) $object->source = GETPOST('source_id'); $object->fk_project = GETPOST('projectid', 'int'); $object->ref_client = GETPOST('ref_client', 'alpha'); - $object->modelpdf = GETPOST('model'); + $object->model_pdf = GETPOST('model'); $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); $object->fk_account = GETPOST('fk_account', 'int'); @@ -288,7 +278,7 @@ if (empty($reshook)) $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); $object->warehouse_id = GETPOST('warehouse_id', 'int'); $object->fk_delivery_address = GETPOST('fk_address'); - $object->contactid = GETPOST('contactid'); + $object->contact_id = GETPOST('contactid'); $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); @@ -502,17 +492,14 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - elseif ($action == 'classifybilled' && $usercancreate) + } elseif ($action == 'classifybilled' && $usercancreate) { $ret = $object->classifyBilled($user); if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - elseif ($action == 'classifyunbilled' && $usercancreate) + } elseif ($action == 'classifyunbilled' && $usercancreate) { $ret = $object->classifyUnBilled(); if ($ret < 0) { @@ -527,17 +514,13 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'setremise' && $usercancreate) { + } elseif ($action == 'setremise' && $usercancreate) { $result = $object->set_remise($user, GETPOST('remise')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'setabsolutediscount' && $usercancreate) { + } elseif ($action == 'setabsolutediscount' && $usercancreate) { if (GETPOST('remise_id')) { if ($object->id > 0) { $object->insert_discount(GETPOST('remise_id')); @@ -545,9 +528,7 @@ if (empty($reshook)) dol_print_error($db, $object->error); } } - } - - elseif ($action == 'setdate' && $usercancreate) { + } elseif ($action == 'setdate' && $usercancreate) { // print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $date = dol_mktime(0, 0, 0, GETPOST('order_month'), GETPOST('order_day'), GETPOST('order_year')); @@ -555,19 +536,16 @@ if (empty($reshook)) if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } + } elseif ($action == 'setdate_livraison' && $usercancreate) { + // print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; + $datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); - elseif ($action == 'setdate_livraison' && $usercancreate) { - // print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; - $datelivraison = dol_mktime(0, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year')); - - $result = $object->set_date_livraison($user, $datelivraison); - if ($result < 0) { - setEventMessages($object->error, $object->errors, 'errors'); - } - } - - elseif ($action == 'setmode' && $usercancreate) { + $object->fetch($id); + $result = $object->set_date_livraison($user, $datedelivery); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } elseif ($action == 'setmode' && $usercancreate) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); @@ -581,21 +559,15 @@ if (empty($reshook)) // Multicurrency rate elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); - } - - elseif ($action == 'setavailability' && $usercancreate) { + } elseif ($action == 'setavailability' && $usercancreate) { $result = $object->availability(GETPOST('availability_id')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); - } - - elseif ($action == 'setdemandreason' && $usercancreate) { + } elseif ($action == 'setdemandreason' && $usercancreate) { $result = $object->demand_reason(GETPOST('demand_reason_id')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); - } - - elseif ($action == 'setconditions' && $usercancreate) { + } elseif ($action == 'setconditions' && $usercancreate) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); if ($result < 0) { dol_print_error($db, $object->error); @@ -612,7 +584,7 @@ if (empty($reshook)) } $ret = $object->fetch($object->id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } } @@ -648,18 +620,20 @@ if (empty($reshook)) if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'setremisepercent' && $usercancreate) { + } elseif ($action == 'setremisepercent' && $usercancreate) { $result = $object->set_remise($user, GETPOST('remise_percent')); - } - - elseif ($action == 'setremiseabsolue' && $usercancreate) { + } elseif ($action == 'setremiseabsolue' && $usercancreate) { $result = $object->set_remise_absolue($user, GETPOST('remise_absolue')); - } - - // Add a new line - elseif ($action == 'addline' && $usercancreate) + } elseif ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && GETPOST('vatforalllines', 'alpha')) { + // Define vat_rate + $vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0); + $vat_rate = str_replace('*', '', $vat_rate); + $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty, $mysoc); + $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty, $mysoc); + foreach ($object->lines as $line) { + $result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $line->info_bits, $line->date_start, $line->date_end, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); + } + } elseif ($action == 'addline' && $usercancreate) // Add a new line { $langs->load('errors'); $error = 0; @@ -674,9 +648,7 @@ if (empty($reshook)) { $idprod = 0; $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - } - else - { + } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } @@ -724,9 +696,7 @@ if (empty($reshook)) if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) { $idprod = $res->fk_product_child; - } - else - { + } else { setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors'); $error++; } @@ -794,9 +764,7 @@ if (empty($reshook)) $tva_npr = $prodcustprice->lines[0]->recuperableonly; if (empty($tva_tx)) $tva_npr = 0; } - } - else - { + } else { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } } @@ -816,9 +784,7 @@ if (empty($reshook)) if ($priceforthequantityarray['price_base_type'] == 'HT') { $pu_ht = $priceforthequantityarray['unitprice']; - } - else - { + } else { $pu_ttc = $priceforthequantityarray['unitprice']; } // Note: the remise_percent or price by qty is used to set data on form, so we will use value from POST. @@ -841,9 +807,7 @@ if (empty($reshook)) if ($priceforthequantityarray['price_base_type'] == 'HT') { $pu_ht = $priceforthequantityarray['unitprice']; - } - else - { + } else { $pu_ttc = $priceforthequantityarray['unitprice']; } // Note: the remise_percent or price by qty is used to set data on form, so we will use value from POST. @@ -976,7 +940,7 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); } - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST['prod_entry_mode']); @@ -1120,7 +1084,7 @@ if (empty($reshook)) } $ret = $object->fetch($object->id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST['qty']); @@ -1156,19 +1120,15 @@ if (empty($reshook)) } elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha') == $langs->trans('Cancel')) { header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // Pour reaffichage de la fiche en cours d'edition exit(); - } - - elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) + } elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { - $idwarehouse = GETPOST('idwarehouse'); + $idwarehouse = GETPOST('idwarehouse', 'int'); $qualified_for_stock_change = 0; if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { + } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } @@ -1198,14 +1158,12 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1219,9 +1177,7 @@ if (empty($reshook)) if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { + } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } @@ -1251,33 +1207,27 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } } } - } - - elseif ($action == 'confirm_shipped' && $confirm == 'yes' && $usercanclose) { + } elseif ($action == 'confirm_shipped' && $confirm == 'yes' && $usercanclose) { $result = $object->cloture($user); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'confirm_cancel' && $confirm == 'yes' && $usercanvalidate) + } elseif ($action == 'confirm_cancel' && $confirm == 'yes' && $usercanvalidate) { - $idwarehouse = GETPOST('idwarehouse'); + $idwarehouse = GETPOST('idwarehouse', 'int'); $qualified_for_stock_change = 0; if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { + } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } @@ -1348,8 +1298,7 @@ if (empty($reshook)) { dol_include_once('/'.$fromElement.'/class/'.$fromElement.'.class.php'); $lineClassName = 'OrderLine'; - } - elseif ($fromElement == 'propal') + } elseif ($fromElement == 'propal') { dol_include_once('/comm/'.$fromElement.'/class/'.$fromElement.'.class.php'); $lineClassName = 'PropaleLigne'; @@ -1401,8 +1350,7 @@ if (empty($reshook)) } else { $error++; } - } - else { + } else { $error++; } } @@ -1532,12 +1480,10 @@ if ($action == 'create' && $usercancreate) // For compatibility if ($element == 'order' || $element == 'commande') { $element = $subelement = 'commande'; - } - elseif ($element == 'propal') { + } elseif ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; - } - elseif ($element == 'contract') { + } elseif ($element == 'contract') { $element = $subelement = 'contrat'; } @@ -1583,9 +1529,7 @@ if ($action == 'create' && $usercancreate) // Object source contacts list $srccontactslist = $objectsrc->liste_contact(-1, 'external', 1); } - } - else - { + } else { $cond_reglement_id = $soc->cond_reglement_id; $mode_reglement_id = $soc->mode_reglement_id; $fk_account = $soc->fk_account; @@ -1623,8 +1567,7 @@ if ($action == 'create' && $usercancreate) print ''.$langs->trans('RefCustomer').''; if (!empty($conf->global->MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER) && !empty($origin) && !empty($originid)) print ''; - else - print ''; + else print ''; print ''; // Thirdparty @@ -1637,7 +1580,7 @@ if ($action == 'create' && $usercancreate) print ''; } else { print ''; - print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 3)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); + print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); // reload page to retrieve customer informations if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE)) { @@ -1681,15 +1624,14 @@ if ($action == 'create' && $usercancreate) print $form->selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date print ''; - // Delivery date planed - print "".$langs->trans("DateDeliveryPlanned").''; - if (empty($datedelivery)) - { - if (!empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); - else $datedelivery = empty($conf->global->MAIN_AUTOFILL_DATE_DELIVERY) ?-1 : ''; - } - print $form->selectDate($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1); - print ""; + // Date delivery planned + print ''.$langs->trans("DateDeliveryPlanned").''; + print ''; + //print dol_print_date($object->date_livraison, "day"); // date_livraison come from order and will be stored into date_delivery planed. + $date_delivery = ($date_delivery ? $date_delivery : $object->date_livraison); // $date_delivery comes from GETPOST + print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); + print "\n"; + print ''; // terms of the settlement print ''.$langs->trans('PaymentConditionsShort').''; @@ -1957,9 +1899,7 @@ if ($action == 'create' && $usercancreate) if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { + } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } @@ -1989,9 +1929,7 @@ if ($action == 'create' && $usercancreate) if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { + } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } @@ -2031,9 +1969,7 @@ if ($action == 'create' && $usercancreate) if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { + } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } @@ -2067,7 +2003,7 @@ if ($action == 'create' && $usercancreate) if ($action == 'clone') { // Create an array for form $formquestion = array( - array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)')) + array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client = 2 OR s.client=3)')) ); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } @@ -2209,11 +2145,11 @@ if ($action == 'create' && $usercancreate) print '
'; print ''; print ''; - print $form->selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); + print $form->selectDate($object->date_livraison ? $object->date_livraison : -1, 'liv_', 1, 1, '', "setdate_livraison", 1, 0); print ''; print '
'; } else { - print $object->date_livraison ? dol_print_date($object->date_livraison, 'daytext') : ' '; + print $object->date_livraison ? dol_print_date($object->date_livraison, 'dayhour') : ' '; if ($object->hasDelay() && !empty($object->date_livraison)) { print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); } @@ -2387,9 +2323,7 @@ if ($action == 'create' && $usercancreate) if ($action != 'editincoterm') { print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); - } - else - { + } else { print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); } print ''; @@ -2561,8 +2495,7 @@ if ($action == 'create' && $usercancreate) if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { print ''.$langs->trans('SendMail').''; - } else - print ''.$langs->trans('SendMail').''; + } else print ''.$langs->trans('SendMail').''; } } @@ -2688,13 +2621,13 @@ if ($action == 'create' && $usercancreate) print '
'; print ''; // ancre // Documents - $comref = dol_sanitizeFileName($object->ref); - $relativepath = $comref.'/'.$comref.'.pdf'; - $filedir = $conf->commande->multidir_output[$object->entity].'/'.$comref; + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref.'/'.$objref.'.pdf'; + $filedir = $conf->commande->multidir_output[$object->entity].'/'.$objref; $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed = $usercanread; $delallowed = $usercancreate; - print $formfile->showdocuments('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang, '', $object); + print $formfile->showdocuments('commande', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang, '', $object); // Show links to link elements diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index ab0abb3d151..f62c00ee81b 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -29,230 +29,229 @@ require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; class Orders extends DolibarrApi { - /** - * @var array $FIELDS Mandatory fields, checked when create and update object - */ - static $FIELDS = array( - 'socid', - 'date' - ); + /** + * @var array $FIELDS Mandatory fields, checked when create and update object + */ + static $FIELDS = array( + 'socid', + 'date' + ); - /** - * @var Commande $commande {@type Commande} - */ - public $commande; + /** + * @var Commande $commande {@type Commande} + */ + public $commande; - /** - * Constructor - */ - public function __construct() - { - global $db, $conf; - $this->db = $db; - $this->commande = new Commande($this->db); - } + /** + * Constructor + */ + public function __construct() + { + global $db, $conf; + $this->db = $db; + $this->commande = new Commande($this->db); + } - /** - * Get properties of an order object by id - * - * Return an array with order informations - * - * @param int $id ID of order - * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id - * @return array|mixed data without useless information + /** + * Get properties of an order object by id * - * @throws RestException - */ - public function get($id, $contact_list = 1) - { - return $this->_fetch($id, '', '', $contact_list); - } + * Return an array with order informations + * + * @param int $id ID of order + * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id + * @return array|mixed data without useless information + * + * @throws RestException + */ + public function get($id, $contact_list = 1) + { + return $this->_fetch($id, '', '', $contact_list); + } - /** - * Get properties of an order object by ref - * - * Return an array with order informations - * - * @param string $ref Ref of object - * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id - * @return array|mixed data without useless information - * - * @url GET ref/{ref} - * - * @throws RestException - */ - public function getByRef($ref, $contact_list = 1) - { - return $this->_fetch('', $ref, '', $contact_list); - } + /** + * Get properties of an order object by ref + * + * Return an array with order informations + * + * @param string $ref Ref of object + * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id + * @return array|mixed data without useless information + * + * @url GET ref/{ref} + * + * @throws RestException + */ + public function getByRef($ref, $contact_list = 1) + { + return $this->_fetch('', $ref, '', $contact_list); + } - /** - * Get properties of an order object by ref_ext - * - * Return an array with order informations - * - * @param string $ref_ext External reference of object - * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id - * @return array|mixed data without useless information - * - * @url GET ref_ext/{ref_ext} - * - * @throws RestException - */ - public function getByRefExt($ref_ext, $contact_list = 1) - { - return $this->_fetch('', '', $ref_ext, $contact_list); - } + /** + * Get properties of an order object by ref_ext + * + * Return an array with order informations + * + * @param string $ref_ext External reference of object + * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id + * @return array|mixed data without useless information + * + * @url GET ref_ext/{ref_ext} + * + * @throws RestException + */ + public function getByRefExt($ref_ext, $contact_list = 1) + { + return $this->_fetch('', '', $ref_ext, $contact_list); + } - /** - * Get properties of an order object - * - * Return an array with order informations - * - * @param int $id ID of order + /** + * Get properties of an order object + * + * Return an array with order informations + * + * @param int $id ID of order * @param string $ref Ref of object * @param string $ref_ext External reference of object - * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id - * @return array|mixed data without useless information - * - * @throws RestException - */ - private function _fetch($id, $ref = '', $ref_ext = '', $contact_list = 1) - { - if (!DolibarrApiAccess::$user->rights->commande->lire) { - throw new RestException(401); - } + * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id + * @return array|mixed data without useless information + * + * @throws RestException + */ + private function _fetch($id, $ref = '', $ref_ext = '', $contact_list = 1) + { + if (!DolibarrApiAccess::$user->rights->commande->lire) { + throw new RestException(401); + } - $result = $this->commande->fetch($id, $ref, $ref_ext); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $result = $this->commande->fetch($id, $ref, $ref_ext); + if (!$result) { + throw new RestException(404, 'Order not found'); + } - if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - // Add external contacts ids - $this->commande->contacts_ids = $this->commande->liste_contact(-1, 'external', $contact_list); - $this->commande->fetchObjectLinked(); - return $this->_cleanObjectDatas($this->commande); - } + // Add external contacts ids + $this->commande->contacts_ids = $this->commande->liste_contact(-1, 'external', $contact_list); + $this->commande->fetchObjectLinked(); + return $this->_cleanObjectDatas($this->commande); + } - /** - * List orders - * - * Get a list of orders - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Limit for list - * @param int $page Page number - * @param string $thirdparty_ids Thirdparty ids to filter orders of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" - * @return array Array of order objects - * - * @throws RestException 404 Not found - * @throws RestException 503 Error - */ - public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $sqlfilters = '') - { - global $db, $conf; + /** + * List orders + * + * Get a list of orders + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @param string $thirdparty_ids Thirdparty ids to filter orders of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" + * @return array Array of order objects + * + * @throws RestException 404 Not found + * @throws RestException 503 Error + */ + public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $sqlfilters = '') + { + global $db, $conf; - $obj_ret = array(); + $obj_ret = array(); - // case of external user, $thirdparty_ids param is ignored and replaced by user's socid - $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $thirdparty_ids; + // case of external user, $thirdparty_ids param is ignored and replaced by user's socid + $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $thirdparty_ids; - // If the internal user must only see his customers, force searching by him - $search_sale = 0; - if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) $search_sale = DolibarrApiAccess::$user->id; + // If the internal user must only see his customers, force searching by him + $search_sale = 0; + if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) $search_sale = DolibarrApiAccess::$user->id; - $sql = "SELECT t.rowid"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) - $sql .= " FROM ".MAIN_DB_PREFIX."commande as t"; + $sql = "SELECT t.rowid"; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) + $sql .= " FROM ".MAIN_DB_PREFIX."commande as t"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale - $sql .= ' WHERE t.entity IN ('.getEntity('commande').')'; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; - if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; - if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale - // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; - } - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } + $sql .= ' WHERE t.entity IN ('.getEntity('commande').')'; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; + if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; + if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + // Insert sale filter + if ($search_sale > 0) + { + $sql .= " AND sc.fk_user = ".$search_sale; + } + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } - $sql .= $db->order($sortfield, $sortorder); - if ($limit) { - if ($page < 0) - { - $page = 0; - } - $offset = $limit * $page; + $sql .= $db->order($sortfield, $sortorder); + if ($limit) { + if ($page < 0) + { + $page = 0; + } + $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); - } + $sql .= $db->plimit($limit + 1, $offset); + } - dol_syslog("API Rest request"); - $result = $db->query($sql); + dol_syslog("API Rest request"); + $result = $db->query($sql); - if ($result) - { - $num = $db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - $i = 0; - while ($i < $min) - { - $obj = $db->fetch_object($result); - $commande_static = new Commande($db); - if ($commande_static->fetch($obj->rowid)) { - // Add external contacts ids - $commande_static->contacts_ids = $commande_static->liste_contact(-1, 'external', 1); - $obj_ret[] = $this->_cleanObjectDatas($commande_static); - } - $i++; - } - } - else { - throw new RestException(503, 'Error when retrieve commande list : '.$db->lasterror()); - } - if (!count($obj_ret)) { - throw new RestException(404, 'No order found'); - } + if ($result) + { + $num = $db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + $i = 0; + while ($i < $min) + { + $obj = $db->fetch_object($result); + $commande_static = new Commande($db); + if ($commande_static->fetch($obj->rowid)) { + // Add external contacts ids + $commande_static->contacts_ids = $commande_static->liste_contact(-1, 'external', 1); + $obj_ret[] = $this->_cleanObjectDatas($commande_static); + } + $i++; + } + } else { + throw new RestException(503, 'Error when retrieve commande list : '.$db->lasterror()); + } + if (!count($obj_ret)) { + throw new RestException(404, 'No order found'); + } return $obj_ret; - } + } - /** - * Create a sale order - * - * Exemple: { "socid": 2, "date": 1595196000, "type": 0, "lines": [{ "fk_product": 2, "qty": 1 }] } - * - * @param array $request_data Request data - * @return int ID of order - */ - public function post($request_data = null) - { - if (!DolibarrApiAccess::$user->rights->commande->creer) { + /** + * Create a sale order + * + * Exemple: { "socid": 2, "date": 1595196000, "type": 0, "lines": [{ "fk_product": 2, "qty": 1 }] } + * + * @param array $request_data Request data + * @return int ID of order + */ + public function post($request_data = null) + { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401, "Insuffisant rights"); - } - // Check mandatory fields - $result = $this->_validate($request_data); + } + // Check mandatory fields + $result = $this->_validate($request_data); - foreach ($request_data as $field => $value) { - $this->commande->$field = $value; - } - /*if (isset($request_data["lines"])) { + foreach ($request_data as $field => $value) { + $this->commande->$field = $value; + } + /*if (isset($request_data["lines"])) { $lines = array(); foreach ($request_data["lines"] as $line) { array_push($lines, (object) $line); @@ -260,204 +259,241 @@ class Orders extends DolibarrApi $this->commande->lines = $lines; }*/ - if ($this->commande->create(DolibarrApiAccess::$user) < 0) { - throw new RestException(500, "Error creating order", array_merge(array($this->commande->error), $this->commande->errors)); - } + if ($this->commande->create(DolibarrApiAccess::$user) < 0) { + throw new RestException(500, "Error creating order", array_merge(array($this->commande->error), $this->commande->errors)); + } - return $this->commande->id; - } + return $this->commande->id; + } - /** - * Get lines of an order - * - * @param int $id Id of order - * - * @url GET {id}/lines - * - * @return int - */ - public function getLines($id) - { - if (!DolibarrApiAccess::$user->rights->commande->lire) { + /** + * Get lines of an order + * + * @param int $id Id of order + * + * @url GET {id}/lines + * + * @return int + */ + public function getLines($id) + { + if (!DolibarrApiAccess::$user->rights->commande->lire) { throw new RestException(401); } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $this->commande->getLinesArray(); - $result = array(); - foreach ($this->commande->lines as $line) { - array_push($result, $this->_cleanObjectDatas($line)); - } - return $result; - } + } + $this->commande->getLinesArray(); + $result = array(); + foreach ($this->commande->lines as $line) { + array_push($result, $this->_cleanObjectDatas($line)); + } + return $result; + } - /** - * Add a line to given order - * - * @param int $id Id of order to update - * @param array $request_data OrderLine data - * - * @url POST {id}/lines - * - * @return int - */ - public function postLine($id, $request_data = null) - { - if (!DolibarrApiAccess::$user->rights->commande->creer) { + /** + * Add a line to given order + * + * @param int $id Id of order to update + * @param array $request_data OrderLine data + * + * @url POST {id}/lines + * + * @return int + */ + public function postLine($id, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + } $request_data = (object) $request_data; - $updateRes = $this->commande->addline( - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - $request_data->fk_product, - $request_data->remise_percent, - $request_data->info_bits, - $request_data->fk_remise_except, - 'HT', - 0, - $request_data->date_start, - $request_data->date_end, - $request_data->product_type, - $request_data->rang, - $request_data->special_code, - $request_data->fk_parent_line, - $request_data->fk_fournprice, - $request_data->pa_ht, - $request_data->label, - $request_data->array_options, - $request_data->fk_unit, - $request_data->origin, - $request_data->origin_id, - $request_data->multicurrency_subprice - ); + $updateRes = $this->commande->addline( + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + $request_data->fk_product, + $request_data->remise_percent, + $request_data->info_bits, + $request_data->fk_remise_except, + 'HT', + 0, + $request_data->date_start, + $request_data->date_end, + $request_data->product_type, + $request_data->rang, + $request_data->special_code, + $request_data->fk_parent_line, + $request_data->fk_fournprice, + $request_data->pa_ht, + $request_data->label, + $request_data->array_options, + $request_data->fk_unit, + $request_data->origin, + $request_data->origin_id, + $request_data->multicurrency_subprice, + $request_data->ref_ext + ); - if ($updateRes > 0) { - return $updateRes; - } else { - throw new RestException(400, $this->commande->error); - } - } + if ($updateRes > 0) { + return $updateRes; + } else { + throw new RestException(400, $this->commande->error); + } + } - /** - * Update a line to given order - * - * @param int $id Id of order to update - * @param int $lineid Id of line to update - * @param array $request_data OrderLine data - * - * @url PUT {id}/lines/{lineid} - * - * @return array|bool - */ - public function putLine($id, $lineid, $request_data = null) - { - if (!DolibarrApiAccess::$user->rights->commande->creer) { + /** + * Update a line to given order + * + * @param int $id Id of order to update + * @param int $lineid Id of line to update + * @param array $request_data OrderLine data + * + * @url PUT {id}/lines/{lineid} + * + * @return array|bool + */ + public function putLine($id, $lineid, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + } $request_data = (object) $request_data; - $updateRes = $this->commande->updateline( - $lineid, - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->remise_percent, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - 'HT', - $request_data->info_bits, - $request_data->date_start, - $request_data->date_end, - $request_data->product_type, - $request_data->fk_parent_line, - 0, - $request_data->fk_fournprice, - $request_data->pa_ht, - $request_data->label, - $request_data->special_code, - $request_data->array_options, - $request_data->fk_unit, - $request_data->multicurrency_subprice - ); + $updateRes = $this->commande->updateline( + $lineid, + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->remise_percent, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + 'HT', + $request_data->info_bits, + $request_data->date_start, + $request_data->date_end, + $request_data->product_type, + $request_data->fk_parent_line, + 0, + $request_data->fk_fournprice, + $request_data->pa_ht, + $request_data->label, + $request_data->special_code, + $request_data->array_options, + $request_data->fk_unit, + $request_data->multicurrency_subprice, + 0, + $request_data->ref_ext + ); - if ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } - return false; - } + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + return false; + } - /** - * Delete a line to given order - * - * - * @param int $id Id of order to update - * @param int $lineid Id of line to delete - * - * @url DELETE {id}/lines/{lineid} - * - * @return int - * - * @throws RestException 401 - * @throws RestException 404 - */ - public function deleteLine($id, $lineid) - { - if (!DolibarrApiAccess::$user->rights->commande->creer) { + /** + * Delete a line to given order + * + * + * @param int $id Id of order to update + * @param int $lineid Id of line to delete + * + * @url DELETE {id}/lines/{lineid} + * + * @return int + * + * @throws RestException 401 + * @throws RestException 404 + */ + public function deleteLine($id, $lineid) + { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + } - // TODO Check the lineid $lineid is a line of ojbect + // TODO Check the lineid $lineid is a line of ojbect - $updateRes = $this->commande->deleteline(DolibarrApiAccess::$user, $lineid); - if ($updateRes > 0) { - return $this->get($id); - } else { - throw new RestException(405, $this->commande->error); - } - } + $updateRes = $this->commande->deleteline(DolibarrApiAccess::$user, $lineid); + if ($updateRes > 0) { + return $this->get($id); + } else { + throw new RestException(405, $this->commande->error); + } + } - /** + /** + * Get contacts of given order + * + * Return an array with contact informations + * + * @param int $id ID of order + * @param string $type Type of the contact (BILLING, SHIPPING, CUSTOMER) + * + * @url GET {id}/contacts + * + * @return array data without useless information + * + * @throws RestException + */ + public function getContacts($id, $type = '') + { + if (!DolibarrApiAccess::$user->rights->commande->lire) { + throw new RestException(401); + } + + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } + + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $contacts = $this->commande->liste_contact(-1, 'external', 0, $type); + + return $this->_cleanObjectDatas($contacts); + } + + /** * Add a contact type of given order * * @param int $id Id of order to update @@ -468,35 +504,44 @@ class Orders extends DolibarrApi * * @return int * - * @throws RestException 401 - * @throws RestException 404 + * @throws RestException 401 + * @throws RestException 404 */ - public function postContact($id, $contactid, $type) - { - if (!DolibarrApiAccess::$user->rights->commande->creer) { + public function postContact($id, $contactid, $type) + { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->commande->add_contact($contactid, $type, 'external'); + $result = $this->commande->add_contact($contactid, $type, 'external'); - if (!$result) { - throw new RestException(500, 'Error when added the contact'); - } + if ($result < 0) { + throw new RestException(500, 'Error when added the contact'); + } - return $this->commande; - } + if ($result == 0) { + throw new RestException(304, 'contact already added'); + } - /** - * Delete a contact type of given order + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Contact linked to the order' + ) + ); + } + + /** + * Unlink a contact type of given order * * @param int $id Id of order to update * @param int $rowid Row key of the contact in the array contact_ids. @@ -505,140 +550,143 @@ class Orders extends DolibarrApi * * @return int * - * @throws RestException 401 - * @throws RestException 404 - * @throws RestException 500 + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 500 */ - public function deleteContact($id, $rowid) - { - if (!DolibarrApiAccess::$user->rights->commande->creer) { + public function deleteContact($id, $rowid) + { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->commande->delete_contact($rowid); + $result = $this->commande->delete_linked_contact($rowid); - if (!$result) { - throw new RestException(500, 'Error when deleted the contact'); - } + if (!$result) { + throw new RestException(500, 'Error when deleted the contact'); + } - return $this->commande; - } + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Contact unlinked from order' + ) + ); + } - /** - * Update order general fields (won't touch lines of order) - * - * @param int $id Id of order to update - * @param array $request_data Datas - * - * @return int - */ - public function put($id, $request_data = null) - { - if (!DolibarrApiAccess::$user->rights->commande->creer) { + /** + * Update order general fields (won't touch lines of order) + * + * @param int $id Id of order to update + * @param array $request_data Datas + * + * @return int + */ + public function put($id, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - foreach ($request_data as $field => $value) { - if ($field == 'id') continue; - $this->commande->$field = $value; - } + foreach ($request_data as $field => $value) { + if ($field == 'id') continue; + $this->commande->$field = $value; + } // Update availability if (!empty($this->commande->availability_id)) { - if ($this->commande->availability($this->commande->availability_id) < 0) + if ($this->commande->availability($this->commande->availability_id) < 0) throw new RestException(400, 'Error while updating availability'); } - if ($this->commande->update(DolibarrApiAccess::$user) > 0) - { - return $this->get($id); - } - else - { - throw new RestException(500, $this->commande->error); - } - } + if ($this->commande->update(DolibarrApiAccess::$user) > 0) + { + return $this->get($id); + } else { + throw new RestException(500, $this->commande->error); + } + } - /** - * Delete order - * - * @param int $id Order ID - * @return array - */ - public function delete($id) - { - if (!DolibarrApiAccess::$user->rights->commande->supprimer) { + /** + * Delete order + * + * @param int $id Order ID + * @return array + */ + public function delete($id) + { + if (!DolibarrApiAccess::$user->rights->commande->supprimer) { throw new RestException(401); } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if (!$this->commande->delete(DolibarrApiAccess::$user)) { - throw new RestException(500, 'Error when deleting order : '.$this->commande->error); - } + if (!$this->commande->delete(DolibarrApiAccess::$user)) { + throw new RestException(500, 'Error when deleting order : '.$this->commande->error); + } - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Order deleted' - ) - ); - } + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Order deleted' + ) + ); + } - /** - * Validate an order - * + /** + * Validate an order + * * If you get a bad value for param notrigger check, provide this in body - * { - * "idwarehouse": 0, - * "notrigger": 0 - * } - * - * @param int $id Order ID - * @param int $idwarehouse Warehouse ID - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * - * @url POST {id}/validate - * + * { + * "idwarehouse": 0, + * "notrigger": 0 + * } + * + * @param int $id Order ID + * @param int $idwarehouse Warehouse ID + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * + * @url POST {id}/validate + * * @throws RestException 304 - * @throws RestException 401 - * @throws RestException 404 - * @throws RestException 500 - * - * @return array - */ - public function validate($id, $idwarehouse = 0, $notrigger = 0) - { - if (!DolibarrApiAccess::$user->rights->commande->creer) { + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 500 + * + * @return array + */ + public function validate($id, $idwarehouse = 0, $notrigger = 0) + { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); @@ -646,288 +694,288 @@ class Orders extends DolibarrApi $result = $this->commande->valid(DolibarrApiAccess::$user, $idwarehouse, $notrigger); if ($result == 0) { - throw new RestException(304, 'Error nothing done. May be object is already validated'); + throw new RestException(304, 'Error nothing done. May be object is already validated'); } if ($result < 0) { - throw new RestException(500, 'Error when validating Order: '.$this->commande->error); + throw new RestException(500, 'Error when validating Order: '.$this->commande->error); + } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } - if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - $this->commande->fetchObjectLinked(); + $this->commande->fetchObjectLinked(); - return $this->_cleanObjectDatas($this->commande); - } + return $this->_cleanObjectDatas($this->commande); + } - /** - * Tag the order as validated (opened) - * - * Function used when order is reopend after being closed. - * - * @param int $id Id of the order - * - * @url POST {id}/reopen - * - * @return int - * - * @throws RestException 304 - * @throws RestException 400 - * @throws RestException 401 - * @throws RestException 404 - * @throws RestException 405 - */ - public function reopen($id) - { + /** + * Tag the order as validated (opened) + * + * Function used when order is reopend after being closed. + * + * @param int $id Id of the order + * + * @url POST {id}/reopen + * + * @return int + * + * @throws RestException 304 + * @throws RestException 400 + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 405 + */ + public function reopen($id) + { - if (!DolibarrApiAccess::$user->rights->commande->creer) { - throw new RestException(401); - } - if (empty($id)) { - throw new RestException(400, 'Order ID is mandatory'); - } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + if (!DolibarrApiAccess::$user->rights->commande->creer) { + throw new RestException(401); + } + if (empty($id)) { + throw new RestException(400, 'Order ID is mandatory'); + } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } - $result = $this->commande->set_reopen(DolibarrApiAccess::$user); - if ($result < 0) { - throw new RestException(405, $this->commande->error); - }elseif ($result == 0) { - throw new RestException(304); - } + $result = $this->commande->set_reopen(DolibarrApiAccess::$user); + if ($result < 0) { + throw new RestException(405, $this->commande->error); + } elseif ($result == 0) { + throw new RestException(304); + } - return $result; - } + return $result; + } - /** - * Classify the order as invoiced. Could be also called setbilled - * - * @param int $id Id of the order - * - * @url POST {id}/setinvoiced - * - * @return int - * - * @throws RestException 400 - * @throws RestException 401 - * @throws RestException 404 - * @throws RestException 405 - */ - public function setinvoiced($id) - { + /** + * Classify the order as invoiced. Could be also called setbilled + * + * @param int $id Id of the order + * + * @url POST {id}/setinvoiced + * + * @return int + * + * @throws RestException 400 + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 405 + */ + public function setinvoiced($id) + { - if (!DolibarrApiAccess::$user->rights->commande->creer) { - throw new RestException(401); - } - if (empty($id)) { - throw new RestException(400, 'Order ID is mandatory'); - } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + if (!DolibarrApiAccess::$user->rights->commande->creer) { + throw new RestException(401); + } + if (empty($id)) { + throw new RestException(400, 'Order ID is mandatory'); + } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } - $result = $this->commande->classifyBilled(DolibarrApiAccess::$user); - if ($result < 0) { - throw new RestException(400, $this->commande->error); - } - - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } - - if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - $this->commande->fetchObjectLinked(); - - return $this->_cleanObjectDatas($this->commande); - } - - /** - * Close an order (Classify it as "Delivered") - * - * @param int $id Order ID - * @param int $notrigger Disabled triggers - * - * @url POST {id}/close - * - * @return int - */ - public function close($id, $notrigger = 0) - { - if (!DolibarrApiAccess::$user->rights->commande->creer) { - throw new RestException(401); - } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } - - if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - $result = $this->commande->cloture(DolibarrApiAccess::$user, $notrigger); - if ($result == 0) { - throw new RestException(304, 'Error nothing done. May be object is already closed'); - } - if ($result < 0) { - throw new RestException(500, 'Error when closing Order: '.$this->commande->error); - } - - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } - - if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - $this->commande->fetchObjectLinked(); - - return $this->_cleanObjectDatas($this->commande); - } - - /** - * Set an order to draft - * - * @param int $id Order ID - * @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on) - * - * @url POST {id}/settodraft - * - * @return array - */ - public function settodraft($id, $idwarehouse = -1) - { - if (!DolibarrApiAccess::$user->rights->commande->creer) { - throw new RestException(401); - } - $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } - - if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - $result = $this->commande->setDraft(DolibarrApiAccess::$user, $idwarehouse); - if ($result == 0) { - throw new RestException(304, 'Nothing done. May be object is already closed'); - } - if ($result < 0) { - throw new RestException(500, 'Error when closing Order: '.$this->commande->error); - } + $result = $this->commande->classifyBilled(DolibarrApiAccess::$user); + if ($result < 0) { + throw new RestException(400, $this->commande->error); + } $result = $this->commande->fetch($id); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + if (!$result) { + throw new RestException(404, 'Order not found'); + } - if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - $this->commande->fetchObjectLinked(); + $this->commande->fetchObjectLinked(); - return $this->_cleanObjectDatas($this->commande); - } + return $this->_cleanObjectDatas($this->commande); + } + + /** + * Close an order (Classify it as "Delivered") + * + * @param int $id Order ID + * @param int $notrigger Disabled triggers + * + * @url POST {id}/close + * + * @return int + */ + public function close($id, $notrigger = 0) + { + if (!DolibarrApiAccess::$user->rights->commande->creer) { + throw new RestException(401); + } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } + + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $result = $this->commande->cloture(DolibarrApiAccess::$user, $notrigger); + if ($result == 0) { + throw new RestException(304, 'Error nothing done. May be object is already closed'); + } + if ($result < 0) { + throw new RestException(500, 'Error when closing Order: '.$this->commande->error); + } + + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } + + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $this->commande->fetchObjectLinked(); + + return $this->_cleanObjectDatas($this->commande); + } + + /** + * Set an order to draft + * + * @param int $id Order ID + * @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on) + * + * @url POST {id}/settodraft + * + * @return array + */ + public function settodraft($id, $idwarehouse = -1) + { + if (!DolibarrApiAccess::$user->rights->commande->creer) { + throw new RestException(401); + } + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } + + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $result = $this->commande->setDraft(DolibarrApiAccess::$user, $idwarehouse); + if ($result == 0) { + throw new RestException(304, 'Nothing done. May be object is already closed'); + } + if ($result < 0) { + throw new RestException(500, 'Error when closing Order: '.$this->commande->error); + } + + $result = $this->commande->fetch($id); + if (!$result) { + throw new RestException(404, 'Order not found'); + } + + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $this->commande->fetchObjectLinked(); + + return $this->_cleanObjectDatas($this->commande); + } - /** - * Create an order using an existing proposal. - * - * - * @param int $proposalid Id of the proposal - * - * @url POST /createfromproposal/{proposalid} - * - * @return int - * @throws RestException 400 - * @throws RestException 401 - * @throws RestException 404 - * @throws RestException 405 - */ - public function createOrderFromProposal($proposalid) - { + /** + * Create an order using an existing proposal. + * + * + * @param int $proposalid Id of the proposal + * + * @url POST /createfromproposal/{proposalid} + * + * @return int + * @throws RestException 400 + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 405 + */ + public function createOrderFromProposal($proposalid) + { - require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; - if (!DolibarrApiAccess::$user->rights->propal->lire) { - throw new RestException(401); - } - if (!DolibarrApiAccess::$user->rights->commande->creer) { - throw new RestException(401); - } - if (empty($proposalid)) { - throw new RestException(400, 'Proposal ID is mandatory'); - } + if (!DolibarrApiAccess::$user->rights->propal->lire) { + throw new RestException(401); + } + if (!DolibarrApiAccess::$user->rights->commande->creer) { + throw new RestException(401); + } + if (empty($proposalid)) { + throw new RestException(400, 'Proposal ID is mandatory'); + } - $propal = new Propal($this->db); - $result = $propal->fetch($proposalid); - if (!$result) { - throw new RestException(404, 'Proposal not found'); - } + $propal = new Propal($this->db); + $result = $propal->fetch($proposalid); + if (!$result) { + throw new RestException(404, 'Proposal not found'); + } - $result = $this->commande->createFromProposal($propal, DolibarrApiAccess::$user); - if ($result < 0) { - throw new RestException(405, $this->commande->error); - } - $this->commande->fetchObjectLinked(); + $result = $this->commande->createFromProposal($propal, DolibarrApiAccess::$user); + if ($result < 0) { + throw new RestException(405, $this->commande->error); + } + $this->commande->fetchObjectLinked(); - return $this->_cleanObjectDatas($this->commande); - } + return $this->_cleanObjectDatas($this->commande); + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore - /** - * Clean sensible object datas - * - * @param object $object Object to clean - * @return array Array of cleaned object properties - */ - protected function _cleanObjectDatas($object) - { - // phpcs:enable - $object = parent::_cleanObjectDatas($object); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + /** + * Clean sensible object datas + * + * @param object $object Object to clean + * @return array Array of cleaned object properties + */ + protected function _cleanObjectDatas($object) + { + // phpcs:enable + $object = parent::_cleanObjectDatas($object); - unset($object->note); - unset($object->address); - unset($object->barcode_type); - unset($object->barcode_type_code); - unset($object->barcode_type_label); - unset($object->barcode_type_coder); + unset($object->note); + unset($object->address); + unset($object->barcode_type); + unset($object->barcode_type_code); + unset($object->barcode_type_label); + unset($object->barcode_type_coder); - return $object; - } + return $object; + } - /** - * Validate fields before create or update object - * - * @param array $data Array with data to verify - * @return array - * @throws RestException - */ - private function _validate($data) - { - $commande = array(); - foreach (Orders::$FIELDS as $field) { - if (!isset($data[$field])) - throw new RestException(400, $field." field missing"); - $commande[$field] = $data[$field]; - } - return $commande; - } + /** + * Validate fields before create or update object + * + * @param array $data Array with data to verify + * @return array + * @throws RestException + */ + private function _validate($data) + { + $commande = array(); + foreach (Orders::$FIELDS as $field) { + if (!isset($data[$field])) + throw new RestException(400, $field." field missing"); + $commande[$field] = $data[$field]; + } + return $commande; + } } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 3496a9299fe..6c6c26c135f 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2016 Juanjo Menent + * Copyright (C) 2010-2020 Juanjo Menent * Copyright (C) 2011 Jean Heimburger * Copyright (C) 2012-2014 Christophe Battarel * Copyright (C) 2012 Cedric Salvador @@ -99,13 +99,13 @@ class Commande extends CommonOrder */ public $ref_client; - /** + /** * @var string Internal ref for order * @deprecated */ public $ref_int; - /** + /** * @var int Contact ID */ public $contactid; @@ -121,15 +121,15 @@ class Commande extends CommonOrder */ public $billed; - /** - * @var int Draft Status of the order - */ - public $brouillon; - public $cond_reglement_code; + /** + * @var int Draft Status of the order + */ + public $brouillon; + public $cond_reglement_code; /** - * @var int bank account ID - */ + * @var int bank account ID + */ public $fk_account; /** @@ -168,12 +168,12 @@ class Commande extends CommonOrder public $demand_reason_id; // Source reason. Why we receive order (after a phone campaign, ...) public $demand_reason_code; /** - * @var int Date of order + * @var int Date of order */ public $date; /** - * @var int Date of order + * @var int Date of order * @deprecated * @see $date */ @@ -182,8 +182,8 @@ class Commande extends CommonOrder public $date_livraison; // Date expected of shipment (date starting shipment, not the reception that occurs some days after) /** - * @var int ID - */ + * @var int ID + */ public $fk_remise_except; public $remise_percent; @@ -197,13 +197,13 @@ class Commande extends CommonOrder public $linked_objects = array(); /** - * @var int User author ID - */ + * @var int User author ID + */ public $user_author_id; - /** - * @var int User validator ID - */ + /** + * @var int User validator ID + */ public $user_valid; /** @@ -213,8 +213,8 @@ class Commande extends CommonOrder // Multicurrency /** - * @var int Currency ID - */ + * @var int Currency ID + */ public $fk_multicurrency; public $multicurrency_code; @@ -223,9 +223,9 @@ class Commande extends CommonOrder public $multicurrency_total_tva; public $multicurrency_total_ttc; - /** - * @var Commande clone of order object - */ + /** + * @var Commande clone of order object + */ public $oldcopy; //! key of module source when order generated from a dedicated module ('cashdesk', 'takepos', ...) @@ -394,11 +394,11 @@ class Commande extends CommonOrder $mybool |= @include_once $dir.$file; } - if ($mybool === false) - { - dol_print_error('', "Failed to include file ".$file); - return ''; - } + if ($mybool === false) + { + dol_print_error('', "Failed to include file ".$file); + return ''; + } $obj = new $classname(); $numref = $obj->getNextValue($soc, $this); @@ -406,16 +406,12 @@ class Commande extends CommonOrder if ($numref != "") { return $numref; - } - else - { + } else { $this->error = $obj->error; //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); return ""; } - } - else - { + } else { print $langs->trans("Error")." ".$langs->trans("Error_COMMANDE_ADDON_NotDefined"); return ""; } @@ -468,9 +464,7 @@ class Commande extends CommonOrder if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef($soc); - } - else - { + } else { $num = $this->ref; } $this->newref = dol_sanitizeFileName($num); @@ -574,16 +568,14 @@ class Commande extends CommonOrder { $this->ref = $num; $this->statut = self::STATUS_VALIDATED; - $this->brouillon = 0; + $this->brouillon = 0; } if (!$error) { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -597,9 +589,9 @@ class Commande extends CommonOrder * @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on) * @return int <0 if KO, >0 if OK */ - public function setDraft($user, $idwarehouse = -1) - { - //phpcs:enable + public function setDraft($user, $idwarehouse = -1) + { + //phpcs:enable global $conf, $langs; $error = 0; @@ -627,12 +619,12 @@ class Commande extends CommonOrder if ($this->db->query($sql)) { - if (!$error) - { - $this->oldcopy = clone $this; - } + if (!$error) + { + $this->oldcopy = clone $this; + } - // If stock is decremented on validate order, we must reincrement it + // If stock is decremented on validate order, we must reincrement it if (!empty($conf->stock->enabled) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) { $result = 0; @@ -668,14 +660,12 @@ class Commande extends CommonOrder $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; } - } + } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -688,7 +678,7 @@ class Commande extends CommonOrder */ public function set_reopen($user) { - // phpcs:enable + // phpcs:enable $error = 0; if ($this->statut != self::STATUS_CANCELED && $this->statut != self::STATUS_CLOSED) @@ -711,9 +701,7 @@ class Commande extends CommonOrder $result = $this->call_trigger('ORDER_REOPEN', $user); if ($result < 0) $error++; // End call triggers - } - else - { + } else { $error++; $this->error = $this->db->lasterror(); dol_print_error($this->db); @@ -726,9 +714,7 @@ class Commande extends CommonOrder $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::set_reopen ".$errmsg, LOG_ERR); @@ -783,15 +769,11 @@ class Commande extends CommonOrder $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); @@ -861,9 +843,7 @@ class Commande extends CommonOrder $this->statut = self::STATUS_CANCELED; $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::cancel ".$errmsg, LOG_ERR); @@ -872,9 +852,7 @@ class Commande extends CommonOrder $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -965,7 +943,7 @@ class Commande extends CommonOrder $sql .= ", ".($this->ref_ext ? "'".$this->db->escape($this->ref_ext)."'" : "null"); $sql .= ", ".($this->ref_client ? "'".$this->db->escape($this->ref_client)."'" : "null"); $sql .= ", ".($this->ref_int ? "'".$this->db->escape($this->ref_int)."'" : "null"); - $sql .= ", '".$this->db->escape($this->modelpdf)."'"; + $sql .= ", '".$this->db->escape($this->model_pdf)."'"; $sql .= ", ".($this->cond_reglement_id > 0 ? $this->cond_reglement_id : "null"); $sql .= ", ".($this->mode_reglement_id > 0 ? $this->mode_reglement_id : "null"); $sql .= ", ".($this->fk_account > 0 ? $this->fk_account : 'NULL'); @@ -980,7 +958,7 @@ class Commande extends CommonOrder $sql .= ", ".(int) $this->fk_incoterms; $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; $sql .= ", ".setEntity($this); - $sql .= ", ".($this->module_source ? "'".$this->db->escape($this->module_source)."'" : "null"); + $sql .= ", ".($this->module_source ? "'".$this->db->escape($this->module_source)."'" : "null"); $sql .= ", ".($this->pos_source != '' ? "'".$this->db->escape($this->pos_source)."'" : "null"); $sql .= ", ".(int) $this->fk_multicurrency; $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; @@ -1026,7 +1004,12 @@ class Commande extends CommonOrder $origintype = $this->element; } - $result = $this->addline( + // ref_ext + if (empty($line->ref_ext)) { + $line->ref_ext = ''; + } + + $result = $this->addline( $line->desc, $line->subprice, $line->qty, @@ -1050,8 +1033,10 @@ class Commande extends CommonOrder $line->label, $line->array_options, $line->fk_unit, - $origintype, - $originid + $origintype, + $originid, + 0, + $line->ref_ext ); if ($result < 0) { @@ -1100,8 +1085,7 @@ class Commande extends CommonOrder $error++; } } - } - else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + } else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); @@ -1147,8 +1131,7 @@ class Commande extends CommonOrder //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object } - } - else dol_print_error($resqlcontact); + } else dol_print_error($resqlcontact); } if (!$error) @@ -1169,23 +1152,17 @@ class Commande extends CommonOrder { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } } - } - else - { + } else { dol_print_error($this->db); $this->db->rollback(); return -1; @@ -1245,6 +1222,13 @@ class Commande extends CommonOrder $this->date_validation = ''; if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $this->ref_client = ''; + // Do not clone ref_ext + $num = count($this->lines); + for ($i = 0; $i < $num; $i++) + { + $this->lines[$i]->ref_ext = ''; + } + // Create clone $this->context['createfromclone'] = 'createfromclone'; $result = $this->create($user); @@ -1288,9 +1272,7 @@ class Commande extends CommonOrder { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1370,13 +1352,13 @@ class Commande extends CommonOrder $this->shipping_method_id = $object->shipping_method_id; $this->warehouse_id = $object->warehouse_id; $this->fk_delivery_address = $object->fk_delivery_address; - $this->contact_id = $object->contactid; + $this->contact_id = $object->contact_id; $this->ref_client = $object->ref_client; if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN)) { - $this->note_private = $object->note_private; - $this->note_public = $object->note_public; + $this->note_private = $object->note_private; + $this->note_public = $object->note_public; } $this->origin = $object->element; @@ -1421,10 +1403,8 @@ class Commande extends CommonOrder $this->valid($user); } return $ret; - } - else return -1; - } - else return -1; + } else return -1; + } else return -1; } @@ -1457,6 +1437,7 @@ class Commande extends CommonOrder * @param string $origin Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be 'orderdet', 'propaldet'..., else 'order','propal,'.... * @param int $origin_id Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be Id of origin object (aka line id), else object id * @param double $pu_ht_devise Unit price in currency + * @param string $ref_ext line external reference * @return int >0 if OK, <0 if KO * * @see add_product() @@ -1466,13 +1447,13 @@ class Commande extends CommonOrder * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit) * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) */ - public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $info_bits = 0, $fk_remise_except = 0, $price_base_type = 'HT', $pu_ttc = 0, $date_start = '', $date_end = '', $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0) + public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $info_bits = 0, $fk_remise_except = 0, $price_base_type = 'HT', $pu_ttc = 0, $date_start = '', $date_end = '', $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0, $ref_ext = '') { global $mysoc, $conf, $langs, $user; $logtext = "::addline commandeid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent"; $logtext .= ", info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start"; - $logtext .= ", date_end=$date_end, type=$type special_code=$special_code, fk_unit=$fk_unit, origin=$origin, origin_id=$origin_id, pu_ht_devise=$pu_ht_devise"; + $logtext .= ", date_end=$date_end, type=$type special_code=$special_code, fk_unit=$fk_unit, origin=$origin, origin_id=$origin_id, pu_ht_devise=$pu_ht_devise, ref_ext=$ref_ext"; dol_syslog(get_class($this).$logtext, LOG_DEBUG); if ($this->statut == self::STATUS_DRAFT) @@ -1480,6 +1461,7 @@ class Commande extends CommonOrder include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; // Clean parameters + if (empty($remise_percent)) $remise_percent = 0; if (empty($qty)) $qty = 0; if (empty($info_bits)) $info_bits = 0; @@ -1489,6 +1471,7 @@ class Commande extends CommonOrder if (empty($txlocaltax2)) $txlocaltax2 = 0; if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line = 0; if (empty($this->fk_multicurrency)) $this->fk_multicurrency = 0; + if (empty($ref_ext)) $ref_ext = ''; $remise_percent = price2num($remise_percent); $qty = price2num($qty); @@ -1504,9 +1487,7 @@ class Commande extends CommonOrder if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } $label = trim($label); @@ -1521,7 +1502,7 @@ class Commande extends CommonOrder return -1; } - $this->db->begin(); + $this->db->begin(); $product_type = $type; if (!empty($fk_product)) @@ -1606,6 +1587,7 @@ class Commande extends CommonOrder $this->line->label = $label; $this->line->desc = $desc; $this->line->qty = $qty; + $this->line->ref_ext = $ref_ext; $this->line->vat_src_code = $vat_src_code; $this->line->tva_tx = $txtva; @@ -1665,23 +1647,17 @@ class Commande extends CommonOrder { $this->db->commit(); return $this->line->id; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->line->error; dol_syslog(get_class($this)."::addline error=".$this->error, LOG_ERR); $this->db->rollback(); return -2; } - } - else - { + } else { dol_syslog(get_class($this)."::addline status of order must be Draft to allow use of ->addline()", LOG_ERR); return -3; } @@ -1705,7 +1681,7 @@ class Commande extends CommonOrder */ public function add_product($idproduct, $qty, $remise_percent = 0.0, $date_start = '', $date_end = '') { - // phpcs:enable + // phpcs:enable global $conf, $mysoc; if (!$qty) $qty = 1; @@ -1804,7 +1780,7 @@ class Commande extends CommonOrder $sql .= ', c.fk_incoterms, c.location_incoterms'; $sql .= ", c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc"; $sql .= ", c.module_source, c.pos_source"; - $sql .= ", i.libelle as label_incoterms"; + $sql .= ", i.libelle as label_incoterms"; $sql .= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql .= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc'; $sql .= ', ca.code as availability_code, ca.label as availability_label'; @@ -1866,7 +1842,8 @@ class Commande extends CommonOrder $this->note = $obj->note_private; // deprecated $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; - $this->modelpdf = $obj->model_pdf; + $this->model_pdf = $obj->model_pdf; + $this->modelpdf = $obj->model_pdf; // deprecated $this->last_main_doc = $obj->last_main_doc; $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; @@ -1920,15 +1897,11 @@ class Commande extends CommonOrder return -3; } return 1; - } - else - { + } else { $this->error = 'Order with id '.$id.' not found sql='.$sql; return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -1944,7 +1917,7 @@ class Commande extends CommonOrder */ public function insert_discount($idremise) { - // phpcs:enable + // phpcs:enable global $langs; include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -1992,22 +1965,16 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $line->error; $this->db->rollback(); return -2; } - } - else - { + } else { $this->db->rollback(); return -2; } @@ -2025,10 +1992,10 @@ class Commande extends CommonOrder public function fetch_lines($only_product = 0, $loadalsotranslation = 0) { global $langs, $conf; - // phpcs:enable + // phpcs:enable $this->lines = array(); - $sql = 'SELECT l.rowid, l.fk_product, l.fk_parent_line, l.product_type, l.fk_commande, l.label as custom_label, l.description, l.price, l.qty, l.vat_src_code, l.tva_tx,'; + $sql = 'SELECT l.rowid, l.fk_product, l.fk_parent_line, l.product_type, l.fk_commande, l.label as custom_label, l.description, l.price, l.qty, l.vat_src_code, l.tva_tx, l.ref_ext,'; $sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.fk_remise_except, l.remise_percent, l.subprice, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht, l.rang, l.info_bits, l.special_code,'; $sql .= ' l.total_ht, l.total_ttc, l.total_tva, l.total_localtax1, l.total_localtax2, l.date_start, l.date_end,'; $sql .= ' l.fk_unit,'; @@ -2063,6 +2030,7 @@ class Commande extends CommonOrder $line->description = $objp->description; // Description line $line->product_type = $objp->product_type; $line->qty = $objp->qty; + $line->ref_ext = $objp->ref_ext; $line->vat_src_code = $objp->vat_src_code; $line->tva_tx = $objp->tva_tx; @@ -2118,13 +2086,13 @@ class Commande extends CommonOrder $line->fetch_optionals(); // multilangs - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->fk_product) && !empty($loadalsotranslation)) { - $line = new Product($this->db); - $line->fetch($objp->fk_product); - $line->getMultiLangs(); - } + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->fk_product) && !empty($loadalsotranslation)) { + $line = new Product($this->db); + $line->fetch($objp->fk_product); + $line->getMultiLangs(); + } - $this->lines[$i] = $line; + $this->lines[$i] = $line; $i++; } @@ -2132,9 +2100,7 @@ class Commande extends CommonOrder $this->db->free($result); return 1; - } - else - { + } else { $this->error = $this->db->error(); return -3; } @@ -2197,9 +2163,7 @@ class Commande extends CommonOrder $this->db->free($resql); return $nb; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -2244,9 +2208,7 @@ class Commande extends CommonOrder } $this->db->free($resql); return $num; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -2262,7 +2224,7 @@ class Commande extends CommonOrder */ public function nb_expedition() { - // phpcs:enable + // phpcs:enable $sql = 'SELECT count(*)'; $sql .= ' FROM '.MAIN_DB_PREFIX.'expedition as e'; $sql .= ', '.MAIN_DB_PREFIX.'element_element as el'; @@ -2275,8 +2237,7 @@ class Commande extends CommonOrder { $row = $this->db->fetch_row($resql); return $row[0]; - } - else dol_print_error($this->db); + } else dol_print_error($this->db); } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -2290,7 +2251,7 @@ class Commande extends CommonOrder */ public function stock_array($filtre_statut = self::STATUS_CANCELED) { - // phpcs:enable + // phpcs:enable $this->stocks = array(); // Tableau des id de produit de la commande @@ -2362,36 +2323,26 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; } - } - else - { + } else { $this->db->rollback(); $this->error = $line->error; return -1; } - } - else - { + } else { $this->db->rollback(); return 0; } - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; } - } - else - { + } else { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; return -1; } @@ -2408,7 +2359,7 @@ class Commande extends CommonOrder */ public function set_remise($user, $remise, $notrigger = 0) { - // phpcs:enable + // phpcs:enable $remise = trim($remise) ?trim($remise) : 0; if ($user->rights->commande->creer) @@ -2450,9 +2401,7 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2476,7 +2425,7 @@ class Commande extends CommonOrder */ public function set_remise_absolue($user, $remise, $notrigger = 0) { - // phpcs:enable + // phpcs:enable $remise = trim($remise) ?trim($remise) : 0; if ($user->rights->commande->creer) @@ -2518,9 +2467,7 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2544,7 +2491,7 @@ class Commande extends CommonOrder */ public function set_date($user, $date, $notrigger = 0) { - // phpcs:enable + // phpcs:enable if ($user->rights->commande->creer) { $error = 0; @@ -2581,9 +2528,7 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2592,9 +2537,7 @@ class Commande extends CommonOrder $this->db->rollback(); return -1 * $error; } - } - else - { + } else { return -2; } } @@ -2610,7 +2553,7 @@ class Commande extends CommonOrder */ public function set_date_livraison($user, $date_livraison, $notrigger = 0) { - // phpcs:enable + // phpcs:enable if ($user->rights->commande->creer) { $error = 0; @@ -2647,9 +2590,7 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2658,9 +2599,7 @@ class Commande extends CommonOrder $this->db->rollback(); return -1 * $error; } - } - else - { + } else { return -2; } } @@ -2681,7 +2620,7 @@ class Commande extends CommonOrder */ public function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'c.date_commande', $sortorder = 'DESC') { - // phpcs:enable + // phpcs:enable global $user; $ga = array(); @@ -2717,13 +2656,10 @@ class Commande extends CommonOrder if ($shortlist == 1) { $ga[$obj->cid] = $obj->ref; - } - elseif ($shortlist == 2) + } elseif ($shortlist == 2) { $ga[$obj->cid] = $obj->ref.' ('.$obj->name.')'; - } - else - { + } else { $ga[$i]['id'] = $obj->cid; $ga[$i]['ref'] = $obj->ref; $ga[$i]['name'] = $obj->name; @@ -2732,9 +2668,7 @@ class Commande extends CommonOrder } } return $ga; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -2788,9 +2722,7 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2799,9 +2731,7 @@ class Commande extends CommonOrder $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $error_str = 'Command status do not meet requirement '.$this->statut; dol_syslog(__METHOD__.$error_str, LOG_ERR); $this->error = $error_str; @@ -2820,7 +2750,7 @@ class Commande extends CommonOrder */ public function demand_reason($demand_reason_id, $notrigger = 0) { - // phpcs:enable + // phpcs:enable global $user; dol_syslog('Commande::demand_reason('.$demand_reason_id.')'); @@ -2860,9 +2790,7 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2871,9 +2799,7 @@ class Commande extends CommonOrder $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $error_str = 'order status do not meet requirement '.$this->statut; dol_syslog(__METHOD__.$error_str, LOG_ERR); $this->error = $error_str; @@ -2893,7 +2819,7 @@ class Commande extends CommonOrder */ public function set_ref_client($user, $ref_client, $notrigger = 0) { - // phpcs:enable + // phpcs:enable if ($user->rights->commande->creer) { $error = 0; @@ -2929,9 +2855,7 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2940,9 +2864,7 @@ class Commande extends CommonOrder $this->db->rollback(); return -1 * $error; } - } - else - { + } else { return -1; } } @@ -2984,9 +2906,7 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::classifyBilled ".$errmsg, LOG_ERR); @@ -2995,9 +2915,7 @@ class Commande extends CommonOrder $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -3039,9 +2957,7 @@ class Commande extends CommonOrder $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::classifyUnBilled ".$errmsg, LOG_ERR); @@ -3050,9 +2966,7 @@ class Commande extends CommonOrder $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -3086,13 +3000,14 @@ class Commande extends CommonOrder * @param string $fk_unit Code of the unit to use. Null to use the default one * @param double $pu_ht_devise Amount in currency * @param int $notrigger disable line update trigger + * @param string $ref_ext external reference * @return int < 0 if KO, > 0 if OK */ - public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $price_base_type = 'HT', $info_bits = 0, $date_start = '', $date_end = '', $type = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0) + public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $price_base_type = 'HT', $info_bits = 0, $date_start = '', $date_end = '', $type = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $ref_ext = '') { global $conf, $mysoc, $langs, $user; - dol_syslog(get_class($this)."::updateline id=$rowid, desc=$desc, pu=$pu, qty=$qty, remise_percent=$remise_percent, txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, price_base_type=$price_base_type, info_bits=$info_bits, date_start=$date_start, date_end=$date_end, type=$type, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, special_code=$special_code"); + dol_syslog(get_class($this)."::updateline id=$rowid, desc=$desc, pu=$pu, qty=$qty, remise_percent=$remise_percent, txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, price_base_type=$price_base_type, info_bits=$info_bits, date_start=$date_start, date_end=$date_end, type=$type, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, special_code=$special_code, ref_ext=$ref_ext"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; if ($this->statut == Commande::STATUS_DRAFT) @@ -3105,6 +3020,7 @@ class Commande extends CommonOrder if (empty($txlocaltax2)) $txlocaltax2 = 0; if (empty($remise_percent)) $remise_percent = 0; if (empty($special_code) || $special_code == 3) $special_code = 0; + if (empty($ref_ext)) $ref_ext = ''; if ($date_start && $date_end && $date_start > $date_end) { $langs->load("errors"); @@ -3160,9 +3076,7 @@ class Commande extends CommonOrder if ($price_base_type == 'TTC') { $subprice = $pu_ttc; - } - else - { + } else { $subprice = $pu_ht; } $remise = 0; @@ -3211,6 +3125,7 @@ class Commande extends CommonOrder $this->line->label = $label; $this->line->desc = $desc; $this->line->qty = $qty; + $this->line->ref_ext = $ref_ext; $this->line->vat_src_code = $vat_src_code; $this->line->tva_tx = $txtva; @@ -3265,17 +3180,13 @@ class Commande extends CommonOrder $this->db->commit(); return $result; - } - else - { + } else { $this->error = $this->line->error; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = get_class($this)."::updateline Order status makes operation forbidden"; $this->errors = array('OrderStatusMakeOperationForbidden'); return -2; @@ -3300,7 +3211,7 @@ class Commande extends CommonOrder if (isset($this->ref_client)) $this->ref_client = trim($this->ref_client); if (isset($this->note) || isset($this->note_private)) $this->note_private = (isset($this->note_private) ? trim($this->note_private) : trim($this->note)); if (isset($this->note_public)) $this->note_public = trim($this->note_public); - if (isset($this->modelpdf)) $this->modelpdf = trim($this->modelpdf); + if (isset($this->model_pdf)) $this->model_pdf = trim($this->model_pdf); if (isset($this->import_key)) $this->import_key = trim($this->import_key); // Check parameters @@ -3369,9 +3280,7 @@ class Commande extends CommonOrder } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -3412,9 +3321,9 @@ class Commande extends CommonOrder if (!$error) { // Delete extrafields of order details - $main = MAIN_DB_PREFIX.'commandedet'; - $ef = $main."_extrafields"; - $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_commande = ".$this->id.")"; + $main = MAIN_DB_PREFIX.'commandedet'; + $ef = $main."_extrafields"; + $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_commande = ".$this->id.")"; if (!$this->db->query($sql)) { $error++; @@ -3471,6 +3380,9 @@ class Commande extends CommonOrder if (!$error) { + // Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive + $this->deleteEcmFiles(); + // Remove directory with files $comref = dol_sanitizeFileName($this->ref); if ($conf->commande->multidir_output[$this->entity] && !empty($this->ref)) @@ -3503,9 +3415,7 @@ class Commande extends CommonOrder { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { $this->error .= ($this->error ? ', '.$errmsg : $errmsg); @@ -3525,7 +3435,7 @@ class Commande extends CommonOrder */ public function load_board($user) { - // phpcs:enable + // phpcs:enable global $conf, $langs; $clause = " WHERE"; @@ -3570,9 +3480,7 @@ class Commande extends CommonOrder } return $response; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -3616,52 +3524,45 @@ class Commande extends CommonOrder */ public function LibStatut($status, $billed, $mode, $donotshowbilled = 0) { - // phpcs:enable + // phpcs:enable global $langs, $conf; $billedtext = ''; if (empty($donotshowbilled)) $billedtext .= ($billed ? ' - '.$langs->trans("Billed") : ''); if ($status == self::STATUS_CANCELED) { - $labelStatus = $langs->trans('StatusOrderCanceled'); - $labelStatusShort = $langs->trans('StatusOrderCanceledShort'); - $statusType = 'status9'; - } - elseif ($status == self::STATUS_DRAFT) { - $labelStatus = $langs->trans('StatusOrderDraft'); - $labelStatusShort = $langs->trans('StatusOrderDraftShort'); - $statusType = 'status0'; - } - elseif ($status == self::STATUS_VALIDATED) { - $labelStatus = $langs->trans('StatusOrderValidated').$billedtext; - $labelStatusShort = $langs->trans('StatusOrderValidatedShort').$billedtext; - $statusType = 'status1'; - } - elseif ($status == self::STATUS_SHIPMENTONPROCESS) { - $labelStatus = $langs->trans('StatusOrderSentShort').$billedtext; - $labelStatusShort = $langs->trans('StatusOrderSentShort').$billedtext; - $statusType = 'status4'; - } - elseif ($status == self::STATUS_CLOSED && (!$billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { - $labelStatus = $langs->trans('StatusOrderToBill'); - $labelStatusShort = $langs->trans('StatusOrderToBillShort'); - $statusType = 'status4'; - } - elseif ($status == self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { - $labelStatus = $langs->trans('StatusOrderProcessed').$billedtext; - $labelStatusShort = $langs->trans('StatusOrderProcessed').$billedtext; - $statusType = 'status6'; - } - elseif ($status == self::STATUS_CLOSED && (!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { - $labelStatus = $langs->trans('StatusOrderDelivered'); - $labelStatusShort = $langs->trans('StatusOrderDelivered'); - $statusType = 'status6'; - } - else { - $labelStatus = $langs->trans('Unknown'); - $labelStatusShort = ''; - $statusType = ''; - $mode = 0; + $labelStatus = $langs->trans('StatusOrderCanceled'); + $labelStatusShort = $langs->trans('StatusOrderCanceledShort'); + $statusType = 'status9'; + } elseif ($status == self::STATUS_DRAFT) { + $labelStatus = $langs->trans('StatusOrderDraft'); + $labelStatusShort = $langs->trans('StatusOrderDraftShort'); + $statusType = 'status0'; + } elseif ($status == self::STATUS_VALIDATED) { + $labelStatus = $langs->trans('StatusOrderValidated').$billedtext; + $labelStatusShort = $langs->trans('StatusOrderValidatedShort').$billedtext; + $statusType = 'status1'; + } elseif ($status == self::STATUS_SHIPMENTONPROCESS) { + $labelStatus = $langs->trans('StatusOrderSentShort').$billedtext; + $labelStatusShort = $langs->trans('StatusOrderSentShort').$billedtext; + $statusType = 'status4'; + } elseif ($status == self::STATUS_CLOSED && (!$billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { + $labelStatus = $langs->trans('StatusOrderToBill'); + $labelStatusShort = $langs->trans('StatusOrderToBillShort'); + $statusType = 'status4'; + } elseif ($status == self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { + $labelStatus = $langs->trans('StatusOrderProcessed').$billedtext; + $labelStatusShort = $langs->trans('StatusOrderProcessed').$billedtext; + $statusType = 'status6'; + } elseif ($status == self::STATUS_CLOSED && (!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { + $labelStatus = $langs->trans('StatusOrderDelivered'); + $labelStatusShort = $langs->trans('StatusOrderDelivered'); + $statusType = 'status6'; + } else { + $labelStatus = $langs->trans('Unknown'); + $labelStatusShort = ''; + $statusType = ''; + $mode = 0; } return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); @@ -3707,7 +3608,7 @@ class Commande extends CommonOrder $label = ''; if ($user->rights->commande->lire) { - $label = ''.$langs->trans("Order").''; + $label = img_picto('', $this->picto).' '.$langs->trans("Order").''; $label .= '
'.$langs->trans('Ref').': '.$this->ref; $label .= '
'.$langs->trans('RefCustomer').': '.($this->ref_customer ? $this->ref_customer : $this->ref_client); if (!empty($this->total_ht)) { @@ -3819,9 +3720,7 @@ class Commande extends CommonOrder } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -3846,6 +3745,8 @@ class Commande extends CommonOrder $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; + $sql .= $this->db->plimit(100); + $resql = $this->db->query($sql); if ($resql) { @@ -3895,9 +3796,7 @@ class Commande extends CommonOrder $line->total_ttc = 60; $line->total_tva = 10; $line->remise_percent = 50; - } - else - { + } else { $line->total_ht = 100; $line->total_ttc = 120; $line->total_tva = 20; @@ -3929,7 +3828,7 @@ class Commande extends CommonOrder */ public function load_state_board() { - // phpcs:enable + // phpcs:enable global $user; $this->nb = array(); @@ -3955,9 +3854,7 @@ class Commande extends CommonOrder } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -3990,6 +3887,7 @@ class Commande extends CommonOrder global $conf, $langs; $langs->load("orders"); + $outputlangs->load("products"); if (!dol_strlen($modele)) { $modele = 'einstein'; @@ -4097,6 +3995,8 @@ class OrderLine extends CommonOrderLine */ public $label; + public $ref_ext; + public $fk_remise_except; public $rang = 0; public $fk_fournprice; @@ -4127,10 +4027,10 @@ class OrderLine extends CommonOrderLine * * @param DoliDB $db handler d'acces base de donnee */ - public function __construct($db) - { - $this->db = $db; - } + public function __construct($db) + { + $this->db = $db; + } /** * Load line order @@ -4141,7 +4041,7 @@ class OrderLine extends CommonOrderLine public function fetch($rowid) { $sql = 'SELECT cd.rowid, cd.fk_commande, cd.fk_parent_line, cd.fk_product, cd.product_type, cd.label as custom_label, cd.description, cd.price, cd.qty, cd.tva_tx, cd.localtax1_tx, cd.localtax2_tx,'; - $sql .= ' cd.remise, cd.remise_percent, cd.fk_remise_except, cd.subprice,'; + $sql .= ' cd.remise, cd.remise_percent, cd.fk_remise_except, cd.subprice, cd.ref_ext,'; $sql .= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_localtax1, cd.total_localtax2, cd.total_ttc, cd.fk_product_fournisseur_price as fk_fournprice, cd.buy_price_ht as pa_ht, cd.rang, cd.special_code,'; $sql .= ' cd.fk_unit,'; $sql .= ' cd.fk_multicurrency, cd.multicurrency_code, cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc,'; @@ -4163,6 +4063,7 @@ class OrderLine extends CommonOrderLine $this->qty = $objp->qty; $this->price = $objp->price; $this->subprice = $objp->subprice; + $this->ref_ext = $objp->ref_ext; $this->vat_src_code = $objp->vat_src_code; $this->tva_tx = $objp->tva_tx; $this->localtax1_tx = $objp->localtax1_tx; @@ -4208,9 +4109,7 @@ class OrderLine extends CommonOrderLine $this->db->free($result); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -4229,32 +4128,32 @@ class OrderLine extends CommonOrderLine $error = 0; - // check if order line is not in a shipment line before deleting - $sqlCheckShipmentLine = "SELECT"; - $sqlCheckShipmentLine .= " ed.rowid"; - $sqlCheckShipmentLine .= " FROM ".MAIN_DB_PREFIX."expeditiondet ed"; - $sqlCheckShipmentLine .= " WHERE ed.fk_origin_line = ".$this->rowid; + // check if order line is not in a shipment line before deleting + $sqlCheckShipmentLine = "SELECT"; + $sqlCheckShipmentLine .= " ed.rowid"; + $sqlCheckShipmentLine .= " FROM ".MAIN_DB_PREFIX."expeditiondet ed"; + $sqlCheckShipmentLine .= " WHERE ed.fk_origin_line = ".$this->rowid; - $resqlCheckShipmentLine = $this->db->query($sqlCheckShipmentLine); - if (!$resqlCheckShipmentLine) { - $error++; - $this->error = $this->db->lasterror(); - $this->errors[] = $this->error; - } else { - $langs->load('errors'); - $num = $this->db->num_rows($resqlCheckShipmentLine); - if ($num > 0) { - $error++; - $objCheckShipmentLine = $this->db->fetch_object($resqlCheckShipmentLine); - $this->error = $langs->trans('ErrorRecordAlreadyExists').' : '.$langs->trans('ShipmentLine').' '.$objCheckShipmentLine->rowid; - $this->errors[] = $this->error; - } - $this->db->free($resqlCheckShipmentLine); - } - if ($error) { - dol_syslog(__METHOD__.'Error ; '.$this->error, LOG_ERR); - return -1; - } + $resqlCheckShipmentLine = $this->db->query($sqlCheckShipmentLine); + if (!$resqlCheckShipmentLine) { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } else { + $langs->load('errors'); + $num = $this->db->num_rows($resqlCheckShipmentLine); + if ($num > 0) { + $error++; + $objCheckShipmentLine = $this->db->fetch_object($resqlCheckShipmentLine); + $this->error = $langs->trans('ErrorRecordAlreadyExists').' : '.$langs->trans('ShipmentLine').' '.$objCheckShipmentLine->rowid; + $this->errors[] = $this->error; + } + $this->db->free($resqlCheckShipmentLine); + } + if ($error) { + dol_syslog(__METHOD__.'Error ; '.$this->error, LOG_ERR); + return -1; + } $this->db->begin(); @@ -4296,9 +4195,7 @@ class OrderLine extends CommonOrderLine } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -4336,6 +4233,7 @@ class OrderLine extends CommonOrderLine if (empty($this->special_code)) $this->special_code = 0; if (empty($this->fk_parent_line)) $this->fk_parent_line = 0; if (empty($this->pa_ht)) $this->pa_ht = 0; + if (empty($this->ref_ext)) $this->ref_ext = ''; // if buy price not defined, define buyprice as configured in margin admin if ($this->pa_ht == 0 && $pa_ht_isemptystring) @@ -4343,9 +4241,7 @@ class OrderLine extends CommonOrderLine if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; - } - else - { + } else { $this->pa_ht = $result; } } @@ -4357,7 +4253,7 @@ class OrderLine extends CommonOrderLine // Insertion dans base de la ligne $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commandedet'; - $sql .= ' (fk_commande, fk_parent_line, label, description, qty, '; + $sql .= ' (fk_commande, fk_parent_line, label, description, qty, ref_ext,'; $sql .= ' vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,'; $sql .= ' fk_product, product_type, remise_percent, subprice, price, remise, fk_remise_except,'; $sql .= ' special_code, rang, fk_product_fournisseur_price, buy_price_ht,'; @@ -4370,6 +4266,7 @@ class OrderLine extends CommonOrderLine $sql .= " ".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; $sql .= " '".$this->db->escape($this->desc)."',"; $sql .= " '".price2num($this->qty)."',"; + $sql .= " '".$this->db->escape($this->ref_ext)."',"; $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; $sql .= " '".price2num($this->tva_tx)."',"; $sql .= " '".price2num($this->localtax1_tx)."',"; @@ -4440,9 +4337,7 @@ class OrderLine extends CommonOrderLine } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; @@ -4482,6 +4377,7 @@ class OrderLine extends CommonOrderLine if (empty($this->product_type)) $this->product_type = 0; if (empty($this->fk_parent_line)) $this->fk_parent_line = 0; if (empty($this->pa_ht)) $this->pa_ht = 0; + if (empty($this->ref_ext)) $this->ref_ext = ''; // if buy price not defined, define buyprice as configured in margin admin if ($this->pa_ht == 0 && $pa_ht_isemptystring) @@ -4489,9 +4385,7 @@ class OrderLine extends CommonOrderLine if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; - } - else - { + } else { $this->pa_ht = $result; } } @@ -4509,6 +4403,7 @@ class OrderLine extends CommonOrderLine $sql .= " , localtax1_type='".$this->db->escape($this->localtax1_type)."'"; $sql .= " , localtax2_type='".$this->db->escape($this->localtax2_type)."'"; $sql .= " , qty=".price2num($this->qty); + $sql .= " , ref_ext='".$this->db->escape($this->ref_ext)."'"; $sql .= " , subprice=".price2num($this->subprice).""; $sql .= " , remise_percent=".price2num($this->remise_percent).""; $sql .= " , price=".price2num($this->price).""; // TODO A virer @@ -4574,9 +4469,7 @@ class OrderLine extends CommonOrderLine } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; @@ -4592,7 +4485,7 @@ class OrderLine extends CommonOrderLine */ public function update_total() { - // phpcs:enable + // phpcs:enable $this->db->begin(); // Clean parameters @@ -4615,9 +4508,7 @@ class OrderLine extends CommonOrderLine { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index cbb93b940de..5af5fb23060 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -78,8 +78,7 @@ class CommandeStats extends Stats $this->field = 'total_ht'; $this->field_line = 'total_ht'; $this->where .= " c.fk_statut > 0"; // Not draft and not cancelled - } - elseif ($mode == 'supplier') + } elseif ($mode == 'supplier') { $object = new CommandeFournisseur($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as c"; diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 6b9e3ae039a..2d11feeeee2 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -63,16 +63,12 @@ if ($action == 'addcontact' && $user->rights->commande->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -84,9 +80,7 @@ elseif ($action == 'swapstatut' && $user->rights->commande->creer) if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne')); - } - else - { + } else { dol_print_error($db); } } @@ -101,8 +95,7 @@ elseif ($action == 'deletecontact' && $user->rights->commande->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { dol_print_error($db); } } @@ -206,9 +199,7 @@ if ($id > 0 || !empty($ref)) $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); if ($res) break; } - } - else - { + } else { // Contact not found print "ErrorRecordNotFound"; } diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 1e445a602f7..f78d6ce2e84 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -184,9 +184,7 @@ if ($resql) print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 9d188cda104..27d38378bcb 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -182,14 +182,10 @@ if ($id > 0 || !empty($ref)) $permtoedit = $user->rights->commande->creer; $param = '&id='.$object->id.'&entity='.(!empty($object->entity) ? $object->entity : $conf->entity); include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; - } - else - { + } else { dol_print_error($db); } -} -else -{ +} else { header('Location: index.php'); exit; } diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 13d67c942ed..96476caeeed 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -173,9 +173,7 @@ if ($resql) //if ($totalinprocess != $total) print ''.$langs->trans("Total").''.$total.''; print "

"; -} -else -{ +} else { dol_print_error($db); } @@ -232,9 +230,7 @@ if (!empty($conf->commande->enabled)) print ''; $i++; } - } - else - { + } else { print ''.$langs->trans("NoOrder").''; } print "

"; @@ -323,8 +319,7 @@ if ($resql) } } print "
"; -} -else dol_print_error($db); +} else dol_print_error($db); $max = 10; @@ -410,8 +405,7 @@ if (!empty($conf->commande->enabled)) } print "
"; - } - else dol_print_error($db); + } else dol_print_error($db); } /* @@ -495,8 +489,7 @@ if (!empty($conf->commande->enabled)) } } print "
"; - } - else dol_print_error($db); + } else dol_print_error($db); } diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index 6de602c22d4..9b45bf66312 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -20,7 +20,7 @@ /** * \file htdocs/commande/info.php * \ingroup commande - * \brief Page des informations d'une commande + * \brief Sale Order info page */ require '../main.inc.php'; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 3b83e04fe3c..898c581407f 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -65,10 +65,10 @@ $search_ref_customer = GETPOST('search_ref_customer', 'alpha'); $search_company = GETPOST('search_company', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); -$search_state = trim(GETPOST("search_state")); +$search_state = GETPOST("search_state", 'alpha'); $search_country = GETPOST("search_country", 'int'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); -$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); +$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $socid = GETPOST('socid', 'int'); $search_user = GETPOST('search_user', 'int'); $search_sale = GETPOST('search_sale', 'int'); @@ -82,9 +82,9 @@ $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'a $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha'); $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); $search_login = GETPOST('search_login', 'alpha'); -$search_categ_cus = trim(GETPOST("search_categ_cus", 'int')); +$search_categ_cus = GETPOST("search_categ_cus", 'int'); $optioncss = GETPOST('optioncss', 'alpha'); -$billed = GETPOST('billed', 'int'); +$search_billed = GETPOSTISSET('search_billed') ? GETPOST('search_billed', 'int') : GETPOST('billed', 'int'); $search_status = GETPOST('search_status', 'int'); $search_btn = GETPOST('button_search', 'alpha'); $search_remove_btn = GETPOST('button_removefilter', 'alpha'); @@ -116,7 +116,7 @@ $hookmanager->initHooks(array('orderlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label('commande'); +$extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -210,6 +210,7 @@ if (empty($reshook)) $search_total_ht = ''; $search_total_vat = ''; $search_total_ttc = ''; + $search_warehouse = ''; $search_multicurrency_code = ''; $search_multicurrency_tx = ''; $search_multicurrency_montant_ht = ''; @@ -223,7 +224,7 @@ if (empty($reshook)) $search_project_ref = ''; $search_project = ''; $search_status = ''; - $billed = ''; + $search_billed = ''; $toselect = ''; $search_array_options = array(); $search_categ_cus = 0; @@ -308,7 +309,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc if ($search_ref) $sql .= natural_search('c.ref', $search_ref); if ($search_ref_customer) $sql .= natural_search('c.ref_client', $search_ref_customer); if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); -if ($billed != '' && $billed >= 0) $sql .= ' AND c.facture = '.$billed; +if ($search_billed != '' && $search_billed >= 0) $sql .= ' AND c.facture = '.$search_billed; if ($search_status <> '') { if ($search_status < 4 && $search_status > -3) @@ -395,9 +396,7 @@ if ($resql) $soc->fetch($socid); $title = $langs->trans('ListOfOrders').' - '.$soc->name; if (empty($search_company)) $search_company = $soc->name; - } - else - { + } else { $title = $langs->trans('ListOfOrders'); } if (strval($search_status) == '0') @@ -467,7 +466,7 @@ if ($resql) if ($search_categ_cus > 0) $param .= '&search_categ_cus='.urlencode($search_categ_cus); if ($show_files) $param .= '&show_files='.urlencode($show_files); if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - if ($billed != '') $param .= '&billed='.urlencode($billed); + if ($search_billed != '') $param .= '&search_billed='.urlencode($search_billed); // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -541,9 +540,7 @@ if ($resql) { print $form->selectyesno('validate_invoices', 0, 1, 1); print ' ('.$langs->trans("AutoValidationNotPossibleWhenStockIsDecreasedOnInvoiceValidation").')'; - } - else - { + } else { print $form->selectyesno('validate_invoices', 0, 1); } if (!empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER)) print '     '.$langs->trans("IfValidateInvoiceIsNoOrderStayUnbilled").''; @@ -758,7 +755,7 @@ if ($resql) } if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) { - // Amount + // Amount VAT print ''; print ''; print ''; @@ -820,7 +817,7 @@ if ($resql) if (!empty($arrayfields['c.facture']['checked'])) { print ''; - print $form->selectyesno('billed', $billed, 1, 0, 1); + print $form->selectyesno('search_billed', $search_billed, 1, 0, 1); print ''; } // Action column @@ -962,8 +959,7 @@ if ($resql) { $notshippable++; } - } - else { // Detailed code, looks bugged + } else { // Detailed code, looks bugged // stock order and stock order_supplier $stock_order = 0; $stock_order_supplier = 0; @@ -1129,7 +1125,7 @@ if ($resql) if (!empty($arrayfields['typent.code']['checked'])) { print ''; - if (count($typenArray) == 0) $typenArray = $formcompany->typent_array(1); + if (empty($typenArray)) $typenArray = $formcompany->typent_array(1); print $typenArray[$obj->typent_code]; print ''; if (!$i) $totalarray['nbfield']++; @@ -1147,7 +1143,7 @@ if ($resql) if (!empty($arrayfields['c.date_delivery']['checked'])) { print ''; - print dol_print_date($db->jdate($obj->date_delivery), 'day'); + print dol_print_date($db->jdate($obj->date_delivery), 'dayhour'); print ''; if (!$i) $totalarray['nbfield']++; } @@ -1310,9 +1306,7 @@ if ($resql) $delallowed = $user->rights->commande->creer; print $formfile->showdocuments('massfilesarea_orders', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index f230f7935a5..7b8e31ce7a4 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -83,9 +83,7 @@ if ($action == 'create') { $error++; setEventMessages($langs->trans('Error_OrderNotChecked'), null, 'errors'); - } - else - { + } else { $origin = GETPOST('origin'); $originid = GETPOST('originid'); } @@ -169,7 +167,7 @@ if (($action == 'create' || $action == 'add') && !$error) $object->note_public = trim($_POST['note_public']); $object->note = trim($_POST['note']); $object->ref_client = $_POST['ref_client']; - $object->modelpdf = $_POST['model']; + $object->model_pdf = $_POST['model']; $object->fk_project = $_POST['projectid']; $object->cond_reglement_id = ($_POST['type'] == 3 ? 1 : $_POST['cond_reglement_id']); $object->mode_reglement_id = $_POST['mode_reglement_id']; @@ -209,9 +207,7 @@ if (($action == 'create' || $action == 'add') && !$error) if ($db->query($sql)) { $db->commit(); - } - else - { + } else { $db->rollback(); } } @@ -256,16 +252,12 @@ if (($action == 'create' || $action == 'add') && !$error) { $result = $object->insert_discount($discountid); //$result=$discount->link_to_invoice($lineid,$id); - } - else - { + } else { setEventMessages($discount->error, $discount->errors, 'errors'); $error++; break; } - } - else - { + } else { // Positive line $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); // Date start @@ -320,9 +312,7 @@ if (($action == 'create' || $action == 'add') && !$error) if ($result > 0) { $lineid = $result; - } - else - { + } else { $lineid = 0; $error++; break; @@ -334,17 +324,13 @@ if (($action == 'create' || $action == 'add') && !$error) } } } - } - else - { + } else { setEventMessages($objectsrc->error, $objectsrc->errors, 'errors'); $error++; } $ii++; } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $error++; } @@ -358,9 +344,7 @@ if (($action == 'create' || $action == 'add') && !$error) $db->commit(); header('Location: '.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$id); exit; - } - else - { + } else { $db->rollback(); $action = 'create'; $_GET["origin"] = $_POST["origin"]; @@ -729,9 +713,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) print ''; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 4e7ed481882..0910e4ee7ad 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -114,9 +114,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filenamenb = $dir.'/ordersnbinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersnbinyear-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filenamenb = $dir.'/ordersnbinyear-'.$year.'.png'; if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$year.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersnbinyear-'.$year.'.png'; @@ -157,9 +155,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filenameamount = $dir.'/ordersamountinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamountinyear-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filenameamount = $dir.'/ordersamountinyear-'.$year.'.png'; if ($mode == 'customer') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$year.'.png'; if ($mode == 'supplier') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamountinyear-'.$year.'.png'; @@ -198,9 +194,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filename_avg = $dir.'/ordersaverage-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$year.'.png'; @@ -381,8 +375,7 @@ print '
'; // Show graphs print ''; - } - else - { + } else { // Sort array by date ASC to calculate balance $totalET_debit = 0; diff --git a/htdocs/compta/ajaxpayment.php b/htdocs/compta/ajaxpayment.php index f380d8b4ee5..0129d1e5f43 100644 --- a/htdocs/compta/ajaxpayment.php +++ b/htdocs/compta/ajaxpayment.php @@ -81,13 +81,11 @@ if ($currentInvId) // Here to breakdown $remainAmount = $currentRemain - $currentAmount; // To keep value between curRemain and curAmount $result += $remainAmount; // result must be deduced by $currentAmount += $remainAmount; // curAmount put to curRemain - } else - { + } else { $currentAmount = $currentRemain; $result += $currentRemain; } - } else - { + } else { // Reset the substraction for this amount $result += price2num($currentAmount); $currentAmount = 0; diff --git a/htdocs/compta/bank/account_statement_document.php b/htdocs/compta/bank/account_statement_document.php index 05f89e1bc6f..1e9c6e3b358 100644 --- a/htdocs/compta/bank/account_statement_document.php +++ b/htdocs/compta/bank/account_statement_document.php @@ -40,13 +40,7 @@ $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); -$num = (GETPOST('num', 'alpha') ? GETPOST('num', 'alpha') : GETPOST('sectionid', 'alpha')); - -$mesg = ''; -if (isset($_SESSION['DolMessage'])) { - $mesg = $_SESSION['DolMessage']; - unset($_SESSION['DolMessage']); -} +$numref = (GETPOST('num', 'alpha') ? GETPOST('num', 'alpha') : GETPOST('sectionid', 'alpha')); // Security check if ($user->socid) { @@ -71,21 +65,74 @@ if (!$sortfield) $sortfield = "name"; $object = new Account($db); -if ($id > 0 || !empty($ref)) $object->fetch($id, $ref); +if ($id > 0 || !empty($ref)) +{ + $result = $object->fetch($id, $ref); + $account = $object->id; // Force the search field on id of account +} $result = restrictedArea($user, 'banque', $object->id, 'bank_account', '', ''); +// Define number of receipt to show (current, previous or next one ?) +$found = false; +if ($_GET["rel"] == 'prev') +{ + // Recherche valeur pour num = numero releve precedent + $sql = "SELECT DISTINCT(b.num_releve) as num"; + $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; + $sql .= " WHERE b.num_releve < '".$db->escape($numref)."'"; + $sql .= " AND b.fk_account = ".$id; + $sql .= " ORDER BY b.num_releve DESC"; + + dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) + { + $numrows = $db->num_rows($resql); + if ($numrows > 0) + { + $obj = $db->fetch_object($resql); + $numref = $obj->num; + $found = true; + } + } +} elseif ($_GET["rel"] == 'next') +{ + // Recherche valeur pour num = numero releve precedent + $sql = "SELECT DISTINCT(b.num_releve) as num"; + $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; + $sql .= " WHERE b.num_releve > '".$db->escape($numref)."'"; + $sql .= " AND b.fk_account = ".$id; + $sql .= " ORDER BY b.num_releve ASC"; + + dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) + { + $numrows = $db->num_rows($resql); + if ($numrows > 0) + { + $obj = $db->fetch_object($resql); + $numref = $obj->num; + $found = true; + } + } +} else { + // On veut le releve num + $found = true; +} + /* * Actions */ -if (!empty($num)) +if (!empty($numref)) { $object->fetch_thirdparty(); - $upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($num); + $upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($numref); } -$backtopage = $_SERVER['PHP_SELF']."?account=".$id."&num=".$num; +$backtopage = $_SERVER['PHP_SELF']."?account=".$id."&num=".$numref; include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; @@ -101,10 +148,10 @@ llxHeader('', $title, $helpurl); if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref)) { - $upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($num); + $upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($numref); // Onglets - $head = account_statement_prepare_head($object, $num); + $head = account_statement_prepare_head($object, $numref); dol_fiche_head($head, 'document', $langs->trans("AccountStatement"), -1, 'account'); @@ -115,8 +162,15 @@ if ($id > 0 || !empty($ref)) { $totalsize += $file['size']; } - $title = $langs->trans("AccountStatement").' '.$num.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts'); - print load_fiche_titre($title, '', ''); + $morehtmlright = ''; + $morehtmlright .= ''; + + $title = $langs->trans("AccountStatement").' '.$numref.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts'); + print load_fiche_titre($title, $morehtmlright, ''); print '
'; print '
'; @@ -134,16 +188,14 @@ if ($id > 0 || !empty($ref)) { $modulepart = 'bank'; $permission = $user->rights->banque->modifier; $permtoedit = $user->rights->banque->modifier; - $param = '&id='.$object->id.'&num='.urlencode($num); - $moreparam = '&num='.urlencode($num); ; - $relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($num)."/"; + $param = '&id='.$object->id.'&num='.urlencode($numref); + $moreparam = '&num='.urlencode($numref); ; + $relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($numref)."/"; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; - } - else { + } else { dol_print_error($db); } -} -else { +} else { Header('Location: index.php'); exit; } diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 1f6e5e6620c..72a7e33d3f2 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -50,9 +50,7 @@ if (!$year_start) { $year_start = $year_current - 2; $year_end = $year_current; -} -else -{ +} else { $year_end = $year_start + 2; } @@ -107,9 +105,7 @@ if ($resql) $encaiss[$row[1]] = $row[0]; $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -135,9 +131,7 @@ if ($resql) $decaiss[$row[1]] = -$row[0]; $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -157,9 +151,7 @@ if (!empty($id)) if (!preg_match('/,/', $id)) { dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); - } - else - { + } else { $bankaccount = new Account($db); $listid = explode(',', $id); foreach ($listid as $key => $aId) @@ -170,9 +162,7 @@ if (!empty($id)) if ($key < (count($listid) - 1)) print ', '; } } -} -else -{ +} else { print $langs->trans("AllAccounts"); } @@ -257,8 +247,7 @@ if ($resql) { $obj = $db->fetch_object($resql); if ($obj) $balance = $obj->total; -} -else { +} else { dol_print_error($db); } @@ -280,9 +269,7 @@ if ($result < 0) $langs->load("errors"); $error++; setEventMessages($langs->trans("ErrorFailedToCreateDir"), null, 'errors'); -} -else -{ +} else { // Calcul de $min et $max $sql = "SELECT MIN(b.datev) as min, MAX(b.datev) as max"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; @@ -298,9 +285,7 @@ else $obj = $db->fetch_object($resql); $min = $db->jdate($obj->min); $max = $db->jdate($obj->max); - } - else - { + } else { dol_print_error($db); } $log = "graph.php: min=".$min." max=".$max; @@ -338,9 +323,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -425,9 +408,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 7d059734126..fb4c2150495 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -68,9 +68,7 @@ if ($fielvalue) { if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account&bank_account', '', '', $fieldtype); -} -else -{ +} else { if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'banque'); } @@ -219,7 +217,7 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', ' $error = 0; // Definition, nettoyage parametres - $num_releve = trim(GETPOST("num_releve", "alpha")); + $num_releve = GETPOST("num_releve", "alpha"); if ($num_releve) { @@ -241,16 +239,12 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', ' } } } - } - else - { + } else { $error++; $langs->load("errors"); setEventMessages($langs->trans("NoRecordSelected"), null, 'errors'); } - } - else - { + } else { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorPleaseTypeBankTransactionReportName"), null, 'errors'); @@ -286,9 +280,7 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier) if (price2num($_POST["addcredit"]) > 0) { $amount = price2num($_POST["addcredit"]); - } - else - { + } else { $amount = - price2num($_POST["adddebit"]); } @@ -337,14 +329,10 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier) setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF'].($id ? "?id=".$id : '')); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $action = 'addline'; } } @@ -468,9 +456,7 @@ if ($id > 0 || !empty($ref)) } } } -} -else -{ +} else { llxHeader('', $langs->trans("BankTransactions"), '', '', 0, 0, array(), array(), $param); } @@ -674,9 +660,7 @@ if ($resql) if ($numr >= $nbmax) $liste = "...   ".$liste; print $liste; if ($numr <= 0) print ''.$langs->trans("None").''; - } - else - { + } else { dol_print_error($db); } @@ -792,14 +776,11 @@ if ($resql) if (empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments { $newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)), '', $user->rights->banque->modifier); - } - else // If direct entries is not done using miscellaneous payments + } else // If direct entries is not done using miscellaneous payments { $newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', $user->rights->banque->modifier); } - } - else - { + } else { $newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', -1); } } @@ -1039,15 +1020,12 @@ if ($resql) if ($sortfield == 'b.datev,b.dateo,b.rowid' && $sortorder == 'desc,desc,desc') { $balancebefore = $objforbalance->previoustotal + ($sign * $objp->amount); - } - // If sort is asc,asc,asc then total of previous date is balance of line before the next line to show - else - { + } // If sort is asc,asc,asc then total of previous date is balance of line before the next line to show + else { $balance = $objforbalance->previoustotal; } } - } - else dol_print_error($db); + } else dol_print_error($db); $balancecalculated = true; @@ -1128,9 +1106,7 @@ if ($resql) { $balance = price2num($balancebefore, 'MT'); // balance = balancebefore of previous line (sort is desc) $balancebefore = price2num($balancebefore - ($sign * $objp->amount), 'MT'); - } - else - { + } else { $balancebefore = price2num($balance, 'MT'); // balancebefore = balance of previous line (sort is asc) $balance = price2num($balance + ($sign * $objp->amount), 'MT'); } @@ -1141,9 +1117,7 @@ if ($resql) $bankaccounttmp->fetch($objp->bankid); $cachebankaccount[$objp->bankid] = $bankaccounttmp; $bankaccount = $bankaccounttmp; - } - else - { + } else { $bankaccount = $cachebankaccount[$objp->bankid]; } @@ -1207,63 +1181,53 @@ if ($resql) $banktransferstatic->id = $links[$key]['url_id']; $banktransferstatic->ref = $links[$key]['label']; print ' '.$banktransferstatic->getNomUrl(0); - } - elseif ($links[$key]['type'] == 'payment') + } elseif ($links[$key]['type'] == 'payment') { $paymentstatic->id = $links[$key]['url_id']; $paymentstatic->ref = $links[$key]['url_id']; // FIXME This is id, not ref of payment print ' '.$paymentstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'payment_supplier') + } elseif ($links[$key]['type'] == 'payment_supplier') { $paymentsupplierstatic->id = $links[$key]['url_id']; $paymentsupplierstatic->ref = $links[$key]['url_id']; // FIXME This is id, not ref of payment print ' '.$paymentsupplierstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'payment_sc') + } elseif ($links[$key]['type'] == 'payment_sc') { print ''; print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; //print $langs->trans("SocialContributionPayment"); print ''; - } - elseif ($links[$key]['type'] == 'payment_vat') + } elseif ($links[$key]['type'] == 'payment_vat') { $paymentvatstatic->id = $links[$key]['url_id']; $paymentvatstatic->ref = $links[$key]['url_id']; print ' '.$paymentvatstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'payment_salary') + } elseif ($links[$key]['type'] == 'payment_salary') { $paymentsalstatic->id = $links[$key]['url_id']; $paymentsalstatic->ref = $links[$key]['url_id']; print ' '.$paymentsalstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'payment_loan') + } elseif ($links[$key]['type'] == 'payment_loan') { print ''; print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; print ''; - } - elseif ($links[$key]['type'] == 'payment_donation') + } elseif ($links[$key]['type'] == 'payment_donation') { print ''; print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; print ''; - } - elseif ($links[$key]['type'] == 'payment_expensereport') + } elseif ($links[$key]['type'] == 'payment_expensereport') { $paymentexpensereportstatic->id = $links[$key]['url_id']; $paymentexpensereportstatic->ref = $links[$key]['url_id']; print ' '.$paymentexpensereportstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'payment_various') + } elseif ($links[$key]['type'] == 'payment_various') { $paymentvariousstatic->id = $links[$key]['url_id']; $paymentvariousstatic->ref = $links[$key]['url_id']; print ' '.$paymentvariousstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'banktransfert') + } elseif ($links[$key]['type'] == 'banktransfert') { // Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail. if ($objp->amount > 0) @@ -1278,9 +1242,7 @@ if ($resql) $bankstatic->label = $objp->bankref; print $bankstatic->getNomUrl(1, ''); print ')'; - } - else - { + } else { $bankstatic->id = $objp->bankid; $bankstatic->label = $objp->bankref; print ' ('.$langs->trans("TransferFrom").' '; @@ -1293,21 +1255,15 @@ if ($resql) print ')'; } //var_dump($links); - } - elseif ($links[$key]['type'] == 'company') + } elseif ($links[$key]['type'] == 'company') { - } - elseif ($links[$key]['type'] == 'user') + } elseif ($links[$key]['type'] == 'user') { - } - elseif ($links[$key]['type'] == 'member') + } elseif ($links[$key]['type'] == 'member') { - } - elseif ($links[$key]['type'] == 'sc') - { - } - else + } elseif ($links[$key]['type'] == 'sc') { + } else { // Show link with label $links[$key]['label'] if (!empty($objp->label) && !empty($links[$key]['label'])) print ' - '; print ''; @@ -1316,9 +1272,7 @@ if ($resql) // Label generique car entre parentheses. On l'affiche en le traduisant if ($reg[1] == 'paiement') $reg[1] = 'Payment'; print ' '.$langs->trans($reg[1]); - } - else - { + } else { print ' '.$links[$key]['label']; } print ''; @@ -1395,9 +1349,7 @@ if ($resql) $companystatic->code_compta = $objp->code_compta; $companystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; print $companystatic->getNomUrl(1); - } - else - { + } else { print ' '; } print ''; @@ -1449,14 +1401,10 @@ if ($resql) if ($balancebefore >= 0) { print '
'; - } - else - { + } else { print ''; } - } - else - { + } else { print ''; } if (!$i) $totalarray['nbfield']++; @@ -1469,14 +1417,10 @@ if ($resql) if ($balance >= 0) { print ''; - } - else - { + } else { print ''; } - } - else - { + } else { print ''; } if (!$i) $totalarray['nbfield']++; @@ -1522,17 +1466,13 @@ if ($resql) print ''; print img_edit(); print ''; - } - else - { + } else { if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print ''; print img_edit(); print ''; - } - else - { + } else { print ''; print img_view(); print ''; @@ -1582,16 +1522,14 @@ if ($resql) { if ($num < $limit && empty($offset)) print ''; else print ''; - } - elseif ($totalarray['totaldebfield'] == $i) print ''; + } elseif ($totalarray['totaldebfield'] == $i) print ''; elseif ($totalarray['totalcredfield'] == $i) print ''; elseif ($i == $posconciliatecol) { print ''; - } - else print ''; + } else print ''; } print ''; } @@ -1609,9 +1547,7 @@ if ($resql) print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 042117808d5..8559096477d 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -89,9 +89,7 @@ if ($result) print ''; print ''; print ''; -} -else -{ +} else { dol_print_error($db); } print "
'; -if ($mesg) { print $mesg; } -else { +if ($mesg) { print $mesg; } else { print $px1->show(); print "
\n"; print $px2->show(); diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index faf2feeb7a0..0c20e46e316 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -334,9 +334,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $nofile['sens'] = $objd->sens; $filesarray[$nofile['item'].'_'.$nofile['id']] = $nofile; - } - else - { + } else { foreach ($files as $key => $file) { $file['id'] = $objd->id; @@ -383,15 +381,12 @@ if (($action == 'searchfiles' || $action == 'dl')) { $i++; } - } - else - { + } else { dol_print_error($db); } $db->free($resd); - } - else { + } else { setEventMessages($langs->trans("ErrorSelectAtLeastOne"), null, 'errors'); $error++; } @@ -491,9 +486,7 @@ if ($result && $action == "dl" && !$error) dol_delete_file($zipname); exit(); - } - else - { + } else { setEventMessages($langs->trans("FailedToOpenFile", $zipname), null, 'errors'); } } @@ -625,9 +618,7 @@ if (!empty($date_start) && !empty($date_stop)) if (empty($TData)) { print '
'.$langs->trans("NoItem").'
 '.price($balancebefore).' '.price($balancebefore).'- '.price($balance).' '.price($balance).'-'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price(-1 * $totalarray['totaldeb']).''.price(-1 * $totalarray['totaldeb']).''.price($totalarray['totalcred']).''; if ($user->rights->banque->consolidate && $action == 'reconcile') print ''; print '
'.$langs->trans("Total").''.price($total).''.price($totalnb ?price2num($total / $totalnb, 'MT') : 0).'
"; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 593893878e0..c99f303210b 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -99,9 +99,7 @@ if ($action == 'add') if (empty($account_number) || $account_number == '-1') { $object->account_number = ''; - } - else - { + } else { $object->account_number = $account_number; } $fk_accountancy_journal = GETPOST('fk_accountancy_journal', 'int'); @@ -155,8 +153,7 @@ if ($action == 'add') $_GET["id"] = $id; // Force chargement page en mode visu $action = ''; - } - else { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); @@ -167,9 +164,7 @@ if ($action == 'add') if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } } @@ -205,9 +200,7 @@ if ($action == 'update') if (empty($account_number) || $account_number == '-1') { $object->account_number = ''; - } - else - { + } else { $object->account_number = $account_number; } $fk_accountancy_journal = GETPOST('fk_accountancy_journal', 'int'); @@ -259,9 +252,7 @@ if ($action == 'update') $object->setCategories($categories); $_GET["id"] = $_POST["id"]; // Force chargement page en mode visu - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); $action = 'edit'; // Force chargement page edition @@ -271,9 +262,7 @@ if ($action == 'update') if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } } @@ -290,9 +279,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights-> setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); header("Location: ".DOL_URL_ROOT."/compta/bank/list.php"); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } @@ -383,8 +370,7 @@ if ($action == 'create') if (isset($_POST["account_country_id"])) { $selectedcode = $_POST["account_country_id"] ? $_POST["account_country_id"] : $object->country_code; - } - elseif (empty($selectedcode)) $selectedcode = $mysoc->country_code; + } elseif (empty($selectedcode)) $selectedcode = $mysoc->country_code; $object->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules print ''.$langs->trans("BankAccountCountry").''; @@ -398,9 +384,7 @@ if ($action == 'create') if ($selectedcode) { $formcompany->select_departement(isset($_POST["account_state_id"]) ? $_POST["account_state_id"] : '', $selectedcode, 'account_state_id'); - } - else - { + } else { print $countrynotdefined; } print ''; @@ -544,9 +528,7 @@ if ($action == 'create') print ''; print $formaccounting->select_account($object->account_number, 'account_number', 1, '', 1, 1); print ''; - } - else - { + } else { print ''.$langs->trans("AccountancyCode").''; print 'account_number).'">'; } @@ -571,16 +553,14 @@ if ($action == 'create') print '
'; print ''; -} -/* ************************************************************************** */ -/* */ -/* Visu et edition */ -/* */ -/* ************************************************************************** */ -else -{ - if (($_GET["id"] || $_GET["ref"]) && $action != 'edit') - { +} else { + /* ************************************************************************** */ + /* */ + /* Visu et edition */ + /* */ + /* ************************************************************************** */ + + if (($_GET["id"] || $_GET["ref"]) && $action != 'edit') { $object = new Account($db); if ($_GET["id"]) { @@ -886,9 +866,7 @@ else if ($selectedcode) { print $formcompany->select_state(isset($_POST["account_state_id"]) ? $_POST["account_state_id"] : $object->state_id, $selectedcode, 'account_state_id'); - } - else - { + } else { print $countrynotdefined; } print ''; diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index 308dad5dbca..0f71134d08a 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -132,9 +132,7 @@ if ($result) print ''; print ''; print ""; - } - else - { + } else { print "".$objp->label.""; print ''; print ''.img_edit().''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 3fcbffba3b2..fcbedc2f140 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -333,7 +333,6 @@ class Account extends CommonObject public function __toString() { $string = ''; - foreach ($this->getFieldsToShow() as $val) { if ($val == 'BankCode') { $string .= $this->code_banque.' '; @@ -343,9 +342,9 @@ class Account extends CommonObject $string .= $this->code_guichet.' '; } elseif ($val == 'BankAccountNumberKey') { $string .= $this->cle_rib.' '; - }elseif ($val == 'BIC') { + } elseif ($val == 'BIC') { $string .= $this->bic.' '; - }elseif ($val == 'IBAN') { + } elseif ($val == 'IBAN') { $string .= $this->iban.' '; } } @@ -403,9 +402,7 @@ class Account extends CommonObject { $rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."bank_url"); return $rowid; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -437,8 +434,7 @@ class Account extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."bank_url"; if ($fk_bank > 0) { $sql .= " WHERE fk_bank = ".$fk_bank; - } - else { $sql .= " WHERE url_id = ".$url_id." AND type = '".$type."'"; + } else { $sql .= " WHERE url_id = ".$url_id." AND type = '".$type."'"; } $sql .= " ORDER BY type, label"; @@ -464,8 +460,7 @@ class Account extends CommonObject $lines[$i]['fk_bank'] = $obj->fk_bank; $i++; } - } - else dol_print_error($this->db); + } else dol_print_error($this->db); return $lines; } @@ -474,10 +469,10 @@ class Account extends CommonObject * Add an entry into table ".MAIN_DB_PREFIX."bank * * @param int $date Date operation - * @param string $oper 1,2,3,4... (deprecated) or 'TYP','VIR','PRE','LIQ','VAD','CB','CHQ'... + * @param string $oper 'VIR','PRE','LIQ','VAD','CB','CHQ'... * @param string $label Descripton * @param float $amount Amount - * @param string $num_chq Numero cheque ou virement + * @param string $num_chq Numero cheque or transfer * @param int $categorie Category id (optionnal) * @param User $user User that create * @param string $emetteur Name of cheque writer @@ -509,9 +504,7 @@ class Account extends CommonObject { $obj = $this->db->fetch_object($resql); $oper = $obj->code; - } - else - { + } else { dol_print_error($this->db, 'Failed to get payment type code'); return -1; } @@ -573,15 +566,18 @@ class Account extends CommonObject if (!$result) { $this->error = $this->db->lasterror(); $this->db->rollback(); + return -3; } } $this->db->commit(); + return $accline->id; } else { $this->error = $this->db->lasterror(); $this->db->rollback(); + return -2; } } @@ -720,20 +716,15 @@ class Account extends CommonObject if ($result < 0) $error++; // End call triggers } - } - else - { + } else { $error++; } - } - else - { + } else { if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error = $langs->trans("ErrorBankLabelAlreadyExists"); $error++; - } - else { + } else { $this->error = $this->db->error()." sql=".$sql; $error++; } @@ -743,9 +734,7 @@ class Account extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1 * $error; } @@ -836,9 +825,7 @@ class Account extends CommonObject if ($result < 0) $error++; // End call triggers } - } - else - { + } else { $error++; $this->error = $this->db->lasterror(); dol_print_error($this->db); @@ -848,9 +835,7 @@ class Account extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1 * $error; } @@ -907,9 +892,7 @@ class Account extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_print_error($this->db); return -1; @@ -1006,14 +989,10 @@ class Account extends CommonObject $this->fetch_optionals(); return 1; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = $this->db->lasterror; $this->errors[] = $this->error; return -1; @@ -1113,9 +1092,7 @@ class Account extends CommonObject dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); } } - } - else - { + } else { $error++; $this->error = "Error ".$this->db->lasterror(); } @@ -1125,9 +1102,7 @@ class Account extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1192,8 +1167,7 @@ class Account extends CommonObject if ($resql) { $obj = $this->db->fetch_object($resql); if ($obj->nb <= 1) $can_be_deleted = true; // Juste le solde - } - else { + } else { dol_print_error($this->db); } return $can_be_deleted; @@ -1291,9 +1265,7 @@ class Account extends CommonObject } return $response; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -1330,9 +1302,7 @@ class Account extends CommonObject $this->nb["banklines"] = $obj->nb; } $this->db->free($resql); - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -1366,8 +1336,7 @@ class Account extends CommonObject { $obj = $db->fetch_object($resql); $nb = $obj->nb; - } - else dol_print_error($db); + } else dol_print_error($db); return $nb; } @@ -1387,9 +1356,11 @@ class Account extends CommonObject global $conf, $langs, $user; $result = ''; - $label = ''.$langs->trans("BankAccount").''; + $label = img_picto('', $this->picto).' '.$langs->trans("BankAccount").''; $label .= '
'.$langs->trans('Label').': '.$this->label; $label .= '
'.$langs->trans('AccountNumber').': '.$this->number; + $label .= '
'.$langs->trans('IBAN').': '.$this->iban; + $label .= '
'.$langs->trans('BIC').': '.$this->bic; $label .= '
'.$langs->trans("AccountCurrency").': '.$this->currency_code; if (empty($user->rights->banque->lire) || !empty($user->socid)) @@ -1414,8 +1385,7 @@ class Account extends CommonObject if ($mode == 'transactions') { $url = DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$this->id; - } - elseif ($mode == 'receipts') + } elseif ($mode == 'receipts') { $url = DOL_URL_ROOT.'/compta/bank/releve.php?account='.$this->id; } @@ -1475,9 +1445,7 @@ class Account extends CommonObject if ($this->error_number == 0) { return 1; - } - else - { + } else { return 0; } } @@ -1810,11 +1778,13 @@ class AccountLine extends CommonObject */ public $fk_account; - public $bank_account_label; // Label of bank account + /** + * @var string Label of bank account + */ + public $bank_account_label; /** - * Issuer - * @var Societe + * @var string Name of check issuer */ public $emetteur; @@ -1896,9 +1866,7 @@ class AccountLine extends CommonObject } $this->db->free($result); return $ret; - } - else - { + } else { return -1; } } @@ -1985,8 +1953,7 @@ class AccountLine extends CommonObject $this->db->rollback(); return -1; } - } - else { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -2014,9 +1981,7 @@ class AccountLine extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -$nbko; } @@ -2053,9 +2018,7 @@ class AccountLine extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -$nbko; } @@ -2085,9 +2048,7 @@ class AccountLine extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->error(); return -1; @@ -2151,9 +2112,7 @@ class AccountLine extends CommonObject $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -2189,14 +2148,11 @@ class AccountLine extends CommonObject { return 1; } - } - else - { + } else { dol_print_error($this->db); return 0; } - } - else dol_print_error($this->db); + } else dol_print_error($this->db); return 0; } @@ -2256,14 +2212,11 @@ class AccountLine extends CommonObject { return 1; } - } - else - { + } else { dol_print_error($this->db); return 0; } - } - else dol_print_error($this->db); + } else dol_print_error($this->db); return 0; } @@ -2333,9 +2286,7 @@ class AccountLine extends CommonObject //$this->date_rappro = $obj->daterappro; // Not yet managed } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -2476,9 +2427,7 @@ class AccountLine extends CommonObject { $alreadydispatched = $obj->nb; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } diff --git a/htdocs/compta/bank/class/api_bankaccounts.class.php b/htdocs/compta/bank/class/api_bankaccounts.class.php index ad75559b362..3293f746033 100644 --- a/htdocs/compta/bank/class/api_bankaccounts.class.php +++ b/htdocs/compta/bank/class/api_bankaccounts.class.php @@ -225,9 +225,7 @@ class BankAccounts extends DolibarrApi if ($accountto->currency_code == $accountfrom->currency_code) { $amount_to = $amount; - } - else - { + } else { if (!$amount_to || empty($amount_to)) { throw new RestException(422, 'You must provide amount_to value since bankaccount_from and bankaccount_to does not share the same currency.'); @@ -303,9 +301,7 @@ class BankAccounts extends DolibarrApi 'message' => 'Internal wire transfer created successfully.' ) ); - } - else - { + } else { $this->db->rollback(); throw new RestException(500, $accountfrom->error.' '.$accountto->error); } @@ -338,9 +334,7 @@ class BankAccounts extends DolibarrApi if ($account->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(500, $account->error); } } diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 6af394ad4b4..bfb522b6e3a 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -95,6 +95,37 @@ class PaymentVarious extends CommonObject public $fk_user_modif; + /** + * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') + * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" + * 'label' the translation key. + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM) + * 'position' is the sort order of field. + * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). + * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'noteditable' says if field is not editable (1 or 0) + * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * 'index' if we want an index in database. + * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...). + * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. + * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8). + * 'css' is the CSS style to use on field. For example: 'maxwidth200' + * 'help' is a string visible as a tooltip on field + * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record + * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. + * 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel") + * 'autofocusoncreate' to have field having the focus on a create form. Only 1 field should have this property set to 1. + * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * + * Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor. + */ + + // BEGIN MODULEBUILDER PROPERTIES + public $fields = array( + // TODO: fill this array + ); + // END MODULEBUILDER PROPERTIES + /** * Constructor * @@ -169,9 +200,7 @@ class PaymentVarious extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -244,9 +273,7 @@ class PaymentVarious extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -422,7 +449,11 @@ class PaymentVarious extends CommonObject $sign * abs($this->amount), $this->num_payment, ($this->category_transaction > 0 ? $this->category_transaction : 0), - $user + $user, + '', + '', + '', + $this->datev ); // Update fk_bank into llx_paiement. @@ -430,9 +461,7 @@ class PaymentVarious extends CommonObject if ($bank_line_id > 0) { $this->update_fk_bank($bank_line_id); - } - else - { + } else { $this->error = $acc->error; $error++; } @@ -461,22 +490,17 @@ class PaymentVarious extends CommonObject $result = $this->call_trigger('PAYMENT_VARIOUS_CREATE', $user); if ($result < 0) $error++; // End call triggers - } - else $error++; + } else $error++; if (!$error) { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -499,9 +523,7 @@ class PaymentVarious extends CommonObject if ($result) { return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -535,30 +557,25 @@ class PaymentVarious extends CommonObject if ($mode == 0) { return $langs->trans($this->statuts[$status]); - } - elseif ($mode == 1) + } elseif ($mode == 1) { return $langs->trans($this->statuts_short[$status]); - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]); elseif ($status == 1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); elseif ($status == 2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); elseif ($status == 2 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); - } - elseif ($mode == 4) + } elseif ($mode == 4) { if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); elseif ($status == 2 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); - } - elseif ($mode == 5) + } elseif ($mode == 5) { if ($status == 0 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); elseif ($status == 1 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); @@ -616,8 +633,7 @@ class PaymentVarious extends CommonObject $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $linkclose = $hookmanager->resPrint; */ - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -676,9 +692,7 @@ class PaymentVarious extends CommonObject $this->date_modif = $this->db->jdate($obj->tms); } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -705,9 +719,7 @@ class PaymentVarious extends CommonObject { $alreadydispatched = $obj->nb; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index d003463e5af..e3863cd2922 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -39,12 +39,6 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); -$mesg = ''; -if (isset($_SESSION['DolMessage'])) { - $mesg = $_SESSION['DolMessage']; - unset($_SESSION['DolMessage']); -} - // Security check if ($user->socid) { $action = ''; @@ -137,12 +131,10 @@ if ($id > 0 || !empty($ref)) { $permtoedit = $user->rights->banque->modifier; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; - } - else { + } else { dol_print_error($db); } -} -else { +} else { Header('Location: index.php'); exit; } diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 347353be84f..296211bf35c 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -84,9 +84,7 @@ if ($result < 0) $langs->load("errors"); $error++; setEventMessages($langs->trans("ErrorFailedToCreateDir"), null, 'errors'); -} -else -{ +} else { // Calcul $min and $max $sql = "SELECT MIN(b.datev) as min, MAX(b.datev) as max"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; @@ -102,9 +100,7 @@ else $obj = $db->fetch_object($resql); $min = $db->jdate($obj->min); $max = $db->jdate($obj->max); - } - else - { + } else { dol_print_error($db); } if (empty($min)) $min = dol_now() - 3600 * 24; @@ -151,9 +147,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -174,9 +168,7 @@ else $row = $db->fetch_row($resql); $solde = $row[0]; $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -199,9 +191,7 @@ else if ($day > time()) { $datas[$i] = ''; // Valeur speciale permettant de ne pas tracer le graph - } - else - { + } else { $datas[$i] = $solde + $subtotal; } $datamin[$i] = $object->min_desired; @@ -294,9 +284,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -317,9 +305,7 @@ else $row = $db->fetch_row($resql); $solde = $row[0]; $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -343,9 +329,7 @@ else if ($day > $now) { $datas[$i] = ''; // Valeur speciale permettant de ne pas tracer le graph - } - else - { + } else { $datas[$i] = $solde + $subtotal; } $datamin[$i] = $object->min_desired; @@ -431,9 +415,7 @@ else $amounts[$row[0]] = $row[1]; $i++; } - } - else - { + } else { dol_print_error($db); } @@ -459,9 +441,7 @@ else if ($day > ($max + 86400)) { $datas[$i] = ''; // Valeur speciale permettant de ne pas tracer le graph - } - else - { + } else { $datas[$i] = 0 + $solde + $subtotal; } $datamin[$i] = $object->min_desired; @@ -557,9 +537,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -591,9 +569,7 @@ else $debits[$row[0]] = abs($row[1]); } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -674,9 +650,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } $sql = "SELECT date_format(b.datev,'%m')"; @@ -699,9 +673,7 @@ else $debits[$row[0]] = abs($row[1]); } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -770,16 +742,12 @@ if ($account) { $morehtml = ''.$langs->trans("ShowAllAccounts").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam, 0, '', '', 1); - } - else - { + } else { $morehtml = ''.$langs->trans("BackToAccount").''; print $langs->trans("AllAccounts"); //print $morehtml; } - } - else - { + } else { $bankaccount = new Account($db); $listid = explode(',', $account); foreach ($listid as $key => $id) @@ -790,9 +758,7 @@ if ($account) if ($key < (count($listid) - 1)) print ', '; } } -} -else -{ +} else { print $langs->trans("AllAccounts"); } @@ -808,9 +774,7 @@ if ($mode == 'showalltime') print ''; print $langs->trans("GoBack"); print ''; -} -else -{ +} else { print ''; print $langs->trans("ShowAllTimeBalance"); print ''; diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index bf8dc6f5649..d2b3e6099dd 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -76,15 +76,15 @@ if ($user->rights->banque->consolidate && $action == 'donext') { $al = new AccountLine($db); $al->dateo_next($_GET["rowid"]); -}elseif ($user->rights->banque->consolidate && $action == 'doprev') +} elseif ($user->rights->banque->consolidate && $action == 'doprev') { $al = new AccountLine($db); $al->dateo_previous($_GET["rowid"]); -}elseif ($user->rights->banque->consolidate && $action == 'dvnext') +} elseif ($user->rights->banque->consolidate && $action == 'dvnext') { $al = new AccountLine($db); $al->datev_next($_GET["rowid"]); -}elseif ($user->rights->banque->consolidate && $action == 'dvprev') +} elseif ($user->rights->banque->consolidate && $action == 'dvprev') { $al = new AccountLine($db); $al->datev_previous($_GET["rowid"]); @@ -99,9 +99,7 @@ if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->rights->ban { dol_print_error($db); } - } - else - { + } else { setEventMessages($langs->trans("MissingIds"), null, 'errors'); } } @@ -120,9 +118,7 @@ if ($user->rights->banque->modifier && $action == "update") if (GETPOST('accountid', 'int') > 0 && !$acline->rappro && !$acline->getVentilExportCompta()) // We ask to change bank account { $actarget->fetch(GETPOST('accountid', 'int')); - } - else - { + } else { $actarget->fetch($id); } @@ -191,9 +187,7 @@ if ($user->rights->banque->modifier && $action == "update") { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $db->commit(); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -229,9 +223,7 @@ if ($user->rights->banque->consolidate && ($action == 'num_releve' || $action == { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $db->commit(); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -324,9 +316,7 @@ if ($result) if (!$objp->rappro && !$bankline->getVentilExportCompta()) { $form->select_comptes($acct->id, 'accountid', 0, '', 0); - } - else - { + } else { print $acct->getNomUrl(1, 'transactions', 'reflabel'); } print ''; @@ -350,8 +340,7 @@ if ($result) print $langs->trans("Payment"); print '';*/ print $paymenttmp->getNomUrl(1); - } - elseif ($links[$key]['type'] == 'payment_supplier') { + } elseif ($links[$key]['type'] == 'payment_supplier') { require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; $paymenttmp = new PaiementFourn($db); $paymenttmp->fetch($links[$key]['url_id']); @@ -361,79 +350,66 @@ if ($result) print $langs->trans("Payment"); print '';*/ print $paymenttmp->getNomUrl(1); - } - elseif ($links[$key]['type'] == 'company') { + } elseif ($links[$key]['type'] == 'company') { $societe = new Societe($db); $societe->fetch($links[$key]['url_id']); print $societe->getNomUrl(1); - } - elseif ($links[$key]['type'] == 'sc') { + } elseif ($links[$key]['type'] == 'sc') { print ''; print img_object($langs->trans('SocialContribution'), 'bill').' '; print $langs->trans("SocialContribution").($links[$key]['label'] ? ' - '.$links[$key]['label'] : ''); print ''; - } - elseif ($links[$key]['type'] == 'payment_sc') { + } elseif ($links[$key]['type'] == 'payment_sc') { print ''; print img_object($langs->trans('Payment'), 'payment').' '; print $langs->trans("SocialContributionPayment"); print ''; - } - elseif ($links[$key]['type'] == 'payment_vat') { + } elseif ($links[$key]['type'] == 'payment_vat') { print ''; print img_object($langs->trans('VAT'), 'payment').' '; print $langs->trans("VATPayment"); print ''; - } - elseif ($links[$key]['type'] == 'payment_salary') { + } elseif ($links[$key]['type'] == 'payment_salary') { print ''; print img_object($langs->trans('PaymentSalary'), 'payment').' '; print $langs->trans("SalaryPayment"); print ''; - } - elseif ($links[$key]['type'] == 'payment_loan') { + } elseif ($links[$key]['type'] == 'payment_loan') { print ''; print img_object($langs->trans('LoanPayment'), 'payment').' '; print $langs->trans("PaymentLoan"); print ''; - } - elseif ($links[$key]['type'] == 'loan') { + } elseif ($links[$key]['type'] == 'loan') { print ''; print img_object($langs->trans('Loan'), 'bill').' '; print $langs->trans("Loan"); print ''; - } - elseif ($links[$key]['type'] == 'member') { + } elseif ($links[$key]['type'] == 'member') { print ''; print img_object($langs->trans('Member'), 'user').' '; print $links[$key]['label']; print ''; - } - elseif ($links[$key]['type'] == 'payment_donation') { + } elseif ($links[$key]['type'] == 'payment_donation') { print ''; print img_object($langs->trans('Donation'), 'payment').' '; print $langs->trans("DonationPayment"); print ''; - } - elseif ($links[$key]['type'] == 'banktransfert') { + } elseif ($links[$key]['type'] == 'banktransfert') { print ''; print img_object($langs->trans('Transaction'), 'payment').' '; print $langs->trans("TransactionOnTheOtherAccount"); print ''; - } - elseif ($links[$key]['type'] == 'user') { + } elseif ($links[$key]['type'] == 'user') { print ''; print img_object($langs->trans('User'), 'user').' '; print $langs->trans("User"); print ''; - } - elseif ($links[$key]['type'] == 'payment_various') { + } elseif ($links[$key]['type'] == 'payment_various') { print ''; print img_object($langs->trans('VariousPayment'), 'payment').' '; print $langs->trans("VariousPayment"); print ''; - } - else { + } else { print ''; print img_object('', 'generic').' '; print $links[$key]['label']; @@ -463,9 +439,7 @@ if ($result) print '     '.$langs->trans("CheckReceipt").': '.$receipt->getNomUrl(2); } print ''; - } - else - { + } else { print ''.$objp->fk_type.' '.$objp->num_chq.''; } print ""; @@ -479,9 +453,7 @@ if ($result) print ''; print ''; print ''; - } - else - { + } else { print ''.$objp->emetteur.''; } print ""; @@ -495,9 +467,7 @@ if ($result) print ''; print ''; print ''; - } - else - { + } else { print ''.$objp->banque.''; } print ""; @@ -517,9 +487,7 @@ if ($result) print img_edit_add().""; } print ''; - } - else - { + } else { print ''; print dol_print_date($db->jdate($objp->do), "day"); print ''; @@ -541,9 +509,7 @@ if ($result) print img_edit_add().""; } print ''; - } - else - { + } else { print ''; print dol_print_date($db->jdate($objp->dv), "day"); print ''; @@ -560,24 +526,18 @@ if ($result) { // Label generique car entre parentheses. On l'affiche en le traduisant print $langs->trans($reg[1]); - } - else - { + } else { print $objp->label; } print '">'; print ''; - } - else - { + } else { print ''; if (preg_match('/^\((.*)\)$/i', $objp->label, $reg)) { // Label generique car entre parentheses. On l'affiche en le traduisant print $langs->trans($reg[1]); - } - else - { + } else { print $objp->label; } print ''; @@ -591,9 +551,7 @@ if ($result) print ''; print 'rappro ? ' disabled' : '').' value="'.price($objp->amount).'"> '.$langs->trans("Currency".$acct->currency_code); print ''; - } - else - { + } else { print ''; print price($objp->amount); print ''; @@ -649,16 +607,12 @@ if ($result) { print $langs->trans("AccountStatement").' rappro ? ' disabled' : '').'>'; print ''; - } - else - { + } else { print $langs->trans("AccountStatement").' rappro ? ' disabled' : '').'>'; } if ($objp->num_releve) print '   ('.$langs->trans("AccountStatement").' '.$objp->num_releve.')'; print ''; - } - else - { + } else { print ''.$objp->num_releve.' '; } print ''; @@ -669,9 +623,7 @@ if ($result) print ''; print 'rappro ? ' checked="checked"' : '')).'">'; print ''; - } - else - { + } else { print ''.yn($objp->rappro).''; } print ''; @@ -694,8 +646,7 @@ if ($result) } $db->free($result); -} -else dol_print_error($db); +} else dol_print_error($db); // End of page llxFooter(); diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index b1c76c529ad..882244518f7 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -212,8 +212,7 @@ if ($resql) $i++; } $db->free($resql); -} -else dol_print_error($db); +} else dol_print_error($db); @@ -487,9 +486,7 @@ foreach ($accounts as $key=>$type) $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $objecttmp->account_number, 1); print $accountingaccount->getNomUrl(0, 1, 1, '', 1); - } - else - { + } else { print $objecttmp->account_number; } print ''; @@ -505,9 +502,7 @@ foreach ($accounts as $key=>$type) $accountingjournal = new AccountingJournal($db); $accountingjournal->fetch($objecttmp->fk_accountancy_journal); print $accountingjournal->getNomUrl(0, 1, 1, '', 1); - } - else - { + } else { print ''; } print ''; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index c737af4a89e..aee53fe3f23 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -125,8 +125,7 @@ if ($_GET["rel"] == 'prev') $found = true; } } -} -elseif ($_GET["rel"] == 'next') +} elseif ($_GET["rel"] == 'next') { // Recherche valeur pour num = numero releve precedent $sql = "SELECT DISTINCT(b.num_releve) as num"; @@ -147,8 +146,7 @@ elseif ($_GET["rel"] == 'next') $found = true; } } -} -else { +} else { // On veut le releve num $found = true; } @@ -179,7 +177,7 @@ $sqlrequestforbankline = $sql; if ($action == 'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($newbankreceipt)) { // TODO Add a test to check newbankreceipt does not exists yet - $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX.'bank SET num_releve = "'.$db->escape($newbankreceipt).'" WHERE num_releve = "'.$db->escape($oldbankreceipt).'"'; + $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX.'bank SET num_releve = "'.$db->escape($newbankreceipt).'" WHERE num_releve = "'.$db->escape($oldbankreceipt).'" AND fk_account = '.$id; $result = $db->query($sqlupdate); if ($result < 0) dol_print_error($db); @@ -249,6 +247,8 @@ if (empty($numref)) $linkback = ''.$langs->trans("BackToList").''; + $morehtmlref = ''; + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); dol_fiche_end(); @@ -295,17 +295,13 @@ if (empty($numref)) if (!isset($objp->numr)) { // - } - else - { + } else { print ''; print ''; if ($action != 'editbankreceipt' || $objp->numr != $brref) { print ''.$objp->numr.''; - } - else - { + } else { print ''; print ''; print ''; @@ -355,14 +351,10 @@ if (empty($numref)) print ''; print "\n
\n"; - } - else - { + } else { dol_print_error($db); } -} -else -{ +} else { /** * Show list of record into a bank statement */ @@ -372,17 +364,15 @@ else dol_fiche_head($head, 'statement', $langs->trans("AccountStatement"), -1, 'account'); - $mesprevnext = ''; - $mesprevnext .= ''; + $morehtmlright = ''; + $morehtmlright .= ''; $title = $langs->trans("AccountStatement").' '.$numref.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts'); - print load_fiche_titre($title, $mesprevnext, ''); + print load_fiche_titre($title, $morehtmlright, ''); //print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, 0, $nbtotalofrecords, 'bank_account', 0, '', '', 0, 1); print "
"; @@ -488,58 +478,50 @@ else $paymentstatic->ref = $langs->trans("Payment"); print ' '.$paymentstatic->getNomUrl(1); $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_supplier') + } elseif ($links[$key]['type'] == 'payment_supplier') { $paymentsupplierstatic->id = $links[$key]['url_id']; $paymentsupplierstatic->ref = $langs->trans("Payment"); print ' '.$paymentsupplierstatic->getNomUrl(1); $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_sc') + } elseif ($links[$key]['type'] == 'payment_sc') { print ''; print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; print $langs->trans("SocialContributionPayment"); print ''; $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_vat') + } elseif ($links[$key]['type'] == 'payment_vat') { $paymentvatstatic->id = $links[$key]['url_id']; $paymentvatstatic->ref = $langs->trans("Payment"); print ' '.$paymentvatstatic->getNomUrl(1); - } - elseif ($links[$key]['type'] == 'payment_salary') + } elseif ($links[$key]['type'] == 'payment_salary') { print ''; print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; print $langs->trans("Payment"); print ''; $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_donation') + } elseif ($links[$key]['type'] == 'payment_donation') { $paymentdonationstatic->id = $links[$key]['url_id']; $paymentdonationstatic->ref = $langs->trans("Payment"); print ' '.$paymentdonationstatic->getNomUrl(1); $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_loan') + } elseif ($links[$key]['type'] == 'payment_loan') { $paymentloanstatic->id = $links[$key]['url_id']; $paymentloanstatic->ref = $langs->trans("Payment"); print ' '.$paymentloanstatic->getNomUrl(1); $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_various') + } elseif ($links[$key]['type'] == 'payment_various') { $paymentvariousstatic->id = $links[$key]['url_id']; $paymentvariousstatic->ref = $langs->trans("Payment"); print ' '.$paymentvariousstatic->getNomUrl(1); $newline = 0; - } - elseif ($links[$key]['type'] == 'banktransfert') { + } elseif ($links[$key]['type'] == 'banktransfert') { // Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail. if ($objp->amount > 0) { @@ -553,9 +535,7 @@ else $bankstatic->label = $objp->bankref; print $bankstatic->getNomUrl(1, ''); print ')'; - } - else - { + } else { $bankstatic->id = $objp->bankid; $bankstatic->label = $objp->bankref; print ' ('.$langs->trans("from").' '; @@ -567,35 +547,30 @@ else print $bankstatic->getNomUrl(1, 'transactions'); print ')'; } - } - elseif ($links[$key]['type'] == 'company') { + } elseif ($links[$key]['type'] == 'company') { $societestatic->id = $links[$key]['url_id']; $societestatic->name = $links[$key]['label']; print $societestatic->getNomUrl(1, 'company', 24); $newline = 0; - } - elseif ($links[$key]['type'] == 'member') { + } elseif ($links[$key]['type'] == 'member') { print ''; print img_object($langs->trans('ShowMember'), 'user').' '; print $links[$key]['label']; print ''; $newline = 0; - } - elseif ($links[$key]['type'] == 'user') { + } elseif ($links[$key]['type'] == 'user') { print ''; print img_object($langs->trans('ShowUser'), 'user').' '; print $links[$key]['label']; print ''; $newline = 0; - } - elseif ($links[$key]['type'] == 'sc') { + } elseif ($links[$key]['type'] == 'sc') { print ''; print img_object($langs->trans('ShowBill'), 'bill').' '; print $langs->trans("SocialContribution"); print ''; $newline = 0; - } - else { + } else { print ''; print $links[$key]['label']; print ''; @@ -625,9 +600,7 @@ else print "
".$objc->label.""; $ii++; } - } - else - { + } else { dol_print_error($db); } } @@ -638,9 +611,7 @@ else { $totald = $totald + abs($objp->amount); print ''.price($objp->amount * -1)." \n"; - } - else - { + } else { $totalc = $totalc + abs($objp->amount); print ' '.price($objp->amount)."\n"; } @@ -649,12 +620,10 @@ else if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { - print ''; + print ''; print img_edit(); print ""; - } - else - { + } else { print " "; } print ""; diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index aa4c39e55ee..7228c38fe50 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -87,9 +87,7 @@ if ($action == 'add') if ($accountto->currency_code == $accountfrom->currency_code) { $amountto = $amount; - } - else - { + } else { if (!$amountto) { $error++; @@ -130,15 +128,11 @@ if ($action == 'add') $mesgs = $langs->trans("TransferFromToDone", ''.$accountfrom->label."", ''.$accountto->label."", $amount, $langs->transnoentities("Currency".$conf->currency)); setEventMessages($mesgs, null, 'mesgs'); $db->commit(); - } - else - { + } else { setEventMessages($accountfrom->error.' '.$accountto->error, null, 'errors'); $db->rollback(); } - } - else - { + } else { $error++; setEventMessages($langs->trans("ErrorFromToAccountsMustDiffers"), null, 'errors'); } diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index b8d259cdc8d..cf494b77a90 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -72,9 +72,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) if ($vline) { $viewline = $vline; - } - else - { + } else { $viewline = 20; } @@ -290,8 +288,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) if ($obj->family == 'invoice') { $mc->getInfo($obj->entity); print "".$mc->label.""; - } - else { + } else { print ""; } } @@ -304,9 +301,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $i++; } - } - else - { + } else { dol_print_error($db); } @@ -326,9 +321,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) print ""; print ""; -} -else -{ +} else { print $langs->trans("ErrorBankAccountNotFound"); } diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index c4fdc3be56a..071a5abf0a9 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -163,9 +163,7 @@ if (empty($reshook)) $urltogo = ($backtopage ? $backtopage : DOL_URL_ROOT.'/compta/bank/various_payment/list.php'); header("Location: ".$urltogo); exit; - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); $action = "create"; @@ -198,22 +196,16 @@ if (empty($reshook)) $db->commit(); header("Location: ".DOL_URL_ROOT.'/compta/bank/various_payment/list.php'); exit; - } - else - { + } else { $object->error = $accountline->error; $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages('Error try do delete a line linked to a conciliated bank transaction', null, 'errors'); } } @@ -375,8 +367,7 @@ if ($action == 'create') print ''; print $formaccounting->select_account($accountancy_code, 'accountancy_code', 1, null, 1, 1); print ''; - } - else // For external software + } else // For external software { print ''.$langs->trans("AccountAccounting").''; print ''; @@ -391,14 +382,11 @@ if ($action == 'create') if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1, ''); - } - else - { + } else { print ''; } print ''; - } - else // For external software + } else // For external software { print ''.$langs->trans("SubledgerAccount").''; print ''; @@ -564,14 +552,10 @@ if ($id) } else { print ''; } - } - else - { + } else { print ''; } - } - else - { + } else { print ''; } diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index d81b9bdd41a..7a89fd77986 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -149,9 +149,7 @@ if ($object->id) $permission = $user->rights->banque->modifier; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 5f68440809c..cfecfecffa5 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -2,6 +2,7 @@ /* Copyright (C) 2017-2019 Alexandre Spangaro * Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Tobias Sekan * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page $langs->loadLangs(array("compta", "banks", "bills", "accountancy")); @@ -44,11 +46,14 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $search_ref = GETPOST('search_ref', 'int'); $search_user = GETPOST('search_user', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); -$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); -$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int')); +$search_datep_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); +$search_datep_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int')); +$search_datev_start = dol_mktime(0, 0, 0, GETPOST('search_date_value_startmonth', 'int'), GETPOST('search_date_value_startday', 'int'), GETPOST('search_date_value_startyear', 'int')); +$search_datev_end = dol_mktime(23, 59, 59, GETPOST('search_date_value_endmonth', 'int'), GETPOST('search_date_value_endday', 'int'), GETPOST('search_date_value_endyear', 'int')); $search_amount_deb = GETPOST('search_amount_deb', 'alpha'); $search_amount_cred = GETPOST('search_amount_cred', 'alpha'); -$search_account = GETPOST('search_account', 'int'); +$search_bank_account = GETPOST('search_account', 'int'); +$search_bank_entry = GETPOST('search_bank_entry', 'int'); $search_accountancy_account = GETPOST("search_accountancy_account"); if ($search_accountancy_account == - 1) $search_accountancy_account = ''; $search_accountancy_subledger = GETPOST("search_accountancy_subledger"); @@ -75,39 +80,103 @@ if (!GETPOST('typeid')) $part = explode(':', $val); if ($part[0] == 'v.fk_typepayment') $typeid = $part[1]; } -} -else -{ +} else { $typeid = GETPOST('typeid'); } if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers { - $search_ref = ""; - $search_label = ""; - $search_date_start = ''; - $search_date_end = ''; - $search_amount_deb = ""; - $search_amount_cred = ""; - $search_account = ''; + $search_ref = ''; + $search_label = ''; + $search_datep_start = ''; + $search_datep_end = ''; + $search_datev_start = ''; + $search_datev_end = ''; + $search_amount_deb = ''; + $search_amount_cred = ''; + $search_bank_account = ''; + $search_bank_entry = ''; $search_accountancy_account = ''; $search_accountancy_subledger = ''; - $typeid = ""; + $typeid = ''; } +$search_all = GETPOSTISSET("search_all") ? trim(GETPOST("search_all", 'alpha')) : trim(GETPOST('sall')); + +/* +* TODO: fill array "$fields" in "/compta/bank/class/paymentvarious.class.php" and use +* +* +* $object = new PaymentVarious($db); +* +* $search = array(); +* foreach ($object->fields as $key => $val) +* { +* if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); +* } + +* $fieldstosearchall = array(); +* foreach ($object->fields as $key => $val) +* { +* if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +* } +* +*/ + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'v.rowid'=>"Ref", + 'v.label'=>"Label", + 'v.datep'=>"DatePayment", + 'v.datev'=>"DateValue", + 'v.amount'=>$langs->trans("Debit").", ".$langs->trans("Credit"), +); + +// Definition of fields for lists +$arrayfields = array( + 'ref' =>array('label'=>"Ref", 'checked'=>1, 'position'=>100), + 'label' =>array('label'=>"Label", 'checked'=>1, 'position'=>110), + 'datep' =>array('label'=>"DatePayment", 'checked'=>1, 'position'=>120), + 'datev' =>array('label'=>"DateValue", 'checked'=>1, 'position'=>130), + 'type' =>array('label'=>"PaymentMode", 'checked'=>1, 'position'=>140), + 'project' =>array('label'=>"Project", 'checked'=>1, 'position'=>200, "enabled"=>!empty($conf->projet->enabled)), + 'bank' =>array('label'=>"BankAccount", 'checked'=>1, 'position'=>300, "enabled"=>!empty($conf->banque->enabled)), + 'entry' =>array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>310, "enabled"=>!empty($conf->banque->enabled)), + 'account' =>array('label'=>"AccountAccountingShort", 'checked'=>1, 'position'=>400, "enabled"=>!empty($conf->accounting->enabled)), + 'subledger' =>array('label'=>"SubledgerAccount", 'checked'=>1, 'position'=>410, "enabled"=>!empty($conf->accounting->enabled)), + 'debit' =>array('label'=>"Debit", 'checked'=>1, 'position'=>500), + 'credit' =>array('label'=>"Credit", 'checked'=>1, 'position'=>510), +); + +$arrayfields = dol_sort_array($arrayfields, 'position'); + +/* + * Actions + */ + +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +if (empty($reshook)) { + // Selection of new fields + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; +} /* * View */ -llxHeader(); - $form = new Form($db); -$formaccounting = new FormAccounting($db); -$variousstatic = new PaymentVarious($db); -$accountstatic = new Account($db); +if ($arrayfields['account']['checked'] || $arrayfields['subledger']['checked']) $formaccounting = new FormAccounting($db); +if ($arrayfields['bank']['checked'] && !empty($conf->accounting->enabled)) $accountingjournal = new AccountingJournal($db); +if ($arrayfields['ref']['checked']) $variousstatic = new PaymentVarious($db); +if ($arrayfields['bank']['checked']) $accountstatic = new Account($db); +if ($arrayfields['project']['checked']) $proj = new Project($db); +if ($arrayfields['entry']['checked']) $bankline = new AccountLine($db); +if ($arrayfields['account']['checked']) $accountingaccount = new AccountingAccount($db); -$sql = "SELECT v.rowid, v.sens, v.amount, v.label, v.datep as datep, v.datev as datev, v.fk_typepayment as type, v.num_payment, v.fk_bank, v.accountancy_code, v.subledger_account,"; +$sql = "SELECT v.rowid, v.sens, v.amount, v.label, v.datep as datep, v.datev as datev, v.fk_typepayment as type, v.num_payment, v.fk_bank, v.accountancy_code, v.subledger_account, v.fk_projet as fk_project,"; $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number as bank_account_number, ba.fk_accountancy_journal as accountancy_journal, ba.label as blabel,"; $sql .= " pst.code as payment_code"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_various as v"; @@ -119,11 +188,14 @@ $sql .= " WHERE v.entity IN (".getEntity('payment_various').")"; // Search criteria if ($search_ref) $sql .= " AND v.rowid=".$db->escape($search_ref); if ($search_label) $sql .= natural_search(array('v.label'), $search_label); -if ($search_date_start) $sql .= " AND v.datep >= '".$db->idate($search_date_start)."'"; -if ($search_date_end) $sql .= " AND v.datep <= '".$db->idate($search_date_end)."'"; +if ($search_datep_start) $sql .= " AND v.datep >= '".$db->idate($search_datep_start)."'"; +if ($search_datep_end) $sql .= " AND v.datep <= '".$db->idate($search_datep_end)."'"; +if ($search_datev_start) $sql .= " AND v.datev >= '".$db->idate($search_datev_start)."'"; +if ($search_datev_end) $sql .= " AND v.datev <= '".$db->idate($search_datev_end)."'"; if ($search_amount_deb) $sql .= natural_search("v.amount", $search_amount_deb, 1); if ($search_amount_cred) $sql .= natural_search("v.amount", $search_amount_cred, 1); -if ($search_account > 0) $sql .= " AND b.fk_account=".$db->escape($search_account); +if ($search_bank_account > 0) $sql .= " AND b.fk_account=".$db->escape($search_bank_account); +if ($search_bank_entry > 0) $sql .= " AND b.fk_account=".$db->escape($search_bank_account); if ($search_accountancy_account > 0) $sql .= " AND v.accountancy_code=".$db->escape($search_accountancy_account); if ($search_accountancy_subledger > 0) $sql .= " AND v.subledger_account=".$db->escape($search_accountancy_subledger); if ($typeid > 0) $sql .= " AND v.fk_typepayment=".$typeid; @@ -131,6 +203,7 @@ if ($filtre) { $filtre = str_replace(":", "=", $filtre); $sql .= " AND ".$filtre; } +if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); $sql .= $db->order($sortfield, $sortorder); @@ -146,6 +219,19 @@ $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); + + // Direct jump if only one record found + if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) + { + $obj = $db->fetch_object($result); + $id = $obj->rowid; + header("Location: ".DOL_URL_ROOT.'/compta/bank/various_payment/card.php?id='.$id); + exit; + } + + // must be place behind the last "header(...)" call + llxHeader(); + $i = 0; $total = 0; @@ -156,10 +242,10 @@ if ($result) if ($search_label) $param .= '&search_label='.urlencode($search_label); if ($search_date_start) $param .= '&search_date_start='.urlencode($search_date_start); if ($search_date_end) $param .= '&search_date_end='.urlencode($search_date_end); - if ($typeid > 0) $param .= '&typeid='.urlencode($typeid); - if ($search_amount_deb) $param .= '&search_amount_deb='.urlencode($search_amount_deb); - if ($search_amount_cred) $param .= '&search_amount_cred='.urlencode($search_amount_cred); - if ($search_account > 0) $param .= '&search_amount='.urlencode($search_account); + if ($typeid > 0) $param .= '&typeid='.urlencode($typeid); + if ($search_amount_deb) $param .= '&search_amount_deb='.urlencode($search_amount_deb); + if ($search_amount_cred) $param .= '&search_amount_cred='.urlencode($search_amount_cred); + if ($search_bank_account > 0) $param .= '&search_amount='.urlencode($search_bank_account); if ($search_accountancy_account > 0) $param .= '&search_accountancy_account='.urlencode($search_accountancy_account); if ($search_accountancy_subledger > 0) $param .= '&search_accountancy_subledger='.urlencode($search_accountancy_subledger); @@ -179,59 +265,110 @@ if ($result) print ''; print ''; print ''; + print ''; - print_barre_liste($langs->trans("VariousPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1); + print_barre_liste($langs->trans("MenuVariousPayment"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1); + + if ($search_all) + { + foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'; + } + + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print '
'; - print ''."\n"; + print '
'; print ''; + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { + print ''; + } + // Ref - print ''; + if ($arrayfields['ref']['checked']) { + print ''; + } // Label - print ''; - - // Date - print ''; - - // Type - print ''; - - // Account - if (!empty($conf->banque->enabled)) - { + if ($arrayfields['label']['checked']) { print ''; + } + + // Payment date + if ($arrayfields['datep']['checked']) { + print ''; + } + + // Value date + if ($arrayfields['datev']['checked']) { + print ''; + } + + // Payment type + if ($arrayfields['type']['checked']) { + print ''; + } + + // Project + if ($arrayfields['project']['checked']) { + print ''; + } + + // Bank account + if ($arrayfields['bank']['checked']) { + print ''; + } + + // Bank entry + if ($arrayfields['entry']['checked']) { + print ''; } // Accounting account - if (!empty($conf->accounting->enabled)) - { - // Accounting account + if ($arrayfields['account']['checked']) { print ''; + } - // Subledger account + // Subledger account + if ($arrayfields['subledger']['checked']) { print ''; + if ($arrayfields['debit']['checked']) { + print ''; + } // Credit - print ''; + if ($arrayfields['credit']['checked']) { + print ''; + } print ''; - print "\n"; - + print ''; print ''; - print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "v.rowid", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "v.label", "", $param, '', $sortfield, $sortorder, 'left '); - print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "v.datep,v.rowid", "", $param, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'left '); - if (!empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); - if (!empty($conf->accounting->enabled)) print_liste_field_titre("AccountAccountingShort", $_SERVER["PHP_SELF"], "v.accountancy_code", "", $param, '', $sortfield, $sortorder, 'left '); - if (!empty($conf->accounting->enabled)) print_liste_field_titre("SubledgerAccount", $_SERVER["PHP_SELF"], "v.subledger_account", "", $param, '', $sortfield, $sortorder, 'left '); - print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "v.amount", "", $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "v.amount", "", $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); - print "\n"; + + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); + + if ($arrayfields['ref']['checked']) print_liste_field_titre($arrayfields['ref']['label'], $_SERVER["PHP_SELF"], 'v.rowid', '', $param, '', $sortfield, $sortorder); + if ($arrayfields['label']['checked']) print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], 'v.label', '', $param, '', $sortfield, $sortorder, 'left '); + if ($arrayfields['datep']['checked']) print_liste_field_titre($arrayfields['datep']['label'], $_SERVER["PHP_SELF"], 'v.datep,v.rowid', '', $param, '', $sortfield, $sortorder, 'center '); + if ($arrayfields['datev']['checked']) print_liste_field_titre($arrayfields['datev']['label'], $_SERVER["PHP_SELF"], 'v.datev,v.rowid', '', $param, '', $sortfield, $sortorder, 'center '); + if ($arrayfields['type']['checked']) print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], 'type', '', $param, '', $sortfield, $sortorder, 'left '); + if ($arrayfields['project']['checked']) print_liste_field_titre($arrayfields['project']['label'], $_SERVER["PHP_SELF"], 'fk_project', '', $param, '', $sortfield, $sortorder); + if ($arrayfields['bank']['checked']) print_liste_field_titre($arrayfields['bank']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); + if ($arrayfields['entry']['checked']) print_liste_field_titre($arrayfields['entry']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); + if ($arrayfields['account']['checked']) print_liste_field_titre($arrayfields['account']['label'], $_SERVER["PHP_SELF"], 'v.accountancy_code', '', $param, '', $sortfield, $sortorder, 'left '); + if ($arrayfields['subledger']['checked']) print_liste_field_titre($arrayfields['subledger']['label'], $_SERVER["PHP_SELF"], 'v.subledger_account', '', $param, '', $sortfield, $sortorder, 'left '); + if ($arrayfields['debit']['checked']) print_liste_field_titre($arrayfields['debit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right '); + if ($arrayfields['credit']['checked']) print_liste_field_titre($arrayfields['credit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right '); + + // Fields from hook + $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); + $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); + print ''; $totalarray = array(); @@ -274,28 +430,53 @@ if ($result) print ''; - $variousstatic->id = $obj->rowid; - $variousstatic->ref = $obj->rowid; + // No + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { + print ''; + } // Ref - print "\n"; - if (!$i) $totalarray['nbfield']++; + if ($arrayfields['ref']['checked']) { + $variousstatic->id = $obj->rowid; + $variousstatic->ref = $obj->rowid; + print ""; + if (!$i) $totalarray['nbfield']++; + } // Label payment - print "\n"; - if (!$i) $totalarray['nbfield']++; + if ($arrayfields['label']['checked']) { + print ""; + if (!$i) $totalarray['nbfield']++; + } // Date payment - print '\n"; - if (!$i) $totalarray['nbfield']++; + if ($arrayfields['datep']['checked']) { + print '"; + if (!$i) $totalarray['nbfield']++; + } + + + // Date value + if ($arrayfields['datev']['checked']) { + print '"; + if (!$i) $totalarray['nbfield']++; + } // Type - print ''; - if (!$i) $totalarray['nbfield']++; + if ($arrayfields['type']['checked']) { + print ''; + if (!$i) $totalarray['nbfield']++; + } - // Account - if (!empty($conf->banque->enabled)) - { + // Project + if ($arrayfields['project']['checked']) { + $proj->fetch($obj->fk_project); + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Bank account + if ($arrayfields['bank']['checked']) { print ''; + if (!$i) $totalarray['nbfield']++; } - else print ' '; - print ''; + } + + // Bank entry + if ($arrayfields['entry']['checked']) { + $bankline->fetch($obj->fk_bank); + print ''; if (!$i) $totalarray['nbfield']++; } // Accounting account - if (!empty($conf->accounting->enabled)) { - $accountingaccount = new AccountingAccount($db); + if ($arrayfields['account']['checked']) { $accountingaccount->fetch('', $obj->accountancy_code, 1); print ''; @@ -329,38 +515,42 @@ if ($result) } // Accounting subledger account - if (!empty($conf->accounting->enabled)) - { + if ($arrayfields['subledger']['checked']) { print ''; if (!$i) $totalarray['nbfield']++; } // Debit - print ''; } - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'total_deb'; - print ''; // Credit - print ''; } - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'total_cred'; - print ''; + print ''; if (!$i) $totalarray['nbfield']++; - print "\n"; + print ""; $i++; } @@ -373,9 +563,7 @@ if ($result) print ''; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 3780fbc1afe..b14b77d5264 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -107,8 +107,7 @@ if (GETPOST('cancel', 'alpha')) { if ($action == 'valid') { $action = 'view'; - } - else { + } else { $action = 'create'; } } @@ -144,8 +143,7 @@ if ($action == "start") $action = 'create'; $error++; } -} -elseif ($action == "add") +} elseif ($action == "add") { if (GETPOST('opening', 'alpha') == '') { @@ -177,9 +175,7 @@ elseif ($action == "add") { $db->commit(); $action = "view"; - } - else - { + } else { $db->rollback; $action = "view"; } @@ -217,9 +213,7 @@ if ($action == "valid") // validate = close { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); - } - else - { + } else { setEventMessages($langs->trans("CashFenceDone"), null); $db->commit(); } @@ -253,9 +247,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) setEventMessages("RecordDeleted", null, 'mesgs'); header("Location: ".$backurlforlist); exit; - } - else - { + } else { if (!empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); else setEventMessages($object->error, null, 'errors'); } @@ -282,8 +274,7 @@ if ($action == "create" || $action == "start" || $action == 'close') $syear = $object->year_close; $smonth = $object->month_close; $sday = $object->day_close; - } - elseif (GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '-1') + } elseif (GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '-1') { $posmodule = GETPOST('posmodule', 'alpha'); $terminalid = GETPOST('posnumber', 'alpha'); @@ -327,11 +318,8 @@ if ($action == "create" || $action == "start" || $action == 'close') { $obj = $db->fetch_object($resql); if ($obj) $initialbalanceforterminal[$terminalid][$key] = $obj->total; - } - else dol_print_error($db); - } - else - { + } else dol_print_error($db); + } else { setEventMessages($langs->trans("SetupOfTerminalNotComplete", $terminaltouse), null, 'errors'); $error++; } @@ -350,8 +338,7 @@ if ($action == "create" || $action == "start" || $action == 'close') if ($key == 'cash') $sql .= " AND cp.code = 'LIQ'"; elseif ($key == 'cheque') $sql .= " AND cp.code = 'CHQ'"; elseif ($key == 'card') $sql .= " AND cp.code = 'CB'"; - else - { + else { dol_print_error('Value for key = '.$key.' not supported'); exit; } @@ -371,8 +358,7 @@ if ($action == "create" || $action == "start" || $action == 'close') $theoricalamountforterminal[$terminalid][$key] = price2num($theoricalamountforterminal[$terminalid][$key] + $obj->total); $theoricalnbofinvoiceforterminal[$terminalid][$key] = $obj->nb; } - } - else dol_print_error($db); + } else dol_print_error($db); } } @@ -388,14 +374,11 @@ if ($action == "create" || $action == "start" || $action == 'close') if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1') { print ''; - } - elseif ($action == 'close') + } elseif ($action == 'close') { print ''; print ''; - } - else - { + } else { print ''; } @@ -469,9 +452,7 @@ if ($action == "create" || $action == "start" || $action == 'close') if ($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') { print ''; - } - else - { + } else { print ''; } print ''; @@ -569,8 +550,7 @@ if ($action == "create" || $action == "start" || $action == 'close') { $object->fetch($id); print $object->opening; - } - else print (GETPOSTISSET('opening') ?price2num(GETPOST('opening', 'alpha')) : price($initialbalanceforterminal[$terminalid]['cash'])); + } else print (GETPOSTISSET('opening') ?price2num(GETPOST('opening', 'alpha')) : price($initialbalanceforterminal[$terminalid]['cash'])); print '">'; print ''; // Amount per payment type @@ -608,8 +588,7 @@ if (empty($action) || $action == "view" || $action == "close") if ($result <= 0) { print $langs->trans("ErrorRecordNotFound"); - } - else { + } else { $head = array(); $head[0][0] = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.$object->id; $head[0][1] = $langs->trans("CashControl"); @@ -706,14 +685,11 @@ if (empty($action) || $action == "view" || $action == "close") if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1') { print ''; - } - elseif ($action == 'close') + } elseif ($action == 'close') { print ''; print ''; - } - else - { + } else { print ''; } @@ -860,8 +836,7 @@ if (empty($action) || $action == "view" || $action == "close") { $object->fetch($id); print $object->opening; - } - else print (GETPOSTISSET('opening') ?price2num(GETPOST('opening', 'alpha')) : price($initialbalanceforterminal[$terminalid]['cash'])); + } else print (GETPOSTISSET('opening') ?price2num(GETPOST('opening', 'alpha')) : price($initialbalanceforterminal[$terminalid]['cash'])); print '">'; print ''; // Amount per payment type diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index a98c9ea83f5..d24c4ac1059 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -98,7 +98,7 @@ if ($user->socid > 0) // Protection if external user //$result = restrictedArea($user, 'monmodule', $id, ''); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { @@ -259,9 +259,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; -} -else -{ +} else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index 81a19389244..0f60be3c3a8 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -404,8 +404,7 @@ class CashControl extends CommonObject $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $linkclose = $hookmanager->resPrint; */ - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 1ea06eba9e9..f2d8e38fb15 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -172,9 +172,7 @@ if ($resql) $bankaccounttmp->fetch($objp->bankid); $cachebankaccount[$objp->bankid] = $bankaccounttmp; $bankaccount = $bankaccounttmp; - } - else - { + } else { $bankaccount = $cachebankaccount[$objp->bankid]; } @@ -208,8 +206,7 @@ if ($resql) print $bankaccount->getNomUrl(1); if ($cashcontrol->posmodule == "takepos") { $var1 = 'CASHDESK_ID_BANKACCOUNT_CASH'.$cashcontrol->posnumber; - } - else { + } else { $var1 = 'CASHDESK_ID_BANKACCOUNT_CASH'; } if ($objp->code == 'CHQ') { @@ -311,9 +308,7 @@ if ($resql) print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 93065219248..dae7ca358ac 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -89,6 +89,8 @@ if ($mode == 'sconly') $param = '&mode=sconly'; if ($sortfield) $param .= '&sortfield='.$sortfield; if ($sortorder) $param .= '&sortorder='.$sortorder; +$totalnboflines = 0; +$num = 0; print '
'; if ($optioncss != '') print ''; @@ -99,14 +101,13 @@ print ''; print ''; print ''; +$nav = ''; if ($mode != 'sconly') { - $center = ($year ? '
'.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')."" : ""); - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'object_payment', 0, '', '', $limit, 1); -} -else -{ - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'object_payment', 0, '', '', $limit, 0); + $nav = ($year ? ''.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')."" : ""); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 1); +} else { + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 0); } if ($year) $param .= '&year='.$year; @@ -217,8 +218,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $accountstatic->accountancy_journal = $obj->accountancy_journal; $accountstatic->label = $obj->blabel; print $accountstatic->getNomUrl(1); - } - else print ' '; + } else print ' '; print ''; } // Paid @@ -240,9 +240,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) if (!empty($conf->banque->enabled)) print ''; print '"; print ""; - } - else - { + } else { dol_print_error($db); } print '
'; + print ''; - print ''; - print ''; + print ''; + print ''; - print '
'; - print $langs->trans('From').' '; - print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1); - print '
'; - print '
'; - print $langs->trans('to').' '; - print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1); - - print '
'; - print '
'; - $form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16); - print ''; - $form->select_comptes($search_account, 'search_account', 0, '', 1); + print ''; + print ''; + print '
'; + print $langs->trans('From').' '; + print $form->selectDate($search_datep_start ? $search_datep_start : -1, 'search_date_start', 0, 0, 1); + print '
'; + print '
'; + print $langs->trans('to').' '; + print $form->selectDate($search_datep_end ? $search_datep_end : -1, 'search_date_end', 0, 0, 1); + print '
'; + print '
'; + print '
'; + print $langs->trans('From').' '; + print $form->selectDate($search_datev_start ? $search_datev_start : -1, 'search_date_value_start', 0, 0, 1); + print '
'; + print '
'; + print $langs->trans('to').' '; + print $form->selectDate($search_datev_end ? $search_datev_end : -1, 'search_date_value_end', 0, 0, 1); + print '
'; + print '
'; + $form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16); + print ''; + // TODO + print ''; + $form->select_comptes($search_bank_account, 'search_account', 0, '', 1); + print ''; + print ''; print ''; print '
'; print $formaccounting->select_account($search_accountancy_account, 'search_accountancy_account', 1, array(), 1, 1, 'maxwidth200'); print '
'; print '
'; print '
'; print $formaccounting->select_auxaccount($search_accountancy_subledger, 'search_accountancy_subledger', 1, 'maxwidth200'); @@ -240,31 +377,50 @@ if ($result) } // Debit - print '
'; + print ''; + print ''; + print ''; + print ''; $searchpicto = $form->showFilterAndCheckAddButtons(0); print $searchpicto; print '
'.(($offset * $limit) + $i).'".$variousstatic->getNomUrl(1)."".$variousstatic->getNomUrl(1)."".dol_trunc($obj->label, 40)."".dol_trunc($obj->label, 40)."'.dol_print_date($db->jdate($obj->datep), 'day')."'.dol_print_date($obj->datep, 'day')."'.dol_print_date($obj->datev, 'day')."'.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''.$proj->getNomUrl(1).''; if ($obj->bid > 0) { @@ -305,23 +486,28 @@ if ($result) if (!empty($conf->accounting->enabled)) { $accountstatic->account_number = $obj->bank_account_number; - - $accountingjournal = new AccountingJournal($db); $accountingjournal->fetch($obj->accountancy_journal); $accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1); } $accountstatic->label = $obj->blabel; print $accountstatic->getNomUrl(1); + } else { + print ' '; + print ''.$bankline->getNomUrl(1).''.$accountingaccount->getNomUrl(0, 1, 1, '', 1).''.length_accounta($obj->subledger_account).''; - if ($obj->sens == 0) - { - print price($obj->amount); - $totalarray['val']['total_deb'] += $obj->amount; + if ($arrayfields['debit']['checked']) { + print ''; + if ($obj->sens == 0) + { + print price($obj->amount); + $totalarray['val']['total_deb'] += $obj->amount; + } + if (!$i) $totalarray['nbfield']++; + if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'total_deb'; + print ''; - if ($obj->sens == 1) - { - print price($obj->amount); - $totalarray['val']['total_cred'] += $obj->amount; + if ($arrayfields['credit']['checked']) { + print ''; + if ($obj->sens == 1) + { + print price($obj->amount); + $totalarray['val']['total_cred'] += $obj->amount; + } + if (!$i) $totalarray['nbfield']++; + if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'total_cred'; + print '
'.price($totalpaye)."
'; @@ -334,8 +332,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $accountstatic->accountancy_journal = $obj->accountancy_journal; $accountstatic->label = $obj->blabel; print $accountstatic->getNomUrl(1); - } - else print ' '; + } else print ' '; print ''; } @@ -356,9 +353,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ""; $db->free($result); - } - else - { + } else { dol_print_error($db); } } @@ -369,19 +364,15 @@ if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { $j = 1; $numlt = 3; -} -elseif ($mysoc->localtax1_assuj == "1") +} elseif ($mysoc->localtax1_assuj == "1") { $j = 1; $numlt = 2; -} -elseif ($mysoc->localtax2_assuj == "1") +} elseif ($mysoc->localtax2_assuj == "1") { $j = 2; $numlt = 3; -} -else -{ +} else { $j = 0; $numlt = 0; } @@ -451,9 +442,7 @@ while ($j < $numlt) print ""; $db->free($result); - } - else - { + } else { dol_print_error($db); } } @@ -462,6 +451,7 @@ while ($j < $numlt) // Payment Salary +/* if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) { if (!$mode || $mode != 'sconly') @@ -546,8 +536,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) $accountstatic->accountancy_journal = $obj->accountancy_journal; $accountstatic->label = $obj->blabel; print $accountstatic->getNomUrl(1); - } - else print ' '; + } else print ' '; print ''; } @@ -565,13 +554,12 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) $db->free($result); print "
"; - } - else - { + } else { dol_print_error($db); } } } +*/ print ''; diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 6c1439d5466..5632e8ebc1a 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -196,9 +196,7 @@ if ($resql) print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 463d9ea699f..4d3ec6b1ee6 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -70,15 +70,11 @@ if ($action == 'validate' && $user->rights->deplacement->creer) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} - -elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer) +} elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer) { $object->fetch($id); if ($object->statut == Deplacement::STATUS_VALIDATED) @@ -88,29 +84,21 @@ elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} - -elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) +} elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) { $result = $object->delete($id); if ($result >= 0) { header("Location: index.php"); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } -} - -elseif ($action == 'add' && $user->rights->deplacement->creer) +} elseif ($action == 'add' && $user->rights->deplacement->creer) { if (!GETPOST('cancel', 'alpha')) { @@ -149,26 +137,18 @@ elseif ($action == 'add' && $user->rights->deplacement->creer) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = 'create'; } - } - else - { + } else { $action = 'create'; } - } - else - { + } else { header("Location: index.php"); exit; } -} - -// Update record +} // Update record elseif ($action == 'update' && $user->rights->deplacement->creer) { if (!GETPOST('cancel', 'alpha')) @@ -189,36 +169,27 @@ elseif ($action == 'update' && $user->rights->deplacement->creer) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } -} - -// Set into a project +} // Set into a project elseif ($action == 'classin' && $user->rights->deplacement->creer) { $object->fetch($id); $result = $object->setProject(GETPOST('projectid', 'int')); if ($result < 0) dol_print_error($db, $object->error); -} - -// Set fields +} // Set fields elseif ($action == 'setdated' && $user->rights->deplacement->creer) { $dated = dol_mktime(GETPOST('datedhour', 'int'), GETPOST('datedmin', 'int'), GETPOST('datedsec', 'int'), GETPOST('datedmonth', 'int'), GETPOST('datedday', 'int'), GETPOST('datedyear', 'int')); $object->fetch($id); $result = $object->setValueFrom('dated', $dated, '', '', 'date', '', $user, 'DEPLACEMENT_MODIFY'); if ($result < 0) dol_print_error($db, $object->error); -} -elseif ($action == 'setkm' && $user->rights->deplacement->creer) +} elseif ($action == 'setkm' && $user->rights->deplacement->creer) { $object->fetch($id); $result = $object->setValueFrom('km', GETPOST('km', 'int'), '', null, 'text', '', $user, 'DEPLACEMENT_MODIFY'); @@ -313,8 +284,7 @@ if ($action == 'create') print '
'; print ''; -} -elseif ($id) +} elseif ($id) { $result = $object->fetch($id); if ($result > 0) @@ -412,9 +382,7 @@ elseif ($id) print ''; print ''; - } - else - { + } else { /* * Confirm delete trip */ @@ -492,9 +460,7 @@ elseif ($id) if ($action == 'classify') { $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1); - } - else - { + } else { $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0); } print ''; @@ -528,9 +494,7 @@ elseif ($id) if ($user->rights->deplacement->creer) { print ''.$langs->trans('Modify').''; - } - else - { + } else { print ''.$langs->trans('Modify').''; } } @@ -540,9 +504,7 @@ elseif ($id) if ($user->rights->deplacement->creer) { print ''.$langs->trans('Validate').''; - } - else - { + } else { print ''.$langs->trans('Validate').''; } } @@ -552,9 +514,7 @@ elseif ($id) if ($user->rights->deplacement->creer) { print ''.$langs->trans('ClassifyRefunded').''; - } - else - { + } else { print ''.$langs->trans('ClassifyRefunded').''; } } @@ -562,17 +522,13 @@ elseif ($id) if ($user->rights->deplacement->supprimer) { print ''.$langs->trans('Delete').''; - } - else - { + } else { print ''.$langs->trans('Delete').''; } print ''; } - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index ec4610179e2..69baf710b95 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -199,16 +199,12 @@ class Deplacement extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return $result; } - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; @@ -267,9 +263,7 @@ class Deplacement extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -312,9 +306,7 @@ class Deplacement extends CommonObject $this->extraparams = (array) json_decode($obj->extraparams, true); return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -338,9 +330,7 @@ class Deplacement extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -375,30 +365,25 @@ class Deplacement extends CommonObject if ($mode == 0) { return $langs->trans($this->statuts[$status]); - } - elseif ($mode == 1) + } elseif ($mode == 1) { return $langs->trans($this->statuts_short[$status]); - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]); elseif ($status == 1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); elseif ($status == 2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); elseif ($status == 2 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); - } - elseif ($mode == 4) + } elseif ($mode == 4) { if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); elseif ($status == 2 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); - } - elseif ($mode == 5) + } elseif ($mode == 5) { if ($status == 0 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); elseif ($status == 1 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); @@ -460,9 +445,7 @@ class Deplacement extends CommonObject $ret[$obj->code] = (($langs->trans($obj->code) != $obj->code) ? $langs->trans($obj->code) : $obj->label); $i++; } - } - else - { + } else { dol_print_error($this->db); } @@ -507,9 +490,7 @@ class Deplacement extends CommonObject $this->date_modification = $this->db->jdate($obj->tms); } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index 2cef0b3e6cd..889eb390ca2 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -123,9 +123,7 @@ if ($object->id) $permission = $user->rights->deplacement->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 9d45bafd20f..0cea847f9ce 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -192,14 +192,11 @@ if ($result) $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; } print '
'; -} -else dol_print_error($db); +} else dol_print_error($db); print ''; diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index a4cc8f24019..78c1f32556d 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -196,9 +196,7 @@ if ($resql) print ""; print "\n"; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index cf745b784fc..7707cb40786 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -167,9 +167,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filename_avg = $dir.'/ordersaverage-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$year.'.png'; @@ -294,8 +292,7 @@ print '
'; // Show graphs print '"; - } - else - { + } else { print ''; } @@ -1198,14 +1148,10 @@ if ($action == 'create') print ''; print ''; print "\n"; - } - else - { + } else { dol_print_error('', "Error, no invoice ".$object->id); } -} -else -{ +} else { /* * View mode */ @@ -1328,9 +1274,7 @@ else if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id'); - } - else - { + } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'none'); } } else { @@ -1350,9 +1294,7 @@ else if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); - } - else - { + } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'none'); } print ''; @@ -1459,9 +1401,7 @@ else if ($action == 'editbankaccount') { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); - } - else - { + } else { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); } print ""; @@ -1485,11 +1425,9 @@ else $list[] = str_replace(':', '|', $k).':'.$model; } $select = 'select;'.implode(',', $list); - print $form->editfieldval($langs->trans("Model"), 'modelpdf', $object->modelpdf, $object, $user->rights->facture->creer, $select); - } - else - { - print $object->modelpdf; + print $form->editfieldval($langs->trans("Model"), 'modelpdf', $object->model_pdf, $object, $user->rights->facture->creer, $select); + } else { + print $object->model_pdf; } print ""; print ''; @@ -1536,15 +1474,11 @@ else print ''; print ''; print '
'; -if ($mesg) { print $mesg; } -else { +if ($mesg) { print $mesg; } else { print $px1->show(); print "
\n"; print $px2->show(); diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index cad443940f4..0074fcc8ba9 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -192,7 +192,7 @@ if (empty($reshook)) $object->title = GETPOST('titre', 'nohtml'); $object->note_private = GETPOST('note_private', 'none'); $object->note_public = GETPOST('note_public', 'none'); - $object->modelpdf = GETPOST('modelpdf', 'alpha'); + $object->model_pdf = GETPOST('modelpdf', 'alpha'); $object->usenewprice = GETPOST('usenewprice', 'alpha'); $object->frequency = $frequency; @@ -238,9 +238,7 @@ if (empty($reshook)) setEventMessages($oldinvoice->error, $oldinvoice->errors, 'errors'); $action = "create"; } - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); $action = "create"; @@ -252,9 +250,7 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$object->id); exit; - } - else - { + } else { $db->rollback(); $error++; @@ -279,18 +275,15 @@ if (empty($reshook)) if ($action == 'setconditions' && $user->rights->facture->creer) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); - } - // Set mode + } // Set mode elseif ($action == 'setmode' && $user->rights->facture->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); - } - // Set project + } // Set project elseif ($action == 'classin' && $user->rights->facture->creer) { $object->setProject(GETPOST('projectid', 'int')); - } - // Set bank account + } // Set bank account elseif ($action == 'setref' && $user->rights->facture->creer) { //var_dump(GETPOST('ref', 'alpha'));exit; @@ -300,47 +293,37 @@ if (empty($reshook)) $object->titre = GETPOST('ref', 'alpha'); // deprecated $object->title = GETPOST('ref', 'alpha'); $object->ref = $object->title; - } - else dol_print_error($db, $object->error, $object->errors); - } - // Set bank account + } else dol_print_error($db, $object->error, $object->errors); + } // Set bank account elseif ($action == 'setbankaccount' && $user->rights->facture->creer) { $result = $object->setBankAccount(GETPOST('fk_account', 'int')); - } - // Set frequency and unit frequency + } // Set frequency and unit frequency elseif ($action == 'setfrequency' && $user->rights->facture->creer) { $object->setFrequencyAndUnit(GETPOST('frequency', 'int'), GETPOST('unit_frequency', 'alpha')); - } - // Set next date of execution + } // Set next date of execution elseif ($action == 'setdate_when' && $user->rights->facture->creer) { $date = dol_mktime(GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0, GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear')); if (!empty($date)) $object->setNextDate($date); - } - // Set max period + } // Set max period elseif ($action == 'setnb_gen_max' && $user->rights->facture->creer) { $object->setMaxPeriod(GETPOST('nb_gen_max', 'int')); - } - // Set auto validate + } // Set auto validate elseif ($action == 'setauto_validate' && $user->rights->facture->creer) { $object->setAutoValidate(GETPOST('auto_validate', 'int')); - } - // Set generate pdf + } // Set generate pdf elseif ($action == 'setgenerate_pdf' && $user->rights->facture->creer) { $object->setGeneratepdf(GETPOST('generate_pdf', 'int')); - } - // Set model pdf + } // Set model pdf elseif ($action == 'setmodelpdf' && $user->rights->facture->creer) { $object->setModelpdf(GETPOST('modelpdf', 'alpha')); - } - - // Set status disabled + } // Set status disabled elseif ($action == 'disable' && $user->rights->facture->creer) { $db->begin(); @@ -356,15 +339,11 @@ if (empty($reshook)) if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Set status enabled + } // Set status enabled elseif ($action == 'enable' && $user->rights->facture->creer) { $db->begin(); @@ -380,19 +359,14 @@ if (empty($reshook)) if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - // Multicurrency Code + } // Multicurrency Code elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); - } - - // Multicurrency rate + } // Multicurrency rate elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); } @@ -418,20 +392,15 @@ if (empty($reshook)) { $db->commit(); $object->fetch($object->id); // Reload lines - } - else - { + } else { $db->rollback(); setEventMessages($db->lasterror(), null, 'errors'); } - } - else - { + } else { $db->rollback(); setEventMessages($line->error, $line->errors, 'errors'); } - } - elseif ($action == 'update_extras') + } elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); @@ -466,9 +435,7 @@ if (empty($reshook)) { $idprod = 0; $tva_tx = (GETPOST('tva_tx', 'alpha') ? GETPOST('tva_tx', 'alpha') : 0); - } - else - { + } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } @@ -570,17 +537,14 @@ if (empty($reshook)) { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); - } - // On reevalue prix selon taux tva car taux tva transaction peut etre different + } // On reevalue prix selon taux tva car taux tva transaction peut etre different // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). elseif ($tmpvat != $tmpprodvat) { if ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); - } - else - { + } else { $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); } } @@ -603,9 +567,7 @@ if (empty($reshook)) } $desc = (!empty($prod->multilangs [$outputlangs->defaultlang] ["description"])) ? $prod->multilangs [$outputlangs->defaultlang] ["description"] : $prod->description; - } - else - { + } else { $desc = $prod->description; } @@ -640,9 +602,7 @@ if (empty($reshook)) $type = $prod->type; $fk_unit = $prod->fk_unit; - } - else - { + } else { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); @@ -672,9 +632,7 @@ if (empty($reshook)) if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) { $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); setEventMessages($mesg, null, 'errors'); - } - else - { + } else { // Insert line $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $info_bits, '', $pu_ttc, $type, - 1, $special_code, $label, $fk_unit, 0, $date_start_fill, $date_end_fill, $fournprice, $buyingprice); @@ -692,7 +650,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model=$object->modelpdf; + $model=$object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -738,18 +696,14 @@ if (empty($reshook)) unset($_POST['situations']); unset($_POST['progress']); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } $action = ''; } } - } - - elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) + } elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) { if (!$object->fetch($id) > 0) dol_print_error($db); $object->fetch_thirdparty(); @@ -907,7 +861,7 @@ if (empty($reshook)) } $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); }*/ $object->fetch($object->id); // Reload lines @@ -947,9 +901,7 @@ if (empty($reshook)) unset($_POST['situations']); unset($_POST['progress']); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1144,9 +1096,7 @@ if ($action == 'create') $select = array('0'=>$langs->trans('DoNotGenerateDoc'), '1'=>$langs->trans('AutoGenerateDoc')); print $form->selectarray('generate_pdf', $select, GETPOST('generate_pdf')); print "
'; - } - else - { + } else { if ($object->frequency > 0) { print $langs->trans('FrequencyPer_'.$object->unit_frequency, $object->frequency); - } - else - { + } else { print $langs->trans("NotARecurringInvoiceTemplate"); } } @@ -1555,9 +1489,7 @@ else if ($action == 'date_when' || $object->frequency > 0) { print $form->editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); - } - else - { + } else { print $langs->trans("NextDateToExecution"); } print ''; @@ -1569,9 +1501,7 @@ else if (!$object->isMaxNbGenReached()) { if (!$object->suspended && $action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) print img_warning($langs->trans("Late")); - } - else - { + } else { print img_info($langs->trans("MaxNumberOfGenerationReached")); } print ''; @@ -1582,18 +1512,14 @@ else if ($action == 'nb_gen_max' || $object->frequency > 0) { print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); - } - else - { + } else { print $langs->trans("MaxPeriodNumber"); } print ''; if ($action == 'nb_gen_max' || $object->frequency > 0) { print $form->editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max ? $object->nb_gen_max : '', $object, $user->rights->facture->creer); - } - else - { + } else { print ''; } print ''; @@ -1603,8 +1529,7 @@ else print ''; if ($action == 'auto_validate' || $object->frequency > 0) print $form->editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); - else - print $langs->trans("StatusOfGeneratedInvoices"); + else print $langs->trans("StatusOfGeneratedInvoices"); print ''; $select = 'select;0:'.$langs->trans('BillStatusDraft').',1:'.$langs->trans('BillStatusValidated'); if ($action == 'auto_validate' || $object->frequency > 0) @@ -1619,8 +1544,7 @@ else print ''; if ($action == 'generate_pdf' || $object->frequency > 0) print $form->editfieldkey($langs->trans("StatusOfGeneratedDocuments"), 'generate_pdf', $object->generate_pdf, $object, $user->rights->facture->creer); - else - print $langs->trans("StatusOfGeneratedDocuments"); + else print $langs->trans("StatusOfGeneratedDocuments"); print ''; print ''; $select = 'select;0:'.$langs->trans('DoNotGenerateDoc').',1:'.$langs->trans('AutogenerateDoc'); @@ -1630,9 +1554,7 @@ else } print ''; print ''; - } - else - { + } else { print ''; } @@ -1733,21 +1655,15 @@ else if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) { print ''; - } - else - { + } else { if (empty($object->frequency) || $object->date_when <= $today) { print ''; - } - else - { + } else { print ''; } } - } - else - { + } else { print ''; } } @@ -1757,9 +1673,7 @@ else if (empty($object->suspended)) { print ''; - } - else - { + } else { print ''; } } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index ab2262844bf..ed77c0e8a56 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -188,9 +188,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } - } - - // Change status of invoice + } // Change status of invoice elseif ($action == 'reopen' && $usercancreate) { $result = $object->fetch($id); @@ -203,9 +201,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Delete invoice + } // Delete invoice elseif ($action == 'confirm_delete' && $confirm == 'yes') { $result = $object->fetch($id); $object->fetch_thirdparty(); @@ -233,9 +229,7 @@ if (empty($reshook)) $action = ''; } } - } - - // Delete line + } // Delete line elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); @@ -257,7 +251,7 @@ if (empty($reshook)) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($id); // Reload to get new records - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } if ($result >= 0) { header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); @@ -267,17 +261,13 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } - } - - // Delete link of credit note to invoice + } // Delete link of credit note to invoice elseif ($action == 'unlinkdiscount' && $usercancreate) { $discount = new DiscountAbsolute($db); $result = $discount->fetch(GETPOST("discountid")); $discount->unlink_invoice(); - } - - // Validation + } // Validation elseif ($action == 'valid' && $usercancreate) { $object->fetch($id); @@ -323,44 +313,44 @@ if (empty($reshook)) if (($tmp_total_ht < 0 || $tmp_total_ht_devise < 0) && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES)) { - $langs->load("errors"); if ($object->type == $object::TYPE_DEPOSIT) { + $langs->load("errors"); // Using negative lines on deposit lead to headach and blocking problems when you want to consume them. setEventMessages($langs->trans("ErrorLinesCantBeNegativeOnDeposits"), null, 'errors'); + $error++; + $action = ''; } else { - setEventMessages($langs->trans("ErrorLinesCantBeNegativeForOneVATRate"), null, 'errors'); + $tmpvatratetoshow = explode('_', $vatrate); + $tmpvatratetoshow[0] = round($tmpvatratetoshow[0], 2); + + if ($tmpvatratetoshow[0] != 0) { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorLinesCantBeNegativeForOneVATRate", $tmpvatratetoshow[0]), null, 'errors'); + $error++; + $action = ''; + } } - $error++; - $action = ''; } } } - } - - elseif ($action == 'set_thirdparty' && $usercancreate) + } elseif ($action == 'set_thirdparty' && $usercancreate) { $object->fetch($id); $object->setValueFrom('fk_soc', $socid, '', null, 'int', '', $user, 'BILL_MODIFY'); header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); exit(); - } - - elseif ($action == 'classin' && $usercancreate) + } elseif ($action == 'classin' && $usercancreate) { $object->fetch($id); $object->setProject($_POST['projectid']); - } - - elseif ($action == 'setmode' && $usercancreate) + } elseif ($action == 'setmode' && $usercancreate) { $object->fetch($id); $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); if ($result < 0) dol_print_error($db, $object->error); - } - - elseif ($action == 'setretainedwarrantyconditions' && $user->rights->facture->creer) + } elseif ($action == 'setretainedwarrantyconditions' && $user->rights->facture->creer) { $object->fetch($id); $object->retained_warranty_fk_cond_reglement = 0; // To clean property @@ -373,36 +363,25 @@ if (empty($reshook)) if ($object->retained_warranty_date_limit < $object->date) $object->retained_warranty_date_limit = $object->date; $result = $object->update($user); if ($result < 0) dol_print_error($db, $object->error); - } - - elseif ($action == 'setretainedwarranty' && $user->rights->facture->creer) + } elseif ($action == 'setretainedwarranty' && $user->rights->facture->creer) { $object->fetch($id); $result = $object->setRetainedWarranty(GETPOST('retained_warranty', 'float')); if ($result < 0) dol_print_error($db, $object->error); - } - - elseif ($action == 'setretainedwarrantydatelimit' && $user->rights->facture->creer) + } elseif ($action == 'setretainedwarrantydatelimit' && $user->rights->facture->creer) { $object->fetch($id); $result = $object->setRetainedWarrantyDateLimit(GETPOST('retained_warranty_date_limit', 'float')); if ($result < 0) dol_print_error($db, $object->error); - } - - - // Multicurrency Code + } // Multicurrency Code elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); - } - - // Multicurrency rate + } // Multicurrency rate elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); - } - - elseif ($action == 'setinvoicedate' && $usercancreate) + } elseif ($action == 'setinvoicedate' && $usercancreate) { $object->fetch($id); $old_date_lim_reglement = $object->date_lim_reglement; @@ -421,9 +400,7 @@ if (empty($reshook)) if ($result < 0) { dol_print_error($db, $object->error); } - } - - elseif ($action == 'setdate_pointoftax' && $usercancreate) + } elseif ($action == 'setdate_pointoftax' && $usercancreate) { $object->fetch($id); $date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']); @@ -432,9 +409,7 @@ if (empty($reshook)) if ($result < 0) { dol_print_error($db, $object->error); } - } - - elseif ($action == 'setconditions' && $usercancreate) + } elseif ($action == 'setconditions' && $usercancreate) { $object->fetch($id); $object->cond_reglement_code = 0; // To clean property @@ -450,9 +425,7 @@ if (empty($reshook)) if ($result < 0) { dol_print_error($db, $object->error); } - } - - elseif ($action == 'setpaymentterm' && $usercancreate) + } elseif ($action == 'setpaymentterm' && $usercancreate) { $object->fetch($id); $object->date_lim_reglement = dol_mktime(12, 0, 0, $_POST['paymenttermmonth'], $_POST['paymenttermday'], $_POST['paymenttermyear']); @@ -464,9 +437,7 @@ if (empty($reshook)) if ($result < 0) { dol_print_error($db, $object->error); } - } - - elseif ($action == 'setrevenuestamp' && $usercancreate) + } elseif ($action == 'setrevenuestamp' && $usercancreate) { $object->fetch($id); $object->revenuestamp = GETPOST('revenuestamp'); @@ -487,34 +458,26 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Set incoterm + } // Set incoterm elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); - } - - // bank account + } // bank account elseif ($action == 'setbankaccount' && $usercancreate) { $result = $object->setBankAccount(GETPOST('fk_account', 'int')); - } - - elseif ($action == 'setremisepercent' && $usercancreate) + } elseif ($action == 'setremisepercent' && $usercancreate) { $object->fetch($id); $result = $object->set_remise($user, $_POST['remise_percent']); - } - - elseif ($action == "setabsolutediscount" && $usercancreate) + } elseif ($action == "setabsolutediscount" && $usercancreate) { // POST[remise_id] or POST[remise_id_for_payment] @@ -567,24 +530,18 @@ if (empty($reshook)) } $ret = $object->fetch($id); // Reload to get new records - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'setref' && $usercancreate) + } elseif ($action == 'setref' && $usercancreate) { $object->fetch($id); $object->setValueFrom('ref', GETPOST('ref'), '', null, '', '', $user, 'BILL_MODIFY'); - } - - elseif ($action == 'setref_client' && $usercancreate) + } elseif ($action == 'setref_client' && $usercancreate) { $object->fetch($id); $object->set_ref_client(GETPOST('ref_client')); - } - - // Classify to validated + } // Classify to validated elseif ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) { $idwarehouse = GETPOST('idwarehouse', 'int'); @@ -618,9 +575,7 @@ if (empty($reshook)) } } } - } - else - { + } else { //var_dump($conf->global->SOCIETE_EMAIL_MANDATORY); if ($key == 'EMAIL') { @@ -689,22 +644,18 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { if (count($object->errors)) setEventMessages(null, $object->errors, 'errors'); else setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Go back to draft status (unvalidate) + } // Go back to draft status (unvalidate) elseif ($action == 'confirm_modif' && $usercanunvalidate) { $idwarehouse = GETPOST('idwarehouse', 'int'); @@ -777,7 +728,7 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -785,9 +736,7 @@ if (empty($reshook)) } } } - } - - // Classify "paid" + } // Classify "paid" elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercanissuepayment) { $object->fetch($id); @@ -816,9 +765,7 @@ if (empty($reshook)) } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); } - } - - // Convertir en reduc + } // Convertir en reduc elseif ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); @@ -971,25 +918,19 @@ if (empty($reshook)) if ($result >= 0) { $db->commit(); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } else { $db->commit(); } - } - else - { + } else { setEventMessages($discount->error, $discount->errors, 'errors'); $db->rollback(); } } - } - - // Delete payment + } // Delete payment elseif ($action == 'confirm_delete_paiement' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); @@ -1005,9 +946,7 @@ if (empty($reshook)) setEventMessages($paiement->error, $paiement->errors, 'errors'); } } - } - - /* + } /* * Insert new invoice in database */ elseif ($action == 'add' && $usercancreate) @@ -1025,7 +964,7 @@ if (empty($reshook)) // Replacement invoice if ($_POST['type'] == Facture::TYPE_REPLACEMENT) { - $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($dateinvoice)) { $error++; @@ -1052,7 +991,7 @@ if (empty($reshook)) // We do not copy the private note $object->ref_client = $_POST['ref_client']; $object->ref_int = $_POST['ref_int']; - $object->modelpdf = $_POST['model']; + $object->model_pdf = $_POST['model']; $object->fk_project = $_POST['projectid']; $object->cond_reglement_id = $_POST['cond_reglement_id']; $object->mode_reglement_id = $_POST['mode_reglement_id']; @@ -1086,7 +1025,7 @@ if (empty($reshook)) $action = 'create'; } - $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($dateinvoice)) { $error++; @@ -1109,7 +1048,7 @@ if (empty($reshook)) // We do not copy the private note $object->ref_client = $_POST['ref_client']; $object->ref_int = $_POST['ref_int']; - $object->modelpdf = $_POST['model']; + $object->model_pdf = $_POST['model']; $object->fk_project = $_POST['projectid']; $object->cond_reglement_id = 0; $object->mode_reglement_id = $_POST['mode_reglement_id']; @@ -1137,6 +1076,11 @@ if (empty($reshook)) } $id = $object->create($user); + // NOTE: Pb with situation invoice + // NOTE: fields total on situation invoice are stored as cumulative values on total of lines (bad) but delta on invoice total + // NOTE: fields total on credit note are stored as delta both on total of lines and on invoice total (good) + // NOTE: fields situation_percent on situation invoice are stored as cumulative values on lines (bad) + // NOTE: fields situation_percent on credit note are stored as delta on lines (good) if (GETPOST('invoiceAvoirWithLines', 'int') == 1 && $id > 0) { if (!empty($facture_source->lines)) @@ -1157,17 +1101,17 @@ if (empty($reshook)) } - - if ($facture_source->type == Facture::TYPE_SITUATION) { $source_fk_prev_id = $line->fk_prev_id; // temporary storing situation invoice fk_prev_id - $line->fk_prev_id = $line->id; // Credit note line need to be linked to the situation invoice it is create from + $line->fk_prev_id = $line->id; // The new line of the new credit note we are creating must be linked to the situation invoice line it is created from if (!empty($facture_source->tab_previous_situation_invoice)) { - // search the last invoice in cycle - $lineIndex = count($facture_source->tab_previous_situation_invoice) - 1; + // search the last standard invoice in cycle and the possible credit note between this last and facture_source + // TODO Move this out of loop of $facture_source->lines + $tab_jumped_credit_notes = array(); + $lineIndex = count($facture_source->tab_previous_situation_invoice) - 1; $searchPreviousInvoice = true; while ($searchPreviousInvoice) { @@ -1175,14 +1119,14 @@ if (empty($reshook)) { $searchPreviousInvoice = false; // find, exit; break; - } - else - { + } else { + if ($facture_source->tab_previous_situation_invoice[$lineIndex]->type == Facture::TYPE_CREDIT_NOTE) { + $tab_jumped_credit_notes[$lineIndex] = $facture_source->tab_previous_situation_invoice[$lineIndex]->id; + } $lineIndex--; // go to previous invoice in cycle } } - $maxPrevSituationPercent = 0; foreach ($facture_source->tab_previous_situation_invoice[$lineIndex]->lines as $prevLine) { @@ -1206,6 +1150,36 @@ if (empty($reshook)) // prorata $line->situation_percent = $maxPrevSituationPercent - $line->situation_percent; + + //print 'New line based on invoice id '.$facture_source->tab_previous_situation_invoice[$lineIndex]->id.' fk_prev_id='.$source_fk_prev_id.' will be fk_prev_id='.$line->fk_prev_id.' '.$line->total_ht.' '.$line->situation_percent.'
'; + + // If there is some credit note between last situation invoice and invoice used for credit note generation (note: credit notes are stored as delta) + $maxPrevSituationPercent = 0; + foreach ($tab_jumped_credit_notes as $index => $creditnoteid) { + foreach ($facture_source->tab_previous_situation_invoice[$index]->lines as $prevLine) + { + if ($prevLine->fk_prev_id == $source_fk_prev_id) + { + $maxPrevSituationPercent = $prevLine->situation_percent; + + $line->total_ht -= $prevLine->total_ht; + $line->total_tva -= $prevLine->total_tva; + $line->total_ttc -= $prevLine->total_ttc; + $line->total_localtax1 -= $prevLine->total_localtax1; + $line->total_localtax2 -= $prevLine->total_localtax2; + + $line->multicurrency_subprice -= $prevLine->multicurrency_subprice; + $line->multicurrency_total_ht -= $prevLine->multicurrency_total_ht; + $line->multicurrency_total_tva -= $prevLine->multicurrency_total_tva; + $line->multicurrency_total_ttc -= $prevLine->multicurrency_total_ttc; + } + } + } + + // prorata + $line->situation_percent += $maxPrevSituationPercent; + + //print 'New line based on invoice id '.$facture_source->tab_previous_situation_invoice[$lineIndex]->id.' fk_prev_id='.$source_fk_prev_id.' will be fk_prev_id='.$line->fk_prev_id.' '.$line->total_ht.' '.$line->situation_percent.'
'; } } @@ -1253,7 +1227,7 @@ if (empty($reshook)) } // Add link between credit note and origin - if (!empty($object->fk_facture_source)) { + if (!empty($object->fk_facture_source) && $id > 0) { $facture_source->fetch($object->fk_facture_source); $facture_source->fetchObjectLinked(); @@ -1269,7 +1243,7 @@ if (empty($reshook)) // Standard invoice or Deposit invoice, created from a Predefined template invoice if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT) && GETPOST('fac_rec', 'int') > 0) { - $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($dateinvoice)) { $error++; @@ -1290,7 +1264,7 @@ if (empty($reshook)) $object->note_private = trim(GETPOST('note_private', 'none')); $object->ref_client = $_POST['ref_client']; $object->ref_int = $_POST['ref_int']; - $object->modelpdf = $_POST['model']; + $object->model_pdf = $_POST['model']; $object->fk_project = $_POST['projectid']; $object->cond_reglement_id = ($_POST['type'] == 3 ? 1 : $_POST['cond_reglement_id']); $object->mode_reglement_id = $_POST['mode_reglement_id']; @@ -1320,7 +1294,7 @@ if (empty($reshook)) $action = 'create'; } - $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($dateinvoice)) { $error++; @@ -1342,7 +1316,7 @@ if (empty($reshook)) $object->note_private = trim(GETPOST('note_private', 'none')); $object->ref_client = $_POST['ref_client']; $object->ref_int = $_POST['ref_int']; - $object->modelpdf = $_POST['model']; + $object->model_pdf = $_POST['model']; $object->fk_project = $_POST['projectid']; $object->cond_reglement_id = ($_POST['type'] == 3 ? 1 : $_POST['cond_reglement_id']); $object->mode_reglement_id = $_POST['mode_reglement_id']; @@ -1365,8 +1339,7 @@ if (empty($reshook)) if (in_array($object->type, $retainedWarrantyInvoiceAvailableType)) { $object->retained_warranty = GETPOST('retained_warranty', 'int'); $object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); - } - else { + } else { $object->retained_warranty = 0; $object->retained_warranty_fk_cond_reglement = 0; } @@ -1444,7 +1417,7 @@ if (empty($reshook)) $result = $srcobject->fetch($object->origin_id); $typeamount = GETPOST('typedeposit', 'aZ09'); - $valuedeposit = GETPOST('valuedeposit', 'int'); + $valuedeposit = price2num(GETPOST('valuedeposit', 'alpha'), 'MU'); // If deposit invoice if ($_POST['type'] == Facture::TYPE_DEPOSIT && in_array($typeamount, array('amount', 'variable'))) @@ -1469,14 +1442,11 @@ if (empty($reshook)) $amount_ttc_diff += $am; $amountdeposit[$tva] += $am / (1 + $tva / 100); // Convert into HT for the addline } - } - else - { + } else { if ($typeamount == 'amount') { $amountdeposit[0] = $valuedeposit; - } - elseif ($typeamount == 'variable') + } elseif ($typeamount == 'variable') { if ($result > 0) { @@ -1724,9 +1694,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } - else - { // If some invoice's lines coming from page + } else { // If some invoice's lines coming from page $id = $object->create($user); for ($i = 1; $i <= $NBLINES; $i++) { @@ -1745,7 +1713,7 @@ if (empty($reshook)) // Situation invoices if (GETPOST('type') == Facture::TYPE_SITUATION && (!empty($_POST['situations']))) { - $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($datefacture)) { $error++; $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")); @@ -1838,7 +1806,7 @@ if (empty($reshook)) $object->note_private = trim(GETPOST('note', 'none')); $object->ref_client = GETPOST('ref_client', 'alpha'); $object->ref_int = GETPOST('ref_int', 'alpha'); - $object->modelpdf = GETPOST('model', 'alpha'); + $object->model_pdf = GETPOST('model', 'alpha'); $object->fk_project = GETPOST('projectid', 'int'); $object->cond_reglement_id = GETPOST('cond_reglement_id', 'int'); $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); @@ -1852,9 +1820,7 @@ if (empty($reshook)) if ($id <= 0) { $mesg = $object->error; - } - else - { + } else { $nextSituationInvoice = new Facture($db); $nextSituationInvoice->fetch($id); @@ -1885,7 +1851,7 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -1894,19 +1860,23 @@ if (empty($reshook)) header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); exit(); - } - else - { + } else { $db->rollback(); $action = 'create'; $_GET["origin"] = $_POST["origin"]; $_GET["originid"] = $_POST["originid"]; setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Add a new line - elseif ($action == 'addline' && $usercancreate) + } elseif ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && GETPOST('vatforalllines', 'alpha')) { + // Define vat_rate + $vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0); + $vat_rate = str_replace('*', '', $vat_rate); + $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty, $mysoc); + $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty, $mysoc); + foreach ($object->lines as $line) { + $result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit, $line->multicurrency_subprice); + } + } elseif ($action == 'addline' && $usercancreate) // Add a new line { $langs->load('errors'); $error = 0; @@ -1921,9 +1891,7 @@ if (empty($reshook)) { $idprod = 0; $tva_tx = (GETPOST('tva_tx', 'alpha') ? GETPOST('tva_tx', 'alpha') : 0); - } - else - { + } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } @@ -1970,9 +1938,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldCantBeNegativeOnInvoice", $langs->transnoentitiesnoconv("UnitPriceHT"), $langs->transnoentitiesnoconv("CustomerAbsoluteDiscountShort")), null, 'errors'); } $error++; - } - else - { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error++; } @@ -1998,9 +1964,7 @@ if (empty($reshook)) if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) { $idprod = $res->fk_product_child; - } - else - { + } else { setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors'); $error++; } @@ -2056,17 +2020,14 @@ if (empty($reshook)) { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); - } - // On reevalue prix selon taux tva car taux tva transaction peut etre different + } // On reevalue prix selon taux tva car taux tva transaction peut etre different // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). elseif ($tmpvat != $tmpprodvat) { if ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); - } - else - { + } else { $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); } } @@ -2184,7 +2145,7 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -2233,9 +2194,7 @@ if (empty($reshook)) $action = ''; } } - } - - elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) + } elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) { if (!$object->fetch($id) > 0) dol_print_error($db); $object->fetch_thirdparty(); @@ -2292,16 +2251,14 @@ if (empty($reshook)) setEventMessages($mesg, null, 'warnings'); $error++; $result = -1; - } - elseif (GETPOST('progress') < $line->situation_percent) // TODO : use a modified $line->get_prev_progress($object->id) result + } elseif (GETPOST('progress') < $line->situation_percent) // TODO : use a modified $line->get_prev_progress($object->id) result { $mesg = $langs->trans("CantBeLessThanMinPercent"); setEventMessages($mesg, null, 'warnings'); $error++; $result = -1; } - } - elseif (GETPOST('progress') < $percent) + } elseif (GETPOST('progress') < $percent) { $mesg = '
'.$langs->trans("CantBeLessThanMinPercent").'
'; setEventMessages($mesg, null, 'warnings'); @@ -2356,9 +2313,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldCantBeNegativeOnInvoice", $langs->transnoentitiesnoconv("UnitPriceHT"), $langs->transnoentitiesnoconv("CustomerAbsoluteDiscountShort")), null, 'errors'); } $error++; - } - else - { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error++; } @@ -2401,7 +2356,7 @@ if (empty($reshook)) } $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST['qty']); @@ -2443,9 +2398,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - elseif ($action == 'updatealllines' && $usercancreate && $_POST['all_percent'] == $langs->trans('Modifier')) // Update all lines of situation invoice + } elseif ($action == 'updatealllines' && $usercancreate && $_POST['all_percent'] == $langs->trans('Modifier')) // Update all lines of situation invoice { if (!$object->fetch($id) > 0) dol_print_error($db); if (GETPOST('all_progress') != "") @@ -2458,18 +2411,13 @@ if (empty($reshook)) $mesg = $langs->trans("Line").' '.$i.' : '.$langs->trans("CantBeLessThanMinPercent"); setEventMessages($mesg, null, 'warnings'); $result = -1; - } else - $object->update_percent($line, $_POST['all_progress']); + } else $object->update_percent($line, $_POST['all_progress']); } } - } - - elseif ($action == 'updateline' && $usercancreate && $_POST['cancel'] == $langs->trans('Cancel')) { + } elseif ($action == 'updateline' && $usercancreate && $_POST['cancel'] == $langs->trans('Cancel')) { header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); // To show again edited page exit(); - } - - // Outing situation invoice from cycle + } // Outing situation invoice from cycle elseif ($action == 'confirm_situationout' && $confirm == 'yes' && $usercancreate) { $object->fetch($id, '', '', '', true); @@ -2539,9 +2487,7 @@ if (empty($reshook)) { $searchPreviousInvoice = false; // find, exit; break; - } - else - { + } else { $lineIndex--; // go to previous invoice in cycle } } @@ -2568,25 +2514,17 @@ if (empty($reshook)) { setEventMessages($langs->trans('Updated'), '', 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); - } - else - { + } else { setEventMessages($langs->trans('ErrorOutingSituationInvoiceCreditNote'), array(), 'errors'); } - } - else - { + } else { setEventMessages($langs->trans('ErrorOutingSituationInvoiceOnUpdate'), array(), 'errors'); } - } - else - { + } else { setEventMessages($langs->trans('ErrorFindNextSituationInvoice'), array(), 'errors'); } } - } - - // add lines from objectlinked + } // add lines from objectlinked elseif ($action == 'import_lines_from_object' && $usercancreate && $object->statut == Facture::STATUS_DRAFT @@ -2602,8 +2540,7 @@ if (empty($reshook)) { dol_include_once('/'.$fromElement.'/class/'.$fromElement.'.class.php'); $lineClassName = 'OrderLine'; - } - elseif ($fromElement == 'propal') + } elseif ($fromElement == 'propal') { dol_include_once('/comm/'.$fromElement.'/class/'.$fromElement.'.class.php'); $lineClassName = 'PropaleLigne'; @@ -2645,8 +2582,7 @@ if (empty($reshook)) $array_options = $originLine->array_options; if ($object->type == Facture::TYPE_SITUATION) { $situation_percent = 0; - } - else { + } else { $situation_percent = 100; } $fk_prev_id = ''; @@ -2660,8 +2596,7 @@ if (empty($reshook)) } else { $error++; } - } - else { + } else { $error++; } } @@ -2874,9 +2809,7 @@ if ($action == 'create') //Replicate extrafields $expesrc->fetch_optionals(); $object->array_options = $expesrc->array_options; - } - else - { + } else { $cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0)); $mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0)); $fk_account = (!empty($objectsrc->fk_account) ? $objectsrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0)); @@ -2894,9 +2827,7 @@ if ($action == 'create') $object->array_options = $objectsrc->array_options; } } - } - else - { + } else { $cond_reglement_id = $soc->cond_reglement_id; $mode_reglement_id = $soc->mode_reglement_id; $fk_account = $soc->fk_account; @@ -2907,12 +2838,21 @@ if ($action == 'create') if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; } + // when payment condition is empty (means not override by payment condition form a other object, like third-party), try to use default value + if (empty($cond_reglement_id)) { + $cond_reglement_id = GETPOST("cond_reglement_id"); + } + + // when payment mode is empty (means not override by payment mode form a other object, like third-party), try to use default value + if (empty($mode_reglement_id)) { + $mode_reglement_id = GETPOST("mode_reglement_id"); + } + if (!empty($soc->id)) $absolute_discount = $soc->getAvailableDiscounts(); $note_public = $object->getDefaultCreateValueFor('note_public', ((!empty($origin) && !empty($originid) && is_object($objectsrc) && !empty($conf->global->FACTURE_REUSE_NOTES_ON_CREATE_FROM)) ? $objectsrc->note_public : null)); $note_private = $object->getDefaultCreateValueFor('note_private', ((!empty($origin) && !empty($originid) && is_object($objectsrc) && !empty($conf->global->FACTURE_REUSE_NOTES_ON_CREATE_FROM)) ? $objectsrc->note_private : null)); - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; print ajax_combobox('fac_replacement'); print ajax_combobox('fac_avoir'); @@ -2978,9 +2918,7 @@ if ($action == 'create') print ')'; print ''; print ''."\n"; - } - else - { + } else { print ''.$langs->trans('Customer').''; print ''; print $form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); @@ -3134,10 +3072,10 @@ if ($action == 'create') print '
'; // Next situation invoice - $opt = $form->selectSituationInvoices(GETPOST('originid'), $socid); + $opt = $form->selectSituationInvoices(GETPOST('originid', 'int'), $socid); print '
'; - $tmp = ''.$langs->trans('NoSituations').'') || (GETPOST('origin') && GETPOST('origin') != 'facture' && GETPOST('origin') != 'commande')) $tmp .= ' disabled'; $tmp .= '> '; @@ -3203,9 +3141,7 @@ if ($action == 'create') print $desc; print '
'; } - } - else - { + } else { if (!empty($conf->global->INVOICE_USE_SITUATION)) { print '
'; @@ -3310,9 +3246,7 @@ if ($action == 'create') print '
'; } - } - else - { + } else { print '
'; if (empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp = ' '; else $tmp = ' '; @@ -3463,13 +3397,16 @@ if ($action == 'create') print ''; // Bank Account - if (GETPOSTISSET('fk_account')) { - $fk_account = GETPOST('fk_account'); - } + if (!empty($conf->banque->enabled)) + { + if (GETPOSTISSET('fk_account')) { + $fk_account = GETPOST('fk_account'); + } - print ''.$langs->trans('BankAccount').''; - $form->select_comptes($fk_account, 'fk_account', 0, '', 1); - print ''; + print ''.$langs->trans('BankAccount').''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + } // Project if (!empty($conf->projet->enabled)) @@ -3499,10 +3436,19 @@ if ($action == 'create') } // Other attributes - $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="2"', 'cols' => '2'); + $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="2"', 'cols' => '2', 'socid'=>$socid); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { + if (!empty($conf->global->THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_INVOICE)) { + // copy from thirdparty + $tpExtrafields = new Extrafields($db); + $tpExtrafieldLabels = $tpExtrafields->fetch_name_optionals_label($soc->table_element); + if ($soc->fetch_optionals() > 0) { + $object->array_options = array_merge($object->array_options, $soc->array_options); + } + }; + print $object->showOptionals($extrafields, 'edit', $parameters); } @@ -3679,8 +3625,7 @@ if ($action == 'create') } print '
'; -} -elseif ($id > 0 || !empty($ref)) +} elseif ($id > 0 || !empty($ref)) { /* * Show object in view mode @@ -3789,9 +3734,7 @@ elseif ($id > 0 || !empty($ref)) array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse') ?GETPOST('idwarehouse') : 'ifone', 'idwarehouse', '', 1, 0, 0, $langs->trans("NoStockAction"), 0, $forcecombo)) ); $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); - } - else - { + } else { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', 'no', 1); } } else { @@ -4128,8 +4071,7 @@ elseif ($id > 0 || !empty($ref)) foreach ($facidavoir as $id) { if ($i == 0) print ' '; - else - print ','; + else print ','; $facavoir = new Facture($db); $facavoir->fetch($id); print $facavoir->getNomUrl(1); @@ -4273,9 +4215,7 @@ elseif ($id > 0 || !empty($ref)) if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); - } - else - { + } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'none', 'CRDT'); } print ''; @@ -4327,24 +4267,25 @@ elseif ($id > 0 || !empty($ref)) } // Bank Account - print ''; - print ''; - print '
'; - print $langs->trans('BankAccount'); - print ''; - if (($action != 'editbankaccount') && $usercancreate) - print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
'; - print ''; - if ($action == 'editbankaccount') + if (!empty($conf->banque->enabled)) { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + print ''; + print ''; + print '
'; + print $langs->trans('BankAccount'); + print ''; + if (($action != 'editbankaccount') && $usercancreate) + print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
'; + print ''; + if ($action == 'editbankaccount') + { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + } else { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + } + print ""; + print ''; } - else - { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); - } - print ""; - print ''; // Incoterms if (!empty($conf->incoterm->enabled)) @@ -4361,9 +4302,7 @@ elseif ($id > 0 || !empty($ref)) if ($action != 'editincoterm') { print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); - } - else - { + } else { print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); } print ''; @@ -4377,7 +4316,7 @@ elseif ($id > 0 || !empty($ref)) $displayWarranty = false; } - if($displayWarranty) { + if ($displayWarranty) { // Retained Warranty print ''; print ''; @@ -4432,9 +4369,7 @@ elseif ($id > 0 || !empty($ref)) $form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1); print ''; print ''; - } - else - { + } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->retained_warranty_fk_cond_reglement, 'none'); if (!$displayWarranty) { print img_picto($langs->trans('RetainedWarrantyNeed100Percent'), 'warning.png', 'class="pictowarning valignmiddle" '); @@ -4467,9 +4402,7 @@ elseif ($id > 0 || !empty($ref)) print ''; print ''; print ''; - } - else - { + } else { print dol_print_date($object->retained_warranty_date_limit, 'day'); } print ''; @@ -4831,8 +4764,7 @@ elseif ($id > 0 || !empty($ref)) print ''; $resteapayeraffiche = $resteapayer; @@ -4927,9 +4859,7 @@ elseif ($id > 0 || !empty($ref)) if ($object->type == Facture::TYPE_SITUATION) { $retainedWarranty = $total_global_ttc * $object->retained_warranty / 100; - } - else - { + } else { // Because one day retained warranty could be used on standard invoices $retainedWarranty = $object->total_ttc * $object->retained_warranty / 100; } @@ -4944,8 +4874,7 @@ elseif ($id > 0 || !empty($ref)) print !empty($object->retained_warranty_date_limit) ? ' '.$langs->trans("ToPayOn", dol_print_date($object->retained_warranty_date_limit, 'day')) : ''; print ' :'; } - } - else // Credit note + } else // Credit note { $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -5118,9 +5047,7 @@ elseif ($id > 0 || !empty($ref)) print ''.$langs->trans('Modify').''; } } - } - else - { + } else { print ''.$langs->trans('Modify').''; } } @@ -5159,8 +5086,7 @@ elseif ($id > 0 || !empty($ref)) } else { if ($usercansend) { print ''.$langs->trans('SendMail').''; - } else - print ''.$langs->trans('SendMail').''; + } else print ''.$langs->trans('SendMail').''; } } } @@ -5178,14 +5104,10 @@ elseif ($id > 0 || !empty($ref)) } else { print ''.$langs->trans('MakeWithdrawRequest').''; } - } - else - { + } else { //print ''.$langs->trans("MakeWithdrawRequest").''; } - } - else - { + } else { //print ''.$langs->trans("MakeWithdrawRequest").''; } } @@ -5219,9 +5141,7 @@ elseif ($id > 0 || !empty($ref)) if ($resteapayer == 0) { print ''.$langs->trans('DoPaymentBack').''; - } - else - { + } else { print ''.$langs->trans('DoPaymentBack').''; } } @@ -5260,17 +5180,13 @@ elseif ($id > 0 || !empty($ref)) { // If one payment or one credit note was linked to this invoice print ''.$langs->trans('ClassifyPaidPartially').''; - } - else - { + } else { if (empty($conf->global->INVOICE_CAN_NEVER_BE_CANCELED)) { if ($objectidnext) { print ''.$langs->trans('ClassifyCanceled').''; - } - else - { + } else { print ''.$langs->trans('ClassifyCanceled').''; } } @@ -5282,7 +5198,7 @@ elseif ($id > 0 || !empty($ref)) { if (!$objectidnext) { - print ''.$langs->trans("CreateCreditNote").''; + print ''.$langs->trans("CreateCreditNote").''; } } @@ -5332,9 +5248,7 @@ elseif ($id > 0 || !empty($ref)) if (($object->total_ttc - $totalcreditnotes) == 0) { print ''.$langs->trans("RemoveSituationFromCycle").''; - } - else - { + } else { print ''.$langs->trans("RemoveSituationFromCycle").''; } } @@ -5357,26 +5271,19 @@ elseif ($id > 0 || !empty($ref)) //var_dump($isErasable); if ($isErasable == -4) { print ''.$langs->trans('Delete').''; - } - elseif ($isErasable == -3) { + } elseif ($isErasable == -3) { print ''.$langs->trans('Delete').''; - } - elseif ($isErasable == -2) { + } elseif ($isErasable == -2) { print ''.$langs->trans('Delete').''; - } - elseif ($isErasable == -1) { + } elseif ($isErasable == -1) { print ''.$langs->trans('Delete').''; - } - elseif ($isErasable <= 0) // Any other cases + } elseif ($isErasable <= 0) // Any other cases { print ''.$langs->trans('Delete').''; - } - elseif ($objectidnext) + } elseif ($objectidnext) { print ''.$langs->trans('Delete').''; - } - else - { + } else { print ''.$langs->trans('Delete').''; } } else { @@ -5404,7 +5311,7 @@ elseif ($id > 0 || !empty($ref)) print $formfile->showdocuments( 'facture', $filename, $filedir, $urlsource, $genallowed, - $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', + $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang, '', $object, 0, 'remove_file_comfirm'); $somethingshown = $formfile->numoffiles; diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 85da9cd5c37..1828493d89f 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -28,96 +28,96 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; */ class Invoices extends DolibarrApi { - /** - * - * @var array $FIELDS Mandatory fields, checked when create and update object - */ - static $FIELDS = array( - 'socid', - ); + /** + * + * @var array $FIELDS Mandatory fields, checked when create and update object + */ + static $FIELDS = array( + 'socid', + ); - /** - * @var Facture $invoice {@type Facture} - */ - public $invoice; + /** + * @var Facture $invoice {@type Facture} + */ + public $invoice; - /** - * Constructor - */ - public function __construct() - { - global $db, $conf; - $this->db = $db; - $this->invoice = new Facture($this->db); - } - - /** - * Get properties of a invoice object - * - * Return an array with invoice informations - * - * @param int $id ID of invoice - * @param int $contact_list 0:Return array contains all properties, 1:Return array contains just id - * @return array|mixed data without useless information - * - * @throws RestException - */ - public function get($id, $contact_list = 1) + /** + * Constructor + */ + public function __construct() { - return $this->_fetch($id, '', '', $contact_list); + global $db, $conf; + $this->db = $db; + $this->invoice = new Facture($this->db); } - /** - * Get properties of an invoice object by ref - * - * Return an array with invoice informations - * - * @param string $ref Ref of object - * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id - * @return array|mixed data without useless information - * - * @url GET ref/{ref} - * - * @throws RestException - */ - public function getByRef($ref, $contact_list = 1) - { - return $this->_fetch('', $ref, '', $contact_list); - } + /** + * Get properties of a invoice object + * + * Return an array with invoice informations + * + * @param int $id ID of invoice + * @param int $contact_list 0:Return array contains all properties, 1:Return array contains just id + * @return array|mixed data without useless information + * + * @throws RestException + */ + public function get($id, $contact_list = 1) + { + return $this->_fetch($id, '', '', $contact_list); + } - /** - * Get properties of an invoice object by ref_ext - * - * Return an array with invoice informations - * - * @param string $ref_ext External reference of object - * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id - * @return array|mixed data without useless information - * - * @url GET ref_ext/{ref_ext} - * - * @throws RestException - */ - public function getByRefExt($ref_ext, $contact_list = 1) - { - return $this->_fetch('', '', $ref_ext, $contact_list); - } + /** + * Get properties of an invoice object by ref + * + * Return an array with invoice informations + * + * @param string $ref Ref of object + * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id + * @return array|mixed data without useless information + * + * @url GET ref/{ref} + * + * @throws RestException + */ + public function getByRef($ref, $contact_list = 1) + { + return $this->_fetch('', $ref, '', $contact_list); + } - /** - * Get properties of an invoice object - * - * Return an array with invoice informations - * - * @param int $id ID of order + /** + * Get properties of an invoice object by ref_ext + * + * Return an array with invoice informations + * + * @param string $ref_ext External reference of object + * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id + * @return array|mixed data without useless information + * + * @url GET ref_ext/{ref_ext} + * + * @throws RestException + */ + public function getByRefExt($ref_ext, $contact_list = 1) + { + return $this->_fetch('', '', $ref_ext, $contact_list); + } + + /** + * Get properties of an invoice object + * + * Return an array with invoice informations + * + * @param int $id ID of order * @param string $ref Ref of object * @param string $ref_ext External reference of object - * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id - * @return array|mixed data without useless information - * - * @throws RestException - */ - private function _fetch($id, $ref = '', $ref_ext = '', $contact_list = 1) - { + * @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id + * @return array|mixed data without useless information + * + * @throws RestException + */ + private function _fetch($id, $ref = '', $ref_ext = '', $contact_list = 1) + { if (!DolibarrApiAccess::$user->rights->facture->lire) { throw new RestException(401); } @@ -142,139 +142,138 @@ class Invoices extends DolibarrApi $this->invoice->fetchObjectLinked(); return $this->_cleanObjectDatas($this->invoice); - } + } - /** - * List invoices - * - * Get a list of invoices - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Limit for list - * @param int $page Page number - * @param string $thirdparty_ids Thirdparty ids to filter orders of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} - * @param string $status Filter by invoice status : draft | unpaid | paid | cancelled - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" - * @return array Array of invoice objects - * + /** + * List invoices + * + * Get a list of invoices + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @param string $thirdparty_ids Thirdparty ids to filter orders of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} + * @param string $status Filter by invoice status : draft | unpaid | paid | cancelled + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" + * @return array Array of invoice objects + * * @throws RestException 404 Not found * @throws RestException 503 Error - */ - public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') - { - global $db, $conf; + */ + public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') + { + global $db, $conf; - $obj_ret = array(); + $obj_ret = array(); - // case of external user, $thirdparty_ids param is ignored and replaced by user's socid - $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $thirdparty_ids; + // case of external user, $thirdparty_ids param is ignored and replaced by user's socid + $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $thirdparty_ids; - // If the internal user must only see his customers, force searching by him - $search_sale = 0; - if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) $search_sale = DolibarrApiAccess::$user->id; + // If the internal user must only see his customers, force searching by him + $search_sale = 0; + if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) $search_sale = DolibarrApiAccess::$user->id; - $sql = "SELECT t.rowid"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) - $sql .= " FROM ".MAIN_DB_PREFIX."facture as t"; + $sql = "SELECT t.rowid"; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) + $sql .= " FROM ".MAIN_DB_PREFIX."facture as t"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale - $sql .= ' WHERE t.entity IN ('.getEntity('invoice').')'; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; - if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; + $sql .= ' WHERE t.entity IN ('.getEntity('invoice').')'; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; + if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; - if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale // Filter by status - if ($status == 'draft') $sql .= " AND t.fk_statut IN (0)"; - if ($status == 'unpaid') $sql .= " AND t.fk_statut IN (1)"; - if ($status == 'paid') $sql .= " AND t.fk_statut IN (2)"; - if ($status == 'cancelled') $sql .= " AND t.fk_statut IN (3)"; - // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; - } - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } + if ($status == 'draft') $sql .= " AND t.fk_statut IN (0)"; + if ($status == 'unpaid') $sql .= " AND t.fk_statut IN (1)"; + if ($status == 'paid') $sql .= " AND t.fk_statut IN (2)"; + if ($status == 'cancelled') $sql .= " AND t.fk_statut IN (3)"; + // Insert sale filter + if ($search_sale > 0) + { + $sql .= " AND sc.fk_user = ".$search_sale; + } + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } - $sql .= $db->order($sortfield, $sortorder); - if ($limit) - { - if ($page < 0) - { - $page = 0; - } - $offset = $limit * $page; + $sql .= $db->order($sortfield, $sortorder); + if ($limit) + { + if ($page < 0) + { + $page = 0; + } + $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); - } + $sql .= $db->plimit($limit + 1, $offset); + } - $result = $db->query($sql); - if ($result) - { - $i = 0; - $num = $db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - while ($i < $min) - { - $obj = $db->fetch_object($result); - $invoice_static = new Facture($db); - if ($invoice_static->fetch($obj->rowid)) - { - // Get payment details - $invoice_static->totalpaid = $invoice_static->getSommePaiement(); - $invoice_static->totalcreditnotes = $invoice_static->getSumCreditNotesUsed(); - $invoice_static->totaldeposits = $invoice_static->getSumDepositsUsed(); - $invoice_static->remaintopay = price2num($invoice_static->total_ttc - $invoice_static->totalpaid - $invoice_static->totalcreditnotes - $invoice_static->totaldeposits, 'MT'); + $result = $db->query($sql); + if ($result) + { + $i = 0; + $num = $db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + while ($i < $min) + { + $obj = $db->fetch_object($result); + $invoice_static = new Facture($db); + if ($invoice_static->fetch($obj->rowid)) + { + // Get payment details + $invoice_static->totalpaid = $invoice_static->getSommePaiement(); + $invoice_static->totalcreditnotes = $invoice_static->getSumCreditNotesUsed(); + $invoice_static->totaldeposits = $invoice_static->getSumDepositsUsed(); + $invoice_static->remaintopay = price2num($invoice_static->total_ttc - $invoice_static->totalpaid - $invoice_static->totalcreditnotes - $invoice_static->totaldeposits, 'MT'); // Add external contacts ids $invoice_static->contacts_ids = $invoice_static->liste_contact(-1, 'external', 1); - $obj_ret[] = $this->_cleanObjectDatas($invoice_static); - } - $i++; - } - } - else { - throw new RestException(503, 'Error when retrieve invoice list : '.$db->lasterror()); - } - if (!count($obj_ret)) { - throw new RestException(404, 'No invoice found'); - } + $obj_ret[] = $this->_cleanObjectDatas($invoice_static); + } + $i++; + } + } else { + throw new RestException(503, 'Error when retrieve invoice list : '.$db->lasterror()); + } + if (!count($obj_ret)) { + throw new RestException(404, 'No invoice found'); + } return $obj_ret; - } + } - /** - * Create invoice object - * - * @param array $request_data Request datas - * @return int ID of invoice - */ - public function post($request_data = null) - { - if (!DolibarrApiAccess::$user->rights->facture->creer) { + /** + * Create invoice object + * + * @param array $request_data Request datas + * @return int ID of invoice + */ + public function post($request_data = null) + { + if (!DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401, "Insuffisant rights"); } - // Check mandatory fields - $result = $this->_validate($request_data); + // Check mandatory fields + $result = $this->_validate($request_data); - foreach ($request_data as $field => $value) { - $this->invoice->$field = $value; - } - if (!array_key_exists('date', $request_data)) { - $this->invoice->date = dol_now(); - } - /* We keep lines as an array + foreach ($request_data as $field => $value) { + $this->invoice->$field = $value; + } + if (!array_key_exists('date', $request_data)) { + $this->invoice->date = dol_now(); + } + /* We keep lines as an array if (isset($request_data["lines"])) { $lines = array(); foreach ($request_data["lines"] as $line) { @@ -283,152 +282,154 @@ class Invoices extends DolibarrApi $this->invoice->lines = $lines; }*/ - if ($this->invoice->create(DolibarrApiAccess::$user, 0, (empty($request_data["date_lim_reglement"]) ? 0 : $request_data["date_lim_reglement"])) < 0) { - throw new RestException(500, "Error creating invoice", array_merge(array($this->invoice->error), $this->invoice->errors)); - } - return $this->invoice->id; - } + if ($this->invoice->create(DolibarrApiAccess::$user, 0, (empty($request_data["date_lim_reglement"]) ? 0 : $request_data["date_lim_reglement"])) < 0) { + throw new RestException(500, "Error creating invoice", array_merge(array($this->invoice->error), $this->invoice->errors)); + } + return $this->invoice->id; + } - /** - * Create an invoice using an existing order. - * - * - * @param int $orderid Id of the order - * - * @url POST /createfromorder/{orderid} - * - * @return int - * @throws RestException 400 - * @throws RestException 401 - * @throws RestException 404 - * @throws RestException 405 - */ - public function createInvoiceFromOrder($orderid) - { + /** + * Create an invoice using an existing order. + * + * + * @param int $orderid Id of the order + * + * @url POST /createfromorder/{orderid} + * + * @return int + * @throws RestException 400 + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 405 + */ + public function createInvoiceFromOrder($orderid) + { - require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; + require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - if (!DolibarrApiAccess::$user->rights->commande->lire) { - throw new RestException(401); - } - if (!DolibarrApiAccess::$user->rights->facture->creer) { - throw new RestException(401); - } - if (empty($orderid)) { - throw new RestException(400, 'Order ID is mandatory'); - } + if (!DolibarrApiAccess::$user->rights->commande->lire) { + throw new RestException(401); + } + if (!DolibarrApiAccess::$user->rights->facture->creer) { + throw new RestException(401); + } + if (empty($orderid)) { + throw new RestException(400, 'Order ID is mandatory'); + } - $order = new Commande($this->db); - $result = $order->fetch($orderid); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $order = new Commande($this->db); + $result = $order->fetch($orderid); + if (!$result) { + throw new RestException(404, 'Order not found'); + } - $result = $this->invoice->createFromOrder($order, DolibarrApiAccess::$user); - if ($result < 0) { - throw new RestException(405, $this->invoice->error); - } - $this->invoice->fetchObjectLinked(); - return $this->_cleanObjectDatas($this->invoice); - } + $result = $this->invoice->createFromOrder($order, DolibarrApiAccess::$user); + if ($result < 0) { + throw new RestException(405, $this->invoice->error); + } + $this->invoice->fetchObjectLinked(); + return $this->_cleanObjectDatas($this->invoice); + } - /** - * Get lines of an invoice - * - * @param int $id Id of invoice - * - * @url GET {id}/lines - * - * @return int - */ - public function getLines($id) - { - if (!DolibarrApiAccess::$user->rights->facture->lire) { - throw new RestException(401); - } + /** + * Get lines of an invoice + * + * @param int $id Id of invoice + * + * @url GET {id}/lines + * + * @return int + */ + public function getLines($id) + { + if (!DolibarrApiAccess::$user->rights->facture->lire) { + throw new RestException(401); + } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Invoice not found'); - } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Invoice not found'); + } - if (!DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $this->invoice->getLinesArray(); - $result = array(); - foreach ($this->invoice->lines as $line) { - array_push($result, $this->_cleanObjectDatas($line)); - } - return $result; - } + if (!DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $this->invoice->getLinesArray(); + $result = array(); + foreach ($this->invoice->lines as $line) { + array_push($result, $this->_cleanObjectDatas($line)); + } + return $result; + } - /** - * Update a line to a given invoice - * - * @param int $id Id of invoice to update - * @param int $lineid Id of line to update - * @param array $request_data InvoiceLine data - * - * @url PUT {id}/lines/{lineid} - * - * @return array - * - * @throws RestException 304 - * @throws RestException 401 - * @throws RestException 404 Invoice not found - */ - public function putLine($id, $lineid, $request_data = null) - { - if (!DolibarrApiAccess::$user->rights->facture->creer) { - throw new RestException(401); - } + /** + * Update a line to a given invoice + * + * @param int $id Id of invoice to update + * @param int $lineid Id of line to update + * @param array $request_data InvoiceLine data + * + * @url PUT {id}/lines/{lineid} + * + * @return array + * + * @throws RestException 304 + * @throws RestException 401 + * @throws RestException 404 Invoice not found + */ + public function putLine($id, $lineid, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->facture->creer) { + throw new RestException(401); + } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Invoice not found'); - } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Invoice not found'); + } - if (!DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->invoice->updateline( - $lineid, - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->remise_percent, - $request_data->date_start, - $request_data->date_end, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - 'HT', - $request_data->info_bits, - $request_data->product_type, - $request_data->fk_parent_line, - 0, - $request_data->fk_fournprice, - $request_data->pa_ht, - $request_data->label, - $request_data->special_code, - $request_data->array_options, - $request_data->situation_percent, - $request_data->fk_unit, - $request_data->multicurrency_subprice - ); + if (!DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $request_data = (object) $request_data; + $updateRes = $this->invoice->updateline( + $lineid, + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->remise_percent, + $request_data->date_start, + $request_data->date_end, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + 'HT', + $request_data->info_bits, + $request_data->product_type, + $request_data->fk_parent_line, + 0, + $request_data->fk_fournprice, + $request_data->pa_ht, + $request_data->label, + $request_data->special_code, + $request_data->array_options, + $request_data->situation_percent, + $request_data->fk_unit, + $request_data->multicurrency_subprice, + 0, + $request_data->ref_ext + ); - if ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } else { - throw new RestException(304, $this->invoice->error); - } - } + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } else { + throw new RestException(304, $this->invoice->error); + } + } - /** + /** * Add a contact type of given invoice * * @param int $id Id of invoice to update @@ -439,39 +440,39 @@ class Invoices extends DolibarrApi * * @return int * - * @throws RestException 401 - * @throws RestException 404 + * @throws RestException 401 + * @throws RestException 404 */ - public function postContact($id, $contactid, $type) - { - if (!DolibarrApiAccess::$user->rights->facture->creer) { - throw new RestException(401); - } + public function postContact($id, $contactid, $type) + { + if (!DolibarrApiAccess::$user->rights->facture->creer) { + throw new RestException(401); + } - $result = $this->invoice->fetch($id); + $result = $this->invoice->fetch($id); if (!$result) { throw new RestException(404, 'Invoice not found'); } - if (!in_array($type, array('BILLING', 'SHIPPING', 'CUSTOMER'), true)) { - throw new RestException(500, 'Availables types: BILLING, SHIPPING OR CUSTOMER'); - } + if (!in_array($type, array('BILLING', 'SHIPPING', 'CUSTOMER'), true)) { + throw new RestException(500, 'Availables types: BILLING, SHIPPING OR CUSTOMER'); + } - if (!DolibarrApi::_checkAccessToResource('invoice', $this->invoice->id)) { + if (!DolibarrApi::_checkAccessToResource('invoice', $this->invoice->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->invoice->add_contact($contactid, $type, 'external'); + $result = $this->invoice->add_contact($contactid, $type, 'external'); - if (!$result) { - throw new RestException(500, 'Error when added the contact'); - } + if (!$result) { + throw new RestException(500, 'Error when added the contact'); + } - return $this->_cleanObjectDatas($this->invoice); - } + return $this->_cleanObjectDatas($this->invoice); + } - /** + /** * Delete a contact type of given invoice * * @param int $id Id of invoice to update @@ -548,9 +549,7 @@ class Invoices extends DolibarrApi $updateRes = $this->invoice->deleteline($lineid); if ($updateRes > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(405, $this->invoice->error); } } @@ -707,7 +706,9 @@ class Invoices extends DolibarrApi $request_data->array_options, $request_data->situation_percent, $request_data->fk_prev_id, - $request_data->fk_unit + $request_data->fk_unit, + 0, + $request_data->ref_ext ); if ($updateRes < 0) { @@ -875,8 +876,8 @@ class Invoices extends DolibarrApi * Sets an invoice as paid * * @param int $id Order ID - * @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet (cas escompte par exemple) - * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple) + * @param string $close_code Code filled if we classify to 'Paid completely' when payment is not complete (for escompte for example) + * @param string $close_note Comment defined if we classify to 'Paid' when payment is not complete (for escompte for example) * * @url POST {id}/settopaid * @@ -1041,14 +1042,11 @@ class Invoices extends DolibarrApi $discount = new DiscountAbsolute($this->db); if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) { $discount->description = '(CREDIT_NOTE)'; - } - elseif ($this->invoice->type == Facture::TYPE_DEPOSIT) { + } elseif ($this->invoice->type == Facture::TYPE_DEPOSIT) { $discount->description = '(DEPOSIT)'; - } - elseif ($this->invoice->type == Facture::TYPE_STANDARD || $this->invoice->type == Facture::TYPE_REPLACEMENT || $this->invoice->type == Facture::TYPE_SITUATION) { + } elseif ($this->invoice->type == Facture::TYPE_STANDARD || $this->invoice->type == Facture::TYPE_REPLACEMENT || $this->invoice->type == Facture::TYPE_SITUATION) { $discount->description = '(EXCESS RECEIVED)'; - } - else { + } else { throw new RestException(500, 'Cant convert to reduc an Invoice of this type'); } @@ -1062,7 +1060,7 @@ class Invoices extends DolibarrApi // If we're on a standard invoice, we have to get excess received to create a discount in TTC without VAT // Total payments - $sql = 'SELECT SUM(pf.amount) as total_paiements'; + $sql = 'SELECT SUM(pf.amount) as total_payments'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id'; $sql .= ' WHERE pf.fk_facture = '.$this->invoice->id; @@ -1072,7 +1070,7 @@ class Invoices extends DolibarrApi if (!$resql) dol_print_error($this->db); $res = $this->db->fetch_object($resql); - $total_paiements = $res->total_paiements; + $total_payments = $res->total_payments; // Total credit note and deposit $total_creditnote_and_deposit = 0; @@ -1085,7 +1083,7 @@ class Invoices extends DolibarrApi while ($obj = $this->db->fetch_object($resql)) $total_creditnote_and_deposit += $obj->amount_ttc; } else dol_print_error($this->db); - $discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $this->invoice->total_ttc; + $discount->amount_ht = $discount->amount_ttc = $total_payments + $total_creditnote_and_deposit - $this->invoice->total_ttc; $discount->amount_tva = 0; $discount->tva_tx = 0; @@ -1124,18 +1122,14 @@ class Invoices extends DolibarrApi if ($result >= 0) { $this->db->commit(); - } - else - { + } else { $this->db->rollback(); throw new RestException(500, 'Could not set paid'); } } else { $this->db->commit(); } - } - else - { + } else { $this->db->rollback(); throw new RestException(500, 'Discount creation error'); } @@ -1287,12 +1281,12 @@ class Invoices extends DolibarrApi * * @param int $id Id of invoice * @param string $datepaye {@from body} Payment date {@type timestamp} - * @param int $paiementid {@from body} Payment mode Id {@min 1} + * @param int $paymentid {@from body} Payment mode Id {@min 1} * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} * @param int $accountid {@from body} Account Id {@min 1} - * @param string $num_paiement {@from body} Payment number (optional) - * @param string $comment {@from body} Note (optional) - * @param string $chqemetteur {@from body} Payment issuer (mandatory if paiementcode = 'CHQ') + * @param string $num_payment {@from body} Payment number (optional) + * @param string $comment {@from body} Note private (optional) + * @param string $chqemetteur {@from body} Payment issuer (mandatory if paymentcode = 'CHQ') * @param string $chqbank {@from body} Issuer bank name (optional) * * @url POST {id}/payments @@ -1303,7 +1297,7 @@ class Invoices extends DolibarrApi * @throws RestException 401 * @throws RestException 404 */ - public function addPayment($id, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement = '', $comment = '', $chqemetteur = '', $chqbank = '') + public function addPayment($id, $datepaye, $paymentid, $closepaidinvoices, $accountid, $num_payment = '', $comment = '', $chqemetteur = '', $chqbank = '') { global $conf; @@ -1326,8 +1320,8 @@ class Invoices extends DolibarrApi } } - if (empty($paiementid)) { - throw new RestException(400, 'Paiement ID or Paiement Code is mandatory'); + if (empty($paymentid)) { + throw new RestException(400, 'Payment ID or Payment Code is mandatory'); } @@ -1364,40 +1358,40 @@ class Invoices extends DolibarrApi // Creation of payment line - $paiement = new Paiement($this->db); - $paiement->datepaye = $datepaye; - $paiement->amounts = $amounts; // Array with all payments dispatching with invoice id - $paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching - $paiement->paiementid = $paiementid; - $paiement->paiementcode = dol_getIdFromCode($this->db, $paiementid, 'c_paiement', 'id', 'code', 1); - $paiement->num_paiement = $num_paiement; - $paiement->note = $comment; + $paymentobj = new Paiement($this->db); + $paymentobj->datepaye = $datepaye; + $paymentobj->amounts = $amounts; // Array with all payments dispatching with invoice id + $paymentobj->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching + $paymentobj->paiementid = $paymentid; + $paymentobj->paiementcode = dol_getIdFromCode($this->db, $paymentid, 'c_paiement', 'id', 'code', 1); + $paymentobj->num_payment = $num_payment; + $paymentobj->note_private = $comment; - $paiement_id = $paiement->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices - if ($paiement_id < 0) + $payment_id = $paymentobj->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices + if ($payment_id < 0) { $this->db->rollback(); - throw new RestException(400, 'Payment error : '.$paiement->error); + throw new RestException(400, 'Payment error : '.$paymentobj->error); } if (!empty($conf->banque->enabled)) { $label = '(CustomerInvoicePayment)'; - if ($paiement->paiementcode == 'CHQ' && empty($chqemetteur)) { - throw new RestException(400, 'Emetteur is mandatory when payment code is '.$paiement->paiementcode); + if ($paymentobj->paiementcode == 'CHQ' && empty($chqemetteur)) { + throw new RestException(400, 'Emetteur is mandatory when payment code is '.$paymentobj->paiementcode); } if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note - $result = $paiement->addPaymentToBank(DolibarrApiAccess::$user, 'payment', $label, $accountid, $chqemetteur, $chqbank); + $result = $paymentobj->addPaymentToBank(DolibarrApiAccess::$user, 'payment', $label, $accountid, $chqemetteur, $chqbank); if ($result < 0) { $this->db->rollback(); - throw new RestException(400, 'Add payment to bank error : '.$paiement->error); + throw new RestException(400, 'Add payment to bank error : '.$paymentobj->error); } } $this->db->commit(); - return $paiement_id; + return $payment_id; } /** @@ -1407,11 +1401,11 @@ class Invoices extends DolibarrApi * * @param array $arrayofamounts {@from body} Array with id of invoices with amount to pay for each invoice * @param string $datepaye {@from body} Payment date {@type timestamp} - * @param int $paiementid {@from body} Payment mode Id {@min 1} + * @param int $paymentid {@from body} Payment mode Id {@min 1} * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} * @param int $accountid {@from body} Account Id {@min 1} - * @param string $num_paiement {@from body} Payment number (optional) - * @param string $comment {@from body} Note (optional) + * @param string $num_payment {@from body} Payment number (optional) + * @param string $comment {@from body} Note private (optional) * @param string $chqemetteur {@from body} Payment issuer (mandatory if paiementcode = 'CHQ') * @param string $chqbank {@from body} Issuer bank name (optional) * @@ -1424,7 +1418,7 @@ class Invoices extends DolibarrApi * @throws RestException 403 * @throws RestException 404 */ - public function addPaymentDistributed($arrayofamounts, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement = '', $comment = '', $chqemetteur = '', $chqbank = '') + public function addPaymentDistributed($arrayofamounts, $datepaye, $paymentid, $closepaidinvoices, $accountid, $num_payment = '', $comment = '', $chqemetteur = '', $chqbank = '') { global $conf; @@ -1447,8 +1441,8 @@ class Invoices extends DolibarrApi throw new RestException(400, 'Account ID is mandatory'); } } - if (empty($paiementid)) { - throw new RestException(400, 'Paiement ID or Paiement Code is mandatory'); + if (empty($paymentid)) { + throw new RestException(400, 'Payment ID or Payment Code is mandatory'); } $this->db->begin(); @@ -1496,37 +1490,84 @@ class Invoices extends DolibarrApi } // Creation of payment line - $paiement = new Paiement($this->db); - $paiement->datepaye = $datepaye; - $paiement->amounts = $amounts; // Array with all payments dispatching with invoice id - $paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching - $paiement->paiementid = $paiementid; - $paiement->paiementcode = dol_getIdFromCode($this->db, $paiementid, 'c_paiement', 'id', 'code', 1); - $paiement->num_paiement = $num_paiement; - $paiement->note = $comment; - $paiement_id = $paiement->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices - if ($paiement_id < 0) + $paymentobj = new Paiement($this->db); + $paymentobj->datepaye = $datepaye; + $paymentobj->amounts = $amounts; // Array with all payments dispatching with invoice id + $paymentobj->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching + $paymentobj->paiementid = $paymentid; + $paymentobj->paiementcode = dol_getIdFromCode($this->db, $paymentid, 'c_paiement', 'id', 'code', 1); + $paymentobj->num_payment = $num_payment; + $paymentobj->note_private = $comment; + + $payment_id = $paymentobj->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices + if ($payment_id < 0) { $this->db->rollback(); - throw new RestException(400, 'Payment error : '.$paiement->error); + throw new RestException(400, 'Payment error : '.$paymentobj->error); } if (!empty($conf->banque->enabled)) { $label = '(CustomerInvoicePayment)'; - if ($paiement->paiementcode == 'CHQ' && empty($chqemetteur)) { - throw new RestException(400, 'Emetteur is mandatory when payment code is '.$paiement->paiementcode); + if ($paymentobj->paiementcode == 'CHQ' && empty($chqemetteur)) { + throw new RestException(400, 'Emetteur is mandatory when payment code is '.$paymentobj->paiementcode); } if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note - $result = $paiement->addPaymentToBank(DolibarrApiAccess::$user, 'payment', $label, $accountid, $chqemetteur, $chqbank); + $result = $paymentobj->addPaymentToBank(DolibarrApiAccess::$user, 'payment', $label, $accountid, $chqemetteur, $chqbank); if ($result < 0) { $this->db->rollback(); - throw new RestException(400, 'Add payment to bank error : '.$paiement->error); + throw new RestException(400, 'Add payment to bank error : '.$paymentobj->error); } } $this->db->commit(); - return $paiement_id; + return $payment_id; + } + + /** + * Update a payment + * + * @param int $id Id of payment + * @param string $num_payment Payment number + * + * @url PUT payments/{id} + * + * @return array + * @throws RestException 400 Bad parameters + * @throws RestException 401 Not allowed + * @throws RestException 404 Not found + */ + public function putPayment($id, $num_payment = '') + { + require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; + + if (!DolibarrApiAccess::$user->rights->facture->creer) { + throw new RestException(401); + } + if (empty($id)) { + throw new RestException(400, 'Payment ID is mandatory'); + } + + $paymentobj = new Paiement($this->db); + $result = $paymentobj->fetch($id); + + if (!$result) { + throw new RestException(404, 'Payment not found'); + } + + if (!empty($num_payment)) { + $result = $paymentobj->update_num($num_payment); + if ($result < 0) { + throw new RestException(500, 'Error when updating the payment num'); + } + } + + return [ + 'success' => [ + 'code' => 200, + 'message' => 'Payment updated' + ] + ]; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 71be89f30f5..c5e93bc41ad 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -199,9 +199,10 @@ class FactureRec extends CommonInvoice * * @param User $user User object * @param int $facid Id of source invoice + * @param int $notrigger No trigger * @return int <0 if KO, id of invoice created if OK */ - public function create($user, $facid) + public function create($user, $facid, $notrigger = 0) { global $conf; @@ -221,7 +222,6 @@ class FactureRec extends CommonInvoice $this->date_when = null; } - $this->frequency = abs($this->frequency); $this->nb_gen_done = 0; $this->nb_gen_max = empty($this->nb_gen_max) ? 0 : $this->nb_gen_max; @@ -336,8 +336,7 @@ class FactureRec extends CommonInvoice if ($result_insert < 0) { $error++; - } - else { + } else { $objectline = new FactureLigneRec($this->db); if ($objectline->fetch($result_insert)) { @@ -377,8 +376,7 @@ class FactureRec extends CommonInvoice $error++; } } - } - else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + } else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); @@ -391,25 +389,39 @@ class FactureRec extends CommonInvoice } } + if (!$error) { + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } + + if (!$error && !$notrigger) + { + // Call trigger + $result = $this->call_trigger('BILLREC_CREATE', $user); + if ($result < 0) + { + $this->db->rollback(); + return -2; + } + // End call triggers + } + if ($error) { $this->db->rollback(); - } - else - { + } else { $this->db->commit(); return $this->id; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; } - } - else - { + } else { $this->db->rollback(); return -1; } @@ -460,9 +472,7 @@ class FactureRec extends CommonInvoice } $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; @@ -584,16 +594,12 @@ class FactureRec extends CommonInvoice return -3; } return 1; - } - else - { + } else { $this->error = 'Bill with id '.$rowid.' or ref '.$ref.' not found sql='.$sql; dol_syslog('Facture::Fetch Error '.$this->error, LOG_ERR); return -2; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -722,9 +728,7 @@ class FactureRec extends CommonInvoice $this->db->free($result); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -3; } @@ -766,15 +770,11 @@ class FactureRec extends CommonInvoice // Delete extrafields $res = $this->deleteExtraFields(); if ($res < 0) $error = -4; - } - else - { + } else { $this->error = $this->db->lasterror(); $error = -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $error = -2; } @@ -783,9 +783,7 @@ class FactureRec extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return $error; } @@ -860,9 +858,7 @@ class FactureRec extends CommonInvoice if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } @@ -969,9 +965,7 @@ class FactureRec extends CommonInvoice $this->id = $facid; $this->update_price(); return $lineId; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -1045,9 +1039,7 @@ class FactureRec extends CommonInvoice if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } @@ -1131,9 +1123,7 @@ class FactureRec extends CommonInvoice $this->id = $facid; $this->update_price(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -1226,8 +1216,7 @@ class FactureRec extends CommonInvoice if ($num) $this->output .= $langs->trans("FoundXQualifiedRecurringInvoiceTemplate", $num)."\n"; - else - $this->output .= $langs->trans("NoQualifiedRecurringInvoiceTemplateFound"); + else $this->output .= $langs->trans("NoQualifiedRecurringInvoiceTemplateFound"); $saventity = $conf->entity; @@ -1288,9 +1277,7 @@ class FactureRec extends CommonInvoice $error++; } } - } - else - { + } else { $error++; $this->error = "Failed to load invoice template with id=".$line->rowid.", entity=".$conf->entity."\n"; $this->errors[] = "Failed to load invoice template with id=".$line->rowid.", entity=".$conf->entity; @@ -1303,9 +1290,7 @@ class FactureRec extends CommonInvoice dol_syslog("createRecurringInvoices Process invoice template ".$facturerec->ref." is finished with a success generation"); $nb_create++; $this->output .= $langs->trans("InvoiceGeneratedFromTemplate", $facture->ref, $facturerec->ref)."\n"; - } - else - { + } else { $db->rollback("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref); } @@ -1323,8 +1308,7 @@ class FactureRec extends CommonInvoice } $conf->entity = $saventity; // Restore entity context - } - else dol_print_error($db); + } else dol_print_error($db); $this->output = trim($this->output); @@ -1349,7 +1333,7 @@ class FactureRec extends CommonInvoice $result = ''; - $label = ''.$langs->trans("ShowInvoice").''; + $label = ''.$langs->trans("RepeatableInvoice").''; if (!empty($this->ref)) { $label .= '
'.$langs->trans('Ref').': '.$this->ref; } @@ -1430,69 +1414,54 @@ class FactureRec extends CommonInvoice { if ($status == self::STATUS_SUSPENDED) { $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $labelStatus = $langs->trans("Draft"); } } - } - elseif ($mode == 1) + } elseif ($mode == 1) { $prefix = 'Short'; if ($recur) { if ($status == self::STATUS_SUSPENDED) { $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $labelStatus = $langs->trans("Draft"); } } - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($recur) { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status4'; $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status0'; $labelStatus = $langs->trans('Draft'); } } - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($recur) { @@ -1500,25 +1469,20 @@ class FactureRec extends CommonInvoice if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status4'; $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status0'; $labelStatus = $langs->trans('Draft'); } } - } - elseif ($mode == 4) + } elseif ($mode == 4) { $prefix = ''; if ($recur) @@ -1526,25 +1490,20 @@ class FactureRec extends CommonInvoice if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status4'; $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status0'; $labelStatus = $langs->trans('Draft'); } } - } - elseif ($mode == 5 || $mode == 6) + } elseif ($mode == 5 || $mode == 6) { $prefix = ''; if ($mode == 5) $prefix = 'Short'; @@ -1553,19 +1512,15 @@ class FactureRec extends CommonInvoice if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status4'; $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status0'; $labelStatus = $langs->trans('Draft'); } @@ -1600,6 +1555,8 @@ class FactureRec extends CommonInvoice $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; + $sql .= $this->db->plimit(100); + $resql = $this->db->query($sql); if ($resql) { @@ -1654,16 +1611,14 @@ class FactureRec extends CommonInvoice $line->total_ht = -100; $line->total_ttc = -119.6; $line->total_tva = -19.6; - } - elseif ($xnbp == 2) // UP is negative (free line) + } elseif ($xnbp == 2) // UP is negative (free line) { $line->subprice = -100; $line->total_ht = -100; $line->total_ttc = -119.6; $line->total_tva = -19.6; $line->remise_percent = 0; - } - elseif ($xnbp == 3) // Discount is 50% (product line) + } elseif ($xnbp == 3) // Discount is 50% (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; @@ -1671,8 +1626,7 @@ class FactureRec extends CommonInvoice $line->total_ttc = 59.8; $line->total_tva = 9.8; $line->remise_percent = 50; - } - else // (product line) + } else // (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; @@ -1761,9 +1715,7 @@ class FactureRec extends CommonInvoice $this->frequency = $frequency; if (!empty($unit)) $this->unit_frequency = $unit; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1794,9 +1746,7 @@ class FactureRec extends CommonInvoice $this->date_when = $date; if ($increment_nb_gen_done > 0) $this->nb_gen_done++; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1827,9 +1777,7 @@ class FactureRec extends CommonInvoice { $this->nb_gen_max = $nb; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1858,9 +1806,7 @@ class FactureRec extends CommonInvoice { $this->auto_validate = $validate; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1889,9 +1835,7 @@ class FactureRec extends CommonInvoice { $this->generate_pdf = $validate; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1920,9 +1864,7 @@ class FactureRec extends CommonInvoice { $this->modelpdf = $model; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -2067,9 +2009,7 @@ class FactureLigneRec extends CommonInvoiceLine $this->db->free($result); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -3; } @@ -2149,9 +2089,7 @@ class FactureLigneRec extends CommonInvoiceLine } $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index fd6a6d32642..5110b1194e5 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2010-2016 Juanjo Menent + * Copyright (C) 2010-2020 Juanjo Menent * Copyright (C) 2012-2014 Christophe Battarel * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Cédric Salvador @@ -100,13 +100,13 @@ class Facture extends CommonInvoice public $author; /** - * @var int ID - */ + * @var int ID + */ public $fk_user_author; /** - * @var int ID - */ + * @var int ID + */ public $fk_user_valid; public $date; // Date invoice @@ -153,8 +153,8 @@ class Facture extends CommonInvoice public $mode_reglement_code; // Code in llx_c_paiement /** - * @var int ID Field to store bank id to use when payment mode is withdraw - */ + * @var int ID Field to store bank id to use when payment mode is withdraw + */ public $fk_bank; /** @@ -175,8 +175,8 @@ class Facture extends CommonInvoice // Multicurrency /** - * @var int ID - */ + * @var int ID + */ public $fk_multicurrency; public $multicurrency_code; @@ -323,30 +323,30 @@ class Facture extends CommonInvoice ); // END MODULEBUILDER PROPERTIES - /** - * Standard invoice - */ - const TYPE_STANDARD = 0; + /** + * Standard invoice + */ + const TYPE_STANDARD = 0; - /** - * Replacement invoice - */ - const TYPE_REPLACEMENT = 1; + /** + * Replacement invoice + */ + const TYPE_REPLACEMENT = 1; - /** - * Credit note invoice - */ - const TYPE_CREDIT_NOTE = 2; + /** + * Credit note invoice + */ + const TYPE_CREDIT_NOTE = 2; - /** - * Deposit invoice - */ - const TYPE_DEPOSIT = 3; + /** + * Deposit invoice + */ + const TYPE_DEPOSIT = 3; - /** - * Proforma invoice (should not be used. a proforma is an order) - */ - const TYPE_PROFORMA = 4; + /** + * Proforma invoice (should not be used. a proforma is an order) + */ + const TYPE_PROFORMA = 4; /** * Situation invoice @@ -407,7 +407,7 @@ class Facture extends CommonInvoice * @param int $forceduedate If set, do not recalculate due date from payment condition but force it with value * @return int <0 if KO, >0 if OK */ - public function create(User $user, $notrigger = 0, $forceduedate = 0) + public function create(User $user, $notrigger = 0, $forceduedate = 0) { global $langs, $conf, $mysoc, $hookmanager; $error = 0; @@ -423,7 +423,7 @@ class Facture extends CommonInvoice $this->brouillon = 1; // Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate) - if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code); + if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $this->date); else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); if (empty($this->fk_multicurrency)) { @@ -461,7 +461,7 @@ class Facture extends CommonInvoice // Create invoice from a template invoice if ($this->fac_rec > 0) { - $this->fk_fac_rec_source = $this->fac_rec; + $this->fk_fac_rec_source = $this->fac_rec; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; $_facrec = new FactureRec($this->db); @@ -503,9 +503,9 @@ class Facture extends CommonInvoice $this->ref_client = trim($this->ref_client); $this->note_public = trim($this->note_public); $this->note_private = trim($this->note_private); - $this->note_private = dol_concatdesc($this->note_private, $langs->trans("GeneratedFromRecurringInvoice", $_facrec->ref)); + $this->note_private = dol_concatdesc($this->note_private, $langs->trans("GeneratedFromRecurringInvoice", $_facrec->ref)); - $this->array_options = $_facrec->array_options; + $this->array_options = $_facrec->array_options; //if (! $this->remise) $this->remise = 0; if (!$this->mode_reglement_id) $this->mode_reglement_id = 0; @@ -520,12 +520,12 @@ class Facture extends CommonInvoice // For recurring invoices, update date and number of last generation of recurring template invoice, before inserting new invoice if ($_facrec->frequency > 0) { - dol_syslog("This is a recurring invoice so we set date_last_gen and next date_when"); - if (empty($_facrec->date_when)) $_facrec->date_when = $now; - $next_date = $_facrec->getNextDate(); // Calculate next date - $result = $_facrec->setValueFrom('date_last_gen', $now, '', null, 'date', '', $user, ''); - //$_facrec->setValueFrom('nb_gen_done', $_facrec->nb_gen_done + 1); // Not required, +1 already included into setNextDate when second param is 1. - $result = $_facrec->setNextDate($next_date, 1); + dol_syslog("This is a recurring invoice so we set date_last_gen and next date_when"); + if (empty($_facrec->date_when)) $_facrec->date_when = $now; + $next_date = $_facrec->getNextDate(); // Calculate next date + $result = $_facrec->setValueFrom('date_last_gen', $now, '', null, 'date', '', $user, ''); + //$_facrec->setValueFrom('nb_gen_done', $_facrec->nb_gen_done + 1); // Not required, +1 already included into setNextDate when second param is 1. + $result = $_facrec->setNextDate($next_date, 1); } // Define lang of customer @@ -536,8 +536,8 @@ class Facture extends CommonInvoice if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($this->default_lang)) $newlang = $this->default_lang; // for thirdparty if (!empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); } // Array of possible substitutions (See also file mailing-send.php that should manage same substitutions) @@ -567,16 +567,16 @@ class Facture extends CommonInvoice } // Define due date if not already defined - if (empty($forceduedate)) { - $duedate = $this->calculate_date_lim_reglement(); - /*if ($duedate < 0) { Regression, a date can be negative if before 1970. + if (empty($forceduedate)) { + $duedate = $this->calculate_date_lim_reglement(); + /*if ($duedate < 0) { Regression, a date can be negative if before 1970. dol_syslog(__METHOD__ . ' Error in calculate_date_lim_reglement. We got ' . $duedate, LOG_ERR); return -1; }*/ - $this->date_lim_reglement = $duedate; - } else { - $this->date_lim_reglement = $forceduedate; - } + $this->date_lim_reglement = $duedate; + } else { + $this->date_lim_reglement = $forceduedate; + } // Insert into database $socid = $this->socid; @@ -595,17 +595,17 @@ class Facture extends CommonInvoice $sql .= ", note_private"; $sql .= ", note_public"; $sql .= ", ref_client, ref_int"; - $sql .= ", fk_account"; + $sql .= ", fk_account"; $sql .= ", module_source, pos_source, fk_fac_rec_source, fk_facture_source, fk_user_author, fk_projet"; $sql .= ", fk_cond_reglement, fk_mode_reglement, date_lim_reglement, model_pdf"; $sql .= ", situation_cycle_ref, situation_counter, situation_final"; $sql .= ", fk_incoterms, location_incoterms"; - $sql .= ", fk_multicurrency"; - $sql .= ", multicurrency_code"; - $sql .= ", multicurrency_tx"; - $sql .= ", retained_warranty"; - $sql .= ", retained_warranty_date_limit"; - $sql .= ", retained_warranty_fk_cond_reglement"; + $sql .= ", fk_multicurrency"; + $sql .= ", multicurrency_code"; + $sql .= ", multicurrency_tx"; + $sql .= ", retained_warranty"; + $sql .= ", retained_warranty_date_limit"; + $sql .= ", retained_warranty_fk_cond_reglement"; $sql .= ")"; $sql .= " VALUES ("; $sql .= "'(PROV)'"; @@ -636,7 +636,7 @@ class Facture extends CommonInvoice $sql .= ", ".($this->situation_counter ? "'".$this->db->escape($this->situation_counter)."'" : "null"); $sql .= ", ".($this->situation_final ? $this->situation_final : 0); $sql .= ", ".(int) $this->fk_incoterms; - $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; + $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; $sql .= ", ".(int) $this->fk_multicurrency; $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; $sql .= ", ".(double) $this->multicurrency_tx; @@ -667,28 +667,27 @@ class Facture extends CommonInvoice { foreach ($this->linked_objects as $origin => $tmp_origin_id) { - if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) - { - foreach ($tmp_origin_id as $origin_id) - { - $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { - $this->error = $this->db->lasterror(); - $error++; - } - } - } - else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) - { - $origin_id = $tmp_origin_id; - $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { - $this->error = $this->db->lasterror(); - $error++; - } - } + if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) + { + foreach ($tmp_origin_id as $origin_id) + { + $ret = $this->add_object_linked($origin, $origin_id); + if (!$ret) + { + $this->error = $this->db->lasterror(); + $error++; + } + } + } else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + { + $origin_id = $tmp_origin_id; + $ret = $this->add_object_linked($origin, $origin_id); + if (!$ret) + { + $this->error = $this->db->lasterror(); + $error++; + } + } } } @@ -699,20 +698,20 @@ class Facture extends CommonInvoice $originidforcontact = $this->origin_id; if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order { - require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; - $exp = new Expedition($this->db); - $exp->fetch($this->origin_id); - $exp->fetchObjectLinked(null, '', null, '', 'OR', 1, 'sourcetype', 0); - if (count($exp->linkedObjectsIds['commande']) > 0) - { - foreach ($exp->linkedObjectsIds['commande'] as $key => $value) - { - $originforcontact = 'commande'; - if (is_object($value)) $originidforcontact = $value->id; - else $originidforcontact = $value; - break; // We take first one - } - } + require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; + $exp = new Expedition($this->db); + $exp->fetch($this->origin_id); + $exp->fetchObjectLinked(null, '', null, '', 'OR', 1, 'sourcetype', 0); + if (count($exp->linkedObjectsIds['commande']) > 0) + { + foreach ($exp->linkedObjectsIds['commande'] as $key => $value) + { + $originforcontact = 'commande'; + if (is_object($value)) $originidforcontact = $value->id; + else $originidforcontact = $value; + break; // We take first one + } + } } $sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc"; @@ -721,13 +720,12 @@ class Facture extends CommonInvoice $resqlcontact = $this->db->query($sqlcontact); if ($resqlcontact) { - while ($objcontact = $this->db->fetch_object($resqlcontact)) - { - //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; - $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object - } - } - else dol_print_error($resqlcontact); + while ($objcontact = $this->db->fetch_object($resqlcontact)) + { + //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; + $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object + } + } else dol_print_error($resqlcontact); } /* @@ -766,12 +764,12 @@ class Facture extends CommonInvoice $newinvoiceline->fk_parent_line = $fk_parent_line; if ($this->type === Facture::TYPE_REPLACEMENT && $newinvoiceline->fk_remise_except) { - $discount = new DiscountAbsolute($this->db); - $discount->fetch($newinvoiceline->fk_remise_except); + $discount = new DiscountAbsolute($this->db); + $discount->fetch($newinvoiceline->fk_remise_except); - $discountId = $soc->set_remise_except($discount->amount_ht, $user, $discount->description, $discount->tva_tx); - $newinvoiceline->fk_remise_except = $discountId; - } + $discountId = $soc->set_remise_except($discount->amount_ht, $user, $discount->description, $discount->tva_tx); + $newinvoiceline->fk_remise_except = $discountId; + } $result = $newinvoiceline->insert(); @@ -787,8 +785,7 @@ class Facture extends CommonInvoice break; } } - } - elseif (!$error && empty($this->fac_rec)) // If this->lines is an array of invoice line arrays + } elseif (!$error && empty($this->fac_rec)) // If this->lines is an array of invoice line arrays { $fk_parent_line = 0; @@ -796,13 +793,13 @@ class Facture extends CommonInvoice foreach ($this->lines as $i => $val) { - $line = $this->lines[$i]; + $line = $this->lines[$i]; - // Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array - //if (! is_object($line)) $line=json_decode(json_encode($line), false); // convert recursively array into object. - if (!is_object($line)) $line = (object) $line; + // Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array + //if (! is_object($line)) $line=json_decode(json_encode($line), false); // convert recursively array into object. + if (!is_object($line)) $line = (object) $line; - if ($result >= 0) + if ($result >= 0) { // Reset fk_parent_line for no child products and special product if (($line->product_type != 9 && empty($line->fk_parent_line)) || $line->product_type == 9) { @@ -821,7 +818,12 @@ class Facture extends CommonInvoice $origintype = $this->element; } - $result = $this->addline( + // init ref_ext + if (empty($line->ref_ext)) { + $line->ref_ext = ''; + } + + $result = $this->addline( $line->desc, $line->subprice, $line->qty, @@ -840,8 +842,8 @@ class Facture extends CommonInvoice $line->product_type, $line->rang, $line->special_code, - $origintype, - $originid, + $origintype, + $originid, $fk_parent_line, $line->fk_fournprice, $line->pa_ht, @@ -850,7 +852,8 @@ class Facture extends CommonInvoice $line->situation_percent, $line->fk_prev_id, $line->fk_unit, - $line->pu_ht_devise + $line->pu_ht_devise, + $line->ref_ext ); if ($result < 0) { @@ -899,26 +902,26 @@ class Facture extends CommonInvoice $buyprice = empty($_facrec->lines[$i]->buyprice) ? 0 : $_facrec->lines[$i]->buyprice; // If buyprice not defined from template invoice, we try to guess the best value if (!$buyprice && $_facrec->lines[$i]->fk_product > 0) - { - require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $producttmp = new ProductFournisseur($this->db); - $producttmp->fetch($_facrec->lines[$i]->fk_product); + { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + $producttmp = new ProductFournisseur($this->db); + $producttmp->fetch($_facrec->lines[$i]->fk_product); - // If margin module defined on costprice, we try the costprice - // If not defined or if module margin defined and pmp and stock module enabled, we try pmp price - // else we get the best supplier price - if ($conf->global->MARGIN_TYPE == 'costprice' && !empty($producttmp->cost_price)) $buyprice = $producttmp->cost_price; - elseif (!empty($conf->stock->enabled) && ($conf->global->MARGIN_TYPE == 'costprice' || $conf->global->MARGIN_TYPE == 'pmp') && !empty($producttmp->pmp)) $buyprice = $producttmp->pmp; - else { - if ($producttmp->find_min_price_product_fournisseur($_facrec->lines[$i]->fk_product) > 0) - { - if ($producttmp->product_fourn_price_id > 0) - { - $buyprice = price2num($producttmp->fourn_unitprice * (1 - $producttmp->fourn_remise_percent / 100) + $producttmp->fourn_remise, 'MU'); - } - } - } - } + // If margin module defined on costprice, we try the costprice + // If not defined or if module margin defined and pmp and stock module enabled, we try pmp price + // else we get the best supplier price + if ($conf->global->MARGIN_TYPE == 'costprice' && !empty($producttmp->cost_price)) $buyprice = $producttmp->cost_price; + elseif (!empty($conf->stock->enabled) && ($conf->global->MARGIN_TYPE == 'costprice' || $conf->global->MARGIN_TYPE == 'pmp') && !empty($producttmp->pmp)) $buyprice = $producttmp->pmp; + else { + if ($producttmp->find_min_price_product_fournisseur($_facrec->lines[$i]->fk_product) > 0) + { + if ($producttmp->product_fourn_price_id > 0) + { + $buyprice = price2num($producttmp->fourn_unitprice * (1 - $producttmp->fourn_remise_percent / 100) + $producttmp->fourn_remise, 'MU'); + } + } + } + } $result_insert = $this->addline( $_facrec->lines[$i]->desc, @@ -942,7 +945,7 @@ class Facture extends CommonInvoice '', 0, 0, - $fk_product_fournisseur_price, + $fk_product_fournisseur_price, $buyprice, $_facrec->lines[$i]->label, empty($_facrec->lines[$i]->array_options) ?null:$_facrec->lines[$i]->array_options, @@ -971,45 +974,37 @@ class Facture extends CommonInvoice // Actions on extra fields if (!$error) { - $result = $this->insertExtraFields(); - if ($result < 0) $error++; + $result = $this->insertExtraFields(); + if ($result < 0) $error++; } - if (!$error && !$notrigger) - { - // Call trigger - $result = $this->call_trigger('BILL_CREATE', $user); - if ($result < 0) $error++; - // End call triggers - } + if (!$error && !$notrigger) + { + // Call trigger + $result = $this->call_trigger('BILL_CREATE', $user); + if ($result < 0) $error++; + // End call triggers + } if (!$error) { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -4; } - } - else - { + } else { $this->error = $langs->trans('FailedToUpdatePrice'); $this->db->rollback(); return -3; } - } - else - { + } else { dol_syslog(get_class($this)."::create error ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -1024,7 +1019,7 @@ class Facture extends CommonInvoice * @param int $invertdetail Reverse sign of amounts for lines * @return int <0 if KO, >0 if OK */ - public function createFromCurrent(User $user, $invertdetail = 0) + public function createFromCurrent(User $user, $invertdetail = 0) { global $conf; @@ -1035,13 +1030,13 @@ class Facture extends CommonInvoice // fetch optionals attributes and labels $this->fetch_optionals(); - if (!empty($this->array_options)) { - $facture->array_options = $this->array_options; - } + if (!empty($this->array_options)) { + $facture->array_options = $this->array_options; + } - foreach ($this->lines as &$line) { - $line->fetch_optionals(); //fetch extrafields - } + foreach ($this->lines as &$line) { + $line->fetch_optionals(); //fetch extrafields + } $facture->fk_facture_source = $this->fk_facture_source; $facture->type = $this->type; @@ -1067,9 +1062,9 @@ class Facture extends CommonInvoice $facture->situation_cycle_ref = $this->situation_cycle_ref; $facture->situation_final = $this->situation_final; - $facture->retained_warranty = $this->retained_warranty; - $facture->retained_warranty_fk_cond_reglement = $this->retained_warranty_fk_cond_reglement; - $facture->retained_warranty_date_limit = $this->retained_warranty_date_limit; + $facture->retained_warranty = $this->retained_warranty; + $facture->retained_warranty_fk_cond_reglement = $this->retained_warranty_fk_cond_reglement; + $facture->retained_warranty_date_limit = $this->retained_warranty_date_limit; // Loop on each line of new invoice @@ -1084,6 +1079,7 @@ class Facture extends CommonInvoice $facture->lines[$i]->total_localtax1 = -$facture->lines[$i]->total_localtax1; $facture->lines[$i]->total_localtax2 = -$facture->lines[$i]->total_localtax2; $facture->lines[$i]->total_ttc = -$facture->lines[$i]->total_ttc; + $facture->lines[$i]->ref_ext = ''; } } @@ -1094,8 +1090,7 @@ class Facture extends CommonInvoice { $this->error = $facture->error; $this->errors = $facture->errors; - } - elseif ($this->type == self::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION)) + } elseif ($this->type == self::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION)) { $this->fetchObjectLinked('', '', $this->id, 'facture'); @@ -1117,7 +1112,7 @@ class Facture extends CommonInvoice /** * Load an object from its id and create a new one in database * - * @param User $user User that clone + * @param User $user User that clone * @param int $fromid Id of object to clone * @return int New id of clone */ @@ -1140,11 +1135,11 @@ class Facture extends CommonInvoice if ($objsoc->fetch($this->socid) > 0) { - $object->socid = $objsoc->id; - $object->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); - $object->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); - $object->fk_project = ''; - $object->fk_delivery_address = ''; + $object->socid = $objsoc->id; + $object->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); + $object->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); + $object->fk_project = ''; + $object->fk_delivery_address = ''; } // TODO Change product price if multi-prices @@ -1173,14 +1168,14 @@ class Facture extends CommonInvoice // Loop on each line of new invoice foreach ($object->lines as $i => $line) { - if (($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts + if (($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts { - unset($object->lines[$i]); - unset($object->products[$i]); // Tant que products encore utilise + unset($object->lines[$i]); + unset($object->products[$i]); // Tant que products encore utilise } // Bloc to update dates of service (month by month only if previously filled at 1d near start or end of month) // If it's a service with start and end dates - if (!empty($line->date_start) && !empty($line->date_end) ) { + if (!empty($line->date_start) && !empty($line->date_end)) { // Get the dates $start = dol_getdate($line->date_start); $end = dol_getdate($line->date_end); @@ -1202,6 +1197,8 @@ class Facture extends CommonInvoice $object->lines[$i]->date_end = $newLast; } } + + $object->lines[$i]->ref_ext = ''; // Do not clone ref_ext } // Create clone @@ -1210,13 +1207,13 @@ class Facture extends CommonInvoice if ($result < 0) $error++; else { // copy internal contacts - if ($object->copy_linked_contact($this, 'internal') < 0) + if ($object->copy_linked_contact($this, 'internal') < 0) $error++; // copy external contacts if same company elseif ($this->socid == $object->socid) { - if ($object->copy_linked_contact($this, 'external') < 0) + if ($object->copy_linked_contact($this, 'external') < 0) $error++; } } @@ -1240,9 +1237,7 @@ class Facture extends CommonInvoice { $this->db->commit(); return $object->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1255,7 +1250,7 @@ class Facture extends CommonInvoice * @param User $user Object user * @return int <0 if KO, 0 if nothing done, 1 if OK */ - public function createFromOrder($object, User $user) + public function createFromOrder($object, User $user) { global $conf, $hookmanager; @@ -1308,7 +1303,7 @@ class Facture extends CommonInvoice $marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht); $line->pa_ht = $marginInfos[0]; - // get extrafields from original line + // get extrafields from original line $object->lines[$i]->fetch_optionals(); foreach ($object->lines[$i]->array_options as $options_key => $value) $line->array_options[$options_key] = $value; @@ -1325,22 +1320,22 @@ class Facture extends CommonInvoice $this->demand_reason_id = $object->demand_reason_id; $this->date_livraison = $object->date_livraison; $this->fk_delivery_address = $object->fk_delivery_address; // deprecated - $this->contact_id = $object->contactid; + $this->contact_id = $object->contact_id; $this->ref_client = $object->ref_client; if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN)) { - $this->note_private = $object->note_private; - $this->note_public = $object->note_public; + $this->note_private = $object->note_private; + $this->note_public = $object->note_public; } - $this->module_source = $object->module_source; + $this->module_source = $object->module_source; $this->pos_source = $object->pos_source; $this->origin = $object->element; $this->origin_id = $object->id; - // get extrafields from original line + // get extrafields from original line $object->fetch_optionals(); foreach ($object->array_options as $options_key => $value) $this->array_options[$options_key] = $value; @@ -1367,10 +1362,8 @@ class Facture extends CommonInvoice if (!$error) { return 1; - } - else return -1; - } - else return -1; + } else return -1; + } else return -1; } /** @@ -1381,13 +1374,13 @@ class Facture extends CommonInvoice * @param int $max Maxlength of ref * @param int $short 1=Return just URL * @param string $moretitle Add more text to title tooltip - * @param int $notooltip 1=Disable tooltip - * @param int $addlinktonotes 1=Add link to notes - * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @param string $target Target of link ('', '_self', '_blank', '_parent', '_backoffice', ...) + * @param int $notooltip 1=Disable tooltip + * @param int $addlinktonotes 1=Add link to notes + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param string $target Target of link ('', '_self', '_blank', '_parent', '_backoffice', ...) * @return string String with URL */ - public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1, $target = '') + public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1, $target = '') { global $langs, $conf, $user, $mysoc; @@ -1398,8 +1391,8 @@ class Facture extends CommonInvoice if ($option == 'withdraw') $url = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$this->id; else $url = DOL_URL_ROOT.'/compta/facture/card.php?facid='.$this->id; - if (!$user->rights->facture->lire) - $option = 'nolink'; + if (!$user->rights->facture->lire) + $option = 'nolink'; if ($option !== 'nolink') { @@ -1415,56 +1408,56 @@ class Facture extends CommonInvoice if ($this->type == self::TYPE_REPLACEMENT) $picto .= 'r'; // Replacement invoice if ($this->type == self::TYPE_CREDIT_NOTE) $picto .= 'a'; // Credit note if ($this->type == self::TYPE_DEPOSIT) $picto .= 'd'; // Deposit invoice - $label = ''; + $label = ''; - if ($user->rights->facture->lire) { - $label = ''.$langs->trans("Invoice").''; - if ($this->type == self::TYPE_REPLACEMENT) $label = ''.$langs->transnoentitiesnoconv("ReplacementInvoice").''; - if ($this->type == self::TYPE_CREDIT_NOTE) $label = ''.$langs->transnoentitiesnoconv("CreditNote").''; - if ($this->type == self::TYPE_DEPOSIT) $label = ''.$langs->transnoentitiesnoconv("Deposit").''; - if ($this->type == self::TYPE_SITUATION) $label = ''.$langs->transnoentitiesnoconv("InvoiceSituation").''; - if (!empty($this->ref)) - $label .= '
'.$langs->trans('Ref').': '.$this->ref; - if (!empty($this->ref_client)) - $label .= '
'.$langs->trans('RefCustomer').': '.$this->ref_client; - if (!empty($this->date)) - $label .= '
'.$langs->trans('Date').': '.dol_print_date($this->date, 'day'); - if (!empty($this->total_ht)) - $label .= '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_tva)) - $label .= '
'.$langs->trans('AmountVAT').': '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_localtax1) && $this->total_localtax1 != 0) // We keep test != 0 because $this->total_localtax1 can be '0.00000000' - $label .= '
'.$langs->transcountry('AmountLT1', $mysoc->country_code).': '.price($this->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_localtax2) && $this->total_localtax2 != 0) - $label .= '
'.$langs->transcountry('AmountLT2', $mysoc->country_code).': '.price($this->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_ttc)) - $label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); - if ($moretitle) $label .= ' - '.$moretitle; - if (isset($this->statut) && isset($this->alreadypaid)) { - $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5, $this->alreadypaid); - } - } + if ($user->rights->facture->lire) { + $label = img_picto('', $this->picto).' '.$langs->trans("Invoice").''; + if ($this->type == self::TYPE_REPLACEMENT) $label = ''.$langs->transnoentitiesnoconv("ReplacementInvoice").''; + if ($this->type == self::TYPE_CREDIT_NOTE) $label = ''.$langs->transnoentitiesnoconv("CreditNote").''; + if ($this->type == self::TYPE_DEPOSIT) $label = ''.$langs->transnoentitiesnoconv("Deposit").''; + if ($this->type == self::TYPE_SITUATION) $label = ''.$langs->transnoentitiesnoconv("InvoiceSituation").''; + if (!empty($this->ref)) + $label .= '
'.$langs->trans('Ref').': '.$this->ref; + if (!empty($this->ref_client)) + $label .= '
'.$langs->trans('RefCustomer').': '.$this->ref_client; + if (!empty($this->date)) + $label .= '
'.$langs->trans('Date').': '.dol_print_date($this->date, 'day'); + if (!empty($this->total_ht)) + $label .= '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_tva)) + $label .= '
'.$langs->trans('AmountVAT').': '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_localtax1) && $this->total_localtax1 != 0) // We keep test != 0 because $this->total_localtax1 can be '0.00000000' + $label .= '
'.$langs->transcountry('AmountLT1', $mysoc->country_code).': '.price($this->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_localtax2) && $this->total_localtax2 != 0) + $label .= '
'.$langs->transcountry('AmountLT2', $mysoc->country_code).': '.price($this->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_ttc)) + $label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); + if ($moretitle) $label .= ' - '.$moretitle; + if (isset($this->statut) && isset($this->alreadypaid)) { + $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5, $this->alreadypaid); + } + } $linkclose = ($target ? ' target="'.$target.'"' : ''); if (empty($notooltip) && $user->rights->facture->lire) { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { - $label = $langs->trans("Invoice"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; - } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; - $linkclose .= ' class="classfortooltip"'; + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label = $langs->trans("Invoice"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip"'; } - $linkstart = ''; + $linkstart = ''; $linkend = ''; - if ($option == 'nolink') { - $linkstart = ''; - $linkend = ''; - } + if ($option == 'nolink') { + $linkstart = ''; + $linkend = ''; + } $result .= $linkstart; if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); @@ -1473,19 +1466,19 @@ class Facture extends CommonInvoice if ($addlinktonotes) { - $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); - if ($txttoshow) - { - //$notetoshow = $langs->trans("ViewPrivateNote").':
'.dol_string_nohtmltag($txttoshow, 1); - $notetoshow = $langs->trans("ViewPrivateNote").':
'.$txttoshow; - $result .= ' '; - $result .= ''; - $result .= img_picto('', 'note'); - $result .= ''; - //$result.=img_picto($langs->trans("ViewNote"),'object_generic'); - //$result.=''; - $result .= ''; - } + $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); + if ($txttoshow) + { + //$notetoshow = $langs->trans("ViewPrivateNote").':
'.dol_string_nohtmltag($txttoshow, 1); + $notetoshow = $langs->trans("ViewPrivateNote").':
'.$txttoshow; + $result .= ' '; + $result .= ''; + $result .= img_picto('', 'note'); + $result .= ''; + //$result.=img_picto($langs->trans("ViewNote"),'object_generic'); + //$result.=''; + $result .= ''; + } } return $result; @@ -1523,10 +1516,10 @@ class Facture extends CommonInvoice $sql .= ", f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc"; $sql .= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql .= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc'; - $sql .= ', f.fk_incoterms, f.location_incoterms'; - $sql .= ', f.module_source, f.pos_source'; - $sql .= ", i.libelle as label_incoterms"; - $sql .= ", f.retained_warranty as retained_warranty, f.retained_warranty_date_limit as retained_warranty_date_limit, f.retained_warranty_fk_cond_reglement as retained_warranty_fk_cond_reglement"; + $sql .= ', f.fk_incoterms, f.location_incoterms'; + $sql .= ', f.module_source, f.pos_source'; + $sql .= ", i.libelle as label_incoterms"; + $sql .= ", f.retained_warranty as retained_warranty, f.retained_warranty_date_limit as retained_warranty_date_limit, f.retained_warranty_fk_cond_reglement as retained_warranty_fk_cond_reglement"; $sql .= ' FROM '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON f.fk_mode_reglement = p.id'; @@ -1597,7 +1590,8 @@ class Facture extends CommonInvoice $this->note_public = $obj->note_public; $this->user_author = $obj->fk_user_author; $this->user_valid = $obj->fk_user_valid; - $this->modelpdf = $obj->model_pdf; + $this->model_pdf = $obj->model_pdf; + $this->modelpdf = $obj->model_pdf; // deprecated $this->last_main_doc = $obj->last_main_doc; $this->situation_cycle_ref = $obj->situation_cycle_ref; $this->situation_counter = $obj->situation_counter; @@ -1645,23 +1639,19 @@ class Facture extends CommonInvoice return -3; } return 1; - } - else - { + } else { $this->error = 'Invoice with id='.$rowid.' or ref='.$ref.' or ref_ext='.$ref_ext.' not found'; dol_syslog(get_class($this)."::fetch Error ".$this->error, LOG_ERR); return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load all detailed lines into this->lines * @@ -1673,11 +1663,11 @@ class Facture extends CommonInvoice public function fetch_lines($only_product = 0, $loadalsotranslation = 0) { global $langs, $conf; - // phpcs:enable + // phpcs:enable $this->lines = array(); $sql = 'SELECT l.rowid, l.fk_facture, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx,'; - $sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,'; + $sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice, l.ref_ext,'; $sql .= ' l.situation_percent, l.fk_prev_id,'; $sql .= ' l.rang, l.special_code,'; $sql .= ' l.date_start as date_start, l.date_end as date_end,'; @@ -1716,8 +1706,9 @@ class Facture extends CommonInvoice $line->fk_product_type = $objp->fk_product_type; // Type of product $line->qty = $objp->qty; $line->subprice = $objp->subprice; + $line->ref_ext = $objp->ref_ext; // line external ref - $line->vat_src_code = $objp->vat_src_code; + $line->vat_src_code = $objp->vat_src_code; $line->tva_tx = $objp->tva_tx; $line->localtax1_tx = $objp->localtax1_tx; $line->localtax2_tx = $objp->localtax2_tx; @@ -1760,14 +1751,14 @@ class Facture extends CommonInvoice $line->multicurrency_total_tva = $objp->multicurrency_total_tva; $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; - $line->fetch_optionals(); + $line->fetch_optionals(); // multilangs - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->fk_product) && !empty($loadalsotranslation)) { - $line = new Product($this->db); - $line->fetch($objp->fk_product); - $line->getMultiLangs(); - } + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->fk_product) && !empty($loadalsotranslation)) { + $line = new Product($this->db); + $line->fetch($objp->fk_product); + $line->getMultiLangs(); + } $this->lines[$i] = $line; @@ -1775,27 +1766,26 @@ class Facture extends CommonInvoice } $this->db->free($result); return 1; - } - else - { + } else { $this->error = $this->db->error(); return -3; } } /** - * Fetch previous and next situations invoices + * Fetch previous and next situations invoices. + * Return all previous and next invoices (both standard and credit notes). * * @return void */ - public function fetchPreviousNextSituationInvoice() + public function fetchPreviousNextSituationInvoice() { global $conf; $this->tab_previous_situation_invoice = array(); $this->tab_next_situation_invoice = array(); - $sql = 'SELECT rowid, situation_counter FROM '.MAIN_DB_PREFIX.'facture'; + $sql = 'SELECT rowid, type, situation_cycle_ref, situation_counter FROM '.MAIN_DB_PREFIX.'facture'; $sql .= ' WHERE rowid <> '.$this->id; $sql .= ' AND entity = '.$this->entity; $sql .= ' AND situation_cycle_ref = '.(int) $this->situation_cycle_ref; @@ -1810,15 +1800,13 @@ class Facture extends CommonInvoice $invoice = new Facture($this->db); if ($invoice->fetch($objp->rowid) > 0) { - if ($objp->situation_counter < $this->situation_counter - || ($objp->situation_counter == $this->situation_counter && $objp->rowid < $this->id) // This case appear when there are credit notes - ) + if ($objp->situation_counter < $this->situation_counter + || ($objp->situation_counter == $this->situation_counter && $objp->rowid < $this->id) // This case appear when there are credit notes + ) { - $this->tab_previous_situation_invoice[] = $invoice; - } - else - { - $this->tab_next_situation_invoice[] = $invoice; + $this->tab_previous_situation_invoice[] = $invoice; + } else { + $this->tab_next_situation_invoice[] = $invoice; } } } @@ -1832,7 +1820,7 @@ class Facture extends CommonInvoice * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - public function update(User $user, $notrigger = 0) + public function update(User $user, $notrigger = 0) { global $conf; @@ -1841,6 +1829,7 @@ class Facture extends CommonInvoice // Clean parameters if (empty($this->type)) $this->type = self::TYPE_STANDARD; if (isset($this->ref)) $this->ref = trim($this->ref); + if (isset($this->ref_ext)) $this->ref_ext = trim($this->ref_ext); if (isset($this->ref_client)) $this->ref_client = trim($this->ref_client); if (isset($this->increment)) $this->increment = trim($this->increment); if (isset($this->close_code)) $this->close_code = trim($this->close_code); @@ -1848,7 +1837,7 @@ class Facture extends CommonInvoice if (isset($this->note) || isset($this->note_private)) $this->note = (isset($this->note) ? trim($this->note) : trim($this->note_private)); // deprecated if (isset($this->note) || isset($this->note_private)) $this->note_private = (isset($this->note_private) ? trim($this->note_private) : trim($this->note)); if (isset($this->note_public)) $this->note_public = trim($this->note_public); - if (isset($this->modelpdf)) $this->modelpdf = trim($this->modelpdf); + if (isset($this->model_pdf)) $this->model_pdf = trim($this->model_pdf); if (isset($this->import_key)) $this->import_key = trim($this->import_key); if (isset($this->retained_warranty)) $this->retained_warranty = floatval($this->retained_warranty); @@ -1859,6 +1848,7 @@ class Facture extends CommonInvoice // Update request $sql = "UPDATE ".MAIN_DB_PREFIX."facture SET"; $sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").","; + $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; $sql .= " type=".(isset($this->type) ? $this->db->escape($this->type) : "null").","; $sql .= " ref_client=".(isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null").","; $sql .= " increment=".(isset($this->increment) ? "'".$this->db->escape($this->increment)."'" : "null").","; @@ -1933,25 +1923,23 @@ class Facture extends CommonInvoice } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Add a discount line into an invoice (as an invoice line) using an existing absolute discount (Consume the discount) * * @param int $idremise Id of absolute discount * @return int >0 if OK, <0 if KO */ - public function insert_discount($idremise) + public function insert_discount($idremise) { - // phpcs:enable + // phpcs:enable global $langs; include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -1987,12 +1975,12 @@ class Facture extends CommonInvoice // Get buy/cost price of invoice that is source of discount if ($remise->fk_facture_source > 0) { - $srcinvoice = new Facture($this->db); - $srcinvoice->fetch($remise->fk_facture_source); - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; // TODO Move this into commonobject - $formmargin = new FormMargin($this->db); - $arraytmp = $formmargin->getMarginInfosArray($srcinvoice, false); - $facligne->pa_ht = $arraytmp['pa_total']; + $srcinvoice = new Facture($this->db); + $srcinvoice->fetch($remise->fk_facture_source); + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; // TODO Move this into commonobject + $formmargin = new FormMargin($this->db); + $arraytmp = $formmargin->getMarginInfosArray($srcinvoice, false); + $facligne->pa_ht = $arraytmp['pa_total']; } $facligne->total_ht = -$remise->amount_ht; @@ -2021,29 +2009,23 @@ class Facture extends CommonInvoice $this->db->commit(); return 1; - } - else - { + } else { $this->error = $facligne->error; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $facligne->error; $this->db->rollback(); return -2; } - } - else - { + } else { $this->db->rollback(); return -3; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set customer ref * @@ -2051,10 +2033,10 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function set_ref_client($ref_client, $notrigger = 0) + public function set_ref_client($ref_client, $notrigger = 0) { - // phpcs:enable - global $user; + // phpcs:enable + global $user; $error = 0; @@ -2063,8 +2045,7 @@ class Facture extends CommonInvoice $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture'; if (empty($ref_client)) $sql .= ' SET ref_client = NULL'; - else - $sql .= ' SET ref_client = \''.$this->db->escape($ref_client).'\''; + else $sql .= ' SET ref_client = \''.$this->db->escape($ref_client).'\''; $sql .= ' WHERE rowid = '.$this->id; dol_syslog(__METHOD__.' this->id='.$this->id.', ref_client='.$ref_client, LOG_DEBUG); @@ -2094,9 +2075,7 @@ class Facture extends CommonInvoice $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2115,7 +2094,7 @@ class Facture extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, 0=Refused, >0 if OK */ - public function delete($user, $notrigger = 0, $idwarehouse = -1) + public function delete($user, $notrigger = 0, $idwarehouse = -1) { global $langs, $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2135,10 +2114,10 @@ class Facture extends CommonInvoice if (!$error && !$notrigger) { - // Call trigger - $result = $this->call_trigger('BILL_DELETE', $user); - if ($result < 0) $error++; - // End call triggers + // Call trigger + $result = $this->call_trigger('BILL_DELETE', $user); + if ($result < 0) $error++; + // End call triggers } // Removed extrafields @@ -2210,7 +2189,7 @@ class Facture extends CommonInvoice } } - // Invoice line extrafileds + // Invoice line extrafileds $main = MAIN_DB_PREFIX.'facturedet'; $ef = $main."_extrafields"; $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_facture = $rowid)"; @@ -2228,6 +2207,9 @@ class Facture extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { + // Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive + $this->deleteEcmFiles(); + // On efface le repertoire de pdf provisoire $ref = dol_sanitizeFileName($this->ref); if ($conf->facture->dir_output && !empty($this->ref)) @@ -2260,29 +2242,23 @@ class Facture extends CommonInvoice $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror()." sql=".$sql; $this->db->rollback(); return -6; } - } - else - { + } else { $this->error = $this->db->lasterror()." sql=".$sql; $this->db->rollback(); return -4; } - } - else - { + } else { $this->db->rollback(); return -2; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Tag the invoice as paid completely (if close_code is filled) => this->fk_statut=2, this->paye=1 * or partialy (if close_code filled) + appel trigger BILL_PAYED => this->fk_statut=2, this->paye stay 0 @@ -2292,9 +2268,9 @@ class Facture extends CommonInvoice * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple) * @return int <0 if KO, >0 if OK */ - public function set_paid($user, $close_code = '', $close_note = '') + public function set_paid($user, $close_code = '', $close_note = '') { - // phpcs:enable + // phpcs:enable $error = 0; if ($this->paye != 1) @@ -2317,13 +2293,11 @@ class Facture extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { - // Call trigger - $result = $this->call_trigger('BILL_PAYED', $user); - if ($result < 0) $error++; - // End call triggers - } - else - { + // Call trigger + $result = $this->call_trigger('BILL_PAYED', $user); + if ($result < 0) $error++; + // End call triggers + } else { $error++; $this->error = $this->db->lasterror(); } @@ -2332,21 +2306,17 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Tag la facture comme non payee completement + appel trigger BILL_UNPAYED * Fonction utilisee quand un paiement prelevement est refuse, @@ -2355,9 +2325,9 @@ class Facture extends CommonInvoice * @param User $user Object user that change status * @return int <0 if KO, >0 if OK */ - public function set_unpaid($user) + public function set_unpaid($user) { - // phpcs:enable + // phpcs:enable $error = 0; $this->db->begin(); @@ -2372,13 +2342,11 @@ class Facture extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { - // Call trigger - $result = $this->call_trigger('BILL_UNPAYED', $user); - if ($result < 0) $error++; - // End call triggers - } - else - { + // Call trigger + $result = $this->call_trigger('BILL_UNPAYED', $user); + if ($result < 0) $error++; + // End call triggers + } else { $error++; $this->error = $this->db->error(); dol_print_error($this->db); @@ -2388,16 +2356,14 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Tag invoice as canceled, with no payment on it (example for replacement invoice or payment never received) + call trigger BILL_CANCEL * Warning, if option to decrease stock on invoice was set, this function does not change stock (it might be a cancel because @@ -2408,9 +2374,9 @@ class Facture extends CommonInvoice * @param string $close_note Comment * @return int <0 if KO, >0 if OK */ - public function set_canceled($user, $close_code = '', $close_note = '') + public function set_canceled($user, $close_code = '', $close_note = '') { - // phpcs:enable + // phpcs:enable dol_syslog(get_class($this)."::set_canceled rowid=".$this->id, LOG_DEBUG); @@ -2434,27 +2400,23 @@ class Facture extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { - // Call trigger - $result = $this->call_trigger('BILL_CANCEL', $user); - if ($result < 0) - { + // Call trigger + $result = $this->call_trigger('BILL_CANCEL', $user); + if ($result < 0) + { $this->db->rollback(); return -1; } - // End call triggers + // End call triggers $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -2; @@ -2469,11 +2431,11 @@ class Facture extends CommonInvoice * @param string $force_number Reference to force on invoice * @param int $idwarehouse Id of warehouse to use for stock decrease if option to decreasenon stock is on (0=no decrease) * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @param int $batch_rule [=0] 0 not decrement batch, else batch rule to use + * @param int $batch_rule 0=do not decrement batch, else batch rule to use * 1=take in batches ordered by sellby and eatby dates - * @return int <0 if KO, 0=Nothing done because invoice is not a draft, >0 if OK + * @return int <0 if KO, 0=Nothing done because invoice is not a draft, >0 if OK */ - public function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0, $batch_rule = 0) + public function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0, $batch_rule = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2504,12 +2466,12 @@ class Facture extends CommonInvoice } if (count($this->lines) <= 0) { - $langs->load("errors"); + $langs->load("errors"); $this->error = $langs->trans("ErrorObjectMustHaveLinesToBeValidated", $this->ref); return -1; } if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->facture->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->facture->invoice_advance->validate))) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->facture->invoice_advance->validate))) { $this->error = 'Permission denied'; dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS='.$conf->global->MAIN_USE_ADVANCED_PERMS, LOG_ERR); @@ -2563,8 +2525,7 @@ class Facture extends CommonInvoice if ($force_number) { $num = $force_number; - } - elseif (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life + } elseif (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life { if (!empty($conf->global->FAC_FORCE_DATE_VALIDATION)) // If option enabled, we force invoice date { @@ -2572,9 +2533,7 @@ class Facture extends CommonInvoice $this->date_lim_reglement = $this->calculate_date_lim_reglement(); } $num = $this->getNextNumRef($this->thirdparty); - } - else - { + } else { $num = $this->ref; } $this->newref = dol_sanitizeFileName($num); @@ -2724,10 +2683,10 @@ class Facture extends CommonInvoice // Trigger calls if (!$error && !$notrigger) { - // Call trigger - $result = $this->call_trigger('BILL_VALIDATE', $user); - if ($result < 0) $error++; - // End call triggers + // Call trigger + $result = $this->call_trigger('BILL_VALIDATE', $user); + if ($result < 0) $error++; + // End call triggers } if (!$error) @@ -2755,16 +2714,16 @@ class Facture extends CommonInvoice if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); - // Rename docs starting with $oldref with $newref - $listoffiles = dol_dir_list($conf->facture->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { - $dirsource = $fileentry['name']; - $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); - $dirsource = $fileentry['path'].'/'.$dirsource; - $dirdest = $fileentry['path'].'/'.$dirdest; - @rename($dirsource, $dirdest); - } + // Rename docs starting with $oldref with $newref + $listoffiles = dol_dir_list($conf->facture->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); + foreach ($listoffiles as $fileentry) + { + $dirsource = $fileentry['name']; + $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); + $dirsource = $fileentry['path'].'/'.$dirsource; + $dirdest = $fileentry['path'].'/'.$dirdest; + @rename($dirsource, $dirdest); + } } } } @@ -2788,24 +2747,22 @@ class Facture extends CommonInvoice $this->date_validation = $now; $i = 0; - if (!empty($conf->global->INVOICE_USE_SITUATION)) - { - $final = true; - $nboflines = count($this->lines); - while (($i < $nboflines) && $final) { - $final = ($this->lines[$i]->situation_percent == 100); - $i++; - } + if (!empty($conf->global->INVOICE_USE_SITUATION)) + { + $final = true; + $nboflines = count($this->lines); + while (($i < $nboflines) && $final) { + $final = ($this->lines[$i]->situation_percent == 100); + $i++; + } - if (empty($final)) $this->situation_final = 0; - else $this->situation_final = 1; + if (empty($final)) $this->situation_final = 0; + else $this->situation_final = 1; - $this->setFinal($user); - } + $this->setFinal($user); + } } - } - else - { + } else { $error++; } @@ -2813,9 +2770,7 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -2827,7 +2782,7 @@ class Facture extends CommonInvoice * @param Translate $langs Translate object * @return bool false if KO, true if OK */ - public function updatePriceNextInvoice(&$langs) + public function updatePriceNextInvoice(&$langs) { foreach ($this->tab_next_situation_invoice as $next_invoice) { @@ -2871,7 +2826,7 @@ class Facture extends CommonInvoice */ public function setDraft($user, $idwarehouse = -1) { - // phpcs:enable + // phpcs:enable global $conf, $langs; $error = 0; @@ -2942,15 +2897,11 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -2994,39 +2945,41 @@ class Facture extends CommonInvoice * @param int $fk_prev_id Previous situation line id reference * @param string $fk_unit Code of the unit to use. Null to use the default one * @param double $pu_ht_devise Unit price in currency + * @param string $ref_ext External reference of the line * @return int <0 if KO, Id of line if OK */ - public function addline( - $desc, - $pu_ht, - $qty, - $txtva, - $txlocaltax1 = 0, - $txlocaltax2 = 0, - $fk_product = 0, - $remise_percent = 0, - $date_start = '', - $date_end = '', - $ventil = 0, - $info_bits = 0, - $fk_remise_except = '', - $price_base_type = 'HT', - $pu_ttc = 0, - $type = self::TYPE_STANDARD, - $rang = -1, - $special_code = 0, - $origin = '', - $origin_id = 0, - $fk_parent_line = 0, - $fk_fournprice = null, - $pa_ht = 0, - $label = '', - $array_options = 0, - $situation_percent = 100, - $fk_prev_id = 0, - $fk_unit = null, - $pu_ht_devise = 0 - ) { + public function addline( + $desc, + $pu_ht, + $qty, + $txtva, + $txlocaltax1 = 0, + $txlocaltax2 = 0, + $fk_product = 0, + $remise_percent = 0, + $date_start = '', + $date_end = '', + $ventil = 0, + $info_bits = 0, + $fk_remise_except = '', + $price_base_type = 'HT', + $pu_ttc = 0, + $type = self::TYPE_STANDARD, + $rang = -1, + $special_code = 0, + $origin = '', + $origin_id = 0, + $fk_parent_line = 0, + $fk_fournprice = null, + $pa_ht = 0, + $label = '', + $array_options = 0, + $situation_percent = 100, + $fk_prev_id = 0, + $fk_unit = null, + $pu_ht_devise = 0, + $ref_ext = '' + ) { // Deprecation warning if ($label) { dol_syslog(__METHOD__.": using line label is deprecated", LOG_WARNING); @@ -3053,6 +3006,7 @@ class Facture extends CommonInvoice if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line = 0; if (empty($fk_prev_id)) $fk_prev_id = 'null'; if (!isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100; + if (empty($ref_ext)) $ref_ext = ''; $remise_percent = price2num($remise_percent); $qty = price2num($qty); @@ -3069,9 +3023,7 @@ class Facture extends CommonInvoice if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } @@ -3094,8 +3046,8 @@ class Facture extends CommonInvoice $product_type = $product->type; if (!empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) { - $langs->load("errors"); - $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref); + $langs->load("errors"); + $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref); $this->db->rollback(); return -3; } @@ -3128,8 +3080,8 @@ class Facture extends CommonInvoice // MultiCurrency $multicurrency_total_ht = $tabprice[16]; - $multicurrency_total_tva = $tabprice[17]; - $multicurrency_total_ttc = $tabprice[18]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; // Rank to use @@ -3148,6 +3100,7 @@ class Facture extends CommonInvoice $this->line->fk_facture = $this->id; $this->line->label = $label; // deprecated $this->line->desc = $desc; + $this->line->ref_ext = $ref_ext; $this->line->qty = ($this->type == self::TYPE_CREDIT_NOTE ?abs($qty) : $qty); // For credit note, quantity is always positive and unit price negative $this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ?-abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise @@ -3192,8 +3145,8 @@ class Facture extends CommonInvoice $this->line->multicurrency_code = $this->multicurrency_code; $this->line->multicurrency_subprice = $pu_ht_devise; $this->line->multicurrency_total_ht = $multicurrency_total_ht; - $this->line->multicurrency_total_tva = $multicurrency_total_tva; - $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; if (is_array($array_options) && count($array_options) > 0) { $this->line->array_options = $array_options; @@ -3212,24 +3165,18 @@ class Facture extends CommonInvoice { $this->db->commit(); return $this->line->id; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->line->error; $this->db->rollback(); return -2; } - } - else - { - dol_syslog(get_class($this)."::addline status of order must be Draft to allow use of ->addline()", LOG_ERR); + } else { + dol_syslog(get_class($this)."::addline status of invoice must be Draft to allow use of ->addline()", LOG_ERR); return -3; } } @@ -3256,14 +3203,15 @@ class Facture extends CommonInvoice * @param int $pa_ht Price (without tax) of product when it was bought * @param string $label Label of the line (deprecated, do not use) * @param int $special_code Special code (also used by externals modules!) - * @param array $array_options extrafields array + * @param array $array_options extrafields array * @param int $situation_percent Situation advance percentage * @param string $fk_unit Code of the unit to use. Null to use the default one * @param double $pu_ht_devise Unit price in currency * @param int $notrigger disable line update trigger + * @param string $ref_ext External reference of the line * @return int < 0 if KO, > 0 if OK */ - public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = self::TYPE_STANDARD, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $situation_percent = 100, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0) + public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = self::TYPE_STANDARD, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $situation_percent = 100, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $ref_ext = '') { global $conf, $user; // Deprecation warning @@ -3301,11 +3249,12 @@ class Facture extends CommonInvoice if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line = 0; if (empty($special_code) || $special_code == 3) $special_code = 0; if (!isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100; + if (empty($ref_ext)) $ref_ext = ''; $remise_percent = price2num($remise_percent); $qty = price2num($qty); $pu = price2num($pu); - $pu_ht_devise = price2num($pu_ht_devise); + $pu_ht_devise = price2num($pu_ht_devise); $pa_ht = price2num($pa_ht); $txtva = price2num($txtva); $txlocaltax1 = price2num($txlocaltax1); @@ -3321,12 +3270,12 @@ class Facture extends CommonInvoice $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc); // Clean vat code - $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { - $vat_src_code = $reg[1]; - $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. - } + $vat_src_code = ''; + if (preg_match('/\((.*)\)/', $txtva, $reg)) + { + $vat_src_code = $reg[1]; + $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. + } $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx, $pu_ht_devise); @@ -3341,8 +3290,8 @@ class Facture extends CommonInvoice // MultiCurrency $multicurrency_total_ht = $tabprice[16]; - $multicurrency_total_tva = $tabprice[17]; - $multicurrency_total_ttc = $tabprice[18]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; // Old properties: $price, $remise (deprecated) @@ -3367,8 +3316,8 @@ class Facture extends CommonInvoice $product_type = $product->type; if (!empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) { - $langs->load("errors"); - $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref); + $langs->load("errors"); + $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref); $this->db->rollback(); return -3; } @@ -3378,7 +3327,7 @@ class Facture extends CommonInvoice $line->oldline = $staticline; $this->line = $line; - $this->line->context = $this->context; + $this->line->context = $this->context; // Reorder if fk_parent_line change if (!empty($fk_parent_line) && !empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line) @@ -3391,6 +3340,7 @@ class Facture extends CommonInvoice $this->line->rowid = $rowid; $this->line->label = $label; $this->line->desc = $desc; + $this->line->ref_ext = $ref_ext; $this->line->qty = ($this->type == self::TYPE_CREDIT_NOTE ?abs($qty) : $qty); // For credit note, quantity is always positive and unit price negative $this->line->vat_src_code = $vat_src_code; @@ -3423,8 +3373,8 @@ class Facture extends CommonInvoice // Multicurrency $this->line->multicurrency_subprice = $pu_ht_devise; $this->line->multicurrency_total_ht = $multicurrency_total_ht; - $this->line->multicurrency_total_tva = $multicurrency_total_tva; - $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; if (is_array($array_options) && count($array_options) > 0) { // We replace values in this->line->array_options only for entries defined into $array_options @@ -3443,16 +3393,12 @@ class Facture extends CommonInvoice $this->update_price(1); $this->db->commit(); return $result; - } - else - { - $this->error = $this->line->error; + } else { + $this->error = $this->line->error; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = "Invoice statut makes operation forbidden"; return -2; } @@ -3465,7 +3411,7 @@ class Facture extends CommonInvoice * @param float $situation_percent progress percentage need to be test * @return false if KO, true if OK */ - public function checkProgressLine($idline, $situation_percent) + public function checkProgressLine($idline, $situation_percent) { $sql = 'SELECT fd.situation_percent FROM '.MAIN_DB_PREFIX.'facturedet fd INNER JOIN '.MAIN_DB_PREFIX.'facture f ON (fd.fk_facture = f.rowid) @@ -3485,7 +3431,7 @@ class Facture extends CommonInvoice else return $situation_percent < $obj->situation_percent; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update invoice line with percentage * @@ -3493,16 +3439,16 @@ class Facture extends CommonInvoice * @param int $percent Percentage * @return void */ - public function update_percent($line, $percent) + public function update_percent($line, $percent) { - // phpcs:enable - global $mysoc, $user; + // phpcs:enable + global $mysoc, $user; - // Progress should never be changed for discount lines - if (($line->info_bits & 2) == 2) - { - return; - } + // Progress should never be changed for discount lines + if (($line->info_bits & 2) == 2) + { + return; + } include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -3528,9 +3474,9 @@ class Facture extends CommonInvoice * @param int $rowid Id of line to delete * @return int <0 if KO, >0 if OK */ - public function deleteline($rowid) + public function deleteline($rowid) { - global $user; + global $user; dol_syslog(get_class($this)."::deleteline rowid=".$rowid, LOG_DEBUG); @@ -3558,7 +3504,7 @@ class Facture extends CommonInvoice $line = new FactureLigne($this->db); - $line->context = $this->context; + $line->context = $this->context; // For triggers $result = $line->fetch($rowid); @@ -3572,23 +3518,19 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; } - } - else - { + } else { $this->db->rollback(); $this->error = $line->error; return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set percent discount * @@ -3597,9 +3539,9 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - public function set_remise($user, $remise, $notrigger = 0) + public function set_remise($user, $remise, $notrigger = 0) { - // phpcs:enable + // phpcs:enable // Clean parameters if (empty($remise)) $remise = 0; @@ -3639,9 +3581,7 @@ class Facture extends CommonInvoice $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -3654,7 +3594,7 @@ class Facture extends CommonInvoice } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set absolute discount * @@ -3663,9 +3603,9 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function set_remise_absolue($user, $remise, $notrigger = 0) + public function set_remise_absolue($user, $remise, $notrigger = 0) { - // phpcs:enable + // phpcs:enable if (empty($remise)) $remise = 0; if ($user->rights->facture->creer) @@ -3708,9 +3648,7 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -3730,7 +3668,7 @@ class Facture extends CommonInvoice * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - public function getNextNumRef($soc, $mode = 'next') + public function getNextNumRef($soc, $mode = 'next') { global $conf, $langs; @@ -3828,7 +3766,7 @@ class Facture extends CommonInvoice * @param int $id Id of object to load * @return void */ - public function info($id) + public function info($id) { $sql = 'SELECT c.rowid, datec, date_valid as datev, tms as datem,'; $sql .= ' date_closing as dateclosing,'; @@ -3868,15 +3806,13 @@ class Facture extends CommonInvoice $this->date_closing = $this->db->jdate($obj->dateclosing); } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of invoices (eventually filtered on a user) into an array * @@ -3890,9 +3826,9 @@ class Facture extends CommonInvoice * @param string $sortorder Sort order * @return array|int -1 if KO, array with result if OK */ - public function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'f.datef,f.rowid', $sortorder = 'DESC') + public function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'f.datef,f.rowid', $sortorder = 'DESC') { - // phpcs:enable + // phpcs:enable global $conf, $user; $ga = array(); @@ -3928,13 +3864,10 @@ class Facture extends CommonInvoice if ($shortlist == 1) { $ga[$obj->fid] = $obj->ref; - } - elseif ($shortlist == 2) + } elseif ($shortlist == 2) { $ga[$obj->fid] = $obj->ref.' ('.$obj->name.')'; - } - else - { + } else { $ga[$i]['id'] = $obj->fid; $ga[$i]['ref'] = $obj->ref; $ga[$i]['name'] = $obj->name; @@ -3943,16 +3876,14 @@ class Facture extends CommonInvoice } } return $ga; - } - else - { + } else { dol_print_error($this->db); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of invoices qualified to be replaced by another invoice. * Invoices matching the following rules are returned: @@ -3961,9 +3892,9 @@ class Facture extends CommonInvoice * @param int $socid Id thirdparty * @return array|int Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) */ - public function list_replacable_invoices($socid = 0) + public function list_replacable_invoices($socid = 0) { - // phpcs:enable + // phpcs:enable global $conf; $return = array(); @@ -3993,16 +3924,14 @@ class Facture extends CommonInvoice } //print_r($return); return $return; - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of invoices qualified to be corrected by a credit note. * Invoices matching the following rules are returned: @@ -4011,9 +3940,9 @@ class Facture extends CommonInvoice * @param int $socid Id thirdparty * @return array Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) */ - public function list_qualified_avoir_invoices($socid = 0) + public function list_qualified_avoir_invoices($socid = 0) { - // phpcs:enable + // phpcs:enable global $conf; $return = array(); @@ -4032,19 +3961,17 @@ class Facture extends CommonInvoice $sql .= " AND f.type != ".self::TYPE_CREDIT_NOTE; // Type non 2 si facture non avoir if (!empty($conf->global->INVOICE_USE_SITUATION_CREDIT_NOTE)) { - // Select the last situation invoice - $sqlSit = 'SELECT MAX(fs.rowid)'; - $sqlSit .= " FROM ".MAIN_DB_PREFIX."facture as fs"; - $sqlSit .= " WHERE fs.entity IN (".getEntity('invoice').")"; - $sqlSit .= " AND fs.type = ".self::TYPE_SITUATION; - $sqlSit .= " AND fs.fk_statut in (".self::STATUS_VALIDATED.",".self::STATUS_CLOSED.")"; - $sqlSit .= " GROUP BY fs.situation_cycle_ref"; - $sqlSit .= " ORDER BY fs.situation_counter"; - $sql .= " AND ( f.type != ".self::TYPE_SITUATION." OR f.rowid IN (".$sqlSit.") )"; // Type non 5 si facture non avoir - } - else - { - $sql .= " AND f.type != ".self::TYPE_SITUATION; // Type non 5 si facture non avoir + // Select the last situation invoice + $sqlSit = 'SELECT MAX(fs.rowid)'; + $sqlSit .= " FROM ".MAIN_DB_PREFIX."facture as fs"; + $sqlSit .= " WHERE fs.entity IN (".getEntity('invoice').")"; + $sqlSit .= " AND fs.type = ".self::TYPE_SITUATION; + $sqlSit .= " AND fs.fk_statut in (".self::STATUS_VALIDATED.",".self::STATUS_CLOSED.")"; + $sqlSit .= " GROUP BY fs.situation_cycle_ref"; + $sqlSit .= " ORDER BY fs.situation_counter"; + $sql .= " AND ( f.type != ".self::TYPE_SITUATION." OR f.rowid IN (".$sqlSit.") )"; // Type non 5 si facture non avoir + } else { + $sql .= " AND f.type != ".self::TYPE_SITUATION; // Type non 5 si facture non avoir } if ($socid > 0) $sql .= " AND f.fk_soc = ".$socid; @@ -4068,164 +3995,23 @@ class Facture extends CommonInvoice } return $return; - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Create a withdrawal request for a standing order. - * Use the remain to pay excluding all existing open direct debit requests. - * - * @param User $fuser User asking the direct debit transfer - * @param float $amount Amount we request direct debit for - * @return int <0 if KO, >0 if OK - */ - public function demande_prelevement($fuser, $amount = 0) - { - // phpcs:enable - - $error = 0; - - dol_syslog(get_class($this)."::demande_prelevement", LOG_DEBUG); - - if ($this->statut > self::STATUS_DRAFT && $this->paye == 0) - { - require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; - $bac = new CompanyBankAccount($this->db); - $bac->fetch(0, $this->socid); - - $sql = 'SELECT count(*)'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'prelevement_facture_demande'; - $sql .= ' WHERE fk_facture = '.$this->id; - $sql .= ' AND traite = 0'; - - dol_syslog(get_class($this)."::demande_prelevement", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $row = $this->db->fetch_row($resql); - if ($row[0] == 0) - { - $now = dol_now(); - - $totalpaye = $this->getSommePaiement(); - $totalcreditnotes = $this->getSumCreditNotesUsed(); - $totaldeposits = $this->getSumDepositsUsed(); - //print "totalpaye=".$totalpaye." totalcreditnotes=".$totalcreditnotes." totaldeposts=".$totaldeposits; - - // We can also use bcadd to avoid pb with floating points - // For example print 239.2 - 229.3 - 9.9; does not return 0. - //$resteapayer=bcadd($this->total_ttc,$totalpaye,$conf->global->MAIN_MAX_DECIMALS_TOT); - //$resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT); - if (empty($amount)) $amount = price2num($this->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); - - if (is_numeric($amount) && $amount != 0) - { - $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'prelevement_facture_demande'; - $sql .= ' (fk_facture, amount, date_demande, fk_user_demande, code_banque, code_guichet, number, cle_rib)'; - $sql .= ' VALUES ('.$this->id; - $sql .= ",'".price2num($amount)."'"; - $sql .= ",'".$this->db->idate($now)."'"; - $sql .= ",".$fuser->id; - $sql .= ",'".$bac->code_banque."'"; - $sql .= ",'".$bac->code_guichet."'"; - $sql .= ",'".$bac->number."'"; - $sql .= ",'".$bac->cle_rib."')"; - - dol_syslog(get_class($this)."::demande_prelevement", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) - { - $this->error = $this->db->lasterror(); - dol_syslog(get_class($this).'::demandeprelevement Erreur'); - $error++; - } - } - else - { - $this->error = 'WithdrawRequestErrorNilAmount'; - dol_syslog(get_class($this).'::demandeprelevement WithdrawRequestErrorNilAmount'); - $error++; - } - - if (!$error) - { - // Force payment mode of invoice to withdraw - $payment_mode_id = dol_getIdFromCode($this->db, 'PRE', 'c_paiement', 'code', 'id', 1); - if ($payment_mode_id > 0) - { - $result = $this->setPaymentMethods($payment_mode_id); - } - } - - if ($error) return -1; - return 1; - } - else - { - $this->error = "A request already exists"; - dol_syslog(get_class($this).'::demandeprelevement Impossible de creer une demande, demande deja en cours'); - return 0; - } - } - else - { - $this->error = $this->db->error(); - dol_syslog(get_class($this).'::demandeprelevement Erreur -2'); - return -2; - } - } - else - { - $this->error = "Status of invoice does not allow this"; - dol_syslog(get_class($this)."::demandeprelevement ".$this->error." $this->statut, $this->paye, $this->mode_reglement_id"); - return -3; - } - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Supprime une demande de prelevement - * - * @param User $fuser User making delete - * @param int $did id de la demande a supprimer - * @return int <0 if OK, >0 if KO - */ - public function demande_prelevement_delete($fuser, $did) - { - // phpcs:enable - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'prelevement_facture_demande'; - $sql .= ' WHERE rowid = '.$did; - $sql .= ' AND traite = 0'; - if ($this->db->query($sql)) - { - return 0; - } - else - { - $this->error = $this->db->lasterror(); - dol_syslog(get_class($this).'::demande_prelevement_delete Error '.$this->error); - return -1; - } - } - - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load indicators for dashboard (this->nbtodo and this->nbtodolate) * * @param User $user Object user * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - public function load_board($user) + public function load_board($user) { - // phpcs:enable + // phpcs:enable global $conf, $langs; $clause = " WHERE"; @@ -4273,9 +4059,7 @@ class Facture extends CommonInvoice } return $response; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -4290,7 +4074,7 @@ class Facture extends CommonInvoice * * @return array Liste des id contacts facturation */ - public function getIdBillingContact() + public function getIdBillingContact() { return $this->getIdContact('external', 'BILLING'); } @@ -4300,7 +4084,7 @@ class Facture extends CommonInvoice * * @return array Liste des id contacts livraison */ - public function getIdShippingContact() + public function getIdShippingContact() { return $this->getIdContact('external', 'SHIPPING'); } @@ -4314,7 +4098,7 @@ class Facture extends CommonInvoice * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - public function initAsSpecimen($option = '') + public function initAsSpecimen($option = '') { global $conf, $langs; @@ -4322,12 +4106,14 @@ class Facture extends CommonInvoice $arraynow = dol_getdate($now); $nownotime = dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']); - // Load array of products prodids + // Load array of products prodids $num_prods = 0; $prodids = array(); $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; + $sql .= $this->db->plimit(100); + $resql = $this->db->query($sql); if ($resql) { @@ -4395,8 +4181,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ht = -200; $line->multicurrency_total_ttc = -239.2; $line->multicurrency_total_tva = -39.2; - } - elseif ($xnbp == 2) // UP is negative (free line) + } elseif ($xnbp == 2) // UP is negative (free line) { $line->subprice = -100; $line->total_ht = -100; @@ -4406,8 +4191,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ht = -200; $line->multicurrency_total_ttc = -239.2; $line->multicurrency_total_tva = -39.2; - } - elseif ($xnbp == 3) // Discount is 50% (product line) + } elseif ($xnbp == 3) // Discount is 50% (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; @@ -4418,8 +4202,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ttc = 119.6; $line->multicurrency_total_tva = 19.6; $line->remise_percent = 50; - } - else // (product line) + } else // (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; @@ -4470,15 +4253,15 @@ class Facture extends CommonInvoice } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load indicators for dashboard (this->nbtodo and this->nbtodolate) * * @return int <0 if KO, >0 if OK */ - public function load_state_board() + public function load_state_board() { - // phpcs:enable + // phpcs:enable global $conf, $user; $this->nb = array(); @@ -4503,11 +4286,9 @@ class Facture extends CommonInvoice { $this->nb["invoices"] = $obj->nb; } - $this->db->free($resql); + $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -4519,9 +4300,9 @@ class Facture extends CommonInvoice * * @return int >0 if OK, <0 if KO */ - public function getLinesArray() + public function getLinesArray() { - return $this->fetch_lines(); + return $this->fetch_lines(); } /** @@ -4540,6 +4321,7 @@ class Facture extends CommonInvoice global $conf, $langs; $langs->load("bills"); + $outputlangs->load("products"); if (!dol_strlen($modele)) { @@ -4565,7 +4347,7 @@ class Facture extends CommonInvoice * * @return int >= 1 if OK, -1 if error */ - public function newCycle() + public function newCycle() { $sql = 'SELECT max(situation_cycle_ref) FROM '.MAIN_DB_PREFIX.'facture as f'; $sql .= " WHERE f.entity IN (".getEntity('invoice', 0).")"; @@ -4588,27 +4370,27 @@ class Facture extends CommonInvoice } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Checks if the invoice is the first of a cycle * * @return boolean */ - public function is_first() + public function is_first() { - // phpcs:enable + // phpcs:enable return ($this->situation_counter == 1); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns an array containing the previous situations as Facture objects * * @return mixed -1 if error, array of previous situations */ - public function get_prev_sits() + public function get_prev_sits() { - // phpcs:enable + // phpcs:enable global $conf; $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'facture'; @@ -4640,7 +4422,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function setFinal(User $user, $notrigger = 0) + public function setFinal(User $user, $notrigger = 0) { $error = 0; @@ -4668,9 +4450,7 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -4681,15 +4461,15 @@ class Facture extends CommonInvoice } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Checks if the invoice is the last in its cycle * * @return bool Last of the cycle status */ - public function is_last_in_cycle() + public function is_last_in_cycle() { - // phpcs:enable + // phpcs:enable global $conf; if (!empty($this->situation_cycle_ref)) { @@ -4747,24 +4527,21 @@ class Facture extends CommonInvoice $hasDelay = $this->date_lim_reglement < ($now - $conf->facture->client->warning_delay); if ($hasDelay && !empty($this->retained_warranty) && !empty($this->retained_warranty_date_limit)) { - $totalpaye = $this->getSommePaiement(); - $totalpaye = floatval($totalpaye); - $RetainedWarrantyAmount = $this->getRetainedWarrantyAmount(); - if ($totalpaye >= 0 && $RetainedWarrantyAmount >= 0) - { - if (($totalpaye < $this->total_ttc - $RetainedWarrantyAmount) && $this->date_lim_reglement < ($now - $conf->facture->client->warning_delay)) - { - $hasDelay = 1; - } - elseif ($totalpaye < $this->total_ttc && $this->retained_warranty_date_limit < ($now - $conf->facture->client->warning_delay)) - { - $hasDelay = 1; - } - else - { - $hasDelay = 0; - } - } + $totalpaye = $this->getSommePaiement(); + $totalpaye = floatval($totalpaye); + $RetainedWarrantyAmount = $this->getRetainedWarrantyAmount(); + if ($totalpaye >= 0 && $RetainedWarrantyAmount >= 0) + { + if (($totalpaye < $this->total_ttc - $RetainedWarrantyAmount) && $this->date_lim_reglement < ($now - $conf->facture->client->warning_delay)) + { + $hasDelay = 1; + } elseif ($totalpaye < $this->total_ttc && $this->retained_warranty_date_limit < ($now - $conf->facture->client->warning_delay)) + { + $hasDelay = 1; + } else { + $hasDelay = 0; + } + } } return $hasDelay; @@ -4815,48 +4592,45 @@ class Facture extends CommonInvoice public function getRetainedWarrantyAmount($rounding = -1) { global $conf; - if (empty($this->retained_warranty)) { - return -1; - } + if (empty($this->retained_warranty)) { + return -1; + } - $retainedWarrantyAmount = 0; + $retainedWarrantyAmount = 0; - // Billed - retained warranty - if ($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION)) - { - $displayWarranty = true; - // Check if this situation invoice is 100% for real - if (!empty($this->lines)) { - foreach ($this->lines as $i => $line) { - if ($line->product_type < 2 && $line->situation_percent < 100) { - $displayWarranty = false; - break; - } - } - } + // Billed - retained warranty + if ($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION)) + { + $displayWarranty = true; + // Check if this situation invoice is 100% for real + if (!empty($this->lines)) { + foreach ($this->lines as $i => $line) { + if ($line->product_type < 2 && $line->situation_percent < 100) { + $displayWarranty = false; + break; + } + } + } - if ($displayWarranty && !empty($this->situation_final)) - { - $this->fetchPreviousNextSituationInvoice(); - $TPreviousIncoice = $this->tab_previous_situation_invoice; + if ($displayWarranty && !empty($this->situation_final)) + { + $this->fetchPreviousNextSituationInvoice(); + $TPreviousIncoice = $this->tab_previous_situation_invoice; - $total2BillWT = 0; - foreach ($TPreviousIncoice as &$fac) { - $total2BillWT += $fac->total_ttc; - } - $total2BillWT += $this->total_ttc; + $total2BillWT = 0; + foreach ($TPreviousIncoice as &$fac) { + $total2BillWT += $fac->total_ttc; + } + $total2BillWT += $this->total_ttc; - $retainedWarrantyAmount = $total2BillWT * $this->retained_warranty / 100; - } - else { - return -1; - } - } - else - { - // Because one day retained warranty could be used on standard invoices - $retainedWarrantyAmount = $this->total_ttc * $this->retained_warranty / 100; - } + $retainedWarrantyAmount = $total2BillWT * $this->retained_warranty / 100; + } else { + return -1; + } + } else { + // Because one day retained warranty could be used on standard invoices + $retainedWarrantyAmount = $this->total_ttc * $this->retained_warranty / 100; + } if ($rounding < 0) { $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT); @@ -4866,7 +4640,7 @@ class Facture extends CommonInvoice return round($retainedWarrantyAmount, $rounding); } - return $retainedWarrantyAmount; + return $retainedWarrantyAmount; } /** @@ -4877,32 +4651,28 @@ class Facture extends CommonInvoice */ public function setRetainedWarranty($value) { - dol_syslog(get_class($this).'::setRetainedWarranty('.$value.')'); - if ($this->statut >= 0) - { - $fieldname = 'retained_warranty'; - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET '.$fieldname.' = '.floatval($value); - $sql .= ' WHERE rowid='.$this->id; + dol_syslog(get_class($this).'::setRetainedWarranty('.$value.')'); + if ($this->statut >= 0) + { + $fieldname = 'retained_warranty'; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET '.$fieldname.' = '.floatval($value); + $sql .= ' WHERE rowid='.$this->id; - if ($this->db->query($sql)) - { - $this->retained_warranty = floatval($value); - return 1; - } - else - { - dol_syslog(get_class($this).'::setRetainedWarranty Erreur '.$sql.' - '.$this->db->error()); - $this->error = $this->db->error(); - return -1; - } - } - else - { - dol_syslog(get_class($this).'::setRetainedWarranty, status of the object is incompatible'); - $this->error = 'Status of the object is incompatible '.$this->statut; - return -2; - } + if ($this->db->query($sql)) + { + $this->retained_warranty = floatval($value); + return 1; + } else { + dol_syslog(get_class($this).'::setRetainedWarranty Erreur '.$sql.' - '.$this->db->error()); + $this->error = $this->db->error(); + return -1; + } + } else { + dol_syslog(get_class($this).'::setRetainedWarranty, status of the object is incompatible'); + $this->error = 'Status of the object is incompatible '.$this->statut; + return -2; + } } @@ -4915,37 +4685,33 @@ class Facture extends CommonInvoice */ public function setRetainedWarrantyDateLimit($timestamp, $dateYmd = false) { - if (!$timestamp && $dateYmd) { - $timestamp = $this->db->jdate($dateYmd); - } + if (!$timestamp && $dateYmd) { + $timestamp = $this->db->jdate($dateYmd); + } - dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit('.$timestamp.')'); - if ($this->statut >= 0) - { - $fieldname = 'retained_warranty_date_limit'; - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET '.$fieldname.' = '.(strval($timestamp) != '' ? '\''.$this->db->idate($timestamp).'\'' : 'null'); - $sql .= ' WHERE rowid='.$this->id; + dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit('.$timestamp.')'); + if ($this->statut >= 0) + { + $fieldname = 'retained_warranty_date_limit'; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET '.$fieldname.' = '.(strval($timestamp) != '' ? '\''.$this->db->idate($timestamp).'\'' : 'null'); + $sql .= ' WHERE rowid='.$this->id; - if ($this->db->query($sql)) - { - $this->retained_warranty_date_limit = $timestamp; - return 1; - } - else - { - dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit Erreur '.$sql.' - '.$this->db->error()); - $this->error = $this->db->error(); - return -1; - } - } - else - { - dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit, status of the object is incompatible'); - $this->error = 'Status of the object is incompatible '.$this->statut; - return -2; - } + if ($this->db->query($sql)) + { + $this->retained_warranty_date_limit = $timestamp; + return 1; + } else { + dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit Erreur '.$sql.' - '.$this->db->error()); + $this->error = $this->db->error(); + return -1; + } + } else { + dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit, status of the object is incompatible'); + $this->error = 'Status of the object is incompatible '.$this->statut; + return -2; + } } } @@ -4955,12 +4721,12 @@ class Facture extends CommonInvoice */ class FactureLigne extends CommonInvoiceLine { - /** + /** * @var string ID to identify managed object */ public $element = 'facturedet'; - /** + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'facturedet'; @@ -4978,6 +4744,7 @@ class FactureLigne extends CommonInvoiceLine public $label; //! Description ligne public $desc; + public $ref_ext; // External reference of the line public $localtax1_type; // Local tax 1 type public $localtax2_type; // Local tax 2 type @@ -5045,10 +4812,10 @@ class FactureLigne extends CommonInvoiceLine * @param int $rowid id of invoice line to get * @return int <0 if KO, >0 if OK */ - public function fetch($rowid) + public function fetch($rowid) { $sql = 'SELECT fd.rowid, fd.fk_facture, fd.fk_parent_line, fd.fk_product, fd.product_type, fd.label as custom_label, fd.description, fd.price, fd.qty, fd.vat_src_code, fd.tva_tx,'; - $sql .= ' fd.localtax1_tx, fd. localtax2_tx, fd.remise, fd.remise_percent, fd.fk_remise_except, fd.subprice,'; + $sql .= ' fd.localtax1_tx, fd. localtax2_tx, fd.remise, fd.remise_percent, fd.fk_remise_except, fd.subprice, fd.ref_ext,'; $sql .= ' fd.date_start as date_start, fd.date_end as date_end, fd.fk_product_fournisseur_price as fk_fournprice, fd.buy_price_ht as pa_ht,'; $sql .= ' fd.info_bits, fd.special_code, fd.total_ht, fd.total_tva, fd.total_ttc, fd.total_localtax1, fd.total_localtax2, fd.rang,'; $sql .= ' fd.fk_code_ventilation,'; @@ -5076,6 +4843,7 @@ class FactureLigne extends CommonInvoiceLine $this->desc = $objp->description; $this->qty = $objp->qty; $this->subprice = $objp->subprice; + $this->ref_ext = $objp->ref_ext; $this->vat_src_code = $objp->vat_src_code; $this->tva_tx = $objp->tva_tx; $this->localtax1_tx = $objp->localtax1_tx; @@ -5122,10 +4890,8 @@ class FactureLigne extends CommonInvoiceLine $this->db->free($result); return 1; - } - else - { - $this->error = $this->db->lasterror(); + } else { + $this->error = $this->db->lasterror(); return -1; } } @@ -5137,15 +4903,15 @@ class FactureLigne extends CommonInvoiceLine * @param int $noerrorifdiscountalreadylinked 1=Do not make error if lines is linked to a discount and discount already linked to another * @return int <0 if KO, >0 if OK */ - public function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0) + public function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0) { global $langs, $user, $conf; $error = 0; - $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. + $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. - dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG); + dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG); // Clean parameters $this->desc = trim($this->desc); @@ -5160,6 +4926,7 @@ class FactureLigne extends CommonInvoiceLine if (empty($this->remise_percent)) $this->remise_percent = 0; if (empty($this->info_bits)) $this->info_bits = 0; if (empty($this->subprice)) $this->subprice = 0; + if (empty($this->ref_ext)) $this->ref_ext = ''; if (empty($this->special_code)) $this->special_code = 0; if (empty($this->fk_parent_line)) $this->fk_parent_line = 0; if (empty($this->fk_prev_id)) $this->fk_prev_id = 0; @@ -5177,9 +4944,7 @@ class FactureLigne extends CommonInvoiceLine if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; - } - else - { + } else { $this->pa_ht = $result; } } @@ -5208,7 +4973,7 @@ class FactureLigne extends CommonInvoiceLine $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facturedet'; $sql .= ' (fk_facture, fk_parent_line, label, description, qty,'; $sql .= ' vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,'; - $sql .= ' fk_product, product_type, remise_percent, subprice, fk_remise_except,'; + $sql .= ' fk_product, product_type, remise_percent, subprice, ref_ext, fk_remise_except,'; $sql .= ' date_start, date_end, fk_code_ventilation, '; $sql .= ' rang, special_code, fk_product_fournisseur_price, buy_price_ht,'; $sql .= ' info_bits, total_ht, total_tva, total_ttc, total_localtax1, total_localtax2,'; @@ -5221,7 +4986,7 @@ class FactureLigne extends CommonInvoiceLine $sql .= " ".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; $sql .= " '".$this->db->escape($this->desc)."',"; $sql .= " ".price2num($this->qty).","; - $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; + $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; $sql .= " ".price2num($this->tva_tx).","; $sql .= " ".price2num($this->localtax1_tx).","; $sql .= " ".price2num($this->localtax2_tx).","; @@ -5231,6 +4996,7 @@ class FactureLigne extends CommonInvoiceLine $sql .= " ".((int) $this->product_type).","; $sql .= " ".price2num($this->remise_percent).","; $sql .= " ".price2num($this->subprice).","; + $sql .= " '".$this->db->escape($this->ref_ext)."',"; $sql .= ' '.(!empty($this->fk_remise_except) ? $this->fk_remise_except : "null").','; $sql .= " ".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null").","; $sql .= " ".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null").","; @@ -5265,14 +5031,14 @@ class FactureLigne extends CommonInvoiceLine $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'facturedet'); $this->rowid = $this->id; // For backward compatibility - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } + if (!$error) + { + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } // Si fk_remise_except defini, on lie la remise a la facture // ce qui la flague comme "consommee". @@ -5285,19 +5051,17 @@ class FactureLigne extends CommonInvoiceLine // Check if discount was found if ($result > 0) { - // Check if discount not already affected to another invoice + // Check if discount not already affected to another invoice if ($discount->fk_facture_line > 0) { - if (empty($noerrorifdiscountalreadylinked)) - { - $this->error = $langs->trans("ErrorDiscountAlreadyUsed", $discount->id); - dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); - $this->db->rollback(); - return -3; - } - } - else - { + if (empty($noerrorifdiscountalreadylinked)) + { + $this->error = $langs->trans("ErrorDiscountAlreadyUsed", $discount->id); + dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); + $this->db->rollback(); + return -3; + } + } else { $result = $discount->link_to_invoice($this->rowid, 0); if ($result < 0) { @@ -5307,17 +5071,13 @@ class FactureLigne extends CommonInvoiceLine return -3; } } - } - else - { + } else { $this->error = $langs->trans("ErrorADiscountThatHasBeenRemovedIsIncluded"); dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); $this->db->rollback(); return -3; } - } - else - { + } else { $this->error = $discount->error; dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); $this->db->rollback(); @@ -5327,21 +5087,19 @@ class FactureLigne extends CommonInvoiceLine if (!$notrigger) { - // Call trigger - $result = $this->call_trigger('LINEBILL_INSERT', $user); - if ($result < 0) - { + // Call trigger + $result = $this->call_trigger('LINEBILL_INSERT', $user); + if ($result < 0) + { $this->db->rollback(); return -2; } - // End call triggers + // End call triggers } $this->db->commit(); return $this->id; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; @@ -5355,7 +5113,7 @@ class FactureLigne extends CommonInvoiceLine * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - public function update($user = '', $notrigger = 0) + public function update($user = '', $notrigger = 0) { global $user, $conf; @@ -5365,6 +5123,7 @@ class FactureLigne extends CommonInvoiceLine // Clean parameters $this->desc = trim($this->desc); + if (empty($this->ref_ext)) $this->ref_ext = ''; if (empty($this->tva_tx)) $this->tva_tx = 0; if (empty($this->localtax1_tx)) $this->localtax1_tx = 0; if (empty($this->localtax2_tx)) $this->localtax2_tx = 0; @@ -5394,43 +5153,42 @@ class FactureLigne extends CommonInvoiceLine if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; - } - else - { + } else { $this->pa_ht = $result; } } $this->db->begin(); - // Mise a jour ligne en base - $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET"; - $sql .= " description='".$this->db->escape($this->desc)."'"; - $sql .= ", label=".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null"); - $sql .= ", subprice=".price2num($this->subprice).""; - $sql .= ", remise_percent=".price2num($this->remise_percent).""; - if ($this->fk_remise_except) $sql .= ", fk_remise_except=".$this->fk_remise_except; - else $sql .= ", fk_remise_except=null"; + // Update line in database + $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET"; + $sql .= " description='".$this->db->escape($this->desc)."'"; + $sql .= ", ref_ext='".$this->db->escape($this->ref_ext)."'"; + $sql .= ", label=".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null"); + $sql .= ", subprice=".price2num($this->subprice).""; + $sql .= ", remise_percent=".price2num($this->remise_percent).""; + if ($this->fk_remise_except) $sql .= ", fk_remise_except=".$this->fk_remise_except; + else $sql .= ", fk_remise_except=null"; $sql .= ", vat_src_code = '".(empty($this->vat_src_code) ? '' : $this->db->escape($this->vat_src_code))."'"; - $sql .= ", tva_tx=".price2num($this->tva_tx).""; - $sql .= ", localtax1_tx=".price2num($this->localtax1_tx).""; - $sql .= ", localtax2_tx=".price2num($this->localtax2_tx).""; + $sql .= ", tva_tx=".price2num($this->tva_tx).""; + $sql .= ", localtax1_tx=".price2num($this->localtax1_tx).""; + $sql .= ", localtax2_tx=".price2num($this->localtax2_tx).""; $sql .= ", localtax1_type='".$this->db->escape($this->localtax1_type)."'"; $sql .= ", localtax2_type='".$this->db->escape($this->localtax2_type)."'"; - $sql .= ", qty=".price2num($this->qty); - $sql .= ", date_start=".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null"); - $sql .= ", date_end=".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null"); - $sql .= ", product_type=".$this->product_type; - $sql .= ", info_bits='".$this->db->escape($this->info_bits)."'"; - $sql .= ", special_code='".$this->db->escape($this->special_code)."'"; - if (empty($this->skip_update_total)) - { - $sql .= ", total_ht=".price2num($this->total_ht); - $sql .= ", total_tva=".price2num($this->total_tva); - $sql .= ", total_ttc=".price2num($this->total_ttc); - $sql .= ", total_localtax1=".price2num($this->total_localtax1); - $sql .= ", total_localtax2=".price2num($this->total_localtax2); - } + $sql .= ", qty=".price2num($this->qty); + $sql .= ", date_start=".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null"); + $sql .= ", date_end=".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null"); + $sql .= ", product_type=".$this->product_type; + $sql .= ", info_bits='".$this->db->escape($this->info_bits)."'"; + $sql .= ", special_code='".$this->db->escape($this->special_code)."'"; + if (empty($this->skip_update_total)) + { + $sql .= ", total_ht=".price2num($this->total_ht); + $sql .= ", total_tva=".price2num($this->total_tva); + $sql .= ", total_ttc=".price2num($this->total_ttc); + $sql .= ", total_localtax1=".price2num($this->total_localtax1); + $sql .= ", total_localtax2=".price2num($this->total_localtax2); + } $sql .= ", fk_product_fournisseur_price=".(!empty($this->fk_fournprice) ? "'".$this->db->escape($this->fk_fournprice)."'" : "null"); $sql .= ", buy_price_ht='".price2num($this->pa_ht)."'"; $sql .= ", fk_parent_line=".($this->fk_parent_line > 0 ? $this->fk_parent_line : "null"); @@ -5441,9 +5199,9 @@ class FactureLigne extends CommonInvoiceLine // Multicurrency $sql .= ", multicurrency_subprice=".price2num($this->multicurrency_subprice).""; - $sql .= ", multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; - $sql .= ", multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; - $sql .= ", multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; + $sql .= ", multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; + $sql .= ", multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; + $sql .= ", multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; $sql .= " WHERE rowid = ".$this->rowid; @@ -5451,32 +5209,30 @@ class FactureLigne extends CommonInvoiceLine $resql = $this->db->query($sql); if ($resql) { - if (!$error) - { - $this->id = $this->rowid; - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } + if (!$error) + { + $this->id = $this->rowid; + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } if (!$error && !$notrigger) { - // Call trigger - $result = $this->call_trigger('LINEBILL_UPDATE', $user); - if ($result < 0) + // Call trigger + $result = $this->call_trigger('LINEBILL_UPDATE', $user); + if ($result < 0) { $this->db->rollback(); return -2; } - // End call triggers + // End call triggers } $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; @@ -5486,10 +5242,10 @@ class FactureLigne extends CommonInvoiceLine /** * Delete line in database * TODO Add param User $user and notrigger (see skeleton) - * + * * @return int <0 if KO, >0 if OK */ - public function delete() + public function delete() { global $user; @@ -5504,13 +5260,13 @@ class FactureLigne extends CommonInvoiceLine } // End call triggers - // extrafields - $result = $this->deleteExtraFields(); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } + // extrafields + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".$this->rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); @@ -5518,25 +5274,23 @@ class FactureLigne extends CommonInvoiceLine { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Update DB line fields total_xxx + * Update DB line fields total_xxx * Used by migration * * @return int <0 if KO, >0 if OK */ - public function update_total() + public function update_total() { - // phpcs:enable + // phpcs:enable $this->db->begin(); dol_syslog(get_class($this)."::update_total", LOG_DEBUG); @@ -5560,16 +5314,14 @@ class FactureLigne extends CommonInvoiceLine { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns situation_percent of the previous line. * Warning: If invoice is a replacement invoice, this->fk_prev_id is id of the replaced line. @@ -5578,14 +5330,14 @@ class FactureLigne extends CommonInvoiceLine * @param bool $include_credit_note Include credit note or not * @return int >= 0 */ - public function get_prev_progress($invoiceid, $include_credit_note = true) + public function get_prev_progress($invoiceid, $include_credit_note = true) { - // phpcs:enable + // phpcs:enable global $invoicecache; if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") { return 0; } else { - // If invoice is not a situation invoice, this->fk_prev_id is used for something else + // If invoice is not a situation invoice, this->fk_prev_id is used for something else if (!isset($invoicecache[$invoiceid])) { $invoicecache[$invoiceid] = new Facture($this->db); $invoicecache[$invoiceid]->fetch($invoiceid); @@ -5600,20 +5352,20 @@ class FactureLigne extends CommonInvoiceLine $returnPercent = floatval($res['situation_percent']); if ($include_credit_note) { - $sql = 'SELECT fd.situation_percent FROM '.MAIN_DB_PREFIX.'facturedet fd'; - $sql .= ' JOIN '.MAIN_DB_PREFIX.'facture f ON (f.rowid = fd.fk_facture) '; - $sql .= ' WHERE fd.fk_prev_id ='.$this->fk_prev_id; - $sql .= ' AND f.situation_cycle_ref = '.$invoicecache[$invoiceid]->situation_cycle_ref; // Prevent cycle outed - $sql .= ' AND f.type = '.Facture::TYPE_CREDIT_NOTE; + $sql = 'SELECT fd.situation_percent FROM '.MAIN_DB_PREFIX.'facturedet fd'; + $sql .= ' JOIN '.MAIN_DB_PREFIX.'facture f ON (f.rowid = fd.fk_facture) '; + $sql .= ' WHERE fd.fk_prev_id ='.$this->fk_prev_id; + $sql .= ' AND f.situation_cycle_ref = '.$invoicecache[$invoiceid]->situation_cycle_ref; // Prevent cycle outed + $sql .= ' AND f.type = '.Facture::TYPE_CREDIT_NOTE; - $res = $this->db->query($sql); - if ($res) { - while ($obj = $this->db->fetch_object($res)) { - $returnPercent = $returnPercent + floatval($obj->situation_percent); - } - } else { - dol_print_error($this->db); - } + $res = $this->db->query($sql); + if ($res) { + while ($obj = $this->db->fetch_object($res)) { + $returnPercent = $returnPercent + floatval($obj->situation_percent); + } + } else { + dol_print_error($this->db); + } } return $returnPercent; diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index 427daf445c5..9888bd23d13 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -145,9 +145,7 @@ class PaymentTerm // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -202,9 +200,7 @@ class PaymentTerm // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -239,9 +235,7 @@ class PaymentTerm // extends CommonObject } $this->db->free($resql); return $ret; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -305,9 +299,7 @@ class PaymentTerm // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -345,9 +337,7 @@ class PaymentTerm // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -396,9 +386,7 @@ class PaymentTerm // extends CommonObject { $this->db->commit(); return $object->id; - } - else - { + } else { $this->db->rollback(); return -1; } diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 8eb47268186..c88fef5015c 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -69,35 +69,25 @@ if ($action == 'addcontact' && $user->rights->facture->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} - -// Toggle the status of a contact +} // Toggle the status of a contact elseif ($action == 'swapstatut' && $user->rights->facture->creer) { if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne')); - } - else - { + } else { dol_print_error($db); } -} - -// Deletes a contact +} // Deletes a contact elseif ($action == 'deletecontact' && $user->rights->facture->creer) { $object->fetch($id); @@ -107,8 +97,7 @@ elseif ($action == 'deletecontact' && $user->rights->facture->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { dol_print_error($db); } } @@ -207,9 +196,7 @@ if ($id > 0 || !empty($ref)) $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); if ($res) break; } - } - else - { + } else { // Record not found print "ErrorRecordNotFound"; } diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index a901b985342..ed9b032ae90 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -181,14 +181,10 @@ if ($id > 0 || !empty($ref)) $permtoedit = $user->rights->facture->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; - } - else - { + } else { dol_print_error($db); } -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/facture/index.php b/htdocs/compta/facture/index.php new file mode 100644 index 00000000000..5c0aacfdb35 --- /dev/null +++ b/htdocs/compta/facture/index.php @@ -0,0 +1,534 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/compat/facture/index.php +* \ingroup facture + * \brief Home page of customer invoices area + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; + +// Security check +restrictedArea($user, 'facture'); + +// Load translation files required by the page +$langs->load('bills'); + +// Filter to show only result of one customer +$socid = GETPOST('socid', 'int'); +if (isset($user->socid) && $user->socid > 0) +{ + $action = ''; + $socid = $user->socid; +} + +// Maximum elements of the tables +$maxDraftCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD; +$maxLatestEditCount = 5; +$maxOpenCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD; + +/* +* View +*/ + +llxHeader("", $langs->trans("CustomersInvoicesArea"), "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"); + +print load_fiche_titre($langs->trans("CustomersInvoicesArea"), '', 'invoicing'); + +print '
'; + +print '
'; + +// This is useless due to the global search combo +if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) +{ + print getAreaSearchFrom(); + print '
'; +} + +print getPieChart($socid); +print '
'; +print getDraftTable($maxDraftCount, $socid); + +print '
'; + +print '
'; +print '
'; + +print getLatestEditTable($maxLatestEditCount, $socid); +print '
'; +print getOpenTable($maxOpenCount, $socid); + +print '
'; +print '
'; + +print '
'; + +// End of page +llxFooter(); +$db->close(); + +/** + * Return a HTML string that contains a additional search form + * + * @return string A HTML string that contains a additional search form + */ +function getAreaSearchFrom() +{ + global $langs; + + $result = '
'; + $result .= '
'; + $result .= ''; + $result .= '
'; @@ -4397,9 +4336,7 @@ elseif ($id > 0 || !empty($ref)) print ''; print ''; print ''; - } - else - { + } else { print price($object->retained_warranty).'%'; } print '
'; if ($object->type != Facture::TYPE_DEPOSIT) print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); - else - print $langs->trans('AlreadyPaid'); + else print $langs->trans('AlreadyPaid'); print ' :'.price($totalpaye).' 
'.price($retainedWarranty).' 
'; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= "
'.$langs->trans("Search").'
'.$langs->trans("Invoice").':
"; + $result .= "
"; + $result .= ""; + + return $result; +} + +/** + * Return a HTML table that contains a pie chart of customer invoices + * + * @param int $socid (Optional) Show only results from the customer with this id + * @return string A HTML table that contains a pie chart of customer invoices + */ +function getPieChart($socid = 0) +{ + global $conf, $db, $langs, $user; + + $sql = "SELECT count(f.rowid), f.fk_statut"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; + $sql .= ", ".MAIN_DB_PREFIX."facture as f"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture').")"; + if ($user->socid) $sql .= ' AND f.fk_soc = '.$user->socid; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql .= " GROUP BY f.fk_statut"; + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + return ''; + } + + $num = $db->num_rows($resql); + $i = 0; + + $total = 0; + $vals = []; + + while ($i < $num) + { + $row = $db->fetch_row($resql); + if ($row) + { + $vals[$row[1]] = $row[0]; + $total += $row[0]; + } + + $i++; + } + + $db->free($resql); + + $result = '
'; + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + + $objectstatic = new Facture($db); + $array = [Facture::STATUS_DRAFT, Facture::STATUS_VALIDATED, Facture::STATUS_CLOSED, Facture::STATUS_ABANDONED]; + $dataseries = []; + + foreach ($array as $status) + { + $objectstatic->statut = $status; + $objectstatic->paye = $status == Facture::STATUS_CLOSED ? -1 : 0; + + $dataseries[] = [$objectstatic->getLibStatut(1), (isset($vals[$status]) ? (int) $vals[$status] : 0)]; + if (!$conf->use_javascript_ajax) + { + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + } + } + + if ($conf->use_javascript_ajax) + { + $dolgraph = new DolGraph(); + $dolgraph->SetData($dataseries); + $dolgraph->setShowLegend(1); + $dolgraph->setShowPercent(1); + $dolgraph->SetType(['pie']); + $dolgraph->setWidth('100%'); + $dolgraph->draw('idgraphthirdparties'); + + $result .= ''; + $result .= ''; + $result .= ''; + } + + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= '
'.$langs->trans("Statistics").' - '.$langs->trans("CustomerInvoice").'
'.$objectstatic->getLibStatut(0).''.(isset($vals[$status]) ? $vals[$status] : 0).'
'.$dolgraph->show($total ? 0 : 1).'
'.$langs->trans("Total").''.$total.'
'; + $result .= '
'; + return $result; +} + +/** + * Return a HTML table that contains a list with customer invoice drafts + * + * @param int $maxCount (Optional) The maximum count of elements inside the table + * @param int $socid (Optional) Show only results from the customer with this id + * @return string A HTML table that contains a list with customer invoice drafts + */ +function getDraftTable($maxCount = 500, $socid = 0) +{ + global $db, $langs, $user; + + $sql = "SELECT f.rowid, f.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client, f.total as total_ttc"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; + $sql .= ", ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture').")"; + $sql .= " AND f.fk_statut = ".Facture::STATUS_DRAFT; + if ($socid) $sql .= " AND f.fk_soc = ".$socid; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql .= $db->plimit($maxCount, 0); + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + return ''; + } + + $num = $db->num_rows($resql); + + $result = '
'; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num < 1) + { + $result .= '
'; + $result .= $langs->trans("CustomersDraftInvoices"); + $result .= ' '; + $result .= ''.$num.''; + $result .= ''; + $result .= '
'; + $result .= '
'; + return $result; + } + + $objectstatic = new Facture($db); + $companystatic = new Societe($db); + $nbofloop = min($num, $maxCount); + $total = 0; + $i = 0; + + while ($i < $nbofloop) + { + $obj = $db->fetch_object($resql); + + $objectstatic->id = $obj->rowid; + $objectstatic->ref = $obj->ref; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->socname; + $companystatic->client = $obj->client; + $companystatic->canvas = $obj->canvas; + + $result .= ''; + $result .= ''.$objectstatic->getNomUrl(1).''; + $result .= ''.$companystatic->getNomUrl(1, 'customer', 24).''; + $result .= ''.price($obj->total_ttc).''; + $result .= ''; + + $i++; + $total += $obj->total_ttc; + } + + if ($num > $nbofloop) + { + $result .= ''; + $result .= ''.$langs->trans("XMoreLines", ($num - $nbofloop)).''; + $result .= ''; + } + elseif ($total > 0) + { + $result .= ''; + $result .= ''.$langs->trans("Total").''; + $result .= ''.price($total).''; + $result .= ''; + } + + $result .= ''; + $result .= '
'; + return $result; +} + +/** + * Return a HTML table that contains a list with latest edited customer invoices + * + * @param int $maxCount (Optional) The maximum count of elements inside the table + * @param int $socid (Optional) Show only results from the customer with this id + * @return string A HTML table that contains a list with latest edited customer invoices + */ +function getLatestEditTable($maxCount = 5, $socid = 0) +{ + global $conf, $db, $langs, $user; + + $sql = "SELECT f.rowid, f.entity, f.ref, f.fk_statut as status, f.paye, s.nom as socname, s.rowid as socid, s.canvas, s.client,"; + $sql .= " f.datec"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; + $sql .= ", ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture').")"; + if ($socid) $sql .= " AND f.fk_soc = ".$socid; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql .= " ORDER BY f.tms DESC"; + $sql .= $db->plimit($maxCount, 0); + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + } + + $num = $db->num_rows($resql); + + $result = '
'; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num < 1) + { + $result .= '
'.$langs->trans("LastCustomersBills", $maxCount).'
'; + $result .= '
'; + return $result; + } + + $formfile = new FormFile($db); + $objectstatic = new Facture($db); + $companystatic = new Societe($db); + $i = 0; + + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + $objectstatic->id = $obj->rowid; + $objectstatic->ref = $obj->ref; + $objectstatic->paye = $obj->paye; + $objectstatic->statut = $obj->status; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->socname; + $companystatic->client = $obj->client; + $companystatic->canvas = $obj->canvas; + + $filename = dol_sanitizeFileName($obj->ref); + $filedir = $conf->propal->multidir_output[$obj->entity].'/'.$filename; + + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= '
'.$objectstatic->getNomUrl(1).' '.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).'
'; + $result .= ''; + + $result .= ''.$companystatic->getNomUrl(1, 'customer').''; + $result .= ''.dol_print_date($db->jdate($obj->datec), 'day').''; + $result .= ''.$objectstatic->getLibStatut(5).''; + + $result .= ''; + + $i++; + } + + $result .= ''; + $result .= ''; + return $result; +} + +/** + * Return a HTML table that contains a list with open (unpaid) customer invoices + * + * @param int $maxCount (Optional) The maximum count of elements inside the table + * @param int $socid (Optional) Show only results from the customer with this id + * @return string A HTML table that conatins a list with open (unpaid) customer invoices + */ +function getOpenTable($maxCount = 500, $socid = 0) +{ + global $conf, $db, $langs, $user; + + $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client"; + $sql .= ", f.rowid as id, f.entity, f.total as total_ttc, f.total as total_ht, f.ref, f.fk_statut"; + $sql .= ", f.datef as df, f.date_lim_reglement as datelimite"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; + $sql .= ", ".MAIN_DB_PREFIX."facture as f"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture').")"; + $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + if ($socid) $sql .= " AND s.rowid = ".$socid; + $sql .= " ORDER BY f.rowid DESC"; + $sql .= $db->plimit($maxCount, 0); + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + } + + $num = $db->num_rows($resql); + + $result = '
'; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num < 1) + { + $result .= '
'; + $result .= $langs->trans("BillsCustomersUnpaid"); + $result .= ' '; + $result .= ''.$num.''; + $result .= ''; + $result .= '
'; + $result .= '
'; + return $result; + } + + $objectstatic = new Facture($db); + $companystatic = new Societe($db); + $formfile = new FormFile($db); + $nbofloop = min($num, $maxCount); + $now = dol_now(); + $total = 0; + $i = 0; + + while ($i < $nbofloop) + { + $obj = $db->fetch_object($resql); + + $objectstatic->id= $obj->id; + $objectstatic->ref = $obj->ref; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->socname; + $companystatic->client = $obj->client; + $companystatic->canvas = $obj->canvas; + + $filename = dol_sanitizeFileName($obj->ref); + $filedir = $conf->propal->multidir_output[$obj->entity].'/'.dol_sanitizeFileName($obj->ref); + + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + + $result .= ''; + + $result .= ''; + + $result .= ''; + $result .= '
'.$objectstatic->getNomUrl(1).''; + + if ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) + { + $result .= img_warning($langs->trans("Late")); + } + + $result .= ''.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).'
'; + $result .= ''; + + $result .= ''.$companystatic->getNomUrl(1, 'customer', 44).''; + $result .= ''.dol_print_date($db->jdate($obj->df), 'day').''; + $result .= ''.price($obj->total_ttc).''; + + $result .= ''; + + $i++; + $total += $obj->total_ttc; + } + + if ($num > $nbofloop) + { + $result .= ''; + $result .= ''.$langs->trans("XMoreLines", ($num - $nbofloop)).''; + $result .= ''; + } + elseif ($total > 0) + { + $result .= ''; + $result .= ''.$langs->trans("Total").''; + $result .= ''.price($total).''; + $result .= ' '; + $result .= ''; + } + + $result .= ''; + $result .= ''; + return $result; +} diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 65e9044f4f7..400fb3be7ed 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -53,6 +53,8 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'inv $socid = GETPOST('socid', 'int'); +$socid = GETPOST('socid', 'int'); + // Security check $id = (GETPOST('facid', 'int') ?GETPOST('facid', 'int') : GETPOST('id', 'int')); $lineid = GETPOST('lineid', 'int'); @@ -106,7 +108,7 @@ $hookmanager->initHooks(array('invoicereclist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label('facture_rec'); +$extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); @@ -151,6 +153,11 @@ if ($socid > 0) { } +if ($socid > 0) { + $tmpthirdparty = new Societe($db); + $res = $tmpthirdparty->fetch($socid); + if ($res > 0) $search_societe = $tmpthirdparty->name; +} /* * Actions @@ -609,9 +616,7 @@ if ($resql) if (!$invoicerectmp->isMaxNbGenReached()) { if (!$objp->suspended && $objp->frequency > 0 && $db->jdate($objp->date_when) && $db->jdate($objp->date_when) < $now) print img_warning($langs->trans("Late")); - } - else - { + } else { print img_info($langs->trans("MaxNumberOfGenerationReached")); } print ''; @@ -654,19 +659,14 @@ if ($resql) if ($invoicerectmp->isMaxNbGenReached()) { print $langs->trans("MaxNumberOfGenerationReached"); - } - elseif (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today) + } elseif (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today) { print ''; print $langs->trans("CreateBill").''; - } - else - { + } else { print $form->textwithpicto('', $langs->trans("DateIsNotEnough")); } - } - else - { + } else { print " "; } if (!$i) $totalarray['nbfield']++; @@ -676,9 +676,7 @@ if ($resql) $i++; } - } - else - { + } else { $colspan = 1; foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } print ''.$langs->trans("NoRecordFound").''; @@ -693,9 +691,7 @@ if ($resql) print ""; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 8b9e204f17e..41e0817310e 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -5,7 +5,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2012 Juanjo Menent + * Copyright (C) 2010-2020 Juanjo Menent * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Cédric Salvador @@ -100,7 +100,7 @@ $search_module_source = GETPOST('search_module_source', 'alpha'); $search_pos_source = GETPOST('search_pos_source', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); -$search_state = trim(GETPOST("search_state")); +$search_state = GETPOST("search_state"); $search_country = GETPOST("search_country", 'int'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); $search_user = GETPOST('search_user', 'int'); @@ -111,7 +111,7 @@ $search_date_valid_start = dol_mktime(0, 0, 0, GETPOST('search_date_valid_startm $search_date_valid_end = dol_mktime(23, 59, 59, GETPOST('search_date_valid_endmonth', 'int'), GETPOST('search_date_valid_endday', 'int'), GETPOST('search_date_valid_endyear', 'int')); $search_datelimit_start = dol_mktime(0, 0, 0, GETPOST('search_datelimit_startmonth', 'int'), GETPOST('search_datelimit_startday', 'int'), GETPOST('search_datelimit_startyear', 'int')); $search_datelimit_end = dol_mktime(23, 59, 59, GETPOST('search_datelimit_endmonth', 'int'), GETPOST('search_datelimit_endday', 'int'), GETPOST('search_datelimit_endyear', 'int')); -$search_categ_cus = trim(GETPOST("search_categ_cus", 'int')); +$search_categ_cus = GETPOST("search_categ_cus", 'int'); $search_btn = GETPOST('button_search', 'alpha'); $search_remove_btn = GETPOST('button_removefilter', 'alpha'); @@ -150,7 +150,7 @@ $hookmanager->initHooks(array('invoicelist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label('facture'); +$extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); @@ -304,8 +304,7 @@ if ($massaction == 'makepayment'){ header('Location: '.$loc); exit; -} -elseif ($massaction == 'withdrawrequest') +} elseif ($massaction == 'withdrawrequest') { $langs->load("withdrawals"); @@ -313,9 +312,7 @@ elseif ($massaction == 'withdrawrequest') { $error++; setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); - } - else - { + } else { //Checking error $error = 0; @@ -363,12 +360,10 @@ elseif ($massaction == 'withdrawrequest') if ($numprlv > 0) { $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); - } - elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'PRE') { + } elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'PRE') { $error++; setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); - } - else { + } else { $listofbills[] = $objecttmp; // $listofbills will only contains invoices with good payment method and no request already done } } @@ -381,14 +376,12 @@ elseif ($massaction == 'withdrawrequest') foreach ($listofbills as $aBill) { $db->begin(); - $result = $aBill->demande_prelevement($user, $aBill->resteapayer); + $result = $aBill->demande_prelevement($user, $aBill->resteapayer, 'direct-debit', 'facture'); if ($result > 0) { $db->commit(); $nbwithdrawrequestok++; - } - else - { + } else { $db->rollback(); setEventMessages($aBill->error, $aBill->errors, 'errors'); } @@ -455,6 +448,7 @@ if (!$sall) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.f if ($sall || $search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facturedet as pd ON f.rowid=pd.fk_facture'; if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = f.fk_projet"; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid'; // We'll need this table joined to the select in order to filter by sale if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if ($search_user > 0) @@ -462,7 +456,7 @@ if ($search_user > 0) $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } -$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid'; + $sql .= ' WHERE f.fk_soc = s.rowid'; $sql .= ' AND f.entity IN ('.getEntity('invoice').')'; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; @@ -515,9 +509,7 @@ if ($search_status != '-1' && $search_status != '') if ($search_status == '1') $sql .= " AND f.fk_statut = 1"; // unpayed if ($search_status == '2') $sql .= " AND f.fk_statut = 2"; // payed Not that some corrupted data may contains f.fk_statut = 1 AND f.paye = 1 (it means payed too but should not happend. If yes, reopen and reclassify billed) if ($search_status == '3') $sql .= " AND f.fk_statut = 3"; // abandonned - } - else - { + } else { $sql .= " AND f.fk_statut IN (".$db->escape($search_status).")"; // When search_status is '1,2' for example } } @@ -553,19 +545,20 @@ if (!$sall) $sql .= ' f.paye, f.fk_statut, f.close_code,'; $sql .= ' f.datec, f.tms, f.date_closing,'; $sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; + $sql .= ' f.fk_user_author, f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva,'; + $sql .= ' f.multicurrency_total_tva, f.multicurrency_total_ttc,'; $sql .= ' s.rowid, s.nom, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,'; $sql .= ' typent.code,'; $sql .= ' state.code_departement, state.nom,'; $sql .= ' country.code,'; - $sql .= " p.rowid, p.ref, p.title"; + $sql .= " p.rowid, p.ref, p.title,"; + $sql .= " u.login"; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); } -} -else -{ +} else { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } @@ -674,8 +667,7 @@ if ($resql) if ($user->rights->facture->supprimer) { if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) { $arrayofmassactions['predeletedraft'] = $langs->trans("Deletedraft"); - } - elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) { // mass deletion never possible on invoices on such situation + } elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) { // mass deletion never possible on invoices on such situation $arrayofmassactions['predelete'] = $langs->trans("Delete"); } } @@ -840,12 +832,15 @@ if ($resql) { print ''; print '
'; + /* print $langs->trans('From').' '; print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1); print '
'; print '
'; - print $langs->trans('to').' '; + print $langs->trans('to').' ';*/ + print $langs->trans("Before").' '; print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1); + print '
'.$langs->trans("Alert"); print '
'; print ''; } @@ -1211,7 +1206,7 @@ if ($resql) // Ref if (!empty($arrayfields['f.ref']['checked'])) { - print ''; + print ''; print ''; @@ -1219,9 +1214,7 @@ if ($resql) if ($contextpage == 'poslist') { print $obj->ref; - } - else - { + } else { print $facturestatic->getNomUrl(1, '', 200, 0, '', 0, 1); } @@ -1249,7 +1242,7 @@ if ($resql) // Type if (!empty($arrayfields['f.type']['checked'])) { - print '"; if (!$i) $totalarray['nbfield']++; @@ -1258,7 +1251,7 @@ if ($resql) // Date if (!empty($arrayfields['f.date']['checked'])) { - print ''; if (!$i) $totalarray['nbfield']++; @@ -1267,7 +1260,7 @@ if ($resql) // Date if (!empty($arrayfields['f.date_valid']['checked'])) { - print ''; if (!$i) $totalarray['nbfield']++; @@ -1276,7 +1269,7 @@ if ($resql) // Date limit if (!empty($arrayfields['f.date_lim_reglement']['checked'])) { - print ''; @@ -1335,7 +1326,7 @@ if ($resql) // Zip if (!empty($arrayfields['s.zip']['checked'])) { - print ''; if (!$i) $totalarray['nbfield']++; @@ -1377,7 +1368,7 @@ if ($resql) // Payment mode if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { - print ''; if (!$i) $totalarray['nbfield']++; @@ -1413,7 +1404,7 @@ if ($resql) // Amount HT if (!empty($arrayfields['f.total_ht']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht'; $totalarray['val']['f.total_ht'] += $obj->total_ht; @@ -1421,7 +1412,7 @@ if ($resql) // Amount VAT if (!empty($arrayfields['f.total_vat']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_vat'; $totalarray['val']['f.total_vat'] += $obj->total_vat; @@ -1429,7 +1420,7 @@ if ($resql) // Amount LocalTax1 if (!empty($arrayfields['f.total_localtax1']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax1'; $totalarray['val']['f.total_localtax1'] += $obj->total_localtax1; @@ -1437,7 +1428,7 @@ if ($resql) // Amount LocalTax2 if (!empty($arrayfields['f.total_localtax2']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax2'; $totalarray['val']['f.total_localtax2'] += $obj->total_localtax2; @@ -1445,7 +1436,7 @@ if ($resql) // Amount TTC if (!empty($arrayfields['f.total_ttc']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ttc'; $totalarray['val']['f.total_ttc'] += $obj->total_ttc; @@ -1456,7 +1447,7 @@ if ($resql) { $userstatic->id = $obj->fk_user_author; $userstatic->login = $obj->login; - print '\n"; @@ -1470,7 +1461,7 @@ if ($resql) if (!empty($arrayfields['dynamount_payed']['checked'])) { - print ''; // TODO Use a denormalized field + print ''; // TODO Use a denormalized field if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalam'; $totalarray['val']['totalam'] += $totalpay; @@ -1479,7 +1470,7 @@ if ($resql) // Pending amount if (!empty($arrayfields['rtp']['checked'])) { - print ''; // TODO Use a denormalized field if (!$i) $totalarray['nbfield']++; @@ -1491,14 +1482,14 @@ if ($resql) // Currency if (!empty($arrayfields['f.multicurrency_code']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; } // Currency rate if (!empty($arrayfields['f.multicurrency_tx']['checked'])) { - print '\n"; if (!$i) $totalarray['nbfield']++; @@ -1506,31 +1497,31 @@ if ($resql) // Amount HT if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; } // Amount VAT if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; } // Amount TTC if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; } if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) { - print ''; // TODO Use a denormalized field + print ''; // TODO Use a denormalized field if (!$i) $totalarray['nbfield']++; } // Pending amount if (!empty($arrayfields['multicurrency_rtp']['checked'])) { - print ''; // TODO Use a denormalized field if (!$i) $totalarray['nbfield']++; @@ -1606,22 +1597,22 @@ if ($resql) print "\n"; - $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + if ($contextpage != 'poslist') { + $hidegeneratedfilelistifempty = 1; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; - // Show list of available documents - $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; - $urlsource .= str_replace('&', '&', $param); + // Show list of available documents + $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; + $urlsource .= str_replace('&', '&', $param); - $filedir = $diroutputmassaction; - $genallowed = $user->rights->facture->lire; - $delallowed = $user->rights->facture->creer; - $title = ''; + $filedir = $diroutputmassaction; + $genallowed = $user->rights->facture->lire; + $delallowed = $user->rights->facture->creer; + $title = ''; - print $formfile->showdocuments('massfilesarea_invoices', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); -} -else -{ + print $formfile->showdocuments('massfilesarea_invoices', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); + } +} else { dol_print_error($db); } diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 74de1c640d4..88a0b922e55 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -24,17 +24,19 @@ /** * \file htdocs/compta/facture/prelevement.php * \ingroup facture - * \brief Management of direct debit order of invoices + * \brief Management of direct debit order or credit tranfer of invoices */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - -if (!$user->rights->facture->lire) accessforbidden(); +require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; // Load translation files required by the page $langs->loadLangs(array('bills', 'banks', 'withdrawals', 'companies')); @@ -43,17 +45,22 @@ $id = (GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); $action = GETPOST('action', 'alpha'); +$type = GETPOST('type', 'aZ09'); $fieldid = (!empty($ref) ? 'ref' : 'rowid'); if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid); -$object = new Facture($db); +if ($type == 'bank-transfer') { + $object = new FactureFournisseur($db); +} else { + $object = new Facture($db); +} // Load object if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); + $isdraft = (($object->statut == FactureFournisseur::STATUS_DRAFT) ? 1 : 0); if ($ret > 0) { $object->fetch_thirdparty(); @@ -62,6 +69,13 @@ if ($id > 0 || !empty($ref)) $hookmanager->initHooks(array('directdebitcard', 'globalcard')); +if ($type == 'bank-transfer') { + $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture', 'fk_soc', $fieldid, $isdraft); + if (!$user->rights->fournisseur->facture->lire) accessforbidden(); +} else { + $result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid, $isdraft); + if (!$user->rights->facture->lire) accessforbidden(); +} /* @@ -80,15 +94,20 @@ if (empty($reshook)) { $db->begin(); - $result = $object->demande_prelevement($user, GETPOST('withdraw_request_amount')); + $newtype = $type; + $sourcetype = 'facture'; + if ($type == 'bank-transfer') { + $sourcetype = 'supplier_invoice'; + $newtype = 'bank-transfer'; + } + + $result = $object->demande_prelevement($user, price2num(GETPOST('withdraw_request_amount', 'alpha')), $newtype, $sourcetype); if ($result > 0) { $db->commit(); setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } @@ -98,12 +117,12 @@ if (empty($reshook)) if ($action == "delete") { - if ($object->id > 0) + if ($object->id > 0) { - $result = $object->demande_prelevement_delete($user, GETPOST('did')); + $result = $object->demande_prelevement_delete($user, GETPOST('did', 'int')); if ($result == 0) { - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id.'&type='.$type); exit; } } @@ -115,13 +134,20 @@ if (empty($reshook)) * View */ +$form = new Form($db); + $now = dol_now(); -$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('StandingOrders'); -$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; +if ($type == 'bank-transfer') { + $title = $langs->trans('InvoiceSupplier')." - ".$langs->trans('CreditTransfer'); + $helpurl = ""; +} else { + $title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('StandingOrders'); + $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; +} + llxHeader('', $title, $helpurl); -$form = new Form($db); /* *************************************************************************** */ /* */ @@ -147,18 +173,33 @@ if ($object->id > 0) if ($object->paye) $resteapayer = 0; $resteapayeraffiche = $resteapayer; - if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice - $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice - } else { - $filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')"; - $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; - } + if ($type == 'bank-transfer') { + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { // Never use this + $filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + $filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + } else { + $filterabsolutediscount = "fk_invoice_supplier_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS PAID)%')"; + $filtercreditnote = "fk_invoice_supplier_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS PAID)%')"; + } - $absolute_discount = $object->thirdparty->getAvailableDiscounts('', $filterabsolutediscount); - $absolute_creditnote = $object->thirdparty->getAvailableDiscounts('', $filtercreditnote); - $absolute_discount = price2num($absolute_discount, 'MT'); - $absolute_creditnote = price2num($absolute_creditnote, 'MT'); + $absolute_discount = $object->thirdparty->getAvailableDiscounts('', $filterabsolutediscount, 0, 1); + $absolute_creditnote = $object->thirdparty->getAvailableDiscounts('', $filtercreditnote, 0, 1); + $absolute_discount = price2num($absolute_discount, 'MT'); + $absolute_creditnote = price2num($absolute_creditnote, 'MT'); + } else { + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + } else { + $filterabsolutediscount = "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')"; + $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; + } + + $absolute_discount = $object->thirdparty->getAvailableDiscounts('', $filterabsolutediscount); + $absolute_creditnote = $object->thirdparty->getAvailableDiscounts('', $filtercreditnote); + $absolute_discount = price2num($absolute_discount, 'MT'); + $absolute_creditnote = price2num($absolute_creditnote, 'MT'); + } $author = new User($db); if ($object->user_author) @@ -166,20 +207,37 @@ if ($object->id > 0) $author->fetch($object->user_author); } - $head = facture_prepare_head($object); + if ($type == 'bank-transfer') { + $head = facturefourn_prepare_head($object); + } else { + $head = facture_prepare_head($object); + } - dol_fiche_head($head, 'standingorders', $langs->trans('InvoiceCustomer'), -1, 'bill'); + dol_fiche_head($head, 'standingorders', $title, -1, 'bill'); // Invoice content - - $linkback = ''.$langs->trans("BackToList").''; + if ($type == 'bank-transfer') { + $linkback = ''.$langs->trans("BackToList").''; + } else { + $linkback = ''.$langs->trans("BackToList").''; + } $morehtmlref = '
'; // Ref customer - $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); + if ($type == 'bank-transfer') { + $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1); + } else { + $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); + } // Thirdparty $morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + if ($type == 'bank-transfer') { + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; + } else { + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; + } // Project if (!empty($conf->projet->enabled)) { @@ -196,6 +254,7 @@ if ($object->id > 0) $morehtmlref .= '
'; $morehtmlref .= ''; $morehtmlref .= ''; + $morehtmlref .= ''; $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); $morehtmlref .= ''; $morehtmlref .= ''; @@ -229,15 +288,26 @@ if ($object->id > 0) // Type print '
'; + // Label + if ($type == 'bank-transfer') { + print ''; + print ''; + print ''; + print ''; + } + // Date invoice print ''; print ''; @@ -310,22 +395,18 @@ if ($object->id > 0) print '
'; + print ''; print $facturestatic->getLibType(); print "'; + print ''; print dol_print_date($db->jdate($obj->df), 'day'); print ''; + print ''; print dol_print_date($db->jdate($obj->date_valid), 'day'); print ''.dol_print_date($datelimit, 'day'); + print ''.dol_print_date($datelimit, 'day'); if ($facturestatic->hasDelay()) { print img_warning($langs->trans('Alert').' - '.$langs->trans('Late')); @@ -1288,7 +1281,7 @@ if ($resql) // Project ref if (!empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; if ($obj->project_id > 0) { print $projectstatic->getNomUrl(1); @@ -1300,7 +1293,7 @@ if ($resql) // Project title if (!empty($arrayfields['p.title']['checked'])) { - print ''; + print ''; if ($obj->project_id > 0) { print $projectstatic->title; @@ -1316,9 +1309,7 @@ if ($resql) if ($contextpage == 'poslist') { print $thirdpartystatic->name; - } - else - { + } else { print $thirdpartystatic->getNomUrl(1, 'customer'); } print ''; + print ''; print $obj->zip; print ''; + print ''; $form->form_modes_reglement($_SERVER['PHP_SELF'], $obj->fk_mode_reglement, 'none', '', -1); print ''.price($obj->total_ht)."'.price($obj->total_ht)."'.price($obj->total_vat)."'.price($obj->total_vat)."'.price($obj->total_localtax1)."'.price($obj->total_localtax1)."'.price($obj->total_localtax2)."'.price($obj->total_localtax2)."'.price($obj->total_ttc)."'.price($obj->total_ttc)."'; + print ''; if ($userstatic->id) print $userstatic->getLoginUrl(1); else print ' '; print "'.(!empty($totalpay) ?price($totalpay, 0, $langs) : ' ').''.(!empty($totalpay) ?price($totalpay, 0, $langs) : ' ').''; + print ''; print (!empty($remaintopay) ? price($remaintopay, 0, $langs) : ' '); print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."'; + print ''; $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); print "'.price($obj->multicurrency_total_ht)."'.price($obj->multicurrency_total_ht)."'.price($obj->multicurrency_total_vat)."'.price($obj->multicurrency_total_vat)."'.price($obj->multicurrency_total_ttc)."'.price($obj->multicurrency_total_ttc)."'.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : ' ').''.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : ' ').''; + print ''; print (!empty($multicurrency_remaintopay) ? price($multicurrency_remaintopay, 0, $langs) : ' '); print '
'.$langs->trans('Type').''; print $object->getLibType(); - if ($object->type == Facture::TYPE_REPLACEMENT) + if ($object->module_source) { + print ' ('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')'; + } + if ($object->type == $object::TYPE_REPLACEMENT) { - $facreplaced = new Facture($db); + if ($type == 'bank-transfer') { + $facreplaced = new FactureFournisseur($db); + } else { + $facreplaced = new Facture($db); + } $facreplaced->fetch($object->fk_facture_source); print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')'; } - if ($object->type == Facture::TYPE_CREDIT_NOTE) + if ($object->type == $object::TYPE_CREDIT_NOTE) { - $facusing = new Facture($db); + if ($type == 'bank-transfer') { + $facusing = new FactureFournisseur($db); + } else { + $facusing = new Facture($db); + } $facusing->fetch($object->fk_facture_source); print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; } @@ -251,7 +321,11 @@ if ($object->id > 0) { if ($i == 0) print ' '; else print ','; - $facavoir = new Facture($db); + if ($type == 'bank-transfer') { + $facavoir = new FactureFournisseur($db); + } else { + $facavoir = new Facture($db); + } $facavoir->fetch($id); print $facavoir->getNomUrl(1); } @@ -270,37 +344,48 @@ if ($object->id > 0) // Discounts print '
'.$langs->trans('Discounts').''; - $thirdparty = $object->thirdparty; - $discount_type = 0; + if ($type == 'bank-transfer') { + //$societe = new Fournisseur($db); + //$result = $societe->fetch($object->socid); + $thirdparty = $object->thirdparty; + $discount_type = 1; + } else { + $thirdparty = $object->thirdparty; + $discount_type = 0; + } $backtopage = urlencode($_SERVER["PHP_SELF"].'?facid='.$object->id); $cannotApplyDiscount = 1; include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; print '
'.$form->editfieldkey("Label", 'label', $object->label, $object, 0).''.$form->editfieldval("Label", 'label', $object->label, $object, 0).'
'; print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && !empty($object->brouillon) && $user->rights->facture->creer) print ''; + if ($object->type != $object::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && !empty($object->brouillon) && $user->rights->facture->creer) print ''; print '
'; print $langs->trans('DateInvoice'); print 'id.'">'.img_edit($langs->trans('SetDate'), 1).'id.'">'.img_edit($langs->trans('SetDate'), 1).'
'; print '
'; - if ($object->type != Facture::TYPE_CREDIT_NOTE) + if ($object->type != $object::TYPE_CREDIT_NOTE) { if ($action == 'editinvoicedate') { $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id, $object->date, 'invoicedate'); + } else { + print dol_print_date($object->date, 'day'); } - else - { - print dol_print_date($object->date, 'daytext'); - } - } - else - { - print dol_print_date($object->date, 'daytext'); + } else { + print dol_print_date($object->date, 'day'); } print '
'; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && !empty($object->brouillon) && $user->rights->facture->creer) print ''; + if ($object->type != $object::TYPE_CREDIT_NOTE && $action != 'editconditions' && !empty($object->brouillon) && $user->rights->facture->creer) print ''; print '
'; print $langs->trans('PaymentConditionsShort'); print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).'id.'">'.img_edit($langs->trans('SetConditions'), 1).'
'; print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE) + if ($object->type != $object::TYPE_CREDIT_NOTE) { if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id'); - } - else - { + } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none'); } - } - else - { + } else { print ' '; } print ''; @@ -335,25 +416,26 @@ if ($object->id > 0) print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && !empty($object->brouillon) && $user->rights->facture->creer) print ''; + if ($object->type != $object::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && !empty($object->brouillon) && $user->rights->facture->creer) print ''; print '
'; print $langs->trans('DateMaxPayment'); print 'id.'">'.img_edit($langs->trans('SetDate'), 1).'id.'">'.img_edit($langs->trans('SetDate'), 1).'
'; print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE) + if ($object->type != $object::TYPE_CREDIT_NOTE) { + $duedate = $object->date_lim_reglement; + if ($type == 'bank-transfer') { + $duedate = $object->date_echeance; + } + if ($action == 'editpaymentterm') { - $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id, $object->date_lim_reglement, 'paymentterm'); - } - else - { - print dol_print_date($object->date_lim_reglement, 'daytext'); + $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id, $duedate, 'paymentterm'); + } else { + print dol_print_date($duedate, 'day'); if ($object->hasDelay()) { print img_warning($langs->trans('Late')); } } - } - else - { + } else { print ' '; } print ''; @@ -369,9 +451,7 @@ if ($object->id > 0) if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id'); - } - else - { + } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none'); } print ''; @@ -388,16 +468,28 @@ if ($object->id > 0) if ($action == 'editbankaccount') { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); - } - else - { + } else { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); } print ""; print ''; - print ''.$langs->trans("RIB").''; - print $object->thirdparty->display_rib(); + $title = 'CustomerIBAN'; + if ($type == 'bank-transfer') { + $title = 'SupplierIBAN'; + } + print ''.$langs->trans($title).''; + + $bac = new CompanyBankAccount($db); + $bac->fetch(0, $object->thirdparty->id); + + print $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic; + if (!empty($bac->iban)) { + if ($bac->verif() <= 0) print img_warning('Error on default bank number for IBAN : '.$bac->error_message); + } else { + print img_warning($langs->trans("NoDefaultIBANFound")); + } + print ''; print ''; @@ -493,8 +585,13 @@ if ($object->id > 0) $sql .= " , pfd.date_traite as date_traite"; $sql .= " , pfd.amount"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; - $sql .= " WHERE fk_facture = ".$object->id; + if ($type == 'bank-transfer') { + $sql .= " WHERE fk_facture_fourn = ".$object->id; + } else { + $sql .= " WHERE fk_facture = ".$object->id; + } $sql .= " AND pfd.traite = 0"; + $sql .= " AND pfd.ext_payment_id IS NULL"; $sql .= " ORDER BY pfd.date_demande DESC"; $result_sql = $db->query($sql); @@ -502,27 +599,28 @@ if ($object->id > 0) { $num = $db->num_rows($result_sql); $numopen = $num; - } - else - { + } else { dol_print_error($db); } - // For wich amount ? + // For which amount ? $sql = "SELECT SUM(pfd.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; - $sql .= " WHERE fk_facture = ".$object->id; + if ($type == 'bank-transfer') { + $sql .= " WHERE fk_facture_fourn = ".$object->id; + } else { + $sql .= " WHERE fk_facture = ".$object->id; + } $sql .= " AND pfd.traite = 0"; + $sql .= " AND pfd.ext_payment_id IS NULL"; $result_sql = $db->query($sql); if ($result_sql) { $obj = $db->fetch_object($result_sql); if ($obj) $pending = $obj->amount; - } - else - { + } else { dol_print_error($db); } @@ -533,8 +631,13 @@ if ($object->id > 0) print "\n
\n"; + $buttonlabel = $langs->trans("MakeWithdrawRequest"); + if ($type == 'bank-transfer') { + $buttonlabel = $langs->trans("MakeBankTransferOrder"); + } + // Add a transfer request - if ($object->statut > Facture::STATUS_DRAFT && $object->paye == 0 && $num == 0) + if ($object->statut > $object::STATUS_DRAFT && $object->paye == 0 && $num == 0) { if ($resteapayer > 0) { @@ -543,38 +646,38 @@ if ($object->id > 0) $remaintopaylesspendingdebit = $resteapayer - $pending; print '
'; + print ''; print ''; + print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print '
'; + } else { + print ''.$buttonlabel.''; } - else - { - print ''.$langs->trans("MakeWithdrawRequest").''; - } - } - else - { - print ''.$langs->trans("MakeWithdrawRequest").''; + } else { + print ''.$buttonlabel.''; } - } - else - { + } else { if ($num == 0) { - if ($object->statut > Facture::STATUS_DRAFT) print ''.$langs->trans("MakeWithdrawRequest").''; - else print ''.$langs->trans("MakeWithdrawRequest").''; + if ($object->statut > $object::STATUS_DRAFT) print ''.$buttonlabel.''; + else print ''.$buttonlabel.''; + } else { + print ''.$buttonlabel.''; } - else print ''.$langs->trans("MakeWithdrawRequest").''; } print "

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

'; - + if ($type == 'bank-transfer') { + print '
'.$langs->trans("DoCreditTransferBeforePayments").'

'; + } else { + print '
'.$langs->trans("DoStandingOrdersBeforePayments").'

'; + } /* * Withdrawals @@ -587,20 +690,29 @@ if ($object->id > 0) print ''.$langs->trans("DateRequest").''; print ''.$langs->trans("User").''; print ''.$langs->trans("Amount").''; - print ''.$langs->trans("WithdrawalReceipt").''; + if ($type == 'bank-transfer') { + print ''.$langs->trans("BankTransferReceipt").''; + } else { + print ''.$langs->trans("WithdrawalReceipt").''; + } print ' '; print ''.$langs->trans("DateProcess").''; print ' '; print ''; - $sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande"; - $sql .= " , pfd.date_traite as date_traite, pfd.amount,"; - $sql .= " u.rowid as user_id, u.lastname, u.firstname, u.login"; + $sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande,"; + $sql .= " pfd.date_traite as date_traite, pfd.amount,"; + $sql .= " u.rowid as user_id, u.email, u.lastname, u.firstname, u.login, u.statut as user_status"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on pfd.fk_user_demande = u.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_bons as pb ON pb.rowid = pfd.fk_prelevement_bons"; - $sql .= " WHERE fk_facture = ".$object->id; + if ($type == 'bank-transfer') { + $sql .= " WHERE fk_facture_fourn = ".$object->id; + } else { + $sql .= " WHERE fk_facture = ".$object->id; + } $sql .= " AND pfd.traite = 0"; + $sql .= " AND pfd.ext_payment_id IS NULL"; $sql .= " ORDER BY pfd.date_demande DESC"; $result_sql = $db->query($sql); @@ -610,14 +722,29 @@ if ($object->id > 0) { $i = 0; + $tmpuser = new User($db); + $num = $db->num_rows($result); while ($i < $num) { $obj = $db->fetch_object($result_sql); + $tmpuser->id = $obj->user_id; + $tmpuser->login = $obj->login; + $tmpuser->ref = $obj->login; + $tmpuser->email = $obj->email; + $tmpuser->lastname = $obj->lastname; + $tmpuser->firstname = $obj->firstname; + $tmpuser->statut = $obj->user_status; + print ''; - print ''.dol_print_date($db->jdate($obj->date_demande), 'day')."\n"; - print ''.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.''; + + print ''.dol_print_date($db->jdate($obj->date_demande), 'dayhour')."\n"; + + print ''; + print $tmpuser->getNomUrl(1, '', 0, 0, 0, 0, 'login'); + print ''; + print ''.price($obj->amount).''; print '-'; print ' '; @@ -625,7 +752,7 @@ if ($object->id > 0) print ''.$langs->trans("OrderWaiting").''; print ''; - print ''; + print ''; print img_delete(); print ''; @@ -634,9 +761,7 @@ if ($object->id > 0) } $db->free($result_sql); - } - else - { + } else { dol_print_error($db); } @@ -645,12 +770,17 @@ if ($object->id > 0) $sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande, pfd.date_traite, pfd.fk_prelevement_bons, pfd.amount,"; $sql .= " pb.ref,"; - $sql .= " u.rowid as user_id, u.lastname, u.firstname, u.login"; + $sql .= " u.rowid as user_id, u.email, u.lastname, u.firstname, u.login, u.statut as user_status"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on pfd.fk_user_demande = u.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_bons as pb ON pb.rowid = pfd.fk_prelevement_bons"; - $sql .= " WHERE fk_facture = ".$object->id; + if ($type == 'bank-transfer') { + $sql .= " WHERE fk_facture_fourn = ".$object->id; + } else { + $sql .= " WHERE fk_facture = ".$object->id; + } $sql .= " AND pfd.traite = 1"; + $sql .= " AND pfd.ext_payment_id IS NULL"; $sql .= " ORDER BY pfd.date_demande DESC"; $result = $db->query($sql); @@ -660,15 +790,27 @@ if ($object->id > 0) $numclosed = $num; $i = 0; + $tmpuser = new User($db); + while ($i < $num) { $obj = $db->fetch_object($result); + $tmpuser->id = $obj->user_id; + $tmpuser->login = $obj->login; + $tmpuser->ref = $obj->login; + $tmpuser->email = $obj->email; + $tmpuser->lastname = $obj->lastname; + $tmpuser->firstname = $obj->firstname; + $tmpuser->statut = $obj->user_status; + print ''; print ''.dol_print_date($db->jdate($obj->date_demande), 'day')."\n"; - print ''.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.''; + print ''; + print $tmpuser->getNomUrl(1, '', 0, 0, 0, 0, 'login'); + print ''; print ''.price($obj->amount).''; @@ -696,9 +838,7 @@ if ($object->id > 0) print ''.$langs->trans("None").''; $db->free($result); - } - else - { + } else { dol_print_error($db); } diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 284186b73ce..82ba8a33467 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; -if(!empty($conf->category->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +if (!empty($conf->category->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); @@ -60,7 +60,7 @@ if ($user->socid > 0) $nowyear = strftime("%Y", dol_now()); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; -if(!empty($conf->global->INVOICE_STATS_GRAPHS_SHOW_2_YEARS)) $startyear=$year-2; +if (!empty($conf->global->INVOICE_STATS_GRAPHS_SHOW_2_YEARS)) $startyear=$year-2; else $startyear=$year-1; $endyear = $year; @@ -68,7 +68,7 @@ $endyear = $year; /* * View */ -if(!empty($conf->category->enabled)) $langs->load('categories'); +if (!empty($conf->category->enabled)) $langs->load('categories'); $form = new Form($db); $formcompany = new FormCompany($db); $formother = new FormOther($db); @@ -180,9 +180,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filename_avg = $dir.'/ordersaverage-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$year.'.png'; @@ -369,8 +367,7 @@ print '
'; // Show graphs print ''; } print '
'; -if ($mesg) { print $mesg; } -else { +if ($mesg) { print $mesg; } else { print $px1->show(); print "
\n"; print $px2->show(); diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index a02a0fc1682..ef35c03eb54 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -78,9 +78,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) // If not abandonned $total = $total + $sign * $objectlink->total_ht; echo price($objectlink->total_ht); - } - else - { + } else { echo ''.price($objectlink->total_ht).''; } } diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 00b4987ad66..eb11950304f 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -2,11 +2,12 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2015 Regis Houssin - * Copyright (C) 2015-2016 Juanjo Menent + * Copyright (C) 2015-2020 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Marcos García * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2020 Tobias Sekan * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,12 +33,9 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -if (!empty($conf->commande->enabled)) - require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->commande->enabled)) - require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; -if (!empty($conf->tax->enabled)) - require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; // L'espace compta/treso doit toujours etre actif car c'est un espace partage // par de nombreux modules (banque, facture, commande a facturer, etc...) independamment @@ -148,7 +146,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = 0"; + $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = ".Facture::STATUS_DRAFT; $sql .= " AND f.entity IN (".getEntity('invoice').")"; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; @@ -161,16 +159,32 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $reshook = $hookmanager->executeHooks('printFieldListWhereCustomerDraft', $parameters); $sql .= $hookmanager->resPrint; + $sql .= " GROUP BY f.rowid, f.ref, f.datef, f.total, f.tva, f.total_ttc, f.ref_client, f.type, "; + $sql .= "s.email, s.nom, s.rowid, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur"; + + // Add Group from hooks + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldListGroupByCustomerDraft', $parameters); + $sql .= $hookmanager->resPrint; + $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); - print '
'; + print '
'; print ''; + print ''; - print ''; + print ''; + print ''; + if ($num) { $companystatic = new Societe($db); @@ -214,16 +228,12 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) print ''; print ''; print ''; - } - else - { + } else { print ''; } print "
'.$langs->trans("CustomersDraftInvoices").($num ? ''.$num.'' : '').'
'; + print $langs->trans("CustomersDraftInvoices").' '; + print ''; + print ''.$num.''; + print ''; + print '
'.$langs->trans("Total").''.price($tot_ttc).'
'.$langs->trans("NoInvoice").'

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

"; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -428,18 +442,14 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $i++; } - } - else - { + } else { $colspan = 5; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print '
'.$langs->trans("NoInvoice").'

'; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -470,7 +480,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $sql .= $hookmanager->resPrint; $sql .= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.tms, ff.paye,"; - $sql .= " s.nom, s.rowid, s.code_fournisseur, s.code_compta_fournisseur"; + $sql .= " s.nom, s.rowid, s.code_fournisseur, s.code_compta_fournisseur, s.email"; $sql .= " ORDER BY ff.tms DESC "; $sql .= $db->plimit($max, 0); @@ -529,17 +539,13 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $totalam += $obj->am; $i++; } - } - else - { + } else { $colspan = 5; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''.$langs->trans("NoInvoice").''; } print '

'; - } - else - { + } else { dol_print_error($db); } } @@ -608,14 +614,11 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire) $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; } print '
'; - } - else dol_print_error($db); + } else dol_print_error($db); } /** @@ -686,16 +689,12 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ''; print ' '; print ''; - } - else - { + } else { print ''.$langs->trans("None").''; } print "
"; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -724,7 +723,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user $sql .= " AND c.entity = ".$conf->entity; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND c.fk_soc = ".$socid; - $sql .= " AND c.fk_statut = 3"; + $sql .= " AND c.fk_statut = ".Commande::STATUS_CLOSED; $sql .= " AND c.facture = 0"; // Add where from hooks $parameters = array(); @@ -744,8 +743,15 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user print '
'; print ''; + print ""; - print ''; + print ''; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; @@ -815,9 +821,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user print '
'.$langs->trans("OrdersDeliveredToBill").' '.$num.''; + print $langs->trans("OrdersDeliveredToBill").' '; + print ''; + print ''.$num.''; + print ''; + print ''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("ToBill").'

'; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -839,7 +843,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $sql .= " FROM ".MAIN_DB_PREFIX."societe as s LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = s.fk_pays,".MAIN_DB_PREFIX."facture as f"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = 1"; + $sql .= " WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = ".Facture::STATUS_VALIDATED; $sql .= " AND f.entity IN (".getEntity('invoice').')'; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND f.fk_soc = ".$socid; @@ -860,7 +864,15 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) print '
'; print ''; - print ''; + + print ''; + print ''; + print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; @@ -939,18 +951,14 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) print ''; print ''; print ''; - } - else - { + } else { $colspan = 6; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; } print '
'.$langs->trans("BillsCustomersUnpaid", $num).' '.$num.'
'; + print $langs->trans("BillsCustomersUnpaid", $num).' '; + print ''; + print ''.$num.''; + print ''; + print ''.$langs->trans("DateDue").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.price($totalam).' 
'.$langs->trans("NoInvoice").'

'; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -975,7 +983,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $sql .= " WHERE s.rowid = ff.fk_soc"; $sql .= " AND ff.entity = ".$conf->entity; $sql .= " AND ff.paye = 0"; - $sql .= " AND ff.fk_statut = 1"; + $sql .= " AND ff.fk_statut = ".FactureFournisseur::STATUS_VALIDATED; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND ff.fk_soc = ".$socid; // Add where from hooks @@ -994,7 +1002,17 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU print '
'; print ''; - print ''; + + print ''; + print ''; + print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; @@ -1049,17 +1067,13 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU print ''; print ''; print ''; - } - else - { + } else { $colspan = 6; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; } print '
'.$langs->trans("BillsSuppliersUnpaid", $num).' '.$num.'
'; + print $langs->trans("BillsSuppliersUnpaid", $num).' '; + print ''; + // TODO: "impayees.php" looks very outdatetd and should be set to deprecated or directly remove in the next version + // + print ''.$num.''; + print ''; + print ''.$langs->trans("DateDue").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.price($totalam).' 
'.$langs->trans("NoInvoice").'

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

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

'; - print ''; $diff = $x_coll_sum - $x_paye_sum; print ''; print ''; @@ -644,7 +628,9 @@ else $i++; } + print '
'.$langs->trans("TotalToPay").($q ? ', '.$langs->trans("Quadri").' '.$q : '').'
'; +print '
'; // End of page llxFooter(); diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 4a7e387987c..865ef40a258 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -107,7 +107,7 @@ if (empty($reshook)) if (substr($key, 0, 7) == 'amount_' && GETPOST($key) != '') { $cursorfacid = substr($key, 7); - $amounts[$cursorfacid] = price2num(trim(GETPOST($key))); + $amounts[$cursorfacid] = price2num(GETPOST($key)); $totalpayment = $totalpayment + $amounts[$cursorfacid]; if (!empty($amounts[$cursorfacid])) $atleastonepaymentnotnull++; $result = $tmpinvoice->fetch($cursorfacid); @@ -131,11 +131,10 @@ if (empty($reshook)) } $formquestion[$i++] = array('type' => 'hidden', 'name' => $key, 'value' => $_POST[$key]); - } - elseif (substr($key, 0, 21) == 'multicurrency_amount_') + } elseif (substr($key, 0, 21) == 'multicurrency_amount_') { $cursorfacid = substr($key, 21); - $multicurrency_amounts[$cursorfacid] = price2num(trim(GETPOST($key))); + $multicurrency_amounts[$cursorfacid] = price2num(GETPOST($key)); $multicurrency_totalpayment += $multicurrency_amounts[$cursorfacid]; if (!empty($multicurrency_amounts[$cursorfacid])) $atleastonepaymentnotnull++; $result = $tmpinvoice->fetch($cursorfacid); @@ -266,8 +265,6 @@ if (empty($reshook)) $paiement->paiementid = dol_getIdFromCode($db, GETPOST('paiementcode'), 'c_paiement', 'code', 'id', 1); $paiement->num_payment = GETPOST('num_paiement', 'alpha'); $paiement->note_private = GETPOST('comment', 'alpha'); - $paiement->num_paiement = $paiement->num_payment; // For bacward compatibility - $paiement->note = $paiement->note_private; // For bacward compatibility if (!$error) { @@ -312,9 +309,7 @@ if (empty($reshook)) else $loc = DOL_URL_ROOT.'/compta/paiement/card.php?id='.$paiement_id; header('Location: '.$loc); exit; - } - else - { + } else { $db->rollback(); } } @@ -503,9 +498,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''; $form->select_comptes($accountid, 'accountid', 0, '', 2); print ''; - } - else - { + } else { print ' '; } print "\n"; @@ -560,9 +553,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if ($facture->type != Facture::TYPE_CREDIT_NOTE) { $sql .= ' AND type IN (0,1,3,5)'; // Standard invoice, replacement, deposit, situation - } - else - { + } else { $sql .= ' AND type = 2'; // If paying back a credit note, we show all credit notes } // Sort invoices by date and serial number: the older one comes first @@ -665,9 +656,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } print ''; - } - else - { + } else { print ''; } @@ -710,9 +699,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $multicurrency_remaintopay)."'"); print ''; print ''; - } - else - { + } else { print ''; print ''; } @@ -746,9 +733,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'"); print ''; print ''; - } - else - { + } else { print ''; print ''; } @@ -803,9 +788,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie //print "\n"; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -866,7 +849,7 @@ if (!GETPOST('action', 'aZ09')) if (!$sortfield) $sortfield = 'p.datep'; $sql = 'SELECT p.datep as dp, p.amount, f.total_ttc as fa_amount, f.ref'; - $sql .= ', f.rowid as facid, c.libelle as paiement_type, p.num_paiement'; + $sql .= ', f.rowid as facid, c.libelle as paiement_type, p.num_paiement as num_payment'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement as p LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id'; $sql .= ', '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' WHERE p.fk_facture = f.rowid'; @@ -902,7 +885,7 @@ if (!GETPOST('action', 'aZ09')) print ''; print ''.$objp->ref."\n"; print ''.dol_print_date($db->jdate($objp->dp))."\n"; - print ''.$objp->paiement_type.' '.$objp->num_paiement."\n"; + print ''.$objp->paiement_type.' '.$objp->num_payment."\n"; print ''.price($objp->amount).''; print ' '; print ''; diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index e14581f6531..4acfd34a53a 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -65,9 +65,7 @@ if ($action == 'setnote' && $user->rights->facture->paiement) { $db->commit(); $action = ''; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } @@ -87,15 +85,11 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture-> { header("Location: ".$backtopage); exit; - } - else - { + } else { header("Location: list.php"); exit; } - } - else - { + } else { $langs->load("errors"); setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); @@ -131,9 +125,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture-> header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); exit; - } - else - { + } else { $langs->load("errors"); setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); @@ -147,9 +139,7 @@ if ($action == 'setnum_paiement' && !empty($_POST['num_paiement'])) if ($res === 0) { setEventMessages($langs->trans('PaymentNumberUpdateSucceeded'), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans('PaymentNumberUpdateFailed'), null, 'errors'); } } @@ -162,9 +152,7 @@ if ($action == 'setdatep' && !empty($_POST['datepday'])) if ($res === 0) { setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans('PaymentDateUpdateFailed'), null, 'errors'); } } @@ -413,9 +401,7 @@ if ($resql) print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } @@ -445,9 +431,7 @@ if ($user->socid == 0 && $action == '') if (!$disable_delete) { print ''.$langs->trans('Delete').''; - } - else - { + } else { print ''.$langs->trans('Delete').''; } } diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index eeb578ad731..aaf216a7558 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -79,9 +79,7 @@ if ($action == 'setdate' && $user->rights->banque->cheque) { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -98,9 +96,7 @@ if ($action == 'setrefext' && $user->rights->banque->cheque) { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -117,9 +113,7 @@ if ($action == 'setref' && $user->rights->banque->cheque) { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -149,14 +143,10 @@ if ($action == 'create' && $_POST["accountid"] > 0 && $user->rights->banque->che header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($langs->trans("ErrorSelectAtLeastOne"), null, 'mesgs'); $action = 'new'; } @@ -170,9 +160,7 @@ if ($action == 'remove' && $id > 0 && $_GET["lineid"] > 0 && $user->rights->banq { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -185,9 +173,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->c { header("Location: index.php"); exit; - } - else - { + } else { setEventMessages($paiement->error, $paiement->errors, 'errors'); } } @@ -212,9 +198,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->banque->c header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -232,9 +216,7 @@ if ($action == 'confirm_reject_check' && $confirm == 'yes' && $user->rights->ban //header("Location: ".DOL_URL_ROOT.'/compta/paiement/card.php?id='.$paiement_id); //exit; $action = ''; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } @@ -261,15 +243,11 @@ if ($action == 'builddoc' && $user->rights->banque->cheque) { dol_print_error($db, $object->error); exit; - } - else - { + } else { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#builddoc')); exit; } -} - -// Remove file in doc form +} // Remove file in doc form elseif ($action == 'remove_file' && $user->rights->banque->cheque) { if ($object->fetch($id) > 0) @@ -314,9 +292,7 @@ if ($action == 'new') $h++; print load_fiche_titre($langs->trans("Cheques"), '', 'bank_account'); -} -else -{ +} else { $result = $object->fetch($id, $ref); if ($result < 0) { @@ -375,9 +351,10 @@ if ($action == 'new') $now = dol_now(); - print $langs->trans("SelectChequeTransactionAndGenerate").'

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

'."\n"; print '
'; + print ''; print ''; dol_fiche_head(); @@ -509,9 +486,7 @@ if ($action == 'new') if ($paymentstatic->id) { print $paymentstatic->getNomUrl(1); - } - else - { + } else { print ' '; } print ''; @@ -521,9 +496,7 @@ if ($action == 'new') if ($accountlinestatic->rowid) { print $accountlinestatic->getNomUrl(1); - } - else - { + } else { print ' '; } print ''; @@ -543,17 +516,13 @@ if ($action == 'new') if ($user->rights->banque->cheque) { print ''; - } - else - { + } else { print ''.$langs->trans('NewCheckDepositOn', $account_label).''; } print '
'; print '
'; } -} -else -{ +} else { $paymentstatic = new Paiement($db); $accountlinestatic = new AccountLine($db); $accountstatic = new Account($db); @@ -587,9 +556,7 @@ else print $form->selectDate($object->date_bordereau, 'datecreate_', '', '', '', "setdate"); print ''; print ''; - } - else - { + } else { print $object->date_bordereau ? dol_print_date($object->date_bordereau, 'day') : ' '; } @@ -699,9 +666,7 @@ else if ($paymentstatic->id) { print $paymentstatic->getNomUrl(1); - } - else - { + } else { print ' '; } print ''; @@ -711,9 +676,7 @@ else if ($accountlinestatic->rowid) { print $accountlinestatic->getNomUrl(1); - } - else - { + } else { print ' '; } print ''; @@ -736,9 +699,7 @@ else $i++; } - } - else - { + } else { print ''; print $langs->trans("None"); print ''; @@ -755,9 +716,7 @@ else } print ""; - } - else - { + } else { dol_print_error($db); } diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 746065647d5..48c58dc7219 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -120,18 +120,14 @@ class RemiseCheque extends CommonObject if ($this->statut == 0) { $this->ref = "(PROV".$this->id.")"; - } - else - { + } else { $this->ref = $obj->ref; } } $this->db->free($resql); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -227,9 +223,7 @@ class RemiseCheque extends CommonObject array_push($lines, $row[0]); } $this->db->free($resql); - } - else - { + } else { $this->errno = -1026; dol_syslog("RemiseCheque::Create Error ".$this->errno, LOG_ERR); } @@ -269,9 +263,7 @@ class RemiseCheque extends CommonObject dol_syslog("RemiseCheque::Create Error update amount ".$this->errno, LOG_ERR); } } - } - else - { + } else { $this->errno = -1; $this->error = $this->db->lasterror(); $this->errno = $this->db->lasterrno(); @@ -288,9 +280,7 @@ class RemiseCheque extends CommonObject $this->db->commit(); dol_syslog("RemiseCheque::Create end", LOG_DEBUG); return $this->id; - } - else - { + } else { $this->db->rollback(); dol_syslog("RemiseCheque::Create end", LOG_DEBUG); return $this->errno; @@ -341,9 +331,7 @@ class RemiseCheque extends CommonObject if ($this->errno === 0) { $this->db->commit(); - } - else - { + } else { $this->db->rollback(); dol_syslog("RemiseCheque::Delete ROLLBACK ($this->errno)"); } @@ -385,15 +373,11 @@ class RemiseCheque extends CommonObject { $this->ref = $numref; $this->statut = 1; - } - else - { + } else { $this->errno = -1029; dol_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR); } - } - else - { + } else { $this->errno = -1033; dol_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR); } @@ -404,9 +388,7 @@ class RemiseCheque extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); dol_syslog("RemiseCheque::Validate ".$this->errno, LOG_ERR); return $this->errno; @@ -488,9 +470,7 @@ class RemiseCheque extends CommonObject } return $numref; - } - else - { + } else { $langs->load("errors"); print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Bank")); return ""; @@ -544,9 +524,7 @@ class RemiseCheque extends CommonObject } return $response; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -584,9 +562,7 @@ class RemiseCheque extends CommonObject } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -664,17 +640,13 @@ class RemiseCheque extends CommonObject { //$outputlangs->charset_output=$sav_charset_output; return 1; - } - else - { + } else { //$outputlangs->charset_output=$sav_charset_output; dol_syslog("Error"); dol_print_error($this->db, $docmodel->error); return 0; } - } - else - { + } else { $this->error = $langs->trans("ErrorFileDoesNotExists", $dir.$file); return -1; } @@ -720,9 +692,7 @@ class RemiseCheque extends CommonObject $this->errno = -1030; dol_syslog("RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)"); } - } - else - { + } else { $this->errno = -1031; dol_syslog("RemiseCheque::updateAmount ERREUR SELECT ($this->errno)"); } @@ -730,9 +700,7 @@ class RemiseCheque extends CommonObject if ($this->errno === 0) { $this->db->commit(); - } - else - { + } else { $this->db->rollback(); dol_syslog("RemiseCheque::updateAmount ROLLBACK ($this->errno)"); } @@ -761,9 +729,7 @@ class RemiseCheque extends CommonObject if ($resql) { $this->updateAmount(); - } - else - { + } else { $this->errno = -1032; dol_syslog("RemiseCheque::removeCheck ERREUR UPDATE ($this->errno)"); } @@ -838,31 +804,23 @@ class RemiseCheque extends CommonObject { $this->db->commit(); return $rejectedPayment->id; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $rejectedPayment->error; $this->errors = $rejectedPayment->errors; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $rejectedPayment->error; $this->errors = $rejectedPayment->errors; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -935,15 +893,11 @@ class RemiseCheque extends CommonObject { $this->date_bordereau = $date; return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } - } - else - { + } else { return -2; } } @@ -970,15 +924,11 @@ class RemiseCheque extends CommonObject if ($resql) { return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } - } - else - { + } else { return -2; } } @@ -1046,8 +996,7 @@ class RemiseCheque extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index c85553d59a8..1ee79aeafd9 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -76,9 +76,7 @@ if ($resql) { print ''.$num.''; print ''; print "\n"; -} -else -{ +} else { dol_print_error($db); } @@ -140,9 +138,7 @@ if ($resql) print ""; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index fe1f7c31050..e76936c71fd 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -221,9 +221,7 @@ if ($resql) print "\n"; $i++; } - } - else - { + } else { print ''; print ''.$langs->trans("None").""; print ''; @@ -231,9 +229,7 @@ if ($resql) print ""; print ""; print "\n"; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 9b0ee645fc7..f2dc613175f 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -9,6 +9,7 @@ * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Thibault FOUCART * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Andreu Bisquerra Gaya * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,9 +69,13 @@ class Paiement extends CommonObject */ public $montant; - public $amount; // Total amount of payment - public $amounts = array(); // Array of amounts - public $multicurrency_amounts = array(); // Array of amounts + public $amount; // Total amount of payment (in the main currency) + public $multicurrency_amount; // Total amount of payment (in the currency of the bank account) + public $amounts = array(); // array: invoice ID => amount for that invoice (in the main currency)> + public $multicurrency_amounts = array(); // array: invoice ID => amount for that invoice (in the invoice's currency)> + + public $pos_change = 0; // Excess received in TakePOS cash payment + public $author; public $paiementid; // Type of payment. Id saved into fields fk_paiement on llx_paiement public $paiementcode; // Code of payment. @@ -85,13 +90,6 @@ class Paiement extends CommonObject */ public $type_code; - /** - * @var string Numero du CHQ, VIR, etc... - * @deprecated - * @see $num_payment - */ - public $numero; - /** * @var string Numero du CHQ, VIR, etc... * @deprecated @@ -138,6 +136,10 @@ class Paiement extends CommonObject */ public $fk_paiement; // Type of payment + /** + * @var string payment external reference + */ + public $ref_ext; /** * Constructor @@ -159,7 +161,7 @@ class Paiement extends CommonObject */ public function fetch($id, $ref = '', $fk_bank = '') { - $sql = 'SELECT p.rowid, p.ref, p.datep as dp, p.amount, p.statut, p.ext_payment_id, p.ext_payment_site, p.fk_bank,'; + $sql = 'SELECT p.rowid, p.ref, p.ref_ext, p.datep as dp, p.amount, p.statut, p.ext_payment_id, p.ext_payment_site, p.fk_bank, p.multicurrency_amount,'; $sql .= ' c.code as type_code, c.libelle as type_label,'; $sql .= ' p.num_paiement as num_payment, p.note,'; $sql .= ' b.fk_account'; @@ -179,14 +181,16 @@ class Paiement extends CommonObject if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); + $this->id = $obj->rowid; $this->ref = $obj->ref ? $obj->ref : $obj->rowid; + $this->ref_ext = $obj->ref_ext; $this->date = $this->db->jdate($obj->dp); $this->datepaye = $this->db->jdate($obj->dp); - $this->num_paiement = $obj->num_payment; // deprecated $this->num_payment = $obj->num_payment; $this->montant = $obj->amount; // deprecated $this->amount = $obj->amount; + $this->multicurrency_amount = $obj->multicurrency_amount; $this->note = $obj->note; $this->type_label = $obj->type_label; $this->type_code = $obj->type_code; @@ -200,15 +204,11 @@ class Paiement extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->db->free($resql); return 0; } - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -242,9 +242,7 @@ class Paiement extends CommonObject { $amounts = &$this->amounts; $amounts_to_update = &$this->multicurrency_amounts; - } - else - { + } else { $amounts = &$this->multicurrency_amounts; $amounts_to_update = &$this->amounts; } @@ -278,22 +276,25 @@ class Paiement extends CommonObject $this->ref = $this->getNextNumRef(is_object($thirdparty) ? $thirdparty : ''); + if (empty($this->ref_ext)) { + $this->ref_ext = ''; + } + if ($way == 'dolibarr') { $total = $totalamount; $mtotal = $totalamount_converted; // Maybe use price2num with MT for the converted value - } - else - { + } else { $total = $totalamount_converted; // Maybe use price2num with MT for the converted value $mtotal = $totalamount; } - $num_payment = ($this->num_payment ? $this->num_payment : $this->num_paiement); - $note = ($this->note_public ? $this->note_public : $this->note); + $num_payment = $this->num_payment; + $note = ($this->note_private ? $this->note_private : $this->note); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, ref, datec, datep, amount, multicurrency_amount, fk_paiement, num_paiement, note, ext_payment_id, ext_payment_site, fk_user_creat)"; - $sql .= " VALUES (".$conf->entity.", '".$this->db->escape($this->ref)."', '".$this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', ".$total.", ".$mtotal.", ".$this->paiementid.", '".$this->db->escape($num_payment)."', '".$this->db->escape($note)."', ".($this->ext_payment_id ? "'".$this->db->escape($this->ext_payment_id)."'" : "null").", ".($this->ext_payment_site ? "'".$this->db->escape($this->ext_payment_site)."'" : "null").", ".$user->id.")"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, ref, ref_ext, datec, datep, amount, multicurrency_amount, fk_paiement, num_paiement, note, ext_payment_id, ext_payment_site, fk_user_creat, pos_change)"; + $sql .= " VALUES (".$conf->entity.", '".$this->db->escape($this->ref)."', '".$this->db->escape($this->ref_ext)."', '".$this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', ".$total.", ".$mtotal.", ".$this->paiementid.", "; + $sql .= "'".$this->db->escape($num_payment)."', '".$this->db->escape($note)."', ".($this->ext_payment_id ? "'".$this->db->escape($this->ext_payment_id)."'" : "null").", ".($this->ext_payment_site ? "'".$this->db->escape($this->ext_payment_site)."'" : "null").", ".$user->id.", ".((int) $this->pos_change).")"; $resql = $this->db->query($sql); if ($resql) @@ -340,8 +341,7 @@ class Paiement extends CommonObject if (!in_array($invoice->type, $affected_types)) dol_syslog("Invoice ".$facid." is not a standard, nor replacement invoice, nor credit note, nor deposit invoice, nor situation invoice. We do nothing more."); elseif ($remaintopay) dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more."); //else if ($mustwait) dol_syslog("There is ".$mustwait." differed payment to process, we do nothing more."); - else - { + else { // If invoice is a down payment, we also convert down payment to discount if ($invoice->type == Facture::TYPE_DEPOSIT) { @@ -429,15 +429,11 @@ class Paiement extends CommonObject $error++; } } - } - else - { + } else { $this->error = $this->db->lasterror(); $error++; } - } - else - { + } else { dol_syslog(get_class($this).'::Create Amount line '.$key.' not a number. We discard it.'); } } @@ -449,9 +445,7 @@ class Paiement extends CommonObject if ($result < 0) { $error++; } // Fin appel triggers } - } - else - { + } else { $this->error = $this->db->lasterror(); $error++; } @@ -463,9 +457,7 @@ class Paiement extends CommonObject $this->multicurrency_amount = $mtotal; $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -501,9 +493,7 @@ class Paiement extends CommonObject $this->db->rollback(); return -1; } - } - else - { + } else { $this->db->rollback(); return -2; } @@ -513,8 +503,10 @@ class Paiement extends CommonObject { $accline = new AccountLine($this->db); - $result = $accline->fetch($bank_line_id); - if ($result == 0) $accline->rowid = $bank_line_id; // If not found, we set artificially rowid to allow delete of llx_bank_url + $result=$accline->fetch($bank_line_id); + if ($result == 0) { + $accline->id = $accline->rowid = $bank_line_id; // If not found, we set artificially rowid to allow delete of llx_bank_url + } // Delete bank account url lines linked to payment $result = $accline->delete_urls($user); @@ -567,9 +559,7 @@ class Paiement extends CommonObject $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error; $this->db->rollback(); return -5; @@ -718,7 +708,7 @@ class Paiement extends CommonObject $bank_line_id, $this->id_prelevement, DOL_URL_ROOT.'/compta/prelevement/card.php?id=', - $this->num_paiement, + $this->num_payment, 'withdraw' ); } @@ -730,9 +720,7 @@ class Paiement extends CommonObject if ($result < 0) { $error++; } // Fin appel triggers } - } - else - { + } else { $this->error = $acc->error; $error++; } @@ -740,9 +728,7 @@ class Paiement extends CommonObject if (!$error) { $this->db->commit(); - } - else - { + } else { $this->db->rollback(); } } @@ -750,9 +736,7 @@ class Paiement extends CommonObject if (!$error) { return $bank_line_id; - } - else - { + } else { return -1; } } @@ -776,9 +760,7 @@ class Paiement extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this).'::update_fk_bank '.$this->error); return -1; @@ -839,9 +821,7 @@ class Paiement extends CommonObject $this->db->commit(); return 0; - } - else - { + } else { $this->db->rollback(); return -2; } @@ -870,9 +850,7 @@ class Paiement extends CommonObject { $this->num_payment = $this->db->escape($num); return 0; - } - else - { + } else { $this->error = 'Error -1 '.$this->db->error(); return -2; } @@ -895,9 +873,7 @@ class Paiement extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this).'::valide '.$this->error); return -1; @@ -919,9 +895,7 @@ class Paiement extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this).'::reject '.$this->error); return -1; @@ -965,9 +939,7 @@ class Paiement extends CommonObject $this->date_modification = $this->db->jdate($obj->tms); } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -999,9 +971,7 @@ class Paiement extends CommonObject } return $billsarray; - } - else - { + } else { $this->error = $this->db->error(); dol_syslog(get_class($this).'::getBillsArray Error '.$this->error.' -', LOG_DEBUG); return -1; @@ -1033,9 +1003,7 @@ class Paiement extends CommonObject } return $amounts; - } - else - { + } else { $this->error = $this->db->error(); dol_syslog(get_class($this).'::getAmountsArray Error '.$this->error.' -', LOG_DEBUG); return -1; @@ -1118,9 +1086,7 @@ class Paiement extends CommonObject } return $numref; - } - else - { + } else { $langs->load("errors"); print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Invoice")); return ""; @@ -1193,7 +1159,7 @@ class Paiement extends CommonObject if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips $result = ''; - $label = ''.$langs->trans("ShowPayment").'
'; + $label = img_picto('', $this->picto).' '.$langs->trans("Payment").'
'; $label .= ''.$langs->trans("Ref").': '.$this->ref; if ($this->datepaye ? $this->datepaye : $this->date) $label .= '
'.$langs->trans("Date").': '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour'); if ($mode == 'withlistofinvoices') @@ -1206,7 +1172,7 @@ class Paiement extends CommonObject foreach ($arraybill as $billid) { $facturestatic->fetch($billid); - $label .= '
'.$facturestatic->getNomUrl(1).' '.$facturestatic->getLibStatut(2, 1); + $label .= '
'.$facturestatic->getNomUrl(1, '', 0, 0, '', 1).' '.$facturestatic->getLibStatut(2, 1); } } } @@ -1221,8 +1187,7 @@ class Paiement extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $url = DOL_URL_ROOT.'/compta/paiement/card.php?id='.$this->id; diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php index 3da6a95a1e8..00c3440b868 100644 --- a/htdocs/compta/paiement/info.php +++ b/htdocs/compta/paiement/info.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; // Load translation files required by the page $langs->loadLangs(array('bills', 'companies')); -$id = GETPOST('id'); +$id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 20401d81a1a..eb2523960f3 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -129,9 +129,7 @@ if (GETPOST("orphelins", "alpha")) $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -} -else -{ +} else { $sql = "SELECT DISTINCT p.rowid, p.ref, p.datep as dp, p.amount,"; // DISTINCT is to avoid duplicate when there is a link to sales representatives $sql .= " p.statut, p.num_paiement as num_payment,"; $sql .= " c.code as paiement_code,"; @@ -161,7 +159,7 @@ else if ($userid) { if ($userid == -1) $sql .= " AND f.fk_user_author IS NULL"; - else $sql .= " AND f.fk_user_author = ".$userid; + else $sql .= " AND f.fk_user_author = ".$userid; } // Search criteria $sql .= dolSqlDateFilter("p.datep", $day, $month, $year); @@ -378,9 +376,7 @@ if ($resql) print "\n"; print ""; print "\n"; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 76a1ce72d76..9d3bae3140d 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -70,9 +70,7 @@ if ($action == 'builddoc') if ($rap->write_file($dir, $_POST["remonth"], $_POST["reyear"], $outputlangs) > 0) { $outputlangs->charset_output = $sav_charset_output; - } - else - { + } else { $outputlangs->charset_output = $sav_charset_output; dol_print_error($db, $obj->error); } diff --git a/htdocs/compta/paiement/tovalidate.php b/htdocs/compta/paiement/tovalidate.php index 91ef2c215e6..349c483a5db 100644 --- a/htdocs/compta/paiement/tovalidate.php +++ b/htdocs/compta/paiement/tovalidate.php @@ -126,9 +126,7 @@ if ($resql) if ($objp->statut == 0) { print ''.$langs->trans("PaymentStatusToValidShort").''; - } - else - { + } else { print "-"; } diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 509e20f3613..298866a2020 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -41,6 +41,8 @@ if ($user->socid > 0) $socid = $user->socid; } +$charge = new ChargeSociales($db); + /* * Actions @@ -141,9 +143,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y $loc = DOL_URL_ROOT.'/compta/sociales/card.php?id='.$chid; header('Location: '.$loc); exit; - } - else - { + } else { $db->rollback(); } } @@ -163,7 +163,6 @@ $form = new Form($db); // Formulaire de creation d'un paiement de charge if ($action == 'create') { - $charge = new ChargeSociales($db); $charge->fetch($chid); $charge->accountid = $charge->fk_account ? $charge->fk_account : $charge->accountid; $charge->paiementtype = $charge->mode_reglement_id ? $charge->mode_reglement_id : $charge->paiementtype; @@ -225,7 +224,7 @@ if ($action == 'create') print ''.$langs->trans("Date").''; $datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (empty($_POST["remonth"]) ?-1 : $datepaye) : 0; - print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1); + print $form->selectDate($datepayment, '', '', '', 0, "add_payment", 1, 1, 0, '', '', $charge->date_ech, '', 1, $langs->trans("DateOfSocialContribution")); print ""; print ''; @@ -283,9 +282,7 @@ if ($action == 'create') if ($objp->date_ech > 0) { print ''.dol_print_date($objp->date_ech, 'day').''."\n"; - } - else - { + } else { print "!!!\n"; } @@ -305,9 +302,7 @@ if ($action == 'create') $remaintopay = $objp->amount - $sumpaid; print ''; print ''; - } - else - { + } else { print '-'; } print ""; diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index 5fdfe327056..2819e492f7b 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -66,9 +66,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->tax->char $db->commit(); header("Location: ".DOL_URL_ROOT."/compta/sociales/payments.php?mode=sconly"); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } @@ -184,7 +182,7 @@ print ''.$langs->trans('Date').''.dol_print_date($o print ''.$langs->trans('Mode').''.$langs->trans("PaymentType".$object->type_code).''; // Numero -print ''.$langs->trans('Numero').''.$object->num_paiement.''; +print ''.$langs->trans('Numero').''.$object->num_payment.''; // Montant print ''.$langs->trans('Amount').''.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).''; @@ -283,9 +281,7 @@ if ($resql) print "\n"; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } @@ -316,9 +312,7 @@ if ($action == '') if (!$disable_delete) { print ''.$langs->trans('Delete').''; - } - else - { + } else { print ''.$langs->trans('Delete').''; } } diff --git a/htdocs/compta/paymentbybanktransfer/index.php b/htdocs/compta/paymentbybanktransfer/index.php index fd87dd5e447..e2477d86544 100644 --- a/htdocs/compta/paymentbybanktransfer/index.php +++ b/htdocs/compta/paymentbybanktransfer/index.php @@ -28,7 +28,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -68,23 +68,23 @@ print '
'; $thirdpartystatic = new Societe($db); -$invoicestatic = new Facture($db); +$invoicestatic = new FactureFournisseur($db); $bprev = new BonPrelevement($db); print '
'; print ''; print ''; -print ''; +print ''; print ''; print ''; print '
'.$langs->trans("Statistics").'
'.$langs->trans("NbOfInvoiceToWithdraw").'
'.$langs->trans("NbOfInvoiceToPayByBankTransfer").''; -print ''; -print $bprev->NbFactureAPrelever(); +print ''; +print $bprev->nbOfInvoiceToPay('bank-transfer'); print ''; print '
'.$langs->trans("AmountToWithdraw").''; -print price($bprev->SommeAPrelever(), '', '', 1, -1, -1, 'auto'); +print price($bprev->SommeAPrelever('bank-transfer'), '', '', 1, -1, -1, 'auto'); print '

'; @@ -94,19 +94,21 @@ print '

'; */ $sql = "SELECT f.ref, f.rowid, f.total_ttc, f.fk_statut, f.paye, f.type,"; $sql .= " pfd.date_demande, pfd.amount,"; -$sql .= " s.nom as name, s.rowid as socid"; -$sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; +$sql .= " s.nom as name, s.email, s.rowid as socid, s.tva_intra"; +$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; -$sql .= " , ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; +$sql .= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " WHERE s.rowid = f.fk_soc"; -$sql .= " AND f.entity IN (".getEntity('invoice').")"; +$sql .= " AND f.entity IN (".getEntity('supplier_invoice').")"; $sql .= " AND f.total_ttc > 0"; if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { - $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; + $sql .= " AND f.fk_statut = ".FactureFournisseur::STATUS_VALIDATED; } -$sql .= " AND pfd.traite = 0 AND pfd.fk_facture_fourn = f.rowid"; +$sql .= " AND pfd.traite = 0"; +$sql .= " AND pfd.ext_payment_id IS NULL"; +$sql .= " AND pfd.fk_facture_fourn = f.rowid"; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND f.fk_soc = ".$socid; @@ -133,15 +135,17 @@ if ($resql) $invoicestatic->type = $obj->type; $alreadypayed = $invoicestatic->getSommePaiement(); + $thirdpartystatic->id = $obj->socid; + $thirdpartystatic->name = $obj->name; + $thirdpartystatic->email = $obj->email; + $thirdpartystatic->tva_intra = $obj->tva_intra; print ''; print $invoicestatic->getNomUrl(1, 'withdraw'); print ''; print ''; - $thirdpartystatic->id = $obj->socid; - $thirdpartystatic->name = $obj->name; - print $thirdpartystatic->getNomUrl(1, 'customer'); + print $thirdpartystatic->getNomUrl(1, 'supplier'); print ''; print ''; @@ -158,15 +162,11 @@ if ($resql) print ''; $i++; } - } - else - { + } else { print ''.$langs->trans("NoSupplierInvoiceToWithdraw", $langs->transnoentitiesnoconv("BankTransfer")).''; } print "

"; -} -else -{ +} else { dol_print_error($db); } @@ -177,9 +177,11 @@ print '
'; /* * Withdraw receipts */ + $limit = 5; $sql = "SELECT p.rowid, p.ref, p.amount, p.datec, p.statut"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; +$sql .= " WHERE p.type = 'bank-transfer'"; $sql .= " ORDER BY datec DESC"; $sql .= $db->plimit($limit); @@ -192,37 +194,40 @@ if ($result) print"\n\n"; print '
'; print ''; - print ''; + print ''; + print ''; print ''; print ''; print ''; print ''; - while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($result); + if ($num > 0) { + while ($i < min($num, $limit)) + { + $obj = $db->fetch_object($result); + print ''; - print ''; + print "\n"; + print '\n"; + print '\n"; + print '\n"; - print "\n"; - print '\n"; - print '\n"; - print '\n"; - - print "\n"; - $i++; + print "\n"; + $i++; + } + } else { + print ''; } + print "
'.$langs->trans("LatestBankTransferReceipts", $limit).'
'.$langs->trans("LatestBankTransferReceipts", $limit).''.$langs->trans("Date").''.$langs->trans("Amount").''.$langs->trans("Status").'
"; + $bprev->id = $obj->rowid; + $bprev->ref = $obj->ref; + $bprev->statut = $obj->statut; + print $bprev->getNomUrl(1); + print "'.dol_print_date($db->jdate($obj->datec), "dayhour")."'.price($obj->amount)."'.$bprev->getLibStatut(3).""; - $bprev->id = $obj->rowid; - $bprev->ref = $obj->ref; - $bprev->statut = $obj->statut; - print $bprev->getNomUrl(1); - print "'.dol_print_date($db->jdate($obj->datec), "dayhour")."'.price($obj->amount)."'.$bprev->getLibStatut(3)."
'.$langs->trans("None").'

"; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index c7c717e702b..608c9fe594d 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -38,6 +38,8 @@ $socid = GETPOST('socid', 'int'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$type = GETPOST('type', 'aZ09'); + $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); @@ -57,6 +59,11 @@ $search_amount = GETPOST('search_amount', 'alpha'); $bon = new BonPrelevement($db); $hookmanager->initHooks(array('withdrawalsreceiptslist')); +$usercancreate = $user->rights->prelevement->bons->creer; +if ($type == 'bank-transfer') { + $usercancreate = $user->rights->paymentbybanktransfer->create; +} + /* * Actions @@ -78,6 +85,11 @@ llxHeader('', $langs->trans("WithdrawalsReceipts")); $sql = "SELECT p.rowid, p.ref, p.amount, p.statut, p.datec"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " WHERE p.entity IN (".getEntity('invoice').")"; +if ($type == 'bank-transfer') { + $sql .= " AND p.type = 'bank-transfer'"; +} else { + $sql .= " AND p.type = 'debit-order'"; +} if ($search_ref) $sql .= natural_search("p.ref", $search_ref); if ($search_amount) $sql .= natural_search("p.amount", $search_amount, 1); @@ -112,7 +124,7 @@ if ($result) $selectedfields = ''; $newcardbutton = ''; - if ($user->rights->prelevement->bons->creer) + if ($usercancreate) { $newcardbutton .= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php'); } @@ -127,7 +139,14 @@ if ($result) print ''; print ''; - print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1); + $titlekey = "WithdrawalsReceipts"; + $title = $langs->trans("WithdrawalsReceipts"); + if ($type == 'bank-transfer') { + $titlekey = "BankTransferReceipts"; + $title = $langs->trans("BankTransferReceipts"); + } + + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1); $moreforfilter = ''; @@ -146,7 +165,7 @@ if ($result) print ''; print ''; - print_liste_field_titre("WithdrawalsReceipts", $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); + print_liste_field_titre($titlekey, $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); @@ -155,44 +174,47 @@ if ($result) $directdebitorder = new BonPrelevement($db); - while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($result); + if ($num) { + while ($i < min($num, $limit)) + { + $obj = $db->fetch_object($result); - $directdebitorder->id = $obj->rowid; - $directdebitorder->ref = $obj->ref; - $directdebitorder->datec = $obj->datec; - $directdebitorder->amount = $obj->amount; - $directdebitorder->statut = $obj->statut; + $directdebitorder->id = $obj->rowid; + $directdebitorder->ref = $obj->ref; + $directdebitorder->datec = $obj->datec; + $directdebitorder->amount = $obj->amount; + $directdebitorder->statut = $obj->statut; - print ''; + print ''; - print ''; - print $directdebitorder->getNomUrl(1); - print "\n"; + print ''; + print $directdebitorder->getNomUrl(1); + print "\n"; - print ''.dol_print_date($db->jdate($obj->datec), 'day')."\n"; + print ''.dol_print_date($db->jdate($obj->datec), 'day')."\n"; - print ''.price($obj->amount)."\n"; + print ''.price($obj->amount)."\n"; - print ''; - print $bon->LibStatut($obj->statut, 3); - print ''; + print ''; + print $bon->LibStatut($obj->statut, 3); + print ''; - print ''."\n"; + print ''."\n"; - print "\n"; - $i++; + print "\n"; + $i++; + } + } else { + print ''.$langs->trans("None").''; } + print ""; print '
'; print ''; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index d81e101be3d..6349660c59c 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -31,10 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page -$langs->loadLangs(array('banks', 'categories', 'bills', 'withdrawals')); - -if (!$user->rights->prelevement->bons->lire) -accessforbidden(); +$langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals')); // Security check if ($user->socid > 0) accessforbidden(); @@ -44,6 +41,7 @@ $action = GETPOST('action', 'alpha'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); +$type = GETPOST('type', 'aZ09'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; @@ -65,6 +63,13 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ $hookmanager->initHooks(array('directdebitprevcard', 'globalcard', 'directdebitprevlist')); +if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') { + accessforbidden(); +} +if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') { + accessforbidden(); +} + /* * Actions @@ -76,34 +81,38 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - if ($action == 'confirm_delete') - { - $res = $object->delete($user); - if ($res > 0) - { - header("Location: index.php"); - exit; - } - } + if ($action == 'confirm_delete') + { + $res = $object->delete($user); + if ($res > 0) + { + if ($object->type == 'bank-transfer') { + header("Location: ".DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php'); + } else { + header("Location: ".DOL_URL_ROOT.'/compta/prelevement/index.php'); + } + exit; + } + } - // Seems to no be used and replaced with $action == 'infocredit' - if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes') - { - $res = $object->set_credite(); - if ($res >= 0) - { - header("Location: card.php?id=".$id); - exit; - } - } + // Seems to no be used and replaced with $action == 'infocredit' + if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes') + { + $res = $object->set_credite(); + if ($res >= 0) + { + header("Location: card.php?id=".$id); + exit; + } + } - if ($action == 'infotrans' && $user->rights->prelevement->bons->send) - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + if ($action == 'infotrans' && $user->rights->prelevement->bons->send) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - /* + /* if ($_FILES['userfile']['name'] && basename($_FILES['userfile']['name'],".ps") == $object->ref) { $dir = $conf->prelevement->dir_output.'/receipts'; @@ -124,26 +133,24 @@ if (empty($reshook)) $error = $object->set_infotrans($user, $dt, GETPOST('methode', 'alpha')); - if ($error) - { - header("Location: card.php?id=".$id."&error=$error"); - exit; - } - } + if ($error) + { + header("Location: card.php?id=".$id."&error=$error"); + exit; + } + } // Set direct debit order to credited, create payment and close invoices if ($action == 'infocredit' && $user->rights->prelevement->bons->credit) { $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - $error = $object->set_infocredit($user, $dt); - - if ($error) - { - header("Location: card.php?id=".$id."&error=$error"); - exit; - } - } + $error = $object->set_infocredit($user, $dt); + if ($error) + { + setEventMessages($object->error, $object->errors, 'errors'); + } + } } @@ -172,7 +179,7 @@ if ($id > 0 || $ref) }*/ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref'); @@ -198,7 +205,7 @@ if ($id > 0 || $ref) print ''.$langs->trans("TransData").''; print dol_print_date($object->date_trans, 'day'); - print ' '.$langs->trans("By").' '.$muser->getFullName($langs).''; + print ' '.$langs->trans("By").' '.$muser->getFullName($langs).''; print ''.$langs->trans("TransMetod").''; print $object->methodes_trans[$object->method_trans]; print ''; @@ -221,7 +228,9 @@ if ($id > 0 || $ref) $result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); print ''; - print $langs->trans("BankToReceiveWithdraw"); + $labelofbankfield = "BankToReceiveWithdraw"; + if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer'; + print $langs->trans($labelofbankfield); print ''; print ''; if ($acc->id > 0) @@ -230,9 +239,13 @@ if ($id > 0 || $ref) print ''; print ''; - print $langs->trans("WithdrawalFile").''; + $labelfororderfield = 'WithdrawalFile'; + if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile'; + print $langs->trans($labelfororderfield).''; $relativepath = 'receipts/'.$object->ref.'.xml'; - print ''.$relativepath.''; + $modulepart = 'prelevement'; + if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer'; + print ''.$relativepath.''; print ''; print '
'; @@ -290,7 +303,7 @@ if ($id > 0 || $ref) print $form->selectDate('', '', '', '', '', "infocredit", 1, 1); print ''; print ''; - print '
'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice"); + print '
'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice").'
'; print '
'; print ''; print '
'; @@ -403,15 +416,26 @@ if ($id > 0 || $ref) print ''.price($obj->amount)."\n"; - print ''; + print ''; if ($obj->statut == 3) { print ''.$langs->trans("StatusRefused").''; - } - else - { - print " "; + } else { + if ($object->statut == BonPrelevement::STATUS_CREDITED) + { + if ($obj->statut == 2) { + if ($user->rights->prelevement->bons->credit) + { + //print ''.$langs->trans("StandingOrderReject").''; + print ''.$langs->trans("StandingOrderReject").''; + } else { + //print ''.$langs->trans("StandingOrderReject").''; + } + } + } else { + //print ''.$langs->trans("StandingOrderReject").''; + } } print ''; @@ -442,9 +466,7 @@ if ($id > 0 || $ref) print ''; $db->free($result); - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 0c21a3e6d2b..067dd33cd81 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -28,9 +28,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; @@ -66,6 +68,9 @@ class BonPrelevement extends CommonObject public $emetteur_bic; public $emetteur_ics; + public $date_trans; + public $user_trans; + public $total; public $fetched; public $statut; // 0-Wait, 1-Trans, 2-Done @@ -118,7 +123,7 @@ class BonPrelevement extends CommonObject /** * Add invoice to withdrawal * - * @param int $facture_id id invoice to add + * @param int $invoice_id id invoice to add * @param int $client_id id invoice customer * @param string $client_nom customer name * @param int $amount amount of invoice @@ -126,14 +131,16 @@ class BonPrelevement extends CommonObject * @param string $code_guichet code of bank's office * @param string $number bank account number * @param string $number_key number key of account number + * @param string $type 'debit-order' or 'bank-transfer' * @return int >0 if OK, <0 if KO */ - public function AddFacture($facture_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key) + public function AddFacture($invoice_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key, $type = 'debit-order') { // phpcs:enable $result = 0; $line_id = 0; + // Add lines $result = $this->addline($line_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key); if ($result == 0) @@ -141,33 +148,31 @@ class BonPrelevement extends CommonObject if ($line_id > 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_facture ("; - $sql .= "fk_facture"; + if ($type != 'bank-transfer') { + $sql .= "fk_facture"; + } else { + $sql .= "fk_facture_fourn"; + } $sql .= ",fk_prelevement_lignes"; $sql .= ") VALUES ("; - $sql .= $facture_id; + $sql .= $invoice_id; $sql .= ", ".$line_id; $sql .= ")"; if ($this->db->query($sql)) { $result = 0; - } - else - { + } else { $result = -1; - dol_syslog(get_class($this)."::AddFacture Erreur $result"); + dol_syslog(get_class($this)."::AddFacture Error $result"); } - } - else - { + } else { $result = -2; - dol_syslog(get_class($this)."::AddFacture Erreur $result"); + dol_syslog(get_class($this)."::AddFacture Error $result"); } - } - else - { + } else { $result = -3; - dol_syslog(get_class($this)."::AddFacture Erreur $result"); + dol_syslog(get_class($this)."::AddFacture Error $result"); } return $result; @@ -208,14 +213,10 @@ class BonPrelevement extends CommonObject if ($resql) { $num = $this->db->num_rows($resql); - } - else - { + } else { $result = -1; } - } - else - { + } else { /* * No aggregate */ @@ -243,9 +244,7 @@ class BonPrelevement extends CommonObject { $line_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_lignes"); $result = 0; - } - else - { + } else { dol_syslog(get_class($this)."::addline Error -2"); $result = -2; } @@ -288,7 +287,8 @@ class BonPrelevement extends CommonObject $sql .= ", p.method_trans, p.fk_user_trans"; $sql .= ", p.date_credit as date_credit"; $sql .= ", p.fk_user_credit"; - $sql .= ", p.statut"; + $sql .= ", p.type"; + $sql .= ", p.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " WHERE p.entity IN (".getEntity('invoice').")"; if ($rowid > 0) $sql .= " AND p.rowid = ".$rowid; @@ -315,20 +315,19 @@ class BonPrelevement extends CommonObject $this->date_credit = $this->db->jdate($obj->date_credit); $this->user_credit = $obj->fk_user_credit; - $this->statut = $obj->statut; + $this->type = $obj->type; + + $this->status = $obj->status; + $this->statut = $obj->status; // For backward compatibility $this->fetched = 1; return 1; - } - else - { + } else { dol_syslog(get_class($this)."::Fetch Erreur aucune ligne retournee"); return -1; } - } - else - { + } else { return -2; } } @@ -396,17 +395,13 @@ class BonPrelevement extends CommonObject { $this->db->commit(); return 0; - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::set_credite ROLLBACK "); return -1; } - } - else - { + } else { dol_syslog(get_class($this)."::set_credite Ouverture transaction SQL impossible "); return -2; } @@ -414,7 +409,7 @@ class BonPrelevement extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Set direct debit order to "credited" status. + * Set direct debit or credit transfer order to "paid" status. * * @param User $user Id of user * @param int $date date of action @@ -429,132 +424,152 @@ class BonPrelevement extends CommonObject if ($this->fetched == 1) { - if ($date >= $this->date_trans) + if ($date < $this->date_trans) { - if ($this->db->begin()) - { - $sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_bons "; - $sql .= " SET fk_user_credit = ".$user->id; - $sql .= ", statut = ".self::STATUS_CREDITED; - $sql .= ", date_credit = '".$this->db->idate($date)."'"; - $sql .= " WHERE rowid=".$this->id; - $sql .= " AND entity = ".$conf->entity; - $sql .= " AND statut = ".self::STATUS_TRANSFERED; - - if ($this->db->query($sql)) - { - $langs->load('withdrawals'); - $subject = $langs->trans("InfoCreditSubject", $this->ref); - $message = $langs->trans("InfoCreditMessage", $this->ref, dol_print_date($date, 'dayhour')); - - //Add payment of withdrawal into bank - $bankaccount = $conf->global->PRELEVEMENT_ID_BANKACCOUNT; - $facs = array(); - $amounts = array(); - $amountsperthirdparty = array(); - - $facs = $this->getListInvoices(1); - - // Loop on each invoice. $facs=array(0=>id, 1=>amount requested) - $num = count($facs); - for ($i = 0; $i < $num; $i++) - { - $fac = new Facture($this->db); - $fac->fetch($facs[$i][0]); - $amounts[$fac->id] = $facs[$i][1]; - $amountsperthirdparty[$fac->socid][$fac->id] = $facs[$i][1]; - - $totalpaye = $fac->getSommePaiement(); - $totalcreditnotes = $fac->getSumCreditNotesUsed(); - $totaldeposits = $fac->getSumDepositsUsed(); - $alreadypayed = $totalpaye + $totalcreditnotes + $totaldeposits; - - if (price2num($alreadypayed + $facs[$i][1], 'MT') == $fac->total_ttc) { - $result = $fac->set_paid($user); - } - } - - // Make one payment per customer - foreach ($amountsperthirdparty as $thirdpartyid => $cursoramounts) - { - $paiement = new Paiement($this->db); - $paiement->datepaye = $date; - $paiement->amounts = $cursoramounts; // Array with detail of dispatching of payments for each invoice - $paiement->paiementid = 3; // - $paiement->num_payment = $this->ref; // Set ref of direct debit note - $paiement->num_paiement = $this->ref; // For backward compatibility - $paiement->id_prelevement = $this->id; - - $paiement_id = $paiement->create($user); - if ($paiement_id < 0) - { - dol_syslog(get_class($this)."::set_infocredit AddPayment Error"); - $error++; - } - else - { - $result = $paiement->addPaymentToBank($user, 'payment', '(WithdrawalPayment)', $bankaccount, '', ''); - if ($result < 0) - { - dol_syslog(get_class($this)."::set_infocredit AddPaymentToBank Error"); - $error++; - } - } - //var_dump($paiement->amounts); - //var_dump($thirdpartyid); - //var_dump($cursoramounts); - } - - // Update withdrawal line - // TODO: Translate to ligneprelevement.class.php - $sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes"; - $sql .= " SET statut = 2"; - $sql .= " WHERE fk_prelevement_bons = ".$this->id; - - if (!$this->db->query($sql)) - { - dol_syslog(get_class($this)."::set_infocredit Update lines Error"); - $error++; - } - } - else - { - dol_syslog(get_class($this)."::set_infocredit Update Bons Error"); - $error++; - } - - /* - * End of procedure - */ - if ($error == 0) - { - $this->date_credit = $date; - $this->statut = self::STATUS_CREDITED; - - $this->db->commit(); - return 0; - } - else - { - $this->db->rollback(); - dol_syslog("bon-prelevment::set_infocredit ROLLBACK "); - return -1; - } - } - else - { - dol_syslog(get_class($this)."::set_infocredit 1025 Open SQL transaction impossible "); - return -1025; - } - } - else - { - dol_syslog("bon-prelevment::set_infocredit 1027 Date de credit < Date de trans "); + $this->error = 'DateOfMovementLowerThanDateOfFileTransmission'; + dol_syslog("bon-prelevment::set_infocredit 1027 ".$this->error); return -1027; } - } - else - { + + $this->db->begin(); + + $sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_bons "; + $sql .= " SET fk_user_credit = ".$user->id; + $sql .= ", statut = ".self::STATUS_CREDITED; + $sql .= ", date_credit = '".$this->db->idate($date)."'"; + $sql .= " WHERE rowid=".$this->id; + $sql .= " AND entity = ".$conf->entity; + $sql .= " AND statut = ".self::STATUS_TRANSFERED; + + $resql = $this->db->query($sql); + if ($resql) + { + $langs->load('withdrawals'); + $subject = $langs->trans("InfoCreditSubject", $this->ref); + $message = $langs->trans("InfoCreditMessage", $this->ref, dol_print_date($date, 'dayhour')); + + //Add payment of withdrawal into bank + $bankaccount = $conf->global->PRELEVEMENT_ID_BANKACCOUNT; + $facs = array(); + $amounts = array(); + $amountsperthirdparty = array(); + + $facs = $this->getListInvoices(1); + + // Loop on each invoice. $facs=array(0=>id, 1=>amount requested) + $num = count($facs); + for ($i = 0; $i < $num; $i++) + { + if ($this->type == 'bank-transfer') { + $fac = new FactureFournisseur($this->db); + } else { + $fac = new Facture($this->db); + } + + $result = $fac->fetch($facs[$i][0]); + + $amounts[$fac->id] = $facs[$i][1]; + $amountsperthirdparty[$fac->socid][$fac->id] = $facs[$i][1]; + + $totalpaye = $fac->getSommePaiement(); + $totalcreditnotes = $fac->getSumCreditNotesUsed(); + $totaldeposits = $fac->getSumDepositsUsed(); + $alreadypayed = $totalpaye + $totalcreditnotes + $totaldeposits; + + // @TODO Move this after creation of payment + if (price2num($alreadypayed + $facs[$i][1], 'MT') == $fac->total_ttc) { + $result = $fac->set_paid($user); + if ($result < 0) { + $this->error = $fac->error; + $this->errors = $fac->errors; + } + } + } + //var_dump($amountsperthirdparty);exit; + + // Make one payment per customer + foreach ($amountsperthirdparty as $thirdpartyid => $cursoramounts) + { + if ($this->type == 'bank-transfer') { + $paiement = new PaiementFourn($this->db); + } else { + $paiement = new Paiement($this->db); + } + $paiement->datepaye = $date; + $paiement->amounts = $cursoramounts; // Array with detail of dispatching of payments for each invoice + + if ($this->type == 'bank-transfer') { + $paiement->paiementid = 2; + $paiement->paiementcode = 'VIR'; + } else { + $paiement->paiementid = 3; + $paiement->paiementcode = 'PRE'; + } + + $paiement->num_payment = $this->ref; // Set ref of direct debit note + $paiement->id_prelevement = $this->id; + + $paiement_id = $paiement->create($user); // This use ->paiementid, that is ID of payment mode + if ($paiement_id < 0) + { + $error++; + $this->error = $paiement->error; + $this->errors = $paiement->errors; + dol_syslog(get_class($this)."::set_infocredit AddPayment Error ".$this->error); + } else { + if ($this->type == 'bank-transfer') { + $modeforaddpayment = 'payment_supplier'; + } else { + $modeforaddpayment = 'payment'; + } + + $result = $paiement->addPaymentToBank($user, $modeforaddpayment, '(WithdrawalPayment)', $bankaccount, '', ''); + if ($result < 0) + { + $error++; + $this->error = $paiement->error; + $this->errors = $paiement->errors; + dol_syslog(get_class($this)."::set_infocredit AddPaymentToBank Error ".$this->error); + } + } + //var_dump($paiement->amounts); + //var_dump($thirdpartyid); + //var_dump($cursoramounts); + } + + // Update withdrawal line + // TODO: Translate to ligneprelevement.class.php + if (!$error) { + $sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes"; + $sql .= " SET statut = 2"; + $sql .= " WHERE fk_prelevement_bons = ".$this->id; + + if (!$this->db->query($sql)) { + dol_syslog(get_class($this)."::set_infocredit Update lines Error"); + $error++; + } + } + } else { + $this->error = $this->db->lasterror(); + dol_syslog(get_class($this)."::set_infocredit Update Bons Error"); + $error++; + } + + /* + * End of procedure + */ + if ($error == 0) + { + $this->date_credit = $date; + $this->statut = self::STATUS_CREDITED; + + $this->db->commit(); + return 0; + } else { + $this->db->rollback(); + return -1; + } + } else { return -1026; } } @@ -582,7 +597,7 @@ class BonPrelevement extends CommonObject $sql .= " SET fk_user_trans = ".$user->id; $sql .= " , date_trans = '".$this->db->idate($date)."'"; $sql .= " , method_trans = ".$method; - $sql .= " , statut = 1"; + $sql .= " , statut = ".self::STATUS_TRANSFERED; $sql .= " WHERE rowid = ".$this->id; $sql .= " AND entity = ".$conf->entity; $sql .= " AND statut = 0"; @@ -596,9 +611,7 @@ class BonPrelevement extends CommonObject $message .= $langs->trans("InfoTransData", price($this->amount), $this->methodes_trans[$this->method_trans], dol_print_date($date, 'day')); // TODO Call trigger to create a notification using notification module - } - else - { + } else { $error++; } @@ -606,20 +619,17 @@ class BonPrelevement extends CommonObject { $this->date_trans = $date; $this->statut = 1; + $this->user_trans = $user->id; $this->db->commit(); return 0; - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::set_infotrans ROLLBACK", LOG_ERR); return -1; } - } - else - { + } else { dol_syslog(get_class($this)."::set_infotrans Ouverture transaction SQL impossible", LOG_CRIT); return -2; } @@ -638,10 +648,14 @@ class BonPrelevement extends CommonObject $arr = array(); /* - * Returns all invoices presented - * within a withdrawal receipt + * Returns all invoices presented within same order */ - $sql = "SELECT fk_facture"; + $sql = "SELECT "; + if ($this->type == 'bank-transfer') { + $sql .= " pf.fk_facture_fourn"; + } else { + $sql .= " pf.fk_facture"; + } if ($amounts) $sql .= ", SUM(pl.amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl"; @@ -650,7 +664,13 @@ class BonPrelevement extends CommonObject $sql .= " AND pl.fk_prelevement_bons = p.rowid"; $sql .= " AND p.rowid = ".$this->id; $sql .= " AND p.entity = ".$conf->entity; - if ($amounts) $sql .= " GROUP BY fk_facture"; + if ($amounts) { + if ($this->type == 'bank-transfer') { + $sql .= " GROUP BY fk_facture_fourn"; + } else { + $sql .= " GROUP BY fk_facture"; + } + } $resql = $this->db->query($sql); if ($resql) @@ -664,8 +684,7 @@ class BonPrelevement extends CommonObject { $row = $this->db->fetch_row($resql); if (!$amounts) $arr[$i] = $row[0]; - else - { + else { $arr[$i] = array( $row[0], $row[1] @@ -675,9 +694,7 @@ class BonPrelevement extends CommonObject } } $this->db->free($resql); - } - else - { + } else { dol_syslog(get_class($this)."::getListInvoices Erreur"); } @@ -686,24 +703,36 @@ class BonPrelevement extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Returns amount of withdrawal + * Returns amount waiting for direct debit payment or credit transfer payment * - * @return double Total amount + * @param string $mode 'direct-debit' or 'bank-transfer' + * @return double global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) + { + $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; + } + if ($mode != 'bank-transfer') { + $sql .= " AND f.rowid = pfd.fk_facture"; + } else { + $sql .= " AND f.rowid = pfd.fk_facture_fourn"; + } $sql .= " AND f.paye = 0"; $sql .= " AND pfd.traite = 0"; + $sql .= " AND pfd.ext_payment_id IS NULL"; $sql .= " AND f.total_ttc > 0"; $resql = $this->db->query($sql); @@ -714,39 +743,57 @@ class BonPrelevement extends CommonObject $this->db->free($resql); return $obj->nb; - } - else - { + } else { $error = 1; dol_syslog(get_class($this)."::SommeAPrelever Erreur -1"); dol_syslog($this->db->error()); + + return -1; } } + /** + * Get number of invoices waiting for payment + * + * @param string $mode 'direct-debit' or 'bank-transfer' + * @return int NbFactureAPrelever($mode); + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Get number of invoices to withdrawal - * TODO delete params banque and agence when not necesary + * Get number of invoices to pay * - * @param int $banque dolibarr mysoc bank - * @param int $agence dolibarr mysoc agence + * @param string $type 'direct-debit' or 'bank-transfer' * @return int global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; } - $sql .= " AND f.rowid = pfd.fk_facture"; + if ($type == 'bank-transfer') { + $sql .= " AND f.rowid = pfd.fk_facture_fourn"; + } else { + $sql .= " AND f.rowid = pfd.fk_facture"; + } $sql .= " AND pfd.traite = 0"; + $sql .= " AND pfd.ext_payment_id IS NULL"; $sql .= " AND f.total_ttc > 0"; dol_syslog(get_class($this)."::NbFactureAPrelever"); @@ -759,9 +806,7 @@ class BonPrelevement extends CommonObject $this->db->free($resql); return $obj->nb; - } - else - { + } else { $this->error = get_class($this)."::NbFactureAPrelever Erreur -1 sql=".$this->db->error(); return -1; } @@ -770,18 +815,19 @@ class BonPrelevement extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Create a withdraw - * TODO delete params banque and agence when not necesary + * Create a direct debit order or a credit transfer order + * TODO delete params banque and agence when not necessary * - * @param int $banque dolibarr mysoc bank - * @param int $agence dolibarr mysoc bank office (guichet) - * @param string $mode real=do action, simu=test only - * @param string $format FRST, RCUR or ALL + * @param int $banque dolibarr mysoc bank + * @param int $agence dolibarr mysoc bank office (guichet) + * @param string $mode real=do action, simu=test only + * @param string $format FRST, RCUR or ALL * @param string $executiondate Date to execute the transfer * @param int $notrigger Disable triggers - * @return int <0 if KO, nbre of invoice withdrawed if OK + * @param string $type 'direct-debit' or 'bank-transfer' + * @return int <0 if KO, No of invoice included into file if OK */ - public function Create($banque = 0, $agence = 0, $mode = 'real', $format = 'ALL', $executiondate = '', $notrigger = 0) + public function create($banque = 0, $agence = 0, $mode = 'real', $format = 'ALL', $executiondate = '', $notrigger = 0, $type = 'direct-debit') { // phpcs:enable global $conf, $langs, $user; @@ -791,7 +837,12 @@ class BonPrelevement extends CommonObject require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"; require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"; - if (empty($format)) return 'ErrorBadParametersForDirectDebitFileCreate'; + if ($type != 'bank-transfer') { + if (empty($format)) { + $this->error = 'ErrorBadParametersForDirectDebitFileCreate'; + return -1; + } + } $error = 0; @@ -818,19 +869,25 @@ class BonPrelevement extends CommonObject $sql .= ", pfd.code_banque, pfd.code_guichet, pfd.number, pfd.cle_rib"; $sql .= ", pfd.amount"; $sql .= ", s.nom as name"; - $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; + if ($type != 'bank-transfer') { + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; + } else { + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; + } $sql .= ", ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; - $sql .= " WHERE f.rowid = pfd.fk_facture"; - $sql .= " AND f.entity IN (".getEntity('invoice').')'; + $sql .= " WHERE f.entity IN (".getEntity('invoice').')'; + if ($type != 'bank-transfer') { + $sql .= " AND f.rowid = pfd.fk_facture"; + } else { + $sql .= " AND f.rowid = pfd.fk_facture_fourn"; + } $sql .= " AND s.rowid = f.fk_soc"; - //if ($banque || $agence) $sql.= " AND s.rowid = sr.fk_soc"; - $sql .= " AND f.fk_statut = 1"; + $sql .= " AND f.fk_statut = 1"; // Invoice validated $sql .= " AND f.paye = 0"; $sql .= " AND pfd.traite = 0"; $sql .= " AND f.total_ttc > 0"; - //if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'"; - //if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'"; + $sql .= " AND pfd.ext_payment_id IS NULL"; dol_syslog(__METHOD__."::Read invoices, sql=".$sql, LOG_DEBUG); @@ -844,13 +901,17 @@ class BonPrelevement extends CommonObject { $row = $this->db->fetch_row($resql); $factures[$i] = $row; // All fields + if ($row[7] == 0) { + $error++; + dol_syslog(__METHOD__."::Read invoices error Found a null invoice", LOG_ERR); + $this->invoice_in_error[$row[0]] = "Error for invoice id ".$row[0].", found a null amount"; + break; + } $i++; } $this->db->free($resql); dol_syslog(__METHOD__."::Read invoices, ".$i." invoices to withdraw", LOG_DEBUG); - } - else - { + } else { $error++; dol_syslog(__METHOD__."::Read invoices error ".$this->db->error(), LOG_ERR); } @@ -861,30 +922,36 @@ class BonPrelevement extends CommonObject require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; $soc = new Societe($this->db); - // Check RIB + // Check BAN $i = 0; - dol_syslog(__METHOD__."::Check RIB", LOG_DEBUG); + dol_syslog(__METHOD__."::Check BAN", LOG_DEBUG); if (count($factures) > 0) { foreach ($factures as $key => $fac) { - $fact = new Facture($this->db); - $resfetch = $fact->fetch($fac[0]); + if ($type != 'bank-transfer') { + $tmpinvoice = new Facture($this->db); + } else { + $tmpinvoice = new FactureFournisseur($this->db); + } + $resfetch = $tmpinvoice->fetch($fac[0]); if ($resfetch >= 0) // Field 0 of $fac is rowid of invoice { - if ($soc->fetch($fact->socid) >= 0) + if ($soc->fetch($tmpinvoice->socid) >= 0) { $bac = new CompanyBankAccount($this->db); $bac->fetch(0, $soc->id); - if ($format == 'FRST' && $bac->frstrecur != 'FRST') - { - continue; - } - if ($format == 'RCUR' && ($bac->frstrecur != 'RCUR' && $bac->frstrecur != 'RECUR')) - { - continue; + if ($type != 'bank-transfer') { + if ($format == 'FRST' && $bac->frstrecur != 'FRST') + { + continue; + } + if ($format == 'RCUR' && ($bac->frstrecur != 'RCUR' && $bac->frstrecur != 'RECUR')) + { + continue; + } } if ($bac->verif() >= 1) @@ -894,35 +961,27 @@ class BonPrelevement extends CommonObject $factures_prev_id[$i] = $fac[0]; $i++; //dol_syslog(__METHOD__."::RIB is ok", LOG_DEBUG); + } else { + dol_syslog(__METHOD__."::Check BAN Error on default bank number IBAN/BIC for thirdparty reported by verif() ".$tmpinvoice->socid." ".$soc->name, LOG_WARNING); + $this->invoice_in_error[$fac[0]] = "Error on default bank number IBAN/BIC for invoice ".$tmpinvoice->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0); + $this->thirdparty_in_error[$soc->id] = "Error on default bank number IBAN/BIC for invoice ".$tmpinvoice->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0); } - else - { - dol_syslog(__METHOD__."::Check RIB Error on default bank number IBAN/BIC for thirdparty reported by verif() ".$fact->socid." ".$soc->name, LOG_WARNING); - $this->invoice_in_error[$fac[0]] = "Error on default bank number IBAN/BIC for invoice ".$fact->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0); - $this->thirdparty_in_error[$soc->id] = "Error on default bank number IBAN/BIC for invoice ".$fact->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0); - } + } else { + dol_syslog(__METHOD__."::Check BAN Failed to read company", LOG_WARNING); } - else - { - dol_syslog(__METHOD__."::Check RIB Failed to read company", LOG_WARNING); - } - } - else - { - dol_syslog(__METHOD__."::Check RIB Failed to read invoice", LOG_WARNING); + } else { + dol_syslog(__METHOD__."::Check BAN Failed to read invoice", LOG_WARNING); } } - } - else - { - dol_syslog(__METHOD__."::Check RIB No invoice to process", LOG_WARNING); + } else { + dol_syslog(__METHOD__."::Check BAN No invoice to process", LOG_WARNING); } } $ok = 0; // Withdraw invoices in factures_prev array - $out = count($factures_prev)." invoices will be withdrawn."; + $out = count($factures_prev)." invoices will be included."; //print $out."\n"; dol_syslog($out); @@ -937,29 +996,25 @@ class BonPrelevement extends CommonObject if (count($factures_prev) > 0) { - if ($mode == 'real') - { + if ($mode == 'real') { $ok = 1; - } - else - { - print $langs->trans("ModeWarning"); //"Option for real mode was not set, we stop after this simulation\n"; + } else { + print $langs->trans("ModeWarning"); // "Option for real mode was not set, we stop after this simulation\n"; } } - if ($ok) { /* * We are in real mode. - * We create withdraw receipt and build withdraw into disk + * We create order and build file into disk */ $this->db->begin(); $now = dol_now(); /* - * Traitements + * Process order generation */ if (!$error) { @@ -971,7 +1026,7 @@ class BonPrelevement extends CommonObject $sql .= " AND entity = ".$conf->entity; $sql .= " ORDER BY ref DESC LIMIT 1"; - dol_syslog(get_class($this)."::Create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -979,18 +1034,23 @@ class BonPrelevement extends CommonObject $row = $this->db->fetch_row($resql); $ref = "T".$ref.str_pad(dol_substr("00".intval($row[0]) + 1, 0, 2), 2, "0", STR_PAD_LEFT); - $dir = $conf->prelevement->dir_output.'/receipts'; + if ($type != 'bank-transfer') { + $dir = $conf->prelevement->dir_output.'/receipts'; + } else { + $dir = $conf->paymentbybanktransfer->dir_output.'/receipts'; + } if (!is_dir($dir)) dol_mkdir($dir); $this->filename = $dir.'/'.$ref.'.xml'; // Create withdraw receipt in database $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons ("; - $sql .= " ref, entity, datec"; + $sql .= "ref, entity, datec, type"; $sql .= ") VALUES ("; $sql .= "'".$this->db->escape($ref)."'"; $sql .= ", ".$conf->entity; $sql .= ", '".$this->db->idate($now)."'"; + $sql .= ", '".($type == 'bank-transfer' ? 'bank-transfer' : 'debit-order')."'"; $sql .= ")"; $resql = $this->db->query($sql); @@ -999,15 +1059,11 @@ class BonPrelevement extends CommonObject $prev_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_bons"); $this->id = $prev_id; $this->ref = $ref; - } - else - { + } else { $error++; dol_syslog(__METHOD__."::Create withdraw receipt ".$this->db->lasterror(), LOG_ERR); } - } - else - { + } else { $error++; dol_syslog(__METHOD__."::Get last withdraw receipt ".$this->db->lasterror(), LOG_ERR); } @@ -1015,6 +1071,12 @@ class BonPrelevement extends CommonObject if (!$error) { + if ($type != 'bank-transfer') { + $fact = new Facture($this->db); + } else { + $fact = new FactureFournisseur($this->db); + } + /* * Create withdrawal receipt in database */ @@ -1023,21 +1085,26 @@ class BonPrelevement extends CommonObject foreach ($factures_prev as $fac) // Add a link in database for each invoice { // Fetch invoice - $fact = new Facture($this->db); - $fact->fetch($fac[0]); + $result = $fact->fetch($fac[0]); + if ($result < 0) { + $this->error = 'ERRORBONPRELEVEMENT Failed to load invoice with id '.$fac[0]; + break; + } + /* - * Add standing order - * + * Add standing order. This add record into llx_prelevement_lignes * + * $fac[0] : invoice_id + * $fac[1] : ??? + * $fac[2] : third party id * $fac[3] : banque * $fac[4] : guichet * $fac[5] : number * $fac[6] : cle rib * $fac[7] : amount * $fac[8] : client nom - * $fac[2] : client id */ - $ri = $this->AddFacture($fac[0], $fac[2], $fac[8], $fac[7], $fac[3], $fac[4], $fac[5], $fac[6]); + $ri = $this->AddFacture($fac[0], $fac[2], $fac[8], $fac[7], $fac[3], $fac[4], $fac[5], $fac[6], $type); if ($ri <> 0) { $error++; @@ -1050,13 +1117,11 @@ class BonPrelevement extends CommonObject $sql .= ", fk_prelevement_bons = ".$this->id; $sql .= " WHERE rowid = ".$fac[1]; - dol_syslog(__METHOD__."::Update Orders::Sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; - dol_syslog(__METHOD__."::Update Orders::Error=".$this->db->error(), LOG_ERR); + dol_syslog(__METHOD__."::Update Error=".$this->db->error(), LOG_ERR); } } } @@ -1065,11 +1130,10 @@ class BonPrelevement extends CommonObject if (!$error) { /* - * Create direct debit order in a XML file + * Create file of type='direct-debit' for direct debit order or type='bank-transfer' for credit transfer into a XML file */ - dol_syslog(__METHOD__."::Init withdraw receipt for ".count($factures_prev)." invoices", LOG_DEBUG); - + dol_syslog(__METHOD__."::Init direct debit or credit transfer file for ".count($factures_prev)." invoices", LOG_DEBUG); if (count($factures_prev) > 0) { @@ -1077,6 +1141,9 @@ class BonPrelevement extends CommonObject $this->reference_remise = $ref; $id = $conf->global->PRELEVEMENT_ID_BANKACCOUNT; + if ($type == 'bank-transfer') { + $id = $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT; + } $account = new Account($this->db); if ($account->fetch($id) > 0) { @@ -1095,32 +1162,45 @@ class BonPrelevement extends CommonObject $this->factures = $factures_prev_id; $this->context['factures_prev'] = $factures_prev; - // Generation of SEPA file $this->filename - $this->generate($format, $executiondate); + // Generation of direct debit or credti transfer file $this->filename (May be a SEPA file for european countries) + // This also set the property $this->total with amount that is included into file + $result = $this->generate($format, $executiondate, $type); + if ($result < 0) { + /*var_dump($this->error); + var_dump($this->invoice_in_error); */ + $error++; + } } dol_syslog(__METHOD__."::End withdraw receipt, file ".$this->filename, LOG_DEBUG); } - //var_dump($factures_prev);exit; + //var_dump($this->total);exit; /* - * Update total + * Update total defined after generation of file */ - $sql = "UPDATE ".MAIN_DB_PREFIX."prelevement_bons"; - $sql .= " SET amount = ".price2num($this->total); - $sql .= " WHERE rowid = ".$this->id; - $sql .= " AND entity = ".$conf->entity; + if (!$error) { + $sql = "UPDATE ".MAIN_DB_PREFIX."prelevement_bons"; + $sql .= " SET amount = ".price2num($this->total); + $sql .= " WHERE rowid = ".$this->id; + $sql .= " AND entity = ".$conf->entity; - $resql = $this->db->query($sql); - if (!$resql) - { - $error++; - dol_syslog(__METHOD__."::Error update total: ".$this->db->error(), LOG_ERR); + $resql = $this->db->query($sql); + if (!$resql) + { + $error++; + dol_syslog(__METHOD__."::Error update total: ".$this->db->error(), LOG_ERR); + } } if (!$error && !$notrigger) { + $triggername = 'DIRECT_DEBIT_ORDER_CREATE'; + if ($type != 'bank-transfer') { + $triggername = 'CREDIT_TRANSFER_ORDER_CREATE'; + } + // Call trigger - $result = $this->call_trigger('DIRECT_DEBIT_ORDER_CREATE', $user); + $result = $this->call_trigger($triggername, $user); if ($result < 0) $error++; // End call triggers } @@ -1128,16 +1208,12 @@ class BonPrelevement extends CommonObject if (!$error) { $this->db->commit(); - } - else - { + return count($factures_prev); + } else { $this->db->rollback(); + return -1; } - - return count($factures_prev); - } - else - { + } else { return 0; } } @@ -1159,8 +1235,12 @@ class BonPrelevement extends CommonObject if (!$notrigger) { + $triggername = 'DIRECT_DEBIT_ORDER_DELETE'; + if ($this->type == 'bank-transfer') { + $triggername = 'PAYMENTBYBANKTRANFER_DELETE'; + } // Call trigger - $result = $this->call_trigger('DIRECT_DEBIT_ORDER_DELETE', $user); + $result = $this->call_trigger($triggername, $user); if ($result < 0) $error++; // End call triggers } @@ -1197,9 +1277,7 @@ class BonPrelevement extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1224,7 +1302,12 @@ class BonPrelevement extends CommonObject $result = ''; - $label = ''.$langs->trans("ShowWithdraw").''; + $labeltoshow = 'PaymentByDirectDebit'; + if ($this->type == 'bank-transfer') { + $labeltoshow = 'PaymentByBankTransfer'; + } + + $label = ''.$langs->trans($labeltoshow).''; $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; if (isset($this->statut)) { @@ -1232,6 +1315,9 @@ class BonPrelevement extends CommonObject } $url = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id; + if ($this->type == 'bank-transfer') { + $url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/card.php?id='.$this->id; + } if ($option != 'nolink') { @@ -1258,8 +1344,7 @@ class BonPrelevement extends CommonObject $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $linkclose = $hookmanager->resPrint; */ - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -1272,7 +1357,7 @@ class BonPrelevement extends CommonObject //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); global $action, $hookmanager; - $hookmanager->initHooks(array('myobjectdao')); + $hookmanager->initHooks(array('banktransferdao')); $parameters = array('id'=>$this->id, 'getnomurl'=>$result); $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $result = $hookmanager->resPrint; @@ -1300,9 +1385,7 @@ class BonPrelevement extends CommonObject if ($this->db->query($sql)) { return 0; - } - else - { + } else { return -1; } } @@ -1326,9 +1409,7 @@ class BonPrelevement extends CommonObject if ($this->db->query($sql)) { return 0; - } - else - { + } else { return -1; } } @@ -1358,9 +1439,7 @@ class BonPrelevement extends CommonObject if ($this->db->query($sql)) { $result = 0; - } - else - { + } else { $result = -1; dol_syslog(get_class($this)."::AddNotification Error $result"); } @@ -1371,17 +1450,18 @@ class BonPrelevement extends CommonObject /** - * Generate a withdrawal file. + * Generate a direct debit or credit transfer file. * Generation Formats: * - Europe: SEPA (France: CFONB no more supported, Spain: AEB19 if external module EsAEB is enabled) * - Others countries: Warning message * File is generated with name this->filename * - * @param string $format FRST, RCUR or ALL - * @param string $executiondate Date to execute transfer - * @return int 0 if OK, <0 if KO + * @param string $format FRST, RCUR or ALL + * @param string $executiondate Date to execute transfer + * @param string $type 'direct-debit' or 'bank-transfer' + * @return int >=0 if OK, <0 if KO */ - public function generate($format = 'ALL', $executiondate = '') + public function generate($format = 'ALL', $executiondate = '', $type = 'direct-debit') { global $conf, $langs, $mysoc; @@ -1389,7 +1469,7 @@ class BonPrelevement extends CommonObject $result = 0; - dol_syslog(get_class($this)."::generate build file ".$this->filename); + dol_syslog(get_class($this)."::generate build file=".$this->filename." type=".$type); $this->file = fopen($this->filename, "w"); if (empty($this->file)) @@ -1399,165 +1479,334 @@ class BonPrelevement extends CommonObject } $found = 0; + $this->total = 0; // Build file for European countries if ($mysoc->isInEEC()) { $found++; - /** - * SECTION CREATION FICHIER SEPA - */ - // SEPA Initialisation - $CrLf = "\n"; + if ($type != 'bank-transfer') { + /** + * SECTION CREATION FICHIER SEPA - DIRECT DEBIT + */ + // SEPA Initialisation + $CrLf = "\n"; - $now = dol_now(); + $now = dol_now(); - $dateTime_ECMA = dol_print_date($now, '%Y-%m-%dT%H:%M:%S'); + $dateTime_ECMA = dol_print_date($now, '%Y-%m-%dT%H:%M:%S'); - $date_actu = $now; - if (!empty($executiondate)) $date_actu = $executiondate; + $date_actu = $now; + if (!empty($executiondate)) $date_actu = $executiondate; - $dateTime_YMD = dol_print_date($date_actu, '%Y%m%d'); - $dateTime_YMDHMS = dol_print_date($date_actu, '%Y%m%d%H%M%S'); - $fileDebiteurSection = ''; - $fileEmetteurSection = ''; - $i = 0; - $this->total = 0; + $dateTime_YMD = dol_print_date($date_actu, '%Y%m%d'); + $dateTime_YMDHMS = dol_print_date($date_actu, '%Y%m%d%H%M%S'); + $fileDebiteurSection = ''; + $fileEmetteurSection = ''; + $i = 0; - /* - * section Debiteur (sepa Debiteurs bloc lines) - */ + /* + * Section Debitor (sepa Debiteurs bloc lines) + */ - $sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,"; - $sql .= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,"; - $sql .= " f.ref as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum, rib.date_rum"; - $sql .= " FROM"; - $sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; - $sql .= " ".MAIN_DB_PREFIX."facture as f,"; - $sql .= " ".MAIN_DB_PREFIX."prelevement_facture as pf,"; - $sql .= " ".MAIN_DB_PREFIX."societe as soc,"; - $sql .= " ".MAIN_DB_PREFIX."c_country as c,"; - $sql .= " ".MAIN_DB_PREFIX."societe_rib as rib"; - $sql .= " WHERE pl.fk_prelevement_bons = ".$this->id; - $sql .= " AND pl.rowid = pf.fk_prelevement_lignes"; - $sql .= " AND pf.fk_facture = f.rowid"; - $sql .= " AND soc.fk_pays = c.rowid"; - $sql .= " AND soc.rowid = f.fk_soc"; - $sql .= " AND rib.fk_soc = f.fk_soc"; - $sql .= " AND rib.default_rib = 1"; - $sql .= " AND rib.type = 'ban'"; - //print $sql; + $sql = "SELECT soc.rowid as socid, soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,"; + $sql .= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,"; + $sql .= " f.ref as fac, pf.fk_facture as idfac,"; + $sql .= " rib.rowid, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum, rib.date_rum"; + $sql .= " FROM"; + $sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; + $sql .= " ".MAIN_DB_PREFIX."facture as f,"; + $sql .= " ".MAIN_DB_PREFIX."prelevement_facture as pf,"; + $sql .= " ".MAIN_DB_PREFIX."societe as soc,"; + $sql .= " ".MAIN_DB_PREFIX."c_country as c,"; + $sql .= " ".MAIN_DB_PREFIX."societe_rib as rib"; + $sql .= " WHERE pl.fk_prelevement_bons = ".$this->id; + $sql .= " AND pl.rowid = pf.fk_prelevement_lignes"; + $sql .= " AND pf.fk_facture = f.rowid"; + $sql .= " AND f.fk_soc = soc.rowid"; + $sql .= " AND soc.fk_pays = c.rowid"; + $sql .= " AND rib.fk_soc = f.fk_soc"; + $sql .= " AND rib.default_rib = 1"; + $sql .= " AND rib.type = 'ban'"; - // Define $fileDebiteurSection. One section DrctDbtTxInf per invoice. - $resql = $this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - while ($i < $num) + // Define $fileDebiteurSection. One section DrctDbtTxInf per invoice. + $resql = $this->db->query($sql); + if ($resql) { - $obj = $this->db->fetch_object($resql); - $daterum = (!empty($obj->date_rum)) ? $this->db->jdate($obj->date_rum) : $this->db->jdate($obj->datec); - $fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum); - $this->total = $this->total + $obj->somme; - $i++; + $cachearraytotestduplicate = array(); + + $num = $this->db->num_rows($resql); + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + + if (!empty($cachearraytotestduplicate[$obj->idfac])) { + $this->error = $langs->trans('ErrorCompanyHasDuplicateDefaultBAN', $obj->socid); + $this->invoice_in_error[$obj->idfac] = $this->error; + $result = -2; + break; + } + $cachearraytotestduplicate[$obj->idfac] = $obj->rowid; + + $daterum = (!empty($obj->date_rum)) ? $this->db->jdate($obj->date_rum) : $this->db->jdate($obj->datec); + $fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum, $type); + $this->total = $this->total + $obj->somme; + $i++; + } + $nbtotalDrctDbtTxInf = $i; + } else { + $this->error = $this->db->lasterror(); + fputs($this->file, 'ERROR DEBITOR '.$sql.$CrLf); // DEBITOR = Customers + $result = -2; } - $nbtotalDrctDbtTxInf = $i; - } - else - { - fputs($this->file, 'ERROR DEBITOR '.$sql.$CrLf); // DEBITOR = Customers - $result = -2; - } - // Define $fileEmetteurSection. Start of bloc PmtInf. Will contains all DrctDbtTxInf - if ($result != -2) - { - $fileEmetteurSection .= $this->EnregEmetteurSEPA($conf, $date_actu, $nbtotalDrctDbtTxInf, $this->total, $CrLf, $format); - } - else - { - fputs($this->file, 'ERROR CREDITOR'.$CrLf); // CREDITOR = My company - } + // Define $fileEmetteurSection. Start of bloc PmtInf. Will contains all $nbtotalDrctDbtTxInf + if ($result != -2) + { + $fileEmetteurSection .= $this->EnregEmetteurSEPA($conf, $date_actu, $nbtotalDrctDbtTxInf, $this->total, $CrLf, $format, $type); + } - /** - * SECTION CREATION SEPA FILE - */ - // SEPA File Header - fputs($this->file, '<'.'?xml version="1.0" encoding="UTF-8" standalone="yes"?'.'>'.$CrLf); - fputs($this->file, ''.$CrLf); - fputs($this->file, ' '.$CrLf); - // SEPA Group header - fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.('PREL'.$dateTime_YMD.'/REF'.$this->id).''.$CrLf); - fputs($this->file, ' '.$dateTime_ECMA.''.$CrLf); - fputs($this->file, ' '.$i.''.$CrLf); - fputs($this->file, ' '.$this->total.''.$CrLf); - fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.strtoupper(dol_string_unaccent($this->raison_sociale)).''.$CrLf); - fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.$conf->global->PRELEVEMENT_ICS.''.$CrLf); - fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.$CrLf); - // SEPA File Emetteur - if ($result != -2) - { fputs($this-> file, $fileEmetteurSection); } - // SEPA File Debiteurs - if ($result != -2) - { fputs($this-> file, $fileDebiteurSection); } - // SEPA FILE FOOTER - fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.$CrLf); - fputs($this->file, ''.$CrLf); + /** + * SECTION CREATION SEPA FILE - ISO200022 + */ + // SEPA File Header + fputs($this->file, '<'.'?xml version="1.0" encoding="UTF-8" standalone="yes"?'.'>'.$CrLf); + fputs($this->file, ''.$CrLf); + fputs($this->file, ' '.$CrLf); + // SEPA Group header + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.('DD/'.$dateTime_YMD.'/REF'.$this->id).''.$CrLf); + fputs($this->file, ' '.$dateTime_ECMA.''.$CrLf); + fputs($this->file, ' '.$i.''.$CrLf); + fputs($this->file, ' '.$this->total.''.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.strtoupper(dol_string_unaccent($this->raison_sociale)).''.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$conf->global->PRELEVEMENT_ICS.''.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + // SEPA File Emetteur + if ($result != -2) + { fputs($this-> file, $fileEmetteurSection); } + // SEPA File Debiteurs + if ($result != -2) + { fputs($this-> file, $fileDebiteurSection); } + // SEPA FILE FOOTER + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ''.$CrLf); + } else { + /** + * SECTION CREATION FICHIER SEPA - CREDIT TRANSFER + */ + // SEPA Initialisation + $CrLf = "\n"; + + $now = dol_now(); + + $dateTime_ECMA = dol_print_date($now, '%Y-%m-%dT%H:%M:%S'); + + $date_actu = $now; + if (!empty($executiondate)) $date_actu = $executiondate; + + $dateTime_YMD = dol_print_date($date_actu, '%Y%m%d'); + $dateTime_YMDHMS = dol_print_date($date_actu, '%Y%m%d%H%M%S'); + $fileCrediteurSection = ''; + $fileEmetteurSection = ''; + $i = 0; + + /* + * Section Creditor (sepa Crediteurs bloc lines) + */ + + $sql = "SELECT soc.rowid as socid, soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,"; + $sql .= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,"; + $sql .= " f.ref as fac, pf.fk_facture_fourn as idfac,"; + $sql .= " rib.rowid, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum, rib.date_rum"; + $sql .= " FROM"; + $sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; + $sql .= " ".MAIN_DB_PREFIX."facture_fourn as f,"; + $sql .= " ".MAIN_DB_PREFIX."prelevement_facture as pf,"; + $sql .= " ".MAIN_DB_PREFIX."societe as soc,"; + $sql .= " ".MAIN_DB_PREFIX."c_country as c,"; + $sql .= " ".MAIN_DB_PREFIX."societe_rib as rib"; + $sql .= " WHERE pl.fk_prelevement_bons = ".$this->id; + $sql .= " AND pl.rowid = pf.fk_prelevement_lignes"; + $sql .= " AND pf.fk_facture_fourn = f.rowid"; + $sql .= " AND f.fk_soc = soc.rowid"; + $sql .= " AND soc.fk_pays = c.rowid"; + $sql .= " AND rib.fk_soc = f.fk_soc"; + $sql .= " AND rib.default_rib = 1"; + $sql .= " AND rib.type = 'ban'"; + + // Define $fileCrediteurSection. One section DrctDbtTxInf per invoice. + $resql = $this->db->query($sql); + if ($resql) + { + $cachearraytotestduplicate = array(); + + $num = $this->db->num_rows($resql); + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + + if (!empty($cachearraytotestduplicate[$obj->idfac])) { + $this->error = $langs->trans('ErrorCompanyHasDuplicateDefaultBAN', $obj->socid); + $this->invoice_in_error[$obj->idfac] = $this->error; + $result = -2; + break; + } + $cachearraytotestduplicate[$obj->idfac] = $obj->rowid; + + $daterum = (!empty($obj->date_rum)) ? $this->db->jdate($obj->date_rum) : $this->db->jdate($obj->datec); + $fileCrediteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum, $type); + $this->total = $this->total + $obj->somme; + $i++; + } + $nbtotalDrctDbtTxInf = $i; + } else { + $this->error = $this->db->lasterror(); + fputs($this->file, 'ERROR CREDITOR '.$sql.$CrLf); // CREDITORS = Suppliers + $result = -2; + } + + // Define $fileEmetteurSection. Start of bloc PmtInf. Will contains all $nbtotalDrctDbtTxInf + if ($result != -2) { + $fileEmetteurSection .= $this->EnregEmetteurSEPA($conf, $date_actu, $nbtotalDrctDbtTxInf, $this->total, $CrLf, $format, $type); + } + + /** + * SECTION CREATION SEPA FILE - CREDIT TRANSFER - ISO200022 + */ + // SEPA File Header + fputs($this->file, '<'.'?xml version="1.0" encoding="UTF-8" standalone="yes"?'.'>'.$CrLf); + fputs($this->file, ''.$CrLf); + fputs($this->file, ' '.$CrLf); + // SEPA Group header + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.('TRF/'.$dateTime_YMD.'/REF'.$this->id).''.$CrLf); + fputs($this->file, ' '.$dateTime_ECMA.''.$CrLf); + fputs($this->file, ' '.$i.''.$CrLf); + fputs($this->file, ' '.$this->total.''.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.strtoupper(dol_string_unaccent($this->raison_sociale)).''.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$conf->global->PRELEVEMENT_ICS.''.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + // SEPA File Emetteur (mycompany) + if ($result != -2) + { fputs($this-> file, $fileEmetteurSection); } + // SEPA File Creditors + if ($result != -2) + { fputs($this-> file, $fileCrediteurSection); } + // SEPA FILE FOOTER + fputs($this->file, ' '.$CrLf); + fputs($this->file, ' '.$CrLf); + fputs($this->file, ''.$CrLf); + } } // Build file for Other Countries with unknow format if (!$found) { - $this->total = 0; - $sql = "SELECT pl.amount"; - $sql .= " FROM"; - $sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; - $sql .= " ".MAIN_DB_PREFIX."facture as f,"; - $sql .= " ".MAIN_DB_PREFIX."prelevement_facture as pf"; - $sql .= " WHERE pl.fk_prelevement_bons = ".$this->id; - $sql .= " AND pl.rowid = pf.fk_prelevement_lignes"; - $sql .= " AND pf.fk_facture = f.rowid"; + if ($type != 'bank-transfer') { + $sql = "SELECT pl.amount"; + $sql .= " FROM"; + $sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; + $sql .= " ".MAIN_DB_PREFIX."facture as f,"; + $sql .= " ".MAIN_DB_PREFIX."prelevement_facture as pf"; + $sql .= " WHERE pl.fk_prelevement_bons = ".$this->id; + $sql .= " AND pl.rowid = pf.fk_prelevement_lignes"; + $sql .= " AND pf.fk_facture = f.rowid"; - //Lines - $i = 0; - $resql = $this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - - while ($i < $num) + // Lines + $i = 0; + $resql = $this->db->query($sql); + if ($resql) { - $obj = $this->db->fetch_object($resql); - $this->total = $this->total + $obj->amount; - $i++; + $num = $this->db->num_rows($resql); + + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + $this->total = $this->total + $obj->amount; + + // TODO Write record into file + $i++; + } + } else { + $result = -2; + } + } else { + $sql = "SELECT pl.amount"; + $sql .= " FROM"; + $sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; + $sql .= " ".MAIN_DB_PREFIX."facture_fourn as f,"; + $sql .= " ".MAIN_DB_PREFIX."prelevement_facture as pf"; + $sql .= " WHERE pl.fk_prelevement_bons = ".$this->id; + $sql .= " AND pl.rowid = pf.fk_prelevement_lignes"; + $sql .= " AND pf.fk_facture_fourn = f.rowid"; + + // Lines + $i = 0; + $resql = $this->db->query($sql); + if ($resql) + { + $num = $this->db->num_rows($resql); + + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + $this->total = $this->total + $obj->amount; + + // TODO Write record into file + $i++; + } + } else { + $result = -2; } - } - else - { - $result = -2; } $langs->load('withdrawals'); // TODO Add here code to generate a generic file - fputs($this->file, $langs->trans('WithdrawalFileNotCapable', $mysoc->country_code)); + fputs($this->file, $langs->transnoentitiesnoconv('WithdrawalFileNotCapable', $mysoc->country_code)); } fclose($this->file); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($this->file, octdec($conf->global->MAIN_UMASK)); - return $result; + } + + return $result; + } + + + /** + * Generate dynamically a RUM number for a customer bank account + * + * @param string $row_code_client Customer code (soc.code_client) + * @param int $row_datec Creation date of bank account (rib.datec) + * @param string $row_drum Id of customer bank account (rib.rowid) + * @return string RUM number + */ + public static function buildRumNumber($row_code_client, $row_datec, $row_drum) + { + global $langs; + $pre = substr(dol_string_nospecial(dol_string_unaccent($langs->transnoentitiesnoconv('RUM'))), 0, 3); // Must always be on 3 char ('RUM' or 'UMR'. This is a protection against bad translation) + return $pre.'-'.$row_code_client.'-'.$row_drum.'-'.date('U', $row_datec); } @@ -1574,9 +1823,11 @@ class BonPrelevement extends CommonObject * @param string $ref ref of invoice * @param int $facid id of invoice * @param string $rib_dom rib domiciliation + * @param string $type 'direct-debit' or 'bank-transfer' * @return void + * @see EnregDestinataireSEPA() */ - public function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $ref, $facid, $rib_dom = '') + public function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $ref, $facid, $rib_dom = '', $type = 'direct-debit') { // phpcs:enable fputs($this->file, "06"); @@ -1633,22 +1884,6 @@ class BonPrelevement extends CommonObject fputs($this->file, "\n"); } - - /** - * Build RUM number for a customer bank account - * - * @param string $row_code_client Customer code (soc.code_client) - * @param int $row_datec Creation date of bank account (rib.datec) - * @param string $row_drum Id of customer bank account (rib.rowid) - * @return string RUM number - */ - public static function buildRumNumber($row_code_client, $row_datec, $row_drum) - { - global $langs; - $pre = substr(dol_string_nospecial(dol_string_unaccent($langs->transnoentitiesnoconv('RUM'))), 0, 3); // Must always be on 3 char ('RUM' or 'UMR'. This is a protection against bad translation) - return $pre.'-'.$row_code_client.'-'.$row_drum.'-'.date('U', $row_datec); - } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Write recipient of request (customer) @@ -1670,9 +1905,11 @@ class BonPrelevement extends CommonObject * @param string $row_datec rib.datec, * @param string $row_drum rib.rowid used to generate rum * @param string $row_rum rib.rum Rum defined on company bank account + * @param string $type 'direct-debit' or 'bank-transfer' * @return string Return string with SEPA part DrctDbtTxInf + * @see EnregDestinataire() */ - public function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_ref, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum, $row_rum) + public function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_ref, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum, $row_rum, $type = 'direct-debit') { // phpcs:enable global $conf; @@ -1680,7 +1917,7 @@ class BonPrelevement extends CommonObject include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $CrLf = "\n"; - $Rowing = sprintf("%06d", $row_idfac); + $Rowing = sprintf("%010d", $row_idfac); // Define value for RUM // Example: RUMCustomerCode-CustomerBankAccountId-01424448606 (note: Date is date of creation of CustomerBankAccountId) @@ -1689,57 +1926,108 @@ class BonPrelevement extends CommonObject // Define date of RUM signature $DtOfSgntr = dol_print_date($row_datec, '%Y-%m-%d'); - $XML_DEBITOR = ''; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - // $XML_DEBITOR .=' '.('AS-'.dol_trunc($row_ref,20).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters - $XML_DEBITOR .= ' '.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('AS-'.dol_trunc($row_ref, 20)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.round($row_somme, 2).''.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$Rum.''.$CrLf; - $XML_DEBITOR .= ' '.$DtOfSgntr.''.$CrLf; - $XML_DEBITOR .= ' false'.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$row_bic.''.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.dolEscapeXML(strtoupper(dol_string_unaccent($row_nom))).''.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$row_country_code.''.$CrLf; - $addressline1 = dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))); - $addressline2 = dol_string_unaccent(strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""))); - if (trim($addressline1)) $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc($addressline1, 70, 'right', 'UTF-8', true)).''.$CrLf; - if (trim($addressline2)) $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc($addressline2, 70, 'right', 'UTF-8', true)).''.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.preg_replace('/\s/', '', $row_iban).''.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - // $XML_DEBITOR .=' '.($row_ref.'/'.$Rowing.'/'.$Rum).''.$CrLf; - // $XML_DEBITOR .=' '.dol_trunc($row_ref, 135).''.$CrLf; // 140 max - $XML_DEBITOR .= ' '.(($conf->global->PRELEVEMENT_USTRD != "") ? $conf->global->PRELEVEMENT_USTRD : dol_trunc($row_ref, 135)).''.$CrLf; // 140 max - $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.$CrLf; - return $XML_DEBITOR; + if ($type != 'bank-transfer') { + // SEPA Paiement Information of buyer for Direct debit + $XML_DEBITOR = ''; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + // Add EndToEndId. Must be a unique ID for each payment (for example by including bank, buyer or seller, date, checksum) + $XML_DEBITOR .= ' '.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('AS-'.dol_trunc($row_ref, 20)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.round($row_somme, 2).''.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$Rum.''.$CrLf; + $XML_DEBITOR .= ' '.$DtOfSgntr.''.$CrLf; + $XML_DEBITOR .= ' false'.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$row_bic.''.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.dolEscapeXML(strtoupper(dol_string_unaccent($row_nom))).''.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$row_country_code.''.$CrLf; + $addressline1 = dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))); + $addressline2 = dol_string_unaccent(strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""))); + if (trim($addressline1)) $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc($addressline1, 70, 'right', 'UTF-8', true)).''.$CrLf; + if (trim($addressline2)) $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc($addressline2, 70, 'right', 'UTF-8', true)).''.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.preg_replace('/\s/', '', $row_iban).''.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + // A string with some information on payment - 140 max + $XML_DEBITOR .= ' '.(($conf->global->PRELEVEMENT_USTRD != "") ? $conf->global->PRELEVEMENT_USTRD : dol_trunc($row_ref, 135)).''.$CrLf; // 140 max + $XML_DEBITOR .= ' '.$CrLf; + $XML_DEBITOR .= ' '.$CrLf; + return $XML_DEBITOR; + } else { + // SEPA Paiement Information of seller for Credit Transfer + $XML_CREDITOR = ''; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + // Add EndToEndId. Must be a unique ID for each payment (for example by including bank, buyer or seller, date, checksum) + $XML_CREDITOR .= ' '.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('AS-'.dol_trunc($row_ref, 20)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.round($row_somme, 2).''.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + /* + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$Rum.''.$CrLf; + $XML_CREDITOR .= ' '.$DtOfSgntr.''.$CrLf; + $XML_CREDITOR .= ' false'.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + */ + //$XML_CREDITOR .= ' SLEV'.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$row_bic.''.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.dolEscapeXML(strtoupper(dol_string_unaccent($row_nom))).''.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$row_country_code.''.$CrLf; + $addressline1 = dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))); + $addressline2 = dol_string_unaccent(strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""))); + if (trim($addressline1)) $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc($addressline1, 70, 'right', 'UTF-8', true)).''.$CrLf; + if (trim($addressline2)) $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc($addressline2, 70, 'right', 'UTF-8', true)).''.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.preg_replace('/\s/', '', $row_iban).''.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + // A string with some information on payment - 140 max + $XML_CREDITOR .= ' '.(($conf->global->PRELEVEMENT_USTRD != "") ? $conf->global->PRELEVEMENT_USTRD : dol_trunc($row_ref, 135)).''.$CrLf; // 140 max + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + return $XML_CREDITOR; + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Write sender of request (me) + * Write sender of request (me). * + * @param string $type 'direct-debit' or 'bank-transfer' * @return void + * @see EnregEmetteurSEPA() */ - public function EnregEmetteur() + public function EnregEmetteur($type = 'direct-debit') { // phpcs:enable fputs($this->file, "03"); @@ -1811,9 +2099,11 @@ class BonPrelevement extends CommonObject * @param float $total Total * @param string $CrLf End of line character * @param string $format FRST or RCUR or ALL + * @param string $type 'direct-debit' or 'bank-transfer' * @return string String with SEPA Sender + * @see EnregEmetteur() */ - public function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf = '\n', $format = 'FRST') + public function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf = '\n', $format = 'FRST', $type = 'direct-debit') { // phpcs:enable // SEPA INITIALISATION @@ -1840,7 +2130,7 @@ class BonPrelevement extends CommonObject $this->raison_sociale = $account->proprio; } - // Récupération info demandeur + // Get pending payments $sql = "SELECT rowid, ref"; $sql .= " FROM"; $sql .= " ".MAIN_DB_PREFIX."prelevement_bons as pb"; @@ -1851,74 +2141,134 @@ class BonPrelevement extends CommonObject { $obj = $this->db->fetch_object($resql); - // DONNEES BRUTES : par la suite Rows['XXX'] de la requete au dessus $country = explode(':', $configuration->global->MAIN_INFO_SOCIETE_COUNTRY); $IdBon = sprintf("%05d", $obj->rowid); $RefBon = $obj->ref; - // SEPA Paiement Information - $XML_SEPA_INFO = ''; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.('PREL'.$dateTime_YMD.'/ID'.$IdBon.'-'.$RefBon).''.$CrLf; - $XML_SEPA_INFO .= ' DD'.$CrLf; - $XML_SEPA_INFO .= ' '.$nombre.''.$CrLf; - $XML_SEPA_INFO .= ' '.$total.''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' SEPA'.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' CORE'.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$format.''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$dateTime_ETAD.''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.strtoupper(dol_string_unaccent($this->raison_sociale)).''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; - $addressline1 = dol_string_unaccent(strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""))); - $addressline2 = dol_string_unaccent(strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""))); - if ($addressline1) $XML_SEPA_INFO .= ' '.$addressline1.''.$CrLf; - if ($addressline2) $XML_SEPA_INFO .= ' '.$addressline2.''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.preg_replace('/\s/', '', $this->emetteur_iban).''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$this->emetteur_bic.''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - /* $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$this->raison_sociale.''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; - $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.''.$CrLf; - $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN.''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf;*/ - $XML_SEPA_INFO .= ' SLEV'.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$this->emetteur_ics.''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' SEPA'.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - } - else - { + if ($type != 'bank-transfer') { + // SEPA Paiement Information of my company for Direct debit + $XML_SEPA_INFO = ''; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.('DD/'.$dateTime_YMD.'/ID'.$IdBon.'-'.$RefBon).''.$CrLf; + $XML_SEPA_INFO .= ' DD'.$CrLf; + $XML_SEPA_INFO .= ' '.$nombre.''.$CrLf; + $XML_SEPA_INFO .= ' '.$total.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' SEPA'.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' CORE'.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$format.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$dateTime_ETAD.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.strtoupper(dol_string_unaccent($this->raison_sociale)).''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; + $addressline1 = dol_string_unaccent(strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""))); + $addressline2 = dol_string_unaccent(strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""))); + if ($addressline1) $XML_SEPA_INFO .= ' '.$addressline1.''.$CrLf; + if ($addressline2) $XML_SEPA_INFO .= ' '.$addressline2.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.preg_replace('/\s/', '', $this->emetteur_iban).''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$this->emetteur_bic.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + /* $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$this->raison_sociale.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; + $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.''.$CrLf; + $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf;*/ + $XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$this->emetteur_ics.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' SEPA'.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + } else { + // SEPA Paiement Information of my company for Credit Transfer + $XML_SEPA_INFO = ''; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.('TRF/'.$dateTime_YMD.'/ID'.$IdBon.'-'.$RefBon).''.$CrLf; + $XML_SEPA_INFO .= ' TRF'.$CrLf; + //$XML_SEPA_INFO .= ' False'.$CrLf; + $XML_SEPA_INFO .= ' '.$nombre.''.$CrLf; + $XML_SEPA_INFO .= ' '.$total.''.$CrLf; + /* + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' SEPA'.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' TRF'.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' SECU'.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + */ + $XML_SEPA_INFO .= ' '.dol_print_date($dateTime_ETAD, 'dayrfc').''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.strtoupper(dol_string_unaccent($this->raison_sociale)).''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; + $addressline1 = dol_string_unaccent(strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""))); + $addressline2 = dol_string_unaccent(strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""))); + if ($addressline1) $XML_SEPA_INFO .= ' '.$addressline1.''.$CrLf; + if ($addressline2) $XML_SEPA_INFO .= ' '.$addressline2.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.preg_replace('/\s/', '', $this->emetteur_iban).''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$this->emetteur_bic.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + /* $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$this->raison_sociale.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; + $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.''.$CrLf; + $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf;*/ + $XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV + /*$XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$this->emetteur_ics.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' SEPA'.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf;*/ + } + } else { fputs($this->file, 'INCORRECT EMETTEUR '.$XML_SEPA_INFO.$CrLf); - $result = -2; } return $XML_SEPA_INFO; } diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index 88b612554df..a645d2bb078 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -59,21 +59,21 @@ class LignePrelevement $langs->load("withdrawals"); $this->statuts[0] = $langs->trans("StatusWaiting"); - $this->statuts[2] = $langs->trans("StatusCredited"); + $this->statuts[2] = $langs->trans("StatusPaid"); $this->statuts[3] = $langs->trans("StatusRefused"); } /** * Recupere l'objet prelevement * - * @param int $rowid id de la facture a recuperer - * @return integer + * @param int $rowid Id de la facture a recuperer + * @return integer <0 if KO, >=0 if OK */ public function fetch($rowid) { global $conf; - $result = 0; + $error = 0; $sql = "SELECT pl.rowid, pl.amount, p.ref, p.rowid as bon_rowid"; $sql .= ", pl.statut, pl.fk_soc"; @@ -96,23 +96,19 @@ class LignePrelevement $this->statut = $obj->statut; $this->bon_ref = $obj->ref; $this->bon_rowid = $obj->bon_rowid; - } - else - { - $result++; + } else { + $error++; dol_syslog("LignePrelevement::Fetch rowid=$rowid numrows=0"); } $this->db->free($resql); - } - else - { - $result++; + } else { + $error++; dol_syslog("LignePrelevement::Fetch rowid=$rowid"); dol_syslog($this->db->error()); } - return $result; + return $error; } /** @@ -142,20 +138,17 @@ class LignePrelevement if ($mode == 0) { return $langs->trans($this->statuts[$status]); - } - elseif ($mode == 1) + } elseif ($mode == 1) { if ($status == 0) return img_picto($langs->trans($this->statuts[$status]), 'statut1').' '.$langs->trans($this->statuts[$status]); // Waiting elseif ($status == 2) return img_picto($langs->trans($this->statuts[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); // Credited elseif ($status == 3) return img_picto($langs->trans($this->statuts[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]); // Refused - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 0) return img_picto($langs->trans($this->statuts[$status]), 'statut1'); elseif ($status == 2) return img_picto($langs->trans($this->statuts[$status]), 'statut6'); elseif ($status == 3) return img_picto($langs->trans($this->statuts[$status]), 'statut8'); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 0) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut1'); elseif ($status == 2) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut6'); diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 8c033353637..20d600bf9b4 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -153,16 +153,13 @@ class RejetPrelevement $pai->amounts[$facs[$i][0]] = price2num($facs[$i][1] * -1); $pai->datepaye = $date_rejet; $pai->paiementid = 3; // type of payment: withdrawal - $pai->num_paiement = $fac->ref; $pai->num_payment = $fac->ref; if ($pai->create($this->user) < 0) // we call with no_commit { $error++; dol_syslog("RejetPrelevement::Create Error creation payment invoice ".$facs[$i][0]); - } - else - { + } else { $result = $pai->addPaymentToBank($user, 'payment', '(InvoiceRefused)', $bankaccount, '', ''); if ($result < 0) { @@ -191,9 +188,7 @@ class RejetPrelevement { dol_syslog("RejetPrelevement::Create Commit"); $this->db->commit(); - } - else - { + } else { dol_syslog("RejetPrelevement::Create Rollback"); $this->db->rollback(); } @@ -227,9 +222,7 @@ class RejetPrelevement $row = $this->db->fetch_row($resql); $userid = $row[0]; } - } - else - { + } else { dol_syslog("RejetPrelevement::_send_email Erreur lecture user"); } @@ -265,14 +258,10 @@ class RejetPrelevement if ($result) { dol_syslog("RejetPrelevement::_send_email email envoye"); - } - else - { + } else { dol_syslog("RejetPrelevement::_send_email Erreur envoi email"); } - } - else - { + } else { dol_syslog("RejetPrelevement::_send_email Userid invalide"); } } @@ -310,8 +299,7 @@ class RejetPrelevement { $row = $this->db->fetch_row($resql); if (!$amounts) $arr[$i] = $row[0]; - else - { + else { $arr[$i] = array( $row[0], $row[1] @@ -321,9 +309,7 @@ class RejetPrelevement } } $this->db->free($resql); - } - else - { + } else { dol_syslog("getListInvoices", LOG_ERR); } @@ -358,15 +344,11 @@ class RejetPrelevement $this->db->free($resql); return 0; - } - else - { + } else { dol_syslog("RejetPrelevement::Fetch Erreur rowid=$rowid numrows=0"); return -1; } - } - else - { + } else { dol_syslog("RejetPrelevement::Fetch Erreur rowid=$rowid"); return -2; } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 5306b6799b9..842b8b169f5 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -1,11 +1,11 @@ - * Copyright (C) 2010-2015 Laurent Destailleur + * Copyright (C) 2010-2020 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2012 Juanjo Menent * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Frédéric France - * Copyright (C) 2019 Markus Welters + * Copyright (C) 2019 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 @@ -24,7 +24,7 @@ /** * \file htdocs/compta/prelevement/create.php * \ingroup prelevement - * \brief Prelevement creation page + * \brief Page to create a direct debit order or a credit transfer order */ require '../../main.inc.php'; @@ -43,6 +43,8 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies', 'bill if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$type = GETPOST('type', 'aZ09'); + // Get supervariables $action = GETPOST('action', 'alpha'); $mode = GETPOST('mode', 'alpha') ?GETPOST('mode', 'alpha') : 'real'; @@ -75,17 +77,20 @@ if (empty($reshook)) } if ($action == 'create') { - // $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty - $bprev = new BonPrelevement($db); - $executiondate = dol_mktime(0, 0, 0, GETPOST('remonth'), (GETPOST('reday') + $conf->global->PRELEVEMENT_ADDDAYS), GETPOST('reyear')); - - $result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format, $executiondate); - if ($result < 0) - { - setEventMessages($bprev->error, $bprev->errors, 'errors'); + $delayindays = 0; + if ($type != 'bank-transfer') { + $conf->global->PRELEVEMENT_ADDDAYS; + } else { + $conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS; } - elseif ($result == 0) - { + $bprev = new BonPrelevement($db); + $executiondate = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), (GETPOST('reday', 'int') + $delayindays), GETPOST('reyear', 'int')); + + // $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty (we don't use them anymore) + $result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format, $executiondate, 0, $type); + if ($result < 0) { + setEventMessages($bprev->error, $bprev->errors, 'errors'); + } elseif ($result == 0) { $mesg = $langs->trans("NoInvoiceCouldBeWithdrawed", $format); setEventMessages($mesg, null, 'errors'); $mesg .= '
'."\n"; @@ -93,10 +98,15 @@ if (empty($reshook)) { $mesg .= ''.$val."
\n"; } - } - else - { - setEventMessages($langs->trans("DirectDebitOrderCreated", $bprev->getNomUrl(1)), null); + } else { + if ($type != 'bank-transfer') { + setEventMessages($langs->trans("DirectDebitOrderCreated", $bprev->getNomUrl(1)), null); + } else { + setEventMessages($langs->trans("CreditTransferOrderCreated", $bprev->getNomUrl(1)), null); + } + + header("Location: ".DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$bprev->id); + exit; } } } @@ -109,7 +119,11 @@ if (empty($reshook)) $form = new Form($db); $thirdpartystatic = new Societe($db); -$invoicestatic = new Facture($db); +if ($type != 'bank-transfer') { + $invoicestatic = new Facture($db); +} else { + $invoicestatic = new FactureFournisseur($db); +} $bprev = new BonPrelevement($db); llxHeader('', $langs->trans("NewStandingOrder")); @@ -130,26 +144,34 @@ $h++; dol_fiche_head($head, $hselected, $langs->trans("StandingOrders"), 0, 'payment'); */ -print load_fiche_titre($langs->trans("NewStandingOrder")); +$title = $langs->trans("NewStandingOrder"); +if ($type == 'bank-transfer') { + $title = $langs->trans("NewPaymentByBankTransfer"); +} + +print load_fiche_titre($title); dol_fiche_head(); -$nb = $bprev->NbFactureAPrelever(); -$nb1 = $bprev->NbFactureAPrelever(1); -$nb11 = $bprev->NbFactureAPrelever(1, 1); -$pricetowithdraw = $bprev->SommeAPrelever(); -if ($nb < 0 || $nb1 < 0 || $nb11 < 0) +$nb = $bprev->nbOfInvoiceToPay($type); +$pricetowithdraw = $bprev->SommeAPrelever($type); +if ($nb < 0) { dol_print_error($bprev->error); } print ''; -print ''; +$title = $langs->trans("NbOfInvoiceToWithdraw"); +if ($type == 'bank-transfer') { + $title = $langs->trans("NbOfInvoiceToPayByBankTransfer"); +} + +print ''; print ''; -print ''; +print ''; print ''; @@ -160,37 +182,66 @@ print ''; if ($mesg) print $mesg; -print "
\n"; +print '
'."\n"; print '
'; print ''; +print ''; if ($nb) { - if ($pricetowithdraw) { - print $langs->trans('ExecutionDate').' '; - print $form->selectDate(); - if ($mysoc->isInEEC()) { - print ''; - print ''; - } else { - print ''.$langs->trans("CreateAll")."\n"; + if ($pricetowithdraw) { + print $langs->trans('ExecutionDate').' '; + $datere = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + print $form->selectDate($datere, 're'); + + if ($mysoc->isInEEC()) { + $title = $langs->trans("CreateForSepa"); + if ($type == 'bank-transfer') { + $title = $langs->trans("CreateSepaFileForPaymentByBankTransfer"); + } + + if ($type != 'bank-transfer') { + print ''; + } + print ''; + } else { + $title = $langs->trans("CreateAll"); + if ($type == 'bank-transfer') { + $title = $langs->trans("CreateFileForPaymentByBankTransfer"); + } + print ''.$title."\n"; } - } - else - { + } else { if ($mysoc->isInEEC()) { - print ''.$langs->trans("CreateForSepaFRST")."\n"; - print ''.$langs->trans("CreateForSepaRCUR")."\n"; - } - else - { - print ''.$langs->trans("CreateAll")."\n"; + $title = $langs->trans("CreateForSepaFRST"); + if ($type == 'bank-transfer') { + $title = $langs->trans("CreateSepaFileForPaymentByBankTransfer"); + } + print ''.$title."\n"; + + if ($type != 'bank-transfer') { + $title = $langs->trans("CreateForSepaRCUR"); + print ''.$title."\n"; + } + } else { + $title = $langs->trans("CreateAll"); + if ($type == 'bank-transfer') { + $title = $langs->trans("CreateFileForPaymentByBankTransfer"); + } + print ''.$title."\n"; } } -} -else -{ - print 'transnoentitiesnoconv("StandingOrders"))).'">'.$langs->trans("CreateAll")."\n"; +} else { + $titlefortab = $langs->transnoentitiesnoconv("StandingOrders"); + $title = $langs->trans("CreateAll"); + if ($type == 'bank-transfer') { + $titlefortab = $langs->transnoentitiesnoconv("PaymentByBankTransfers"); + $title = $langs->trans("CreateFileForPaymentByBankTransfer"); + } + print ''.$title."\n"; } print "\n"; @@ -206,7 +257,11 @@ print '
'; $sql = "SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,"; $sql .= " pfd.date_demande, pfd.amount"; -$sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; +if ($type == 'bank-transfer') { + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,"; +} else { + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; +} $sql .= " ".MAIN_DB_PREFIX."societe as s,"; $sql .= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " WHERE s.rowid = f.fk_soc"; @@ -215,9 +270,15 @@ if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; } -$sql .= " AND f.total_ttc > 0"; +//$sql .= " AND pfd.amount > 0"; +$sql .= " AND f.total_ttc > 0"; // Avoid credit notes $sql .= " AND pfd.traite = 0"; -$sql .= " AND pfd.fk_facture = f.rowid"; +$sql .= " AND pfd.ext_payment_id IS NULL"; +if ($type == 'bank-transfer') { + $sql .= " AND pfd.fk_facture_fourn = f.rowid"; +} else { + $sql .= " AND pfd.fk_facture = f.rowid"; +} if ($socid > 0) $sql .= " AND f.fk_soc = ".$socid; $nbtotalofrecords = ''; @@ -240,23 +301,32 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - $param = ''; + $param = ''; if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); if ($socid) $param .= '&socid='.urlencode($socid); - if ($option) $param .= "&option=".urlencode($option); + if ($option) $param .= "&option=".urlencode($option); - print '
'; + print ''; print ''; print ''; if (!empty($limit)) { print ''; } - print_barre_liste($langs->trans("InvoiceWaitingWithdraw"), $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit); + $title = $langs->trans("InvoiceWaitingWithdraw"); + if ($type == 'bank-transfer') { + $title = $langs->trans("InvoiceWaitingPaymentByBankTransfer"); + } + print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit); + + $tradinvoice = "Invoice"; + if ($type == 'bank-transfer') { + $tradinvoice = "SupplierInvoice"; + } print '
'.$langs->trans("NbOfInvoiceToWithdraw").'
'.$title.''; print $nb; print '
'.$langs->trans("AmountToWithdraw").'
'.$langs->trans("AmountTotal").''; print price($pricetowithdraw); print '
'; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -273,28 +343,41 @@ if ($resql) { $obj = $db->fetch_object($resql); + $bac->fetch(0, $obj->socid); + print ''; + + // Ref invoice print ''; + // Thirdparty print ''; + // RIB print ''; + // RUM print ''; // Amount print ''; $i++; } - } - else - { + } else { print ''; } print "
'.$langs->trans("Invoice").''.$langs->trans($tradinvoice).''.$langs->trans("ThirdParty").''.$langs->trans("RIB").''.$langs->trans("RUM").'
'; $invoicestatic->id = $obj->rowid; $invoicestatic->ref = $obj->ref; print $invoicestatic->getNomUrl(1, 'withdraw'); print ''; $thirdpartystatic->fetch($obj->socid); print $thirdpartystatic->getNomUrl(1, 'ban'); print ''; - print $thirdpartystatic->display_rib(); - $bac->fetch(0, $obj->socid); + print $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic; if ($bac->verif() <= 0) print img_warning('Error on default bank number for IBAN : '.$bac->error_message); print ''; - print $thirdpartystatic->display_rib('rum'); - $format = $thirdpartystatic->display_rib('format'); - if ($format) print ' ('.$format.')'; + $rumtoshow = $thirdpartystatic->display_rib('rum'); + if ($rumtoshow) { + print $rumtoshow; + $format = $thirdpartystatic->display_rib('format'); + if ($type != 'bank-transfer') { + if ($format) print ' ('.$format.')'; + } + } else { + print img_warning($langs->trans("NoBankAccount")); + } print ''; @@ -307,17 +390,13 @@ if ($resql) print '
'.$langs->trans("None").'
"; print ""; print "
\n"; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 181f71a678c..c6c0f24497a 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -21,12 +21,13 @@ /** * \file htdocs/compta/prelevement/demandes.php * \ingroup prelevement - * \brief Page to list withdraw requests + * \brief Page to list bank transfer requests (debit order or payments of vendors) */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/modPrelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -43,8 +44,10 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myo $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$type = GETPOST('type', 'aZ09'); + $search_facture = GETPOST('search_facture', 'alpha'); -$search_societe = trim(GETPOST('search_societe', 'alpha')); +$search_societe = GETPOST('search_societe', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; @@ -85,27 +88,39 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' * View */ -if (!$status) -{ - $title = $langs->trans("RequestStandingOrderToTreat"); -} -else -{ - $title = $langs->trans("RequestStandingOrderTreated"); +if ($type != 'bank-transfer') { + if (!$status) { + $title = $langs->trans("RequestStandingOrderToTreat"); + } else { + $title = $langs->trans("RequestStandingOrderTreated"); + } +} else { + if (!$status) { + $title = $langs->trans("RequestPaymentsByBankTransferToTreat"); + } else { + $title = $langs->trans("RequestPaymentsByBankTransferTreated"); + } } llxHeader('', $title); $thirdpartystatic = new Societe($db); -$invoicestatic = new Facture($db); +if ($type == 'bank-transfer') { + $invoicestatic = new FactureFournisseur($db); +} else { + $invoicestatic = new Facture($db); +} // List of requests $sql = "SELECT f.ref, f.rowid, f.total_ttc,"; $sql .= " s.nom as name, s.rowid as socid,"; -$sql .= " pfd.date_demande as date_demande,"; -$sql .= " pfd.fk_user_demande"; -$sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; +$sql .= " pfd.date_demande as date_demande, pfd.amount, pfd.fk_user_demande"; +if ($type != 'bank-transfer') { + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; +} else { + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,"; +} $sql .= " ".MAIN_DB_PREFIX."societe as s,"; $sql .= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -114,18 +129,22 @@ $sql .= " AND f.entity IN (".getEntity('invoice').")"; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND f.fk_soc = ".$socid; if (!$status) $sql .= " AND pfd.traite = 0"; +$sql .= " AND pfd.ext_payment_id IS NULL"; if ($status) $sql .= " AND pfd.traite = ".$status; $sql .= " AND f.total_ttc > 0"; if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; } -$sql .= " AND pfd.fk_facture = f.rowid"; +if ($type != 'bank-transfer') { + $sql .= " AND pfd.fk_facture = f.rowid"; +} else { + $sql .= " AND pfd.fk_facture_fourn = f.rowid"; +} if ($search_facture) $sql .= natural_search("f.ref", $search_facture); if ($search_societe) $sql .= natural_search("s.nom", $search_societe); $sql .= $db->order($sortfield, $sortorder); - // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) @@ -142,9 +161,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; -} -else -{ +} else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -159,7 +176,10 @@ else -$newcardbutton = ''.$langs->trans("Back").''; +$newcardbutton = ''.$langs->trans("Back").''; +if ($type == 'bank-transfer') { + $newcardbutton = ''.$langs->trans("Back").''; +} print '
'; if ($optioncss != '') print ''; @@ -171,6 +191,16 @@ print ''; print ''; print ''; +$param = ''; + +$label = 'NewStandingOrder'; +$typefilter = ''; +if ($type == 'bank-transfer') { + $label = 'NewPaymentByBankTransfer'; + $typefilter = 'type='.$type; +} +$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php'.($typefilter ? '?'.$typefilter : '')); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); print ''; @@ -178,14 +208,14 @@ print '
'; print ''; print_liste_field_titre("Bill", $_SERVER["PHP_SELF"]); print_liste_field_titre("Company", $_SERVER["PHP_SELF"]); -print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "", "", $param, 'class="right"'); -print_liste_field_titre("DateRequest", $_SERVER["PHP_SELF"], "", "", $param, 'class="center"'); +print_liste_field_titre("AmountRequested", $_SERVER["PHP_SELF"], "", "", $param, '', '', '', 'right '); +print_liste_field_titre("DateRequest", $_SERVER["PHP_SELF"], "", "", $param, '', '', '', 'center '); print_liste_field_titre(''); print ''; print ''; -print ''; -print ''; +print ''; +print ''; print ''; print ''; // Action column @@ -195,20 +225,18 @@ print $searchpicto; print ''; print ''; -$users = array(); - $i = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); if (empty($obj)) break; // Should not happen + $invoicestatic->fetch($obj->rowid); + print ''; // Ref facture print ''; @@ -218,7 +246,9 @@ while ($i < min($num, $limit)) print $thirdpartystatic->getNomUrl(1, 'customer'); print ''; - print ''; + print ''; print ''; diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index fb0a5548426..c4cb6f0c7c4 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -32,19 +32,21 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page -$langs->loadLangs(array('banks', 'categories', 'companies', 'withdrawals', 'bills')); +$langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals')); // Securite acces client if ($user->socid > 0) accessforbidden(); // Get supervariables -$prev_id = GETPOST('id', 'int'); -$socid = GETPOST('socid', 'int'); +$id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); +$socid = GETPOST('socid', 'int'); +$type = GETPOST('type', 'aZ09'); +// Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST("sortfield", 'alpha'); -$sortorder = GETPOST("sortorder", 'alpha'); +$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -55,6 +57,17 @@ if (!$sortorder) $sortorder = 'DESC'; $object = new BonPrelevement($db); +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals + +$hookmanager->initHooks(array('directdebitprevcard', 'globalcard', 'directdebitprevlist')); + +if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') { + accessforbidden(); +} +if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') { + accessforbidden(); +} /* @@ -66,26 +79,24 @@ $thirdpartytmp = new Societe($db); llxHeader('', $langs->trans("WithdrawalsReceipts")); -if ($prev_id > 0 || $ref) +if ($id > 0 || $ref) { - if ($object->fetch($prev_id, $ref) >= 0) - { - $head = prelevement_prepare_head($object); + if ($object->fetch($id, $ref) >= 0) + { + $head = prelevement_prepare_head($object); dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref'); print '
'; print '
'; - print '
'; - $invoicestatic->id = $obj->rowid; - $invoicestatic->ref = $obj->ref; print $invoicestatic->getNomUrl(1, 'withdraw'); print ''.price($obj->total_ttc).''; + print price($obj->amount, 1, $langs, 1, -1, -1, $conf->currency).' / '.price($obj->total_ttc, 1, $langs, 1, -1, -1, $conf->currency); + print ''.dol_print_date($db->jdate($obj->date_demande), 'day').'
'; + print '
'."\n"; //print ''; print ''; print ''; - // Status - //print ''; if ($object->date_trans <> 0) { @@ -94,7 +105,7 @@ if ($prev_id > 0 || $ref) print ''; + print ' '.$langs->trans("By").' '.$muser->getFullName($langs).''; print ''; @@ -117,7 +128,9 @@ if ($prev_id > 0 || $ref) $result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); print ''; print ''; print '
'.$langs->trans("Ref").''.$object->getNomUrl(1).'
'.$langs->trans("Date").''.dol_print_date($object->datec, 'day').'
'.$langs->trans("Amount").''.price($object->amount).'
'.$langs->trans('Status').''.$object->getLibStatut(1).'
'.$langs->trans("TransData").''; print dol_print_date($object->date_trans, 'day'); - print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'
'.$langs->trans("TransMetod").''; print $object->methodes_trans[$object->method_trans]; print '
'; - print $langs->trans("BankToReceiveWithdraw"); + $labelofbankfield = "BankToReceiveWithdraw"; + if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer'; + print $langs->trans($labelofbankfield); print ''; if ($acc->id > 0) @@ -126,36 +139,50 @@ if ($prev_id > 0 || $ref) print '
'; - print $langs->trans("WithdrawalFile").''; + $labelfororderfield = 'WithdrawalFile'; + if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile'; + print $langs->trans($labelfororderfield).''; $relativepath = 'receipts/'.$object->ref.'.xml'; - print ''.$relativepath.''; + $modulepart = 'prelevement'; + if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer'; + print ''.$relativepath.''; print '
'; print ''; dol_fiche_end(); - } - else - { - dol_print_error($db); - } + } else { + dol_print_error($db); + } } // List of invoices -$sql = "SELECT pf.rowid,"; +$sql = "SELECT pf.rowid, p.type,"; $sql .= " f.rowid as facid, f.ref as ref, f.total_ttc,"; $sql .= " s.rowid as socid, s.nom as name, pl.statut, pl.amount as amount_requested"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= ", ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql .= ", ".MAIN_DB_PREFIX."prelevement_facture as pf"; -$sql .= ", ".MAIN_DB_PREFIX."facture as f"; +if ($object->type != 'bank-transfer') { + $sql .= ", ".MAIN_DB_PREFIX."facture as f"; +} else { + $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; +} $sql .= ", ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE pf.fk_prelevement_lignes = pl.rowid"; $sql .= " AND pl.fk_prelevement_bons = p.rowid"; $sql .= " AND f.fk_soc = s.rowid"; -$sql .= " AND pf.fk_facture = f.rowid"; -$sql .= " AND f.entity IN (".getEntity('invoice').")"; +if ($object->type != 'bank-transfer') { + $sql .= " AND pf.fk_facture = f.rowid"; +} else { + $sql .= " AND pf.fk_facture_fourn = f.rowid"; +} +if ($object->type != 'bank-transfer') { + $sql .= " AND f.entity IN (".getEntity('invoice').")"; +} else { + $sql .= " AND f.entity IN (".getEntity('supplier_invoice').")"; +} if ($object->id > 0) $sql .= " AND p.rowid=".$object->id; if ($socid) $sql .= " AND s.rowid = ".$socid; $sql .= $db->order($sortfield, $sortorder); @@ -164,36 +191,36 @@ $sql .= $db->order($sortfield, $sortorder); $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 - { - $page = 0; - $offset = 0; - } + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql .= $db->plimit($limit + 1, $offset); -$result = $db->query($sql); -if ($result) +$resql = $db->query($sql); +if ($resql) { - $num = $db->num_rows($result); + $num = $db->num_rows($resql); $i = 0; - $param = "&id=".$prev_id; + $param = "&id=".$id; // Lines of title fields print ''; - if ($optioncss != '') print ''; + if ($optioncss != '') print ''; print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; $massactionbutton = ''; @@ -207,91 +234,94 @@ if ($result) print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder); print_liste_field_titre("AmountInvoice", $_SERVER["PHP_SELF"], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre("AmountRequested", $_SERVER["PHP_SELF"], "pl.amount", "", $param, 'class="right"', $sortfield, $sortorder); - print_liste_field_titre("StatusDebitCredit", $_SERVER["PHP_SELF"], "", "", $param, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre(''); print "\n"; $totalinvoices = 0; $totalamount_requested = 0; + $invoicetmpcustomer = new Facture($db); + $invoicetmpsupplier = new FactureFournisseur($db); + while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($result); + { + $obj = $db->fetch_object($resql); - $invoicetmp->id = $obj->facid; - $invoicetmp->ref = $obj->ref; + if ($obj->type == 'bank-transfer') { + $invoicetmp = $invoicetmpsupplier; + } else { + $invoicetmp = $invoicetmpcustomer; + } + $invoicetmp->fetch($obj->facid); - $thirdpartytmp->id = $obj->socid; - $thirdpartytmp->name = $obj->name; + $thirdpartytmp->fetch($obj->socid); - print ''; + print ''; - print ""; - print $invoicetmp->getNomUrl(1); - print "\n"; + print ""; + print $invoicetmp->getNomUrl(1); + print "\n"; - print ''; - print $thirdpartytmp->getNomUrl(1); - print "\n"; + print ''; + print $thirdpartytmp->getNomUrl(1); + print "\n"; - // Amount of invoice - print ''.price($obj->total_ttc)."\n"; + // Amount of invoice + print ''.price($obj->total_ttc)."\n"; - // Amount requested - print ''.price($obj->amount_requested)."\n"; + // Amount requested + print ''.price($obj->amount_requested)."\n"; - // Status of requests - print ''; + // Status of requests + print ''; - if ($obj->statut == 0) - { + if ($obj->statut == 0) { print '-'; - } - elseif ($obj->statut == 2) - { - print $langs->trans("StatusCredited"); - } - elseif ($obj->statut == 3) - { + } elseif ($obj->statut == 2) { + if ($obj->type == 'bank-transfer') { + print $langs->trans("StatusDebited"); + } else { + print $langs->trans("StatusCredited"); + } + } elseif ($obj->statut == 3) { print ''.$langs->trans("StatusRefused").''; } - print ""; + print ""; - print ""; + print ""; - print "\n"; + print "\n"; - $totalinvoices += $obj->total_ttc; - $totalamount_requested += $obj->amount_requested; + $totalinvoices += $obj->total_ttc; + $totalamount_requested += $obj->amount_requested; - $i++; - } + $i++; + } if ($num > 0) - { - print ''; - print ''.$langs->trans("Total").''; - print ' '; - print ''; + { + print ''; + print ''.$langs->trans("Total").''; + print ' '; + print ''; //if ($totalinvoices != $object->amount) print img_warning("AmountOfFileDiffersFromSumOfInvoices"); // It is normal to have total that differs. For an amount of invoice of 100, request to pay may be 50 only. - if ($totalamount_requested != $object->amount) print img_warning("AmountOfFileDiffersFromSumOfInvoices"); + if ($totalamount_requested != $object->amount) print img_warning("AmountOfFileDiffersFromSumOfInvoices"); print "\n"; - print ''; + print ''; print price($totalamount_requested); - print "\n"; - print ' '; - print ' '; - print "\n"; - } + print "\n"; + print ' '; + print ' '; + print "\n"; + } print ""; print ''; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 1cc454a3d4d..2cfc40bb30c 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -21,7 +21,7 @@ /** * \file htdocs/compta/prelevement/fiche-rejet.php * \ingroup prelevement - * \brief Withdraw reject + * \brief Debit order or credit transfer reject */ require '../../main.inc.php'; @@ -34,13 +34,15 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array("banks", "categories", 'withdrawals', 'bills')); -// Securite acces client +// Security check if ($user->socid > 0) accessforbidden(); // Get supervariables $prev_id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); +$type = GETPOST('type', 'aZ09'); + // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); @@ -53,6 +55,15 @@ $pagenext = $page + 1; $object = new BonPrelevement($db); +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals + +if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') { + accessforbidden(); +} +if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') { + accessforbidden(); +} @@ -65,11 +76,11 @@ llxHeader('', $langs->trans("WithdrawalsReceipts")); if ($prev_id > 0 || $ref) { if ($object->fetch($prev_id, $ref) >= 0) - { - $head = prelevement_prepare_head($object); + { + $head = prelevement_prepare_head($object); dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref'); @@ -81,13 +92,6 @@ if ($prev_id > 0 || $ref) print ''.$langs->trans("Date").''.dol_print_date($object->datec, 'day').''; print ''.$langs->trans("Amount").''.price($object->amount).''; - // Status - /* - print ''.$langs->trans('Status').''; - print ''.$object->getLibStatut(1).''; - print ''; - */ - if ($object->date_trans <> 0) { $muser = new User($db); @@ -95,7 +99,7 @@ if ($prev_id > 0 || $ref) print ''.$langs->trans("TransData").''; print dol_print_date($object->date_trans, 'day'); - print ' '.$langs->trans("By").' '.$muser->getFullName($langs).''; + print ' '.$langs->trans("By").' '.$muser->getFullName($langs).''; print ''.$langs->trans("TransMetod").''; print $object->methodes_trans[$object->method_trans]; print ''; @@ -118,7 +122,9 @@ if ($prev_id > 0 || $ref) $result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); print ''; - print $langs->trans("BankToReceiveWithdraw"); + $labelofbankfield = "BankToReceiveWithdraw"; + if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer'; + print $langs->trans($labelofbankfield); print ''; print ''; if ($acc->id > 0) @@ -127,21 +133,24 @@ if ($prev_id > 0 || $ref) print ''; print ''; - print $langs->trans("WithdrawalFile").''; + $labelfororderfield = 'WithdrawalFile'; + if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile'; + print $langs->trans($labelfororderfield).''; $relativepath = 'receipts/'.$object->ref.'.xml'; - print ''.$relativepath.''; + $modulepart = 'prelevement'; + if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer'; + print ''.$relativepath.''; print ''; print ''; dol_fiche_end(); - } - else - { - dol_print_error($db); - } + } else { + dol_print_error($db); + } } + $rej = new RejetPrelevement($db, $user); /* @@ -196,51 +205,47 @@ if ($resql) if ($num > 0) { - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); - print ''; + print ''; - print ''; - print img_picto('', 'statut'.$obj->statut).' '; - print substr('000000'.$obj->rowid, -6); - print ''; - print ''.$obj->name."\n"; + print ''; + print img_picto('', 'statut'.$obj->statut).' '; + print substr('000000'.$obj->rowid, -6); + print ''; + print ''.$obj->name."\n"; - print ''.price($obj->amount)."\n"; - print ''.$rej->motifs[$obj->motif].''; + print ''.price($obj->amount)."\n"; + print ''.$rej->motifs[$obj->motif].''; - print ''.yn($obj->afacturer).''; - print ''.$obj->fk_facture.''; - print "\n"; + print ''.yn($obj->afacturer).''; + print ''.$obj->fk_facture.''; + print "\n"; - $total += $obj->amount; + $total += $obj->amount; - $i++; - } - } - else - { - print ''.$langs->trans("None").''; + $i++; + } + } else { + print ''.$langs->trans("None").''; } if ($num > 0) - { - print ' '; - print ''.$langs->trans("Total").''; - print ''.price($total)."\n"; - print ' '; - print "\n"; - } - print "\n"; - print ''; + { + print ' '; + print ''.$langs->trans("Total").''; + print ''.price($total)."\n"; + print ' '; + print "\n"; + } + print "\n"; + print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 18028e2059a..c59ed2d4232 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -20,7 +20,7 @@ /** * \file htdocs/compta/prelevement/fiche-stat.php * \ingroup prelevement - * \brief Prelevement statistics + * \brief Debit order or credit transfer statistics */ require '../../main.inc.php'; @@ -39,6 +39,8 @@ if ($user->socid > 0) accessforbidden(); $prev_id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); +$type = GETPOST('type', 'aZ09'); + // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); @@ -52,6 +54,17 @@ $pagenext = $page + 1; $object = new BonPrelevement($db); +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals + +if (!$user->rights->prelevement->bons->lire && $object->type != 'bank-transfer') { + accessforbidden(); +} +if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transfer') { + accessforbidden(); +} + + /* * View @@ -66,7 +79,7 @@ if ($prev_id > 0 || $ref) $head = prelevement_prepare_head($object); dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref'); @@ -78,13 +91,6 @@ if ($prev_id > 0 || $ref) print ''.$langs->trans("Date").''.dol_print_date($object->datec, 'day').''; print ''.$langs->trans("Amount").''.price($object->amount).''; - // Status - /* - print ''.$langs->trans('Status').''; - print ''.$object->getLibStatut(1).''; - print ''; - */ - if ($object->date_trans <> 0) { $muser = new User($db); @@ -92,7 +98,7 @@ if ($prev_id > 0 || $ref) print ''.$langs->trans("TransData").''; print dol_print_date($object->date_trans, 'day'); - print ' '.$langs->trans("By").' '.$muser->getFullName($langs).''; + print ' '.$langs->trans("By").' '.$muser->getFullName($langs).''; print ''.$langs->trans("TransMetod").''; print $object->methodes_trans[$object->method_trans]; print ''; @@ -115,7 +121,9 @@ if ($prev_id > 0 || $ref) $result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT); print ''; - print $langs->trans("BankToReceiveWithdraw"); + $labelofbankfield = "BankToReceiveWithdraw"; + if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer'; + print $langs->trans($labelofbankfield); print ''; print ''; if ($acc->id > 0) @@ -124,25 +132,26 @@ if ($prev_id > 0 || $ref) print ''; print ''; - print $langs->trans("WithdrawalFile").''; + $labelfororderfield = 'WithdrawalFile'; + if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile'; + print $langs->trans($labelfororderfield).''; $relativepath = 'receipts/'.$object->ref.'.xml'; - print ''.$relativepath.''; + $modulepart = 'prelevement'; + if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer'; + print ''.$relativepath.''; print ''; print ''; dol_fiche_end(); - } - else - { - $langs->load("errors"); - print $langs->trans("Error"); + } else { + dol_print_error($db); } /* * Stats */ - $ligne = new LignePrelevement($db); + $line = new LignePrelevement($db); $sql = "SELECT sum(pl.amount), pl.statut"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl"; @@ -168,7 +177,7 @@ if ($prev_id > 0 || $ref) print ''; - print $ligne->LibStatut($row[1], 1); + print $line->LibStatut($row[1], 1); print ''; print price($row[0]); @@ -185,9 +194,7 @@ if ($prev_id > 0 || $ref) print ""; $db->free($resql); - } - else - { + } else { print $db->error().' '.$sql; } } diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index eb2932fd4cb..4104249df5c 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -22,7 +22,7 @@ /** * \file htdocs/compta/prelevement/index.php * \ingroup prelevement - * \brief Prelevement index page + * \brief Home page for direct debit orders */ @@ -78,13 +78,13 @@ print ''.$langs->trans("Statistics").''.$langs->trans("NbOfInvoiceToWithdraw").''; print ''; print ''; -print $bprev->NbFactureAPrelever(); +print $bprev->nbOfInvoiceToPay('direct-debit'); print ''; print ''; print ''.$langs->trans("AmountToWithdraw").''; print ''; -print price($bprev->SommeAPrelever(), '', '', 1, -1, -1, 'auto'); +print price($bprev->SommeAPrelever('direct-debit'), '', '', 1, -1, -1, 'auto'); print '
'; @@ -94,7 +94,7 @@ print '
'; */ $sql = "SELECT f.ref, f.rowid, f.total_ttc, f.fk_statut, f.paye, f.type,"; $sql .= " pfd.date_demande, pfd.amount,"; -$sql .= " s.nom as name, s.rowid as socid"; +$sql .= " s.nom as name, s.email, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -106,7 +106,9 @@ if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; } -$sql .= " AND pfd.traite = 0 AND pfd.fk_facture = f.rowid"; +$sql .= " AND pfd.traite = 0"; +$sql .= " AND pfd.ext_payment_id IS NULL"; +$sql .= " AND pfd.fk_facture = f.rowid"; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND f.fk_soc = ".$socid; @@ -133,14 +135,15 @@ if ($resql) $invoicestatic->type = $obj->type; $alreadypayed = $invoicestatic->getSommePaiement(); + $thirdpartystatic->id = $obj->socid; + $thirdpartystatic->name = $obj->name; + $thirdpartystatic->email = $obj->email; print ''; print $invoicestatic->getNomUrl(1, 'withdraw'); print ''; print ''; - $thirdpartystatic->id = $obj->socid; - $thirdpartystatic->name = $obj->name; print $thirdpartystatic->getNomUrl(1, 'customer'); print ''; @@ -158,15 +161,11 @@ if ($resql) print ''; $i++; } - } - else - { + } else { print ''.$langs->trans("NoInvoiceToWithdraw", $langs->transnoentitiesnoconv("StandingOrders")).''; } print "
"; -} -else -{ +} else { dol_print_error($db); } @@ -175,11 +174,14 @@ print '
'; /* - * Withdraw receipts + * Direct debit orders */ + $limit = 5; $sql = "SELECT p.rowid, p.ref, p.amount, p.datec, p.statut"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; +$sql .= " WHERE p.type = 'debit-order'"; +$sql .= " AND entity IN (" . getEntity('prelevement') . ")"; $sql .= " ORDER BY datec DESC"; $sql .= $db->plimit($limit); @@ -192,37 +194,41 @@ if ($result) print"\n\n"; print '
'; print ''; - print ''; + print ''; + print ''; print ''; print ''; print ''; print ''; - while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($result); + if ($num > 0) { + while ($i < min($num, $limit)) + { + $obj = $db->fetch_object($result); - print ''; + print ''; - print "\n"; - print '\n"; - print '\n"; - print '\n"; + print "\n"; + print '\n"; + print '\n"; + print '\n"; - print "\n"; - $i++; + print "\n"; + $i++; + } + } else { + print ''; } + print "
'.$langs->trans("LastWithdrawalReceipt", $limit).'
'.$langs->trans("LastWithdrawalReceipt", $limit).''.$langs->trans("Date").''.$langs->trans("Amount").''.$langs->trans("Status").'
"; - $bprev->id = $obj->rowid; - $bprev->ref = $obj->ref; - $bprev->statut = $obj->statut; - print $bprev->getNomUrl(1); - print "'.dol_print_date($db->jdate($obj->datec), "dayhour")."'.price($obj->amount)."'.$bprev->getLibStatut(3).""; + $bprev->id = $obj->rowid; + $bprev->ref = $obj->ref; + $bprev->statut = $obj->statut; + print $bprev->getNomUrl(1); + print "'.dol_print_date($db->jdate($obj->datec), "dayhour")."'.price($obj->amount)."'.$bprev->getLibStatut(3)."
'.$langs->trans("None").'

"; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index 9169f71a377..ae146522f39 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -43,6 +43,8 @@ $action = GETPOST('action', 'alpha'); $id = GETPOST('id', 'int'); $socid = GETPOST('socid', 'int'); +$type = GETPOST('type', 'aZ09'); + $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortorder = GETPOST('sortorder', 'alpha'); $sortfield = GETPOST('sortfield', 'alpha'); @@ -73,9 +75,7 @@ if ($action == 'confirm_rejet') { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); - } - - elseif ($daterej > dol_now()) + } elseif ($daterej > dol_now()) { $error++; $langs->load("error"); @@ -102,14 +102,10 @@ if ($action == 'confirm_rejet') header("Location: line.php?id=".$id); exit; } - } - else - { + } else { $action = "rejet"; } - } - else - { + } else { header("Location: line.php?id=".$id); exit; } @@ -122,11 +118,18 @@ if ($action == 'confirm_rejet') $invoicestatic = new Facture($db); -llxHeader('', $langs->trans("StandingOrder")); +$title = $langs->trans("WithdrawalsLine"); +if ($type == 'bank-transfer') { + $title = $langs->trans("CreditTransferLine"); +} + +llxHeader('', $title); + +$head = array(); $h = 0; $head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/line.php?id='.$id; -$head[$h][1] = $langs->trans("StandingOrder"); +$head[$h][1] = $title; $hselected = $h; $h++; @@ -134,20 +137,24 @@ if ($id) { $lipre = new LignePrelevement($db); - if ($lipre->fetch($id) == 0) + if ($lipre->fetch($id) >= 0) { $bon = new BonPrelevement($db); $bon->fetch($lipre->bon_rowid); - dol_fiche_head($head, $hselected, $langs->trans("StandingOrder")); + dol_fiche_head($head, $hselected, $title); - print ''; + print '
'; - print ''; + + print ''; - print ''; - print ''; - print ''; + + print ''; + print ''; + print ''; if ($lipre->statut == 3) { @@ -155,31 +162,25 @@ if ($id) $resf = $rej->fetch($lipre->id); if ($resf == 0) { - print ''; - print ''; + print ''; - print ''; - } - else - { - print ''; + print ''; + } else { + print ''; } } print '
'.$langs->trans("WithdrawalsReceipts").''; + print '
'.$langs->trans("Ref").''; + print $id.'
'.$langs->trans("WithdrawalsReceipts").''; print $bon->getNomUrl(1).'
'.$langs->trans("Date").''.dol_print_date($bon->datec, 'day').'
'.$langs->trans("Amount").''.price($lipre->amount).'
'.$langs->trans("Status").''.$lipre->LibStatut($lipre->statut, 1).'
'.$langs->trans("Date").''.dol_print_date($bon->datec, 'day').'
'.$langs->trans("Amount").''.price($lipre->amount).'
'.$langs->trans("Status").''.$lipre->LibStatut($lipre->statut, 1).'
'.$langs->trans("RefusedReason").''.$rej->motif.'
'.$langs->trans("RefusedData").''; + print '
'.$langs->trans("RefusedReason").''.$rej->motif.'
'.$langs->trans("RefusedData").''; if ($rej->date_rejet == 0) { /* Historique pour certaines install */ print $langs->trans("Unknown"); - } - else - { + } else { print dol_print_date($rej->date_rejet, 'day'); } print '
'.$langs->trans("RefusedInvoicing").''.$rej->invoicing.'
'.$resf.'
'.$langs->trans("RefusedInvoicing").''.$rej->invoicing.'
'.$resf.'
'; dol_fiche_end(); - } - else - { + } else { dol_print_error($db); } @@ -195,7 +196,7 @@ if ($id) print ''; print ''; print ''; - print ''; + print '
'; print ''; print ''; @@ -215,13 +216,13 @@ if ($id) //Reason print ''; print ''; //Facturer print ''; print ''; print '
'.$langs->trans("WithdrawalRefused").'
'.$langs->trans("RefusedReason").''; - print $form->selectarray("motif", $rej->motifs); + print $form->selectarray("motif", $rej->motifs, GETPOSTISSET('motif') ? GETPOST('motif', 'int') : ''); print '
'.$langs->trans("RefusedInvoicing").''; - print $form->selectarray("facturer", $rej->facturer); + print $form->selectarray("facturer", $rej->facturer, GETPOSTISSET('facturer') ? GETPOST('facturer', 'int') : ''); print '

'; @@ -240,20 +241,18 @@ if ($id) if ($action == '') { - if ($bon->statut == 2 && $lipre->statut == 2) + if ($bon->statut == BonPrelevement::STATUS_CREDITED) { - if ($user->rights->prelevement->bons->credit) - { - print "id\">".$langs->trans("StandingOrderReject").""; + if ($lipre->statut == 2) { + if ($user->rights->prelevement->bons->credit) + { + print ''.$langs->trans("StandingOrderReject").''; + } else { + print ''.$langs->trans("StandingOrderReject").''; + } } - else - { - print "trans("NotAllowed")."\">".$langs->trans("StandingOrderReject").""; - } - } - else - { - print "trans("NotPossibleForThisStatusOfWithdrawReceiptORLine")."\">".$langs->trans("StandingOrderReject").""; + } else { + print ''.$langs->trans("StandingOrderReject").''; } } @@ -329,9 +328,7 @@ if ($id) print ""; $db->free($result); - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 48f9bcc7c54..2666e8587e6 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -21,7 +21,7 @@ /** * \file htdocs/compta/prelevement/list.php * \ingroup prelevement - * \brief Page liste des prelevements + * \brief Page list of direct debit orders or credit transfers orders */ require '../../main.inc.php'; @@ -47,6 +47,8 @@ $socid = GETPOST('socid', 'int'); if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$type = GETPOST('type', 'aZ09'); + $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); @@ -94,23 +96,35 @@ $form = new Form($db); llxHeader('', $langs->trans("WithdrawalsLines")); $sql = "SELECT p.rowid, p.ref, p.statut as status, p.datec"; -$sql .= " ,f.rowid as facid, f.ref as invoiceref, f.total_ttc"; +$sql .= " , f.rowid as facid, f.ref as invoiceref, f.total_ttc"; $sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.email"; $sql .= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql .= " , ".MAIN_DB_PREFIX."prelevement_facture as pf"; -$sql .= " , ".MAIN_DB_PREFIX."facture as f"; +if ($type == 'bank-transfer') { + $sql .= " , ".MAIN_DB_PREFIX."facture_fourn as f"; +} else { + $sql .= " , ".MAIN_DB_PREFIX."facture as f"; +} $sql .= " , ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE pl.fk_prelevement_bons = p.rowid"; $sql .= " AND pf.fk_prelevement_lignes = pl.rowid"; -$sql .= " AND pf.fk_facture = f.rowid"; +if ($type == 'bank-transfer') { + $sql .= " AND pf.fk_facture_fourn = f.rowid"; +} else { + $sql .= " AND pf.fk_facture = f.rowid"; +} $sql .= " AND f.fk_soc = s.rowid"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; if ($socid) $sql .= " AND s.rowid = ".$socid; if ($search_line) $sql .= " AND pl.rowid = '".$db->escape($search_line)."'"; if ($search_bon) $sql .= natural_search("p.ref", $search_bon); -if ($search_code) $sql .= natural_search("s.code_client", $search_code); +if ($type == 'bank-transfer') { + if ($search_code) $sql .= natural_search("s.code_fourn", $search_code); +} else { + if ($search_code) $sql .= natural_search("s.code_client", $search_code); +} if ($search_company) $sql .= natural_search("s.nom", $search_company); $sql .= $db->order($sortfield, $sortorder); @@ -150,7 +164,11 @@ if ($result) print ''; print ''; - print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit, 0, 0, 1); + $title = $langs->trans("WithdrawalsLines"); + if ($type == 'bank-transfer') { + $title = $langs->trans("CreditTransferLines"); + } + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit, 0, 0, 1); $moreforfilter = ''; @@ -171,9 +189,14 @@ if ($result) print ''; print ''; + $columntitle= "WithdrawalsReceipts"; + if ($type == 'bank-transfer') { + $columntitle= "BankTransferReceipts"; + } + print ''; + print_liste_field_titre($columntitle, $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); - print_liste_field_titre("WithdrawalsReceipts", $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder); print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", '', $param, '', $sortfield, $sortorder, 'center '); @@ -182,62 +205,65 @@ if ($result) print_liste_field_titre(''); print "\n"; - while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($result); + if ($num) { + while ($i < min($num, $limit)) + { + $obj = $db->fetch_object($result); - $bon->ref = $obj->ref; - $bon->statut = $obj->status; + $bon->id = $obj->rowid; + $bon->ref = $obj->ref; + $bon->statut = $obj->status; - $company->id = $obj->socid; - $company->name = $obj->name; - $company->email = $obj->email; - $company->code_client = $obj->code_client; + $company->id = $obj->socid; + $company->name = $obj->name; + $company->email = $obj->email; + $company->code_client = $obj->code_client; - print ''; + print ''; - print ''; - print $line->LibStatut($obj->statut_ligne, 2); - print " "; - print ''; - print substr('000000'.$obj->rowid_ligne, -6); - print ''; + print ''; + print $bon->getNomUrl(1); + print "\n"; - print ''; - print $bon->getNomUrl(1); - print "\n"; + print ''; + print $line->LibStatut($obj->statut_ligne, 2); + print " "; + print ''; + print substr('000000'.$obj->rowid_ligne, -6); + print ''; - print ''; - print ''; - print img_object($langs->trans("ShowBill"), "bill"); - print ' '.$obj->invoiceref."\n"; - print ''; - print ''; + print ''; + print ''; + print img_object($langs->trans("ShowBill"), "bill"); + print ' '.$obj->invoiceref."\n"; + print ''; + print ''; - print ''; - print $company->getNomUrl(1); - print "\n"; + print ''; + print $company->getNomUrl(1); + print "\n"; - print ''.$obj->code_client."\n"; + print ''.$obj->code_client."\n"; - print ''.dol_print_date($db->jdate($obj->datec), 'day')."\n"; + print ''.dol_print_date($db->jdate($obj->datec), 'day')."\n"; - print ''.price($obj->amount)."\n"; + print ''.price($obj->amount)."\n"; - print ' '; + print ' '; - print "\n"; - $i++; - } + print "\n"; + $i++; + } + } else { + print ''.$langs->trans("None").''; + } print ""; print '
'; print ''; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 6d1994b7a4b..a8481d25f7a 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -38,6 +38,8 @@ $socid = GETPOST('socid', 'int'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$type = GETPOST('type', 'aZ09'); + // Get supervariables $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortorder = GETPOST('sortorder', 'alpha'); @@ -47,11 +49,18 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + + /* * View */ -llxHeader('', $langs->trans("WithdrawsRefused")); +$title = $langs->trans("WithdrawsRefused"); +if ($type == 'bank-transfer') { + $title = $langs->trans("CreditTransfersRefused"); +} + +llxHeader('', $title); if ($sortorder == "") $sortorder = "DESC"; if ($sortfield == "") $sortfield = "p.datec"; @@ -76,9 +85,14 @@ $sql .= " WHERE pr.fk_prelevement_lignes = pl.rowid"; $sql .= " AND pl.fk_prelevement_bons = p.rowid"; $sql .= " AND pl.fk_soc = s.rowid"; $sql .= " AND p.entity = ".$conf->entity; +if ($type == 'bank-transfer') { + $sql .= " AND p.type = 'bank-transfer'"; +} else { + $sql .= " AND p.type = 'debit-order'"; +} if ($socid) $sql .= " AND s.rowid = ".$socid; -$sql .= " ".$db->order($sortfield, $sortorder); -$sql .= " ".$db->plimit($conf->liste_limit + 1, $offset); +$sql .= $db->order($sortfield, $sortorder); +$sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); if ($result) @@ -86,40 +100,44 @@ if ($result) $num = $db->num_rows($result); $i = 0; - print_barre_liste($langs->trans("WithdrawsRefused"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num); + $param = ''; + + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num); print"\n\n"; print ''; print ''; - print_liste_field_titre("Line", $_SERVER["PHP_SELF"], "p.ref", '', $urladd); - print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $urladd); - print_liste_field_titre("Reason", $_SERVER["PHP_SELF"], "pr.motif", "", $urladd); + print_liste_field_titre("Line", $_SERVER["PHP_SELF"], "p.ref", '', $param); + print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $param); + print_liste_field_titre("Reason", $_SERVER["PHP_SELF"], "pr.motif", "", $param); print "\n"; - $total = 0; + if ($num) { + while ($i < min($num, $limit)) + { + $obj = $db->fetch_object($result); - while ($i < min($num, $conf->liste_limit)) - { - $obj = $db->fetch_object($result); + print ''; - print '"; - print substr('000000'.$obj->rowid, -6).""; + print '\n"; - print '\n"; + print ''; - print ''; - print "\n"; + print "\n"; - $i++; + $i++; + } + } else { + print ''; } print "
'; - print $line->LibStatut($obj->statut, 2).' '; - print ''; + print ''; + print $line->LibStatut($obj->statut, 2).' '; + print ''; + print substr('000000'.$obj->rowid, -6)."'.$obj->nom."'.stripslashes($obj->nom)."'.$rej->motifs[$obj->motif].''.$rej->motifs[$obj->motif].'
'.$langs->trans("None").'
"; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index c6d1962ff46..1d6e1c2a183 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -36,20 +36,32 @@ $socid = GETPOST('socid', 'int'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$type = GETPOST('type', 'aZ09'); + /* * View */ -llxHeader('', $langs->trans("WithdrawStatistics")); +$title = $langs->trans("WithdrawStatistics"); +if ($type == 'bank-transfer') { + $title = $langs->trans("CreditTransferStatistics"); +} -print load_fiche_titre($langs->trans("Statistics")); +llxHeader('', $title); + +print load_fiche_titre($title); // Define total and nbtotal $sql = "SELECT sum(pl.amount), count(pl.amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql .= ", ".MAIN_DB_PREFIX."prelevement_bons as pb"; $sql .= " WHERE pl.fk_prelevement_bons = pb.rowid"; +if ($type == 'bank-transfer') { + $sql .= " AND pb.type = 'bank-transfer'"; +} else { + $sql .= " AND pb.type = 'debit-order'"; +} $sql .= " AND pb.entity = ".$conf->entity; $resql = $db->query($sql); if ($resql) @@ -71,7 +83,7 @@ if ($resql) */ print '
'; -print load_fiche_titre($langs->trans("WithdrawStatistics"), '', ''); +print load_fiche_titre($langs->trans("ByStatus"), '', ''); $ligne = new LignePrelevement($db); @@ -80,6 +92,11 @@ $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql .= ", ".MAIN_DB_PREFIX."prelevement_bons as pb"; $sql .= " WHERE pl.fk_prelevement_bons = pb.rowid"; $sql .= " AND pb.entity = ".$conf->entity; +if ($type == 'bank-transfer') { + $sql .= " AND pb.type = 'bank-transfer'"; +} else { + $sql .= " AND pb.type = 'debit-order'"; +} $sql .= " GROUP BY pl.statut"; $resql = $db->query($sql); @@ -125,9 +142,7 @@ if ($resql) print ' '; print ""; $db->free(); -} -else -{ +} else { dol_print_error($db); } @@ -137,7 +152,7 @@ else */ print '
'; -print load_fiche_titre($langs->trans("WithdrawRejectStatistics"), '', ''); +print load_fiche_titre($langs->trans("Rejects"), '', ''); // Define total and nbtotal @@ -147,6 +162,11 @@ $sql .= ", ".MAIN_DB_PREFIX."prelevement_bons as pb"; $sql .= " WHERE pl.fk_prelevement_bons = pb.rowid"; $sql .= " AND pb.entity = ".$conf->entity; $sql .= " AND pl.statut = 3"; +if ($type == 'bank-transfer') { + $sql .= " AND pb.type = 'bank-transfer'"; +} else { + $sql .= " AND pb.type = 'debit-order'"; +} $resql = $db->query($sql); if ($resql) { @@ -164,6 +184,7 @@ if ($resql) /* * Stats sur les rejets */ + $sql = "SELECT sum(pl.amount), count(pl.amount) as cc, pr.motif"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql .= ", ".MAIN_DB_PREFIX."prelevement_bons as pb"; @@ -172,6 +193,11 @@ $sql .= " WHERE pl.fk_prelevement_bons = pb.rowid"; $sql .= " AND pb.entity = ".$conf->entity; $sql .= " AND pl.statut = 3"; $sql .= " AND pr.fk_prelevement_lignes = pl.rowid"; +if ($type == 'bank-transfer') { + $sql .= " AND pb.type = 'bank-transfer'"; +} else { + $sql .= " AND pb.type = 'debit-order'"; +} $sql .= " GROUP BY pr.motif"; $sql .= " ORDER BY cc DESC"; @@ -219,9 +245,7 @@ if ($resql) print ' '; print ""; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 3f2112537b1..8b75ec38fce 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -211,15 +211,11 @@ if ($id > 0) } $db->free($resqlp); - } - else - { + } else { dol_print_error($db); } } - } - else - { + } else { dol_print_error($db); } @@ -288,9 +284,7 @@ if ($id > 0) print ""; } -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 27bc4526a3e..671921506d5 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -99,8 +99,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $month_end = $month_start - 1; if ($month_end < 1) $month_end = 12; else $year_end++; - } - else $month_end = $month_start; + } else $month_end = $month_start; $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); } if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } @@ -151,11 +150,10 @@ if ($modecompta == "CREANCES-DETTES") $periodlink = ($year_start ? "".img_previous()." ".img_next()."" : ""); $description = $langs->trans("RulesResultDue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); - else $description .= $langs->trans("DepositsAreIncluded"); + else $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -166,8 +164,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description = $langs->trans("RulesResultInOut"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups"); $calcmode = $langs->trans("CalcModeBookkeeping"); @@ -212,9 +209,7 @@ print_liste_field_titre(''); if ($modecompta == 'BOOKKEEPING') { print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], 'amount', '', $param, 'class="right"', $sortfield, $sortorder); -} -else -{ +} else { if ($modecompta == 'CREANCES-DETTES') { print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], 'amount_ht', '', $param, 'class="right"', $sortfield, $sortorder); @@ -312,16 +307,11 @@ if ($modecompta == 'BOOKKEEPING') $i++; } - } - else - { + } else { print ''.$langs->trans("NoRecordFound").''; } - } - else dol_print_error($db); -} -else -{ + } else dol_print_error($db); +} else { /* * Factures clients */ @@ -336,12 +326,10 @@ else $sql .= " AND f.fk_statut IN (1,2)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql .= " AND f.type IN (0,1,2,5)"; - else - $sql .= " AND f.type IN (0,1,2,3,5)"; + else $sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == 'RECETTES-DEPENSES') + } elseif ($modecompta == 'RECETTES-DEPENSES') { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les @@ -463,12 +451,10 @@ else $sql .= " AND f.fk_statut IN (1,2)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql .= " AND f.type IN (0,1,2)"; - else - $sql .= " AND f.type IN (0,1,2,3)"; + else $sql .= " AND f.type IN (0,1,2,3)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == 'RECETTES-DEPENSES') + } elseif ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT s.nom as name, s.rowid as socid, sum(pf.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."paiementfourn as p"; @@ -517,9 +503,7 @@ else print "\n"; $i++; } - } - else - { + } else { print ' '; print ''.$langs->trans("None").''; print ''; @@ -552,8 +536,7 @@ else $sql .= " AND c.deductible = 0"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == 'RECETTES-DEPENSES') + } elseif ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT c.id, c.libelle as label, sum(p.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -597,8 +580,7 @@ else print ''; $i++; } - } - else { + } else { print ' '; print ''.$langs->trans("None").''; print ''; @@ -629,8 +611,7 @@ else if (!empty($date_start) && !empty($date_end)) $sql .= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; $sql .= " AND cs.entity = ".$conf->entity; - } - elseif ($modecompta == 'RECETTES-DEPENSES') + } elseif ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT c.id, c.libelle as label, sum(p.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -674,8 +655,7 @@ else print ''; $i++; } - } - else { + } else { print ' '; print ''.$langs->trans("None").''; print ''; @@ -767,16 +747,12 @@ else print ''; $i++; } - } - else - { + } else { print ' '; print ''.$langs->trans("None").''; print ''; } - } - else - { + } else { dol_print_error($db); } print ''; @@ -853,16 +829,12 @@ else print ''.price(-$obj->amount_ttc).''; print ''; } - } - else - { + } else { print ' '; print ''.$langs->trans("None").''; print ''; } - } - else - { + } else { dol_print_error($db); } print ''; @@ -887,9 +859,7 @@ else $sql .= " FROM ".MAIN_DB_PREFIX."don as p"; $sql .= " WHERE p.entity IN (".getEntity('donation').")"; $sql .= " AND fk_statut in (1,2)"; - } - else - { + } else { $sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."don as p"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid"; @@ -935,16 +905,12 @@ else print ''; $i++; } - } - else - { + } else { print ' '; print ''.$langs->trans("None").''; print ''; } - } - else - { + } else { dol_print_error($db); } print ''; @@ -1011,8 +977,7 @@ else print ''.price($subtotal_ht).''; print ''.price($subtotal_ttc).''; print ''; - } - else dol_print_error($db); + } else dol_print_error($db); } /* @@ -1060,8 +1025,7 @@ else print ''.price($subtotal_ht).''; print ''.price($subtotal_ttc).''; print ''; - } - else dol_print_error($db); + } else dol_print_error($db); } /* @@ -1083,8 +1047,7 @@ else $sql .= " WHERE f.fk_statut IN (1,2)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql .= " AND f.type IN (0,1,2,5)"; - else - $sql .= " AND f.type IN (0,1,2,3,5)"; + else $sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; @@ -1131,8 +1094,7 @@ else $sql .= " WHERE f.fk_statut IN (1,2)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql .= " AND f.type IN (0,1,2)"; - else - $sql .= " AND f.type IN (0,1,2,3)"; + else $sql .= " AND f.type IN (0,1,2,3)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; $sql .= " AND f.entity = ".$conf->entity; @@ -1172,9 +1134,7 @@ else print ' '."\n"; print ''.price($amount)."\n"; print "\n"; - } - else - { + } else { // VAT really already paid $amount = 0; $sql = "SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount"; @@ -1253,9 +1213,7 @@ else } } $db->free($result); - } - else - { + } else { dol_print_error($db); } print ' '; diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index ad81a3943c1..9ae666cb01a 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -78,8 +78,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $month_end = $month_start - 1; if ($month_end < 1) $month_end = 12; else $year_end++; - } - else $month_end = $month_start; + } else $month_end = $month_start; $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); } if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } @@ -131,11 +130,10 @@ if ($modecompta == 'CREANCES-DETTES') $description = $langs->trans("RulesAmountWithTaxIncluded"); $description .= '
'.$langs->trans("RulesResultDue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= "
".$langs->trans("DepositsAreNotIncluded"); - else $description .= "
".$langs->trans("DepositsAreIncluded"); + else $description .= "
".$langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") { +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear"); $calcmode = $langs->trans("CalcModeEngagement"); $calcmode .= '
('.$langs->trans("SeeReportInDueDebtMode", '', '').')'; @@ -146,8 +144,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") { $description .= '
'.$langs->trans("RulesResultInOut"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear"); $calcmode = $langs->trans("CalcModeBookkeeping"); @@ -191,8 +188,7 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod else $sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == "RECETTES-DEPENSES") + } elseif ($modecompta == "RECETTES-DEPENSES") { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les @@ -228,12 +224,10 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod $i++; } $db->free($result); - } - else { + } else { dol_print_error($db); } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -274,17 +268,14 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod $i++; } - } - else { + } else { dol_print_error($db); } - } - elseif ($modecompta == "RECETTES-DEPENSES") + } elseif ($modecompta == "RECETTES-DEPENSES") { // Nothing from this table } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -307,8 +298,7 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod else $sql .= " AND f.type IN (0,1,2,3)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == "RECETTES-DEPENSES") + } elseif ($modecompta == "RECETTES-DEPENSES") { $sql = "SELECT sum(pf.amount) as amount_ttc, date_format(p.datep,'%Y-%m') as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."paiementfourn as p"; @@ -343,12 +333,10 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod $i++; } $db->free($result); - } - else { + } else { dol_print_error($db); } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -429,8 +417,7 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom } else { dol_print_error($db); } - } - elseif ($modecompta == "RECETTES-DEPENSES") + } elseif ($modecompta == "RECETTES-DEPENSES") { // TVA really already paid $sql = "SELECT sum(t.amount) as amount, date_format(t.datev,'%Y-%m') as dm"; @@ -493,14 +480,13 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom dol_print_error($db); } } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } /* - * Charges sociales non deductibles + * Social contributions */ $subtotal_ht = 0; @@ -513,11 +499,9 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; $sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs"; $sql .= " WHERE cs.fk_type = c.id"; - $sql .= " AND c.deductible = 0"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == "RECETTES-DEPENSES") + } elseif ($modecompta == "RECETTES-DEPENSES") { $sql = "SELECT c.libelle as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -525,7 +509,6 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom $sql .= ", ".MAIN_DB_PREFIX."paiementcharge as p"; $sql .= " WHERE p.fk_charge = cs.rowid"; $sql .= " AND cs.fk_type = c.id"; - $sql .= " AND c.deductible = 0"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; } @@ -533,7 +516,7 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom $sql .= " AND cs.entity = ".$conf->entity; $sql .= " GROUP BY c.libelle, dm"; - dol_syslog("get social contributions deductible=0 ", LOG_DEBUG); + dol_syslog("get social contributions", LOG_DEBUG); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -554,70 +537,7 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom } else { dol_print_error($db); } -} -elseif ($modecompta == "BOOKKEEPING") -{ - // Nothing from this table -} - - -/* - * Charges sociales deductibles - */ - -$subtotal_ht = 0; -$subtotal_ttc = 0; -if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ - if ($modecompta == 'CREANCES-DETTES') - { - $sql = "SELECT c.libelle as nom, date_format(cs.date_ech,'%Y-%m') as dm, sum(cs.amount) as amount"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; - $sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs"; - $sql .= " WHERE cs.fk_type = c.id"; - $sql .= " AND c.deductible = 1"; - if (!empty($date_start) && !empty($date_end)) - $sql .= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == "RECETTES-DEPENSES") - { - $sql = "SELECT c.libelle as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; - $sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs"; - $sql .= ", ".MAIN_DB_PREFIX."paiementcharge as p"; - $sql .= " WHERE p.fk_charge = cs.rowid"; - $sql .= " AND cs.fk_type = c.id"; - $sql .= " AND c.deductible = 1"; - if (!empty($date_start) && !empty($date_end)) - $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; - } - - $sql .= " AND cs.entity = ".$conf->entity; - $sql .= " GROUP BY c.libelle, dm"; - - dol_syslog("get social contributions paid deductible=1", LOG_DEBUG); - $result = $db->query($sql); - if ($result) { - $num = $db->num_rows($result); - $i = 0; - if ($num) { - while ($i < $num) { - $obj = $db->fetch_object($result); - - if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0; - $decaiss[$obj->dm] += $obj->amount; - - if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0; - $decaiss_ttc[$obj->dm] += $obj->amount; - - $i++; - } - } - } else { - dol_print_error($db); - } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -664,8 +584,7 @@ if (!empty($conf->salaries->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo } else { dol_print_error($db); } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -723,19 +642,16 @@ if (!empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' | $decaiss_ttc[$obj->dm] += $obj->amount_ttc; } } - } - else - { + } else { dol_print_error($db); } -} -elseif ($modecompta == 'BOOKKEEPING') { +} elseif ($modecompta == 'BOOKKEEPING') { // Nothing from this table } /* - * Donation get dunning paiement + * Donation get dunning payments */ if (!empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) @@ -785,13 +701,10 @@ if (!empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom $i++; } } - } - else - { + } else { dol_print_error($db); } -} -elseif ($modecompta == 'BOOKKEEPING') { +} elseif ($modecompta == 'BOOKKEEPING') { // Nothing from this table } @@ -825,9 +738,7 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->ba $i++; } } - } - else - { + } else { dol_print_error($db); } @@ -855,9 +766,7 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->ba $i++; } } - } - else - { + } else { dol_print_error($db); } } @@ -893,9 +802,7 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan $i++; } } - } - else - { + } else { dol_print_error($db); } } @@ -960,9 +867,7 @@ if (!empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING')) $i++; } } - } - else - { + } else { dol_print_error($db); } } @@ -1041,9 +946,7 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) if (!isset($totsorties[$annee])) $totsorties[$annee] = 0; $totsorties[$annee] += $decaiss[$case]; } - } - else - { + } else { if (isset($decaiss_ttc[$case]) && $decaiss_ttc[$case] != 0) { print ''.price(price2num($decaiss_ttc[$case], 'MT')).''; @@ -1062,9 +965,7 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) if (!isset($totentrees[$annee])) $totentrees[$annee] = 0; $totentrees[$annee] += $encaiss[$case]; } - } - else - { + } else { if (isset($encaiss_ttc[$case])) { print ''.price(price2num($encaiss_ttc[$case], 'MT')).''; diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index 66adea3371f..48cb8b1154e 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -90,8 +90,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $month_end = $month_start - 1; if ($month_end < 1) $month_end = 12; else $year_end++; - } - else $month_end = $month_start; + } else $month_end = $month_start; $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); } if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } @@ -178,11 +177,10 @@ if ($modecompta == "CREANCES-DETTES") //$periodlink=''.img_previous().' '.img_next().''; $description = $langs->trans("RulesResultDue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); - else $description .= $langs->trans("DepositsAreIncluded"); + else $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") { +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("AnnualByAccountInputOutputMode"); $calcmode = $langs->trans("CalcModeEngagement"); $calcmode .= '
('.$langs->trans("SeeReportInDueDebtMode", '', '').')'; @@ -192,8 +190,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") { $description = $langs->trans("RulesResultInOut"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByPersonalizedAccountGroups"); $calcmode = $langs->trans("CalcModeBookkeeping"); @@ -248,13 +245,11 @@ if ($modecompta == 'CREANCES-DETTES') { //if (! empty($date_start) && ! empty($date_end)) // $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { //if (! empty($date_start) && ! empty($date_end)) // $sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Get array of all report groups that are active $cats = $AccCat->getCats(); // WARNING: Computed groups must be after group they include @@ -375,7 +370,7 @@ elseif ($modecompta == "BOOKKEEPING") print "\n"; //var_dump($sommes); - } else // normal category + } else // normal category { $code = $cat['code']; // Category code we process diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index d7f20622a43..bcdfe1f5238 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -128,9 +128,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') { header("Location: list.php"); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -145,29 +143,23 @@ if ($action == 'add' && $user->rights->tax->charges->creer) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); $action = 'create'; - } - elseif (!$dateperiod) + } elseif (!$dateperiod) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Period")), null, 'errors'); $action = 'create'; - } - elseif (!$actioncode > 0) + } elseif (!$actioncode > 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); $action = 'create'; - } - elseif (empty($amount)) + } elseif (empty($amount)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; - } - elseif (!is_numeric($amount)) + } elseif (!is_numeric($amount)) { setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; - } - else - { + } else { $object->type = $actioncode; $object->label = GETPOST('label', 'alpha'); $object->date_ech = $dateech; @@ -195,24 +187,19 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->tax->charges->cre { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); $action = 'edit'; - } - elseif (!$dateperiod) + } elseif (!$dateperiod) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Period")), null, 'errors'); $action = 'edit'; - } - elseif (empty($amount)) + } elseif (empty($amount)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); $action = 'edit'; - } - elseif (!is_numeric($amount)) + } elseif (!is_numeric($amount)) { setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; - } - else - { + } else { $result = $object->fetch($id); $object->date_ech = $dateech; @@ -245,16 +232,14 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char if (GETPOST('clone_label', 'alphanohtml')) { $object->label = GETPOST('clone_label', 'alphanohtml'); - } - else { + } else { $object->label = $langs->trans("CopyOf").' '.$object->label; } if (GETPOST('clone_for_next_month', 'int')) { $object->periode = dol_time_plus_duree($object->periode, 1, 'm'); $object->date_ech = dol_time_plus_duree($object->date_ech, 1, 'm'); - } - else { + } else { $newdateperiod = dol_mktime(0, 0, 0, GETPOST('clone_periodmonth', 'int'), GETPOST('clone_periodday', 'int'), GETPOST('clone_periodyear', 'int')); $newdateech = dol_mktime(0, 0, 0, GETPOST('clone_date_echmonth', 'int'), GETPOST('clone_date_echday', 'int'), GETPOST('clone_date_echyear', 'int')); if ($newdateperiod) $object->periode = $newdateperiod; @@ -271,18 +256,14 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; - } - else - { + } else { $id = $originalId; $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } } - } - else - { + } else { $db->rollback(); dol_print_error($db, $object->error); } @@ -431,9 +412,7 @@ if ($id > 0) if (!empty($conf->global->TAX_ADD_CLON_FOR_NEXT_MONTH_CHECKBOX)) { $formquestion[] = array('type' => 'checkbox', 'name' => 'clone_for_next_month', 'label' => $langs->trans("CloneTaxForNextMonth"), 'value' => 1); - } - else - { + } else { $formquestion[] = array('type' => 'date', 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1); $formquestion[] = array('type' => 'date', 'name' => 'clone_period', 'label' => $langs->trans("PeriodEndDate"), 'value' => -1); } @@ -502,6 +481,8 @@ if ($id > 0) } $morehtmlref .= '
'; + $morehtmlright = ''; + $linkback = ''.$langs->trans("BackToList").''; $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status @@ -535,9 +516,7 @@ if ($id > 0) if ($action == 'edit') { print $form->selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1); - } - else - { + } else { print dol_print_date($object->periode, "day"); } print ""; @@ -548,8 +527,7 @@ if ($id > 0) print ''.$langs->trans("AmountTTC").""; print ''; print ""; - } - else { + } else { print ''.$langs->trans("AmountTTC").''.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).''; } @@ -674,9 +652,7 @@ if ($id > 0) $totalpaye += $objp->amount; $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; print ''; print ''; @@ -695,9 +671,7 @@ if ($id > 0) print ''; $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -767,9 +741,7 @@ if ($id > 0) print ""; } - } - else - { + } else { /* Social contribution not found */ dol_print_error('', $object->error); } diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index b91d9ca31ee..cc66b56aabd 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -459,28 +459,23 @@ class Cchargesociales { if ($status == 1) return $langs->trans('Enabled'); elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 1) + } elseif ($mode == 1) { if ($status == 1) return $langs->trans('Enabled'); elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5'); - } - elseif ($mode == 4) + } elseif ($mode == 4) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 5) + } elseif ($mode == 5) { if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 6d3f4dffa4a..81ae1e28f20 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -171,14 +171,10 @@ class ChargeSociales extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -252,14 +248,11 @@ class ChargeSociales extends CommonObject if (empty($error)) { $this->db->commit(); return $this->id; - } - else { + } else { $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -328,9 +321,7 @@ class ChargeSociales extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -386,9 +377,7 @@ class ChargeSociales extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -421,14 +410,10 @@ class ChargeSociales extends CommonObject $obj = $this->db->fetch_object($result); $this->db->free($result); return $obj->amount; - } - else - { + } else { return 0; } - } - else - { + } else { print $this->db->error(); return -1; } @@ -612,9 +597,7 @@ class ChargeSociales extends CommonObject $this->db->free($resql); return $amount; - } - else - { + } else { return -1; } } @@ -667,9 +650,7 @@ class ChargeSociales extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index bae8d28a756..62b02860f08 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -134,9 +134,8 @@ class PaymentSocialContribution extends CommonObject if (isset($this->fk_charge)) $this->fk_charge = (int) $this->fk_charge; if (isset($this->amount)) $this->amount = trim($this->amount); if (isset($this->fk_typepaiement)) $this->fk_typepaiement = (int) $this->fk_typepaiement; - if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); - if (isset($this->note)) $this->note = trim($this->note); + if (isset($this->note_private)) $this->note_private = trim($this->note_private); if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank; if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat; if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; @@ -159,7 +158,7 @@ class PaymentSocialContribution extends CommonObject if ($totalamount != 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiementcharge (fk_charge, datec, datep, amount,"; - $sql .= " fk_typepaiement, num_paiement as num_payment, note, fk_user_creat, fk_bank)"; + $sql .= " fk_typepaiement, num_paiement, note, fk_user_creat, fk_bank)"; $sql .= " VALUES ($this->chid, '".$this->db->idate($now)."',"; $sql .= " '".$this->db->idate($this->datepaye)."',"; $sql .= " ".$totalamount.","; @@ -194,14 +193,11 @@ class PaymentSocialContribution extends CommonObject if ($remaintopay == 0) { $result = $contrib->set_paid($user); - } - else dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing."); + } else dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing."); } } } - } - else - { + } else { $error++; } } @@ -215,9 +211,7 @@ class PaymentSocialContribution extends CommonObject $this->total = $totalamount; // deprecated $this->db->commit(); return $this->id; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -270,9 +264,8 @@ class PaymentSocialContribution extends CommonObject $this->datep = $this->db->jdate($obj->datep); $this->amount = $obj->amount; $this->fk_typepaiement = $obj->fk_typepaiement; - $this->num_paiement = $obj->num_payment; $this->num_payment = $obj->num_payment; - $this->note = $obj->note; + $this->note_private = $obj->note; $this->fk_bank = $obj->fk_bank; $this->fk_user_creat = $obj->fk_user_creat; $this->fk_user_modif = $obj->fk_user_modif; @@ -286,9 +279,7 @@ class PaymentSocialContribution extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -312,9 +303,8 @@ class PaymentSocialContribution extends CommonObject if (isset($this->fk_charge)) $this->fk_charge = (int) $this->fk_charge; if (isset($this->amount)) $this->amount = trim($this->amount); if (isset($this->fk_typepaiement)) $this->fk_typepaiement = (int) $this->fk_typepaiement; - if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); - if (isset($this->note)) $this->note = trim($this->note); + if (isset($this->note_private)) $this->note_private = trim($this->note_private); if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank; if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat; if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; @@ -333,7 +323,7 @@ class PaymentSocialContribution extends CommonObject $sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').","; $sql .= " amount=".(isset($this->amount) ? $this->amount : "null").","; $sql .= " fk_typepaiement=".(isset($this->fk_typepaiement) ? $this->fk_typepaiement : "null").","; - $sql .= " num_paiement=".(isset($this->num_paiement) ? "'".$this->db->escape($this->num_paiement)."'" : "null").","; + $sql .= " num_paiement=".(isset($this->num_payment) ? "'".$this->db->escape($this->num_payment)."'" : "null").","; $sql .= " note=".(isset($this->note) ? "'".$this->db->escape($this->note)."'" : "null").","; $sql .= " fk_bank=".(isset($this->fk_bank) ? $this->fk_bank : "null").","; $sql .= " fk_user_creat=".(isset($this->fk_user_creat) ? $this->fk_user_creat : "null").","; @@ -358,9 +348,7 @@ class PaymentSocialContribution extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -414,9 +402,7 @@ class PaymentSocialContribution extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -465,9 +451,7 @@ class PaymentSocialContribution extends CommonObject { $this->db->commit(); return $object->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -516,6 +500,9 @@ class PaymentSocialContribution extends CommonObject { global $conf; + // Clean data + $this->num_payment = trim($this->num_payment); + $error = 0; if (!empty($conf->banque->enabled)) @@ -534,7 +521,7 @@ class PaymentSocialContribution extends CommonObject $this->paiementtype, // Payment mode id or code ("CHQ or VIR for example") $label, $total, - $this->num_paiement, + $this->num_payment, '', $user, $emetteur_nom, @@ -577,9 +564,7 @@ class PaymentSocialContribution extends CommonObject if ($result <= 0) dol_print_error($this->db); } } - } - else - { + } else { $this->error = $acc->error; $error++; } @@ -588,9 +573,7 @@ class PaymentSocialContribution extends CommonObject if (!$error) { return 1; - } - else - { + } else { return -1; } } @@ -613,9 +596,7 @@ class PaymentSocialContribution extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->error(); return 0; } @@ -699,7 +680,7 @@ class PaymentSocialContribution extends CommonObject $result = ''; if (empty($this->ref)) $this->ref = $this->lib; - $label = $langs->trans("ShowPayment").': '.$this->ref; + $label = $langs->trans("Payment").': '.$this->ref; if (!empty($this->id)) { $link = ''; diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 3c73c8e6614..e7d76b94a76 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -163,9 +163,7 @@ if ($object->id) $permtoedit = $user->rights->fournisseur->facture->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 9d210c23d85..40ebcd1cb7c 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -80,9 +80,7 @@ if (!GETPOSTISSET('search_typeid')) $part = explode(':', $val); if ($part[0] == 'cs.fk_type') $search_typeid = $part[1]; } -} -else -{ +} else { $search_typeid = GETPOST('search_typeid', 'int'); } @@ -152,6 +150,7 @@ if ($search_typeid) { $sql .= " AND cs.fk_type=".$db->escape($search_typeid); } $sql .= " GROUP BY cs.rowid, cs.fk_type, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, c.libelle"; +if (!empty($conf->projet->enabled)) $sql .= ", p.rowid, p.ref, p.title"; $sql .= $db->order($sortfield, $sortorder); $totalnboflines = 0; @@ -208,9 +207,7 @@ if ($resql) $countrynotdefined = $langs->trans("ErrorSetACountryFirst"); print $countrynotdefined; print ''; - } - else - { + } else { print '
'; print ''."\n"; @@ -313,9 +310,7 @@ if ($resql) if ($obj->periode) { print 'jdate($obj->periode)).'">'.dol_print_date($db->jdate($obj->periode), 'day').''; - } - else - { + } else { print ' '; } print "\n"; @@ -345,9 +340,7 @@ if ($resql) print ''; } print ''; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index 5cfa5df06ed..fc1f66d5e2c 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -92,9 +92,7 @@ if ($mode != 'sconly') { $center = ($year ? ''.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')."" : ""); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit, 1); -} -else -{ +} else { print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit); } @@ -208,9 +206,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ''; print '"; print ""; - } - else - { + } else { dol_print_error($db); } print '
 '.price($totalpaye)."
'; @@ -287,9 +283,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ""; $db->free($result); - } - else - { + } else { dol_print_error($db); } } @@ -300,19 +294,15 @@ if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { $j = 1; $numlt = 3; -} -elseif ($mysoc->localtax1_assuj == "1") +} elseif ($mysoc->localtax1_assuj == "1") { $j = 1; $numlt = 2; -} -elseif ($mysoc->localtax2_assuj == "1") +} elseif ($mysoc->localtax2_assuj == "1") { $j = 2; $numlt = 3; -} -else -{ +} else { $j = 0; $numlt = 0; } @@ -388,9 +378,7 @@ while ($j < $numlt) print ""; $db->free($result); - } - else - { + } else { dol_print_error($db); } } @@ -472,9 +460,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) $db->free($result); print "
"; - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php index acd58f90217..ee859965552 100644 --- a/htdocs/compta/stats/byratecountry.php +++ b/htdocs/compta/stats/byratecountry.php @@ -77,9 +77,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end else $year_end++; } $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -209,8 +207,7 @@ if ($modecompta == "CREANCES-DETTES") { } $builddate = dol_now(); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByVatRate"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -220,11 +217,9 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); @@ -275,7 +270,9 @@ if ($modecompta == 'CREANCES-DETTES') { $sql .= " AND f.type IN (0,1,2,3,5)"; } $sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; - $sql .= " GROUP BY fd.tva_tx,fd.product_type, cc.label "; + $sql .= " GROUP BY fd.tva_tx,fd.product_type, cc.label, cc.code "; + $sql .= " ORDER BY country, product_type, vatrate"; + dol_syslog("htdocs/compta/tva/index.php sql=".$sql, LOG_DEBUG); $resql = $db->query($sql); @@ -356,7 +353,8 @@ if ($modecompta == 'CREANCES-DETTES') { $sql .= " AND ff.type IN (0,1,2,3,5)"; } $sql2 .= " AND ff.entity IN (".getEntity("facture_fourn", 0).")"; - $sql2 .= " GROUP BY ffd.tva_tx, ffd.product_type, cc.label"; + $sql2 .= " GROUP BY ffd.tva_tx, ffd.product_type, cc.label, cc.code "; + $sql2 .= " ORDER BY country, product_type, vatrate"; //print $sql2; dol_syslog("htdocs/compta/tva/index.php sql=".$sql, LOG_DEBUG); diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 5831467ce63..ab2c1dcadb1 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -103,9 +103,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end else $year_end++; } $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -181,8 +179,7 @@ if ($modecompta == "CREANCES-DETTES") { } $builddate = dol_now(); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByProductsAndServices"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -192,11 +189,9 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } @@ -232,8 +227,7 @@ if ($modecompta == 'CREANCES-DETTES') if ($selected_cat === -2) // Without any category { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp"; } @@ -255,8 +249,7 @@ if ($modecompta == 'CREANCES-DETTES') if ($selected_cat === -2) // Without any category { $sql .= " AND cp.fk_product is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; $sql .= ")"; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 4d4f56a1354..8b6caa89a8f 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -96,9 +96,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } -} -else -{ +} else { // TODO We define q } // $date_start and $date_end are defined. We force $year_start and $nbofyear @@ -154,11 +152,10 @@ if ($modecompta == "CREANCES-DETTES") { //$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $description = $langs->trans("RulesCADue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); - else $description .= $langs->trans("DepositsAreIncluded"); + else $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -167,12 +164,10 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // TODO -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { // TODO } @@ -396,8 +391,7 @@ if (count($amount)) { } else { //print ''; } - } - elseif ($modecompta == 'CREANCES-DETTES') { + } elseif ($modecompta == 'CREANCES-DETTES') { if ($key > 0) { print ''; } else { @@ -416,8 +410,7 @@ if (count($amount)) { } else { //print ''; } - } - elseif ($modecompta == 'CREANCES-DETTES') { + } elseif ($modecompta == 'CREANCES-DETTES') { if ($key > 0) { print ''; } else { @@ -431,8 +424,7 @@ if (count($amount)) { } else { //print ''; } - } - elseif ($modecompta == 'CREANCES-DETTES') { + } elseif ($modecompta == 'CREANCES-DETTES') { if ($key > 0) { print ''; } diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index bec20998cfa..ab71b147b50 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -113,9 +113,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } -} -else -{ +} else { // TODO We define q } @@ -180,11 +178,10 @@ if ($modecompta == "CREANCES-DETTES") //$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $description = $langs->trans("RulesCADue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); - else $description .= $langs->trans("DepositsAreIncluded"); + else $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByThirdParties"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -193,11 +190,9 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); @@ -223,8 +218,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -241,8 +235,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " AND cs.fk_soc is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$db->escape($selected_cat); if ($subcat) $sql .= " OR c.fk_parent = ".$db->escape($selected_cat); $sql .= ")"; @@ -261,8 +254,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -275,8 +267,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " AND cs.fk_soc is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; $sql .= ")"; diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index d1a64e218d2..796ce2cc6a6 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -73,8 +73,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end } $month_end = $month_start - 1; if ($month_end < 1) $month_end = 12; - } - else $month_end = $month_start; + } else $month_end = $month_start; $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); } if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } @@ -124,11 +123,10 @@ if ($modecompta == "CREANCES-DETTES") $periodlink = ($year_start ? "".img_previous()." ".img_next()."" : ""); $description = $langs->trans("RulesCADue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); - else $description .= $langs->trans("DepositsAreIncluded"); + else $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("TurnoverCollected"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -140,8 +138,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $name = $langs->trans("Turnover"); $calcmode = $langs->trans("CalcModeBookkeeping"); @@ -173,8 +170,7 @@ if ($modecompta == 'CREANCES-DETTES') else $sql .= " AND f.type IN (0,1,2,3,5)"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; if ($socid) $sql .= " AND f.fk_soc = ".$socid; -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les @@ -188,8 +184,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") $sql .= " AND pf.fk_facture = f.rowid"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; if ($socid) $sql .= " AND f.fk_soc = ".$socid; -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $sql = "SELECT date_format(b.doc_date,'%Y-%m') as dm, sum(b.credit) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_journal as aj"; @@ -223,8 +218,7 @@ if ($result) $i++; } $db->free($result); -} -else { +} else { dol_print_error($db); } @@ -259,9 +253,7 @@ if ($modecompta == 'RECETTES-DEPENSES') } $i++; } - } - else - { + } else { dol_print_error($db); } } @@ -339,11 +331,8 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { $now_show_delta = 1; // On a trouve le premier mois de la premiere annee generant du chiffre. print ''.price($cum_ht[$case], 1).''; - } - else - { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } - else { print ' '; } + } else { + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } } print ""; } @@ -356,11 +345,8 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) if ($modecompta != 'BOOKKEEPING') print ''; print price($cum[$case], 1); if ($modecompta != 'BOOKKEEPING') print ''; - } - else - { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } - else { print ' '; } + } else { + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } } print ""; @@ -390,12 +376,9 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { print '-'; } - } - else - { + } else { print ''; - if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } - else { print ' '; } + if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } else { print ' '; } print ''; } @@ -483,9 +466,7 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { print ''.($total_ht[$annee] ?price($total_ht[$annee]) : "0").""; - } - else - { + } else { print ' '; } } @@ -494,9 +475,7 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { print ''.($total[$annee] ?price($total[$annee]) : "0").""; - } - else - { + } else { print ' '; } @@ -519,12 +498,9 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) { print '+0%'; } - } - else - { + } else { print ''; - if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; } - else { print ' '; } + if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; } else { print ' '; } print ''; } diff --git a/htdocs/compta/stats/supplier_turnover.php b/htdocs/compta/stats/supplier_turnover.php index 3ff41f4d114..c257d5d1f73 100644 --- a/htdocs/compta/stats/supplier_turnover.php +++ b/htdocs/compta/stats/supplier_turnover.php @@ -69,8 +69,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end } $month_end = $month_start - 1; if ($month_end < 1) $month_end = 12; - } - else $month_end = $month_start; + } else $month_end = $month_start; $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); } if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } @@ -121,8 +120,7 @@ if ($modecompta == "CREANCES-DETTES") $description = $langs->trans("RulesPurchaseTurnoverDue"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("PurchaseTurnoverCollected"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -133,8 +131,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description = $langs->trans("RulesPurchaseTurnoverIn"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $name = $langs->trans("PurchaseTurnover"); $calcmode = $langs->trans("CalcModeBookkeeping"); @@ -165,8 +162,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql .= " AND f.type IN (0,2)"; $sql .= " AND f.entity IN (".getEntity('supplier_invoice').")"; if ($socid) $sql .= " AND f.fk_soc = ".$socid; -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $sql = "SELECT date_format(p.datep,'%Y-%m') as dm, sum(pf.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; @@ -176,8 +172,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") $sql .= " AND pf.fk_facturefourn = f.rowid"; $sql .= " AND f.entity IN (".getEntity('supplier_invoice').")"; if ($socid) $sql .= " AND f.fk_soc = ".$socid; -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $sql = "SELECT date_format(b.doc_date,'%Y-%m') as dm, sum(b.debit) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_journal as aj"; @@ -211,8 +206,7 @@ if ($result) $i++; } $db->free($result); -} -else { +} else { dol_print_error($db); } @@ -289,11 +283,8 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { $now_show_delta = 1; // On a trouve le premier mois de la premiere annee generant du chiffre. print ''.price($cum_ht[$case], 1).''; - } - else - { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } - else { print ' '; } + } else { + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } } print ""; } @@ -306,11 +297,8 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) if ($modecompta != 'BOOKKEEPING') print ''; print price($cum[$case], 1); if ($modecompta != 'BOOKKEEPING') print ''; - } - else - { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } - else { print ' '; } + } else { + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } } print ""; @@ -340,12 +328,9 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { print '-'; } - } - else - { + } else { print ''; - if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } - else { print ' '; } + if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } else { print ' '; } print ''; } @@ -368,9 +353,7 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { print ''.($total_ht[$annee] ?price($total_ht[$annee]) : "0").""; - } - else - { + } else { print ' '; } } @@ -379,9 +362,7 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { print ''.($total[$annee] ?price($total[$annee]) : "0").""; - } - else - { + } else { print ' '; } @@ -404,12 +385,9 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) { print '+0%'; } - } - else - { + } else { print ''; - if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; } - else { print ' '; } + if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; } else { print ' '; } print ''; } diff --git a/htdocs/compta/stats/supplier_turnover_by_prodserv.php b/htdocs/compta/stats/supplier_turnover_by_prodserv.php index fafb967ace1..5911daaba45 100644 --- a/htdocs/compta/stats/supplier_turnover_by_prodserv.php +++ b/htdocs/compta/stats/supplier_turnover_by_prodserv.php @@ -100,9 +100,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end else $year_end++; } $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -172,8 +170,7 @@ if ($modecompta == "CREANCES-DETTES") { $description = $langs->trans("RulesPurchaseTurnoverDue"); $builddate = dol_now(); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("PurchaseTurnoverCollected").', '.$langs->trans("ByProductsAndServices"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -181,11 +178,9 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description = $langs->trans("RulesPurchaseTurnoverIn"); $builddate = dol_now(); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } @@ -221,8 +216,7 @@ if ($modecompta == 'CREANCES-DETTES') if ($selected_cat === -2) // Without any category { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp"; } @@ -240,8 +234,7 @@ if ($modecompta == 'CREANCES-DETTES') if ($selected_cat === -2) // Without any category { $sql .= " AND cp.fk_product is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; $sql .= ")"; diff --git a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php index fcae12f744b..60d65049800 100644 --- a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php +++ b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php @@ -107,9 +107,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } -} -else -{ +} else { // TODO We define q } @@ -175,8 +173,7 @@ if ($modecompta == "CREANCES-DETTES") $description = $langs->trans("RulesPurchaseTurnoverDue"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("PurchaseTurnoverCollected").', '.$langs->trans("ByThirdParties"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -184,11 +181,9 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description = $langs->trans("RulesPurchaseTurnoverIn"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); @@ -215,8 +210,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -229,8 +223,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " AND cs.fk_soc is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$db->escape($selected_cat); if ($subcat) $sql .= " OR c.fk_parent = ".$db->escape($selected_cat); $sql .= ")"; @@ -245,8 +238,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -259,8 +251,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " AND cs.fk_soc is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; $sql .= ")"; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 658c9353a00..78105cf9585 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -100,16 +100,16 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $object->label = GETPOST("label", 'alpha'); $object->note = GETPOST("note", 'none'); - if (empty($object->datev)) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateValue")), null, 'errors'); - $error++; - } if (empty($object->datep)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePayment")), null, 'errors'); $error++; } + if (empty($object->datev)) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PeriodEndDate")), null, 'errors'); + $error++; + } if (empty($object->type_payment) || $object->type_payment < 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentMode")), null, 'errors'); @@ -131,9 +131,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $db->commit(); header("Location: list.php"); exit; - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); $action = "create"; @@ -166,22 +164,16 @@ if ($action == 'delete') $db->commit(); header("Location: ".DOL_URL_ROOT.'/compta/tva/list.php'); exit; - } - else - { + } else { $object->error = $accountline->error; $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $mesg = 'Error try do delete a line linked to a conciliated bank transaction'; setEventMessages($mesg, null, 'errors'); } @@ -388,14 +380,10 @@ if ($id) if (!empty($user->rights->tax->charges->supprimer)) { print ''; - } - else - { + } else { print ''; } - } - else - { + } else { print ''; } print "
"; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index c01408f3c9a..b4201d0bc36 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -150,15 +150,11 @@ class Tva extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); $this->db->rollback(); return -1; @@ -224,9 +220,7 @@ class Tva extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -293,9 +287,7 @@ class Tva extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -404,15 +396,11 @@ class Tva extends CommonObject $ret = $obj->amount; $this->db->free($result); return $ret; - } - else - { + } else { $this->db->free($result); return 0; } - } - else - { + } else { print $this->db->lasterror(); return -1; } @@ -445,15 +433,11 @@ class Tva extends CommonObject $ret = $obj->total_tva; $this->db->free($result); return $ret; - } - else - { + } else { $this->db->free($result); return 0; } - } - else - { + } else { print $this->db->lasterror(); return -1; } @@ -488,15 +472,11 @@ class Tva extends CommonObject $ret = $obj->amount; $this->db->free($result); return $ret; - } - else - { + } else { $this->db->free($result); return 0; } - } - else - { + } else { print $this->db->lasterror(); return -1; } @@ -519,6 +499,7 @@ class Tva extends CommonObject $this->amount = price2num(trim($this->amount)); $this->label = trim($this->label); $this->note = trim($this->note); + $this->num_payment = trim($this->num_payment); $this->fk_bank = (int) $this->fk_bank; $this->fk_user_creat = (int) $this->fk_user_creat; $this->fk_user_modif = (int) $this->fk_user_modif; @@ -603,18 +584,16 @@ class Tva extends CommonObject if ($result <= 0) dol_print_error($this->db); if ($this->amount > 0) { - $bank_line_id = $acc->addline($this->datep, $this->type_payment, $this->label, -abs($this->amount), '', '', $user); + $bank_line_id = $acc->addline($this->datep, $this->type_payment, $this->label, -abs($this->amount), $this->num_payment, '', $user); } else { - $bank_line_id = $acc->addline($this->datep, $this->type_payment, $this->label, abs($this->amount), '', '', $user); + $bank_line_id = $acc->addline($this->datep, $this->type_payment, $this->label, abs($this->amount), $this->num_payment, '', $user); } // Update fk_bank into llx_tva. So we know vat line used to generate bank transaction if ($bank_line_id > 0) { $this->update_fk_bank($bank_line_id); - } - else - { + } else { $this->error = $acc->error; $ok = 0; } @@ -632,21 +611,15 @@ class Tva extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -3; } - } - else - { + } else { $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -669,9 +642,7 @@ class Tva extends CommonObject if ($result) { return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -710,8 +681,7 @@ class Tva extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -752,9 +722,7 @@ class Tva extends CommonObject $this->db->free($resql); return $amount; - } - else - { + } else { return -1; } } @@ -799,9 +767,7 @@ class Tva extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index bcedba7a074..a91d637c39d 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -66,14 +66,11 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $q = GETPOST("q", "int"); if (empty($q)) { - if (GETPOST("month", 'int')) { $date_start = dol_get_first_day($year_start, GETPOST("month", 'int'), false); $date_end = dol_get_last_day($year_start, GETPOST("month", 'int'), false); } - else - { + if (GETPOST("month", 'int')) { $date_start = dol_get_first_day($year_start, GETPOST("month", 'int'), false); $date_end = dol_get_last_day($year_start, GETPOST("month", 'int'), false); } else { if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -3 - (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3), 'm'); $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1; - } - elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat + } elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat if ($current_date['mon'] < $conf->global->SOCIETE_FISCAL_MONTH_START) { if (($conf->global->SOCIETE_FISCAL_MONTH_START - $current_date['mon']) > 6) { // If period started from less than 6 years, we show past year $year_start--; @@ -85,15 +82,12 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end } $date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, false); $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; - } - elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month + } elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -1, 'm'); $date_end = dol_time_plus_duree($date_start, 1, 'm') - 1; } } - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -130,6 +124,7 @@ $product_static = new Product($db); $payment_static = new Paiement($db); $paymentfourn_static = new PaiementFourn($db); $paymentexpensereport_static = new PaymentExpenseReport($db); +$user_static = new User($db); $morequerystring = ''; $listofparams = array('date_startmonth', 'date_startyear', 'date_startday', 'date_endmonth', 'date_endyear', 'date_endday'); @@ -157,7 +152,7 @@ $calcmode = ''; if ($modetax == 0) $calcmode = $langs->trans('OptionVATDefault'); if ($modetax == 1) $calcmode = $langs->trans('OptionVATDebitOption'); if ($modetax == 2) $calcmode = $langs->trans('OptionPaymentForProductAndServices'); -$calcmode .= '
('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')'; +$calcmode .= ' ('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')'; // Set period $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $prevyear = $year_start; @@ -222,7 +217,7 @@ $vatsup = $langs->trans("VATPaid"); // VAT Received - +print '
'; print ""; $y = $year_current; @@ -321,9 +316,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) 'vat' =>$x_paye[$my_paye_thirdpartyid]['vat_list'][$id], 'link' =>$expensereport->getNomUrl(1) ); - } - else - { + } else { $invoice_supplier->id = $x_paye[$my_paye_thirdpartyid]['facid'][$id]; $invoice_supplier->ref = $x_paye[$my_paye_thirdpartyid]['facnum'][$id]; $invoice_supplier->type = $x_paye[$my_paye_thirdpartyid]['type'][$id]; @@ -693,9 +686,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) || ($type == 1 && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) { print $langs->trans("NA"); - } - else - { + } else { if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) { $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); } @@ -753,14 +744,12 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; } - print '
'; - // Total to pay - print '

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

'; diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index 625cf524169..0ea0018632b 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -76,9 +76,7 @@ if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ +} else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } $search_agenda_label = GETPOST('search_agenda_label'); @@ -159,9 +157,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates $objcanvas->display_canvas($action); // Show template -} -else -{ +} else { // ----------------------------------------- // When used in standard mode // ----------------------------------------- diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index fbd31812fe8..415d9e47790 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -119,9 +119,7 @@ abstract class ActionsContactCardCommon { $this->tpl['company'] = $objsoc->getNomUrl(1); $this->tpl['company_id'] = $objsoc->id; - } - else - { + } else { $this->tpl['company'] = $form->select_company($this->object->socid, 'socid', '', 1); } @@ -208,8 +206,7 @@ abstract class ActionsContactCardCommon $dolibarr_user = new User($this->db); $result = $dolibarr_user->fetch($this->object->user_id); $this->tpl['dolibarr_user'] = $dolibarr_user->getLoginUrl(1); - } - else $this->tpl['dolibarr_user'] = $langs->trans("NoDolibarrAccess"); + } else $this->tpl['dolibarr_user'] = $langs->trans("NoDolibarrAccess"); } if ($action == 'view' || $action == 'delete') @@ -222,9 +219,7 @@ abstract class ActionsContactCardCommon $objsoc->fetch($this->object->socid); $this->tpl['company'] = $objsoc->getNomUrl(1); - } - else - { + } else { $this->tpl['company'] = $langs->trans("ContactNotLinkedToCompany"); } @@ -309,9 +304,7 @@ abstract class ActionsContactCardCommon if ($resql) { $obj = $this->db->fetch_object($resql); - } - else - { + } else { dol_print_error($this->db); } $this->object->country_id = $langs->trans("Country".$obj->code) ? $langs->trans("Country".$obj->code) : $obj->label; diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index 54b3f137967..099c973b0a4 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -104,9 +104,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon $this->tpl['actionstodo'] = show_actions_todo($conf, $langs, $db, $objsoc, $this->object, 1); $this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1); - } - else - { + } else { // Confirm delete contact if ($action == 'delete' && $user->rights->societe->contact->supprimer) { diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index a6e5bee1898..606e4e626b0 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -10,6 +10,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018-2019 Frédéric France * Copyright (C) 2019 Josep Lluís Amador + * Copyright (C) 2020 Open-Dsi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -70,9 +71,9 @@ $objcanvas = null; $canvas = (!empty($object->canvas) ? $object->canvas : GETPOST("canvas")); if (!empty($canvas)) { - require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; - $objcanvas = new Canvas($db, $action); - $objcanvas->getCanvas('contact', 'contactcard', $canvas); + require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; + $objcanvas = new Canvas($db, $action); + $objcanvas->getCanvas('contact', 'contactcard', $canvas); } // Security check @@ -101,51 +102,45 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { - header("Location: ".$backtopage); - exit; - } + // Cancel + if (GETPOST('cancel', 'alpha') && !empty($backtopage)) + { + header("Location: ".$backtopage); + exit; + } // Creation utilisateur depuis contact - if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user->user->creer) - { - // Recuperation contact actuel - $result = $object->fetch($id); + if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user->user->creer) + { + // Recuperation contact actuel + $result = $object->fetch($id); - if ($result > 0) - { - $db->begin(); + if ($result > 0) + { + $db->begin(); - // Creation user - $nuser = new User($db); - $result = $nuser->create_from_contact($object, GETPOST("login")); // Do not use GETPOST(alpha) + // Creation user + $nuser = new User($db); + $result = $nuser->create_from_contact($object, GETPOST("login")); // Do not use GETPOST(alpha) - if ($result > 0) - { - $result2 = $nuser->setPassword($user, GETPOST("password"), 0, 0, 1); // Do not use GETPOST(alpha) - if ($result2) - { - $db->commit(); - } - else - { - $error = $nuser->error; $errors = $nuser->errors; - $db->rollback(); - } - } - else - { - $error = $nuser->error; $errors = $nuser->errors; - $db->rollback(); - } - } - else - { - $error = $object->error; $errors = $object->errors; - } - } + if ($result > 0) + { + $result2 = $nuser->setPassword($user, GETPOST("password"), 0, 0, 1); // Do not use GETPOST(alpha) + if ($result2) + { + $db->commit(); + } else { + $error = $nuser->error; $errors = $nuser->errors; + $db->rollback(); + } + } else { + $error = $nuser->error; $errors = $nuser->errors; + $db->rollback(); + } + } else { + $error = $object->error; $errors = $object->errors; + } + } // Confirmation desactivation @@ -155,9 +150,7 @@ if (empty($reshook)) if ($object->setstatus(0) < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } @@ -170,9 +163,7 @@ if (empty($reshook)) if ($object->setstatus(1) < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } @@ -183,50 +174,50 @@ if (empty($reshook)) { $db->begin(); - if ($canvas) $object->canvas = $canvas; + if ($canvas) $object->canvas = $canvas; - $object->entity = (GETPOSTISSET('entity') ?GETPOST('entity', 'int') : $conf->entity); - $object->socid = GETPOST("socid", 'int'); - $object->lastname = GETPOST("lastname", 'alpha'); - $object->firstname = GETPOST("firstname", 'alpha'); - $object->civility_code = GETPOST("civility_code", 'alpha'); - $object->poste = GETPOST("poste", 'alpha'); - $object->address = GETPOST("address", 'alpha'); - $object->zip = GETPOST("zipcode", 'alpha'); - $object->town = GETPOST("town", 'alpha'); - $object->country_id = GETPOST("country_id", 'int'); - $object->state_id = GETPOST("state_id", 'int'); - //$object->jabberid = GETPOST("jabberid", 'alpha'); - //$object->skype = GETPOST("skype", 'alpha'); - //$object->twitter = GETPOST("twitter", 'alpha'); - //$object->facebook = GETPOST("facebook", 'alpha'); - //$object->linkedin = GETPOST("linkedin", 'alpha'); - $object->socialnetworks = array(); - if (!empty($conf->socialnetworks->enabled)) { - foreach ($socialnetworks as $key => $value) { - if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { - $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); - } - } - } - $object->email = GETPOST("email", 'alpha'); - $object->no_email = GETPOST("no_email", "int"); - $object->phone_pro = GETPOST("phone_pro", 'alpha'); - $object->phone_perso = GETPOST("phone_perso", 'alpha'); - $object->phone_mobile = GETPOST("phone_mobile", 'alpha'); - $object->fax = GETPOST("fax", 'alpha'); - $object->priv = GETPOST("priv", 'int'); - $object->note_public = GETPOST("note_public", 'none'); - $object->note_private = GETPOST("note_private", 'none'); - $object->roles = GETPOST("roles", 'array'); + $object->entity = (GETPOSTISSET('entity') ?GETPOST('entity', 'int') : $conf->entity); + $object->socid = GETPOST("socid", 'int'); + $object->lastname = GETPOST("lastname", 'alpha'); + $object->firstname = GETPOST("firstname", 'alpha'); + $object->civility_code = GETPOST("civility_code", 'alpha'); + $object->poste = GETPOST("poste", 'alpha'); + $object->address = GETPOST("address", 'alpha'); + $object->zip = GETPOST("zipcode", 'alpha'); + $object->town = GETPOST("town", 'alpha'); + $object->country_id = GETPOST("country_id", 'int'); + $object->state_id = GETPOST("state_id", 'int'); + //$object->jabberid = GETPOST("jabberid", 'alpha'); + //$object->skype = GETPOST("skype", 'alpha'); + //$object->twitter = GETPOST("twitter", 'alpha'); + //$object->facebook = GETPOST("facebook", 'alpha'); + //$object->linkedin = GETPOST("linkedin", 'alpha'); + $object->socialnetworks = array(); + if (!empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { + $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); + } + } + } + $object->email = GETPOST("email", 'alpha'); + $object->no_email = GETPOST("no_email", "int"); + $object->phone_pro = GETPOST("phone_pro", 'alpha'); + $object->phone_perso = GETPOST("phone_perso", 'alpha'); + $object->phone_mobile = GETPOST("phone_mobile", 'alpha'); + $object->fax = GETPOST("fax", 'alpha'); + $object->priv = GETPOST("priv", 'int'); + $object->note_public = GETPOST("note_public", 'none'); + $object->note_private = GETPOST("note_private", 'none'); + $object->roles = GETPOST("roles", 'array'); - $object->statut = 1; //Defult status to Actif + $object->statut = 1; //Defult status to Actif - // Note: Correct date should be completed with location to have exact GM time of birth. - $object->birthday = dol_mktime(0, 0, 0, GETPOST("birthdaymonth", 'int'), GETPOST("birthdayday", 'int'), GETPOST("birthdayyear", 'int')); - $object->birthday_alert = GETPOST("birthday_alert", 'alpha'); + // Note: Correct date should be completed with location to have exact GM time of birth. + $object->birthday = dol_mktime(0, 0, 0, GETPOST("birthdaymonth", 'int'), GETPOST("birthdayday", 'int'), GETPOST("birthdayyear", 'int')); + $object->birthday_alert = GETPOST("birthday_alert", 'alpha'); - // Fill array 'array_options' with data from add form + // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) { @@ -234,19 +225,19 @@ if (empty($reshook)) $action = 'create'; } - if (!GETPOST("lastname")) - { - $error++; $errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label")); - $action = 'create'; - } + if (!GETPOST("lastname")) + { + $error++; $errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label")); + $action = 'create'; + } - if (!$error) - { - $id = $object->create($user); - if ($id <= 0) - { - $error++; $errors = array_merge($errors, ($object->error ? array($object->error) : $object->errors)); - $action = 'create'; + if (!$error) + { + $id = $object->create($user); + if ($id <= 0) + { + $error++; $errors = array_merge($errors, ($object->error ? array($object->error) : $object->errors)); + $action = 'create'; } else { // Categories association $contcats = GETPOST('contcats', 'array'); @@ -268,57 +259,51 @@ if (empty($reshook)) } } } - } + } - if (!$error && $id > 0) - { - $db->commit(); - if (!empty($backtopage)) $url = $backtopage; - else $url = 'card.php?id='.$id; - header("Location: ".$url); - exit; - } - else - { - $db->rollback(); - } - } + if (!$error && $id > 0) + { + $db->commit(); + if (!empty($backtopage)) $url = $backtopage; + else $url = 'card.php?id='.$id; + header("Location: ".$url); + exit; + } else { + $db->rollback(); + } + } - if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer) - { - $result = $object->fetch($id); + if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer) + { + $result = $object->fetch($id); $object->oldcopy = clone $object; - $object->old_lastname = GETPOST("old_lastname"); - $object->old_firstname = GETPOST("old_firstname"); + $object->old_lastname = GETPOST("old_lastname"); + $object->old_firstname = GETPOST("old_firstname"); - $result = $object->delete(); - if ($result > 0) - { - if ($backtopage) - { - header("Location: ".$backtopage); - exit; - } - else - { - header("Location: ".DOL_URL_ROOT.'/contact/list.php'); - exit; - } - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - } - } + $result = $object->delete(); + if ($result > 0) + { + if ($backtopage) + { + header("Location: ".$backtopage); + exit; + } else { + header("Location: ".DOL_URL_ROOT.'/contact/list.php'); + exit; + } + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } - if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact->creer) - { - if (empty($_POST["lastname"])) - { - $error++; $errors = array($langs->trans("ErrorFieldRequired", $langs->transnoentities("Name").' / '.$langs->transnoentities("Label"))); - $action = 'edit'; - } + if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact->creer) + { + if (empty($_POST["lastname"])) + { + $error++; $errors = array($langs->trans("ErrorFieldRequired", $langs->transnoentities("Name").' / '.$langs->transnoentities("Label"))); + $action = 'edit'; + } if (!$error) { @@ -327,163 +312,171 @@ if (empty($reshook)) // Photo save $dir = $conf->societe->multidir_output[$object->entity]."/contact/".$object->id."/photos"; - $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); - if (GETPOST('deletephoto') && $object->photo) - { - $fileimg = $dir.'/'.$object->photo; - $dirthumbs = $dir.'/thumbs'; - dol_delete_file($fileimg); - dol_delete_dir_recursive($dirthumbs); - $object->photo = ''; - } - if ($file_OK) - { - if (image_format_supported($_FILES['photo']['name']) > 0) - { - dol_mkdir($dir); + $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); + if (GETPOST('deletephoto') && $object->photo) + { + $fileimg = $dir.'/'.$object->photo; + $dirthumbs = $dir.'/thumbs'; + dol_delete_file($fileimg); + dol_delete_dir_recursive($dirthumbs); + $object->photo = ''; + } + if ($file_OK) + { + if (image_format_supported($_FILES['photo']['name']) > 0) + { + dol_mkdir($dir); - if (@is_dir($dir)) - { - $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); - $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); + if (@is_dir($dir)) + { + $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); + $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); - if (!$result > 0) - { - $errors[] = "ErrorFailedToSaveFile"; - } - else - { - $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); + if (!$result > 0) + { + $errors[] = "ErrorFailedToSaveFile"; + } else { + $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); - // Create thumbs - $object->addThumbs($newfile); - } - } - } - else - { - $errors[] = "ErrorBadImageFormat"; - } - } - else - { - switch ($_FILES['photo']['error']) - { - case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini - case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form - $errors[] = "ErrorFileSizeTooLarge"; - break; - case 3: //uploaded file was only partially uploaded - $errors[] = "ErrorFilePartiallyUploaded"; - break; - } - } + // Create thumbs + $object->addThumbs($newfile); + } + } + } else { + $errors[] = "ErrorBadImageFormat"; + } + } else { + switch ($_FILES['photo']['error']) + { + case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini + case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form + $errors[] = "ErrorFileSizeTooLarge"; + break; + case 3: //uploaded file was only partially uploaded + $errors[] = "ErrorFilePartiallyUploaded"; + break; + } + } $object->oldcopy = clone $object; $object->old_lastname = GETPOST("old_lastname", 'alpha'); $object->old_firstname = GETPOST("old_firstname", 'alpha'); - $object->socid = GETPOST("socid", 'int'); - $object->lastname = GETPOST("lastname", 'alpha'); - $object->firstname = GETPOST("firstname", 'alpha'); - $object->civility_code = GETPOST("civility_code", 'alpha'); - $object->poste = GETPOST("poste", 'alpha'); + $object->socid = GETPOST("socid", 'int'); + $object->lastname = GETPOST("lastname", 'alpha'); + $object->firstname = GETPOST("firstname", 'alpha'); + $object->civility_code = GETPOST("civility_code", 'alpha'); + $object->poste = GETPOST("poste", 'alpha'); - $object->address = GETPOST("address", 'alpha'); - $object->zip = GETPOST("zipcode", 'alpha'); - $object->town = GETPOST("town", 'alpha'); - $object->state_id = GETPOST("state_id", 'int'); - $object->country_id = GETPOST("country_id", 'int'); + $object->address = GETPOST("address", 'alpha'); + $object->zip = GETPOST("zipcode", 'alpha'); + $object->town = GETPOST("town", 'alpha'); + $object->state_id = GETPOST("state_id", 'int'); + $object->country_id = GETPOST("country_id", 'int'); - $object->email = GETPOST("email", 'alpha'); - $object->no_email = GETPOST("no_email", "int"); - //$object->jabberid = GETPOST("jabberid", 'alpha'); - //$object->skype = GETPOST("skype", 'alpha'); - //$object->twitter = GETPOST("twitter", 'alpha'); - //$object->facebook = GETPOST("facebook", 'alpha'); - //$object->linkedin = GETPOST("linkedin", 'alpha'); - if (!empty($conf->socialnetworks->enabled)) { - foreach ($socialnetworks as $key => $value) { - if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { - $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); - } - } - } - $object->phone_pro = GETPOST("phone_pro", 'alpha'); - $object->phone_perso = GETPOST("phone_perso", 'alpha'); - $object->phone_mobile = GETPOST("phone_mobile", 'alpha'); - $object->fax = GETPOST("fax", 'alpha'); - $object->priv = GETPOST("priv", 'int'); - $object->note_public = GETPOST("note_public", 'none'); - $object->note_private = GETPOST("note_private", 'none'); - $object->roles = GETPOST("roles", 'array'); + $object->email = GETPOST("email", 'alpha'); + $object->no_email = GETPOST("no_email", "int"); + //$object->jabberid = GETPOST("jabberid", 'alpha'); + //$object->skype = GETPOST("skype", 'alpha'); + //$object->twitter = GETPOST("twitter", 'alpha'); + //$object->facebook = GETPOST("facebook", 'alpha'); + //$object->linkedin = GETPOST("linkedin", 'alpha'); + $object->socialnetworks = array(); + if (!empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { + $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); + } + } + } + $object->phone_pro = GETPOST("phone_pro", 'alpha'); + $object->phone_perso = GETPOST("phone_perso", 'alpha'); + $object->phone_mobile = GETPOST("phone_mobile", 'alpha'); + $object->fax = GETPOST("fax", 'alpha'); + $object->priv = GETPOST("priv", 'int'); + $object->note_public = GETPOST("note_public", 'none'); + $object->note_private = GETPOST("note_private", 'none'); + $object->roles = GETPOST("roles", 'array'); - // Fill array 'array_options' with data from add form + // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; if (!$error) { - $result = $object->update($contactid, $user); + $result = $object->update($contactid, $user); - if ($result > 0) { - // Categories association - $categories = GETPOST('contcats', 'array'); - $object->setCategories($categories); + if ($result > 0) { + // Categories association + $categories = GETPOST('contcats', 'array'); + $object->setCategories($categories); - $no_email = GETPOST('no_email', 'int'); + $no_email = GETPOST('no_email', 'int'); - // Update mass emailing flag into table mailing_unsubscribe - if (GETPOSTISSET('no_email') && $object->email) - { - if ($no_email) - { - $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing', 0).") AND email = '".$db->escape($object->email)."'"; - $resql = $db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - $noemail = $obj->nb; - if (empty($noemail)) - { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe(email, entity, date_creat) VALUES ('".$db->escape($object->email)."', ".$db->escape(getEntity('mailing', 0)).", '".$db->idate(dol_now())."')"; - $resql = $db->query($sql); - } - } - } - else - { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = '".$db->escape($object->email)."' AND entity = ".$db->escape(getEntity('mailing', 0)); - $resql = $db->query($sql); - } + // Update mass emailing flag into table mailing_unsubscribe + if (GETPOSTISSET('no_email') && $object->email) + { + if ($no_email) + { + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing', 0).") AND email = '".$db->escape($object->email)."'"; + $resql = $db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + $noemail = $obj->nb; + if (empty($noemail)) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe(email, entity, date_creat) VALUES ('".$db->escape($object->email)."', ".$db->escape(getEntity('mailing', 0)).", '".$db->idate(dol_now())."')"; + $resql = $db->query($sql); + } + } + } else { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = '".$db->escape($object->email)."' AND entity = ".$db->escape(getEntity('mailing', 0)); + $resql = $db->query($sql); + } - $object->no_email = $no_email; - } + $object->no_email = $no_email; + } - $object->old_lastname = ''; - $object->old_firstname = ''; - $action = 'view'; - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - $action = 'edit'; - } + $object->old_lastname = ''; + $object->old_firstname = ''; + $action = 'view'; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'edit'; + } } - } + } - if (!$error && empty($errors)) - { - if (!empty($backtopage)) - { - header("Location: ".$backtopage); - exit; - } - } - } + if (!$error && empty($errors)) + { + if (!empty($backtopage)) + { + header("Location: ".$backtopage); + exit; + } + } + } - // Actions to send emails + if ($action == 'setprospectcontactlevel' && $user->rights->societe->contact->creer) + { + $object->fetch($id); + $object->fk_prospectlevel = GETPOST('prospect_contact_level_id', 'alpha'); + $result = $object->update($object->id, $user); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + } + + // set communication status + if ($action == 'setstcomm') + { + $object->fetch($id); + $object->stcomm_id = dol_getIdFromCode($db, GETPOST('stcomm', 'alpha'), 'c_stcommcontact'); + $result = $object->update($object->id, $user); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + } + + // Actions to send emails $triggersendname = 'CONTACT_SENTBYMAIL'; $paramname = 'id'; $mode = 'emailfromcontact'; @@ -508,89 +501,87 @@ $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans(" if ($socid > 0) { - $objsoc = new Societe($db); - $objsoc->fetch($socid); + $objsoc = new Societe($db); + $objsoc->fetch($socid); } if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { - // ----------------------------------------- - // When used with CANVAS - // ----------------------------------------- - if (empty($object->error) && $id) + // ----------------------------------------- + // When used with CANVAS + // ----------------------------------------- + if (empty($object->error) && $id) { $object = new Contact($db); $result = $object->fetch($id); if ($result <= 0) dol_print_error('', $object->error); } $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates - $objcanvas->display_canvas($action); // Show template -} -else -{ - // ----------------------------------------- - // When used in standard mode - // ----------------------------------------- + $objcanvas->display_canvas($action); // Show template +} else { + // ----------------------------------------- + // When used in standard mode + // ----------------------------------------- - // Confirm deleting contact - if ($user->rights->societe->contact->supprimer) - { - if ($action == 'delete') - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage ? '&backtopage='.$backtopage : ''), $langs->trans("DeleteContact"), $langs->trans("ConfirmDeleteContact"), "confirm_delete", '', 0, 1); - } - } + // Confirm deleting contact + if ($user->rights->societe->contact->supprimer) + { + if ($action == 'delete') + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage ? '&backtopage='.$backtopage : ''), $langs->trans("DeleteContact"), $langs->trans("ConfirmDeleteContact"), "confirm_delete", '', 0, 1); + } + } - /* + /* * Onglets */ - $head = array(); - if ($id > 0) - { - // Si edition contact deja existant - $object = new Contact($db); - $res = $object->fetch($id, $user); - if ($res < 0) { - setEventMessages($object->error, $object->errors, 'errors'); - } + $head = array(); + if ($id > 0) + { + // Si edition contact deja existant + $object = new Contact($db); + $res = $object->fetch($id, $user); + if ($res < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } - $object->fetchRoles(); + $object->fetchRoles(); - // Show tabs - $head = contact_prepare_head($object); + // Show tabs + $head = contact_prepare_head($object); - $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); - } + $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); + } - if ($user->rights->societe->contact->creer) - { - if ($action == 'create') - { - /* + if ($user->rights->societe->contact->creer) + { + if ($action == 'create') + { + /* * Fiche en mode creation */ - $object->canvas = $canvas; + $object->canvas = $canvas; - $object->state_id = GETPOST("state_id"); + $object->state_id = GETPOST("state_id"); - // We set country_id, country_code and label for the selected country - $object->country_id = $_POST["country_id"] ?GETPOST("country_id") : (empty($objsoc->country_id) ? $mysoc->country_id : $objsoc->country_id); - if ($object->country_id) - { - $tmparray = getCountry($object->country_id, 'all'); - $object->country_code = $tmparray['code']; - $object->country = $tmparray['label']; - } + // We set country_id, country_code and label for the selected country + $object->country_id = $_POST["country_id"] ?GETPOST("country_id") : (empty($objsoc->country_id) ? $mysoc->country_id : $objsoc->country_id); + if ($object->country_id) + { + $tmparray = getCountry($object->country_id, 'all'); + $object->country_code = $tmparray['code']; + $object->country = $tmparray['label']; + } - $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); - $linkback = ''; - print load_fiche_titre($title, $linkback, 'address'); + $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); + $linkback = ''; + print load_fiche_titre($title, $linkback, 'address'); - // Show errors - dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); + // Show errors + dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) + { print "\n".''."\n"; - } + } - print '
'; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; if (!empty($objsoc)) { print ''; - } + } - dol_fiche_head($head, 'card', '', 0, ''); + dol_fiche_head($head, 'card', '', 0, ''); - print ''; + print '
'; - // Name - print ''; - print ''; - print ''; - - print ''; - print ''; - print ''; - print ''; - - // Company - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { - if ($socid > 0) - { - print ''; - print ''; - print ''; - print ''; - } - else { - print ''; - } - } - - // Civility - print ''; - - print ''; - print ''; - - $colspan = 3; - if ($conf->use_javascript_ajax && $socid > 0) $colspan = 2; - - // Address - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party - print ''; - print ''; - - if ($conf->use_javascript_ajax && $socid > 0) - { - $rowspan = 3; - if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; - - print ''; - } - print ''; - - // Zip / Town - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party - print ''; - - // Country - print ''; - - // State - if (empty($conf->global->SOCIETE_DISABLE_STATE)) - { - if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) - { - print ''; - } - - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->phone; // Predefined with third party - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party - - // Phone / Fax - print ''; - print ''; - if ($conf->browser->layout == 'phone') print ''; - print ''; - print ''; - - print ''; - print ''; - if ($conf->browser->layout == 'phone') print ''; - print ''; - print ''; - print ''; - - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party - - // Email - print ''; - print ''; + // Name + print ''; + print ''; print ''; - if (!empty($conf->mailing->enabled)) - { - $noemail = ''; - if (empty($noemail) && !empty($object->email)) - { - $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'"; - //print $sql; - $resql = $db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - $noemail = $obj->nb; - } - } + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; - print ''; - print ''; - } - print ''; + // Company + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) + { + if ($socid > 0) + { + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + } + } - if (!empty($conf->socialnetworks->enabled)) { - foreach ($socialnetworks as $key => $value) { - if ($value['active']) { - print ''; - print ''; - print ''; - print ''; - } elseif (!empty($object->socialnetworks[$key])) { - print ''; - } - } - } - // if (! empty($conf->socialnetworks->enabled)) - // { - // // Jabber - // if (! empty($conf->global->SOCIALNETWORKS_JABBER)) - // { - // print ''; - // print ''; - // } - // // Skype - // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - // { - // print ''; - // print ''; - // } - // // Twitter - // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - // { - // print ''; - // print ''; - // } - // // Facebook - // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - // { - // print ''; - // print ''; - // } - // // LinkedIn - // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - // { - // print ''; - // print ''; - // } - // } + // Civility + print ''; - // Visibility - print ''; + print ''; + print ''; + + $colspan = 3; + if ($conf->use_javascript_ajax && $socid > 0) $colspan = 2; + + // Address + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party + print ''; + print ''; + + if ($conf->use_javascript_ajax && $socid > 0) + { + $rowspan = 3; + if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; + + print ''; + } + print ''; + + // Zip / Town + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party + print ''; + + // Country + print ''; + + // State + if (empty($conf->global->SOCIETE_DISABLE_STATE)) + { + if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) + { + print ''; + } + + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->phone; // Predefined with third party + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party + + // Phone / Fax + print ''; + print ''; + if ($conf->browser->layout == 'phone') print ''; + print ''; + print ''; + + print ''; + print ''; + if ($conf->browser->layout == 'phone') print ''; + print ''; + print ''; + print ''; + + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party + + // Email + print ''; + print ''; + print ''; + + if (!empty($conf->mailing->enabled)) + { + $noemail = ''; + if (empty($noemail) && !empty($object->email)) + { + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'"; + //print $sql; + $resql = $db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + $noemail = $obj->nb; + } + } + + print ''; + print ''; + print ''; + print ''; + } + print ''; + + if (!empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + print ''; + print ''; + print ''; + print ''; + } elseif (!empty($object->socialnetworks[$key])) { + print ''; + } + } + } + // if (! empty($conf->socialnetworks->enabled)) + // { + // // Jabber + // if (! empty($conf->global->SOCIALNETWORKS_JABBER)) + // { + // print ''; + // print ''; + // } + // // Skype + // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) + // { + // print ''; + // print ''; + // } + // // Twitter + // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) + // { + // print ''; + // print ''; + // } + // // Facebook + // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) + // { + // print ''; + // print ''; + // } + // // LinkedIn + // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) + // { + // print ''; + // print ''; + // } + // } + + // Visibility + print ''; // Categories if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { @@ -837,91 +823,84 @@ else print ""; } - // Contact by default - if (!empty($socid)) { - print ''; - print ''; - } + // Contact by default + if (!empty($socid)) { + print ''; + print ''; + } - // Other attributes - $parameters = array('socid' => $socid, 'objsoc' => $objsoc, 'colspan' => ' colspan="3"', 'cols' => 3); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook)) - { - print $object->showOptionals($extrafields, 'edit', $parameters); - } + // Other attributes + $parameters = array('socid' => $socid, 'objsoc' => $objsoc, 'colspan' => ' colspan="3"', 'cols' => 3); + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (empty($reshook)) + { + print $object->showOptionals($extrafields, 'edit', $parameters); + } - print "
lastname).'" autofocus="autofocus">
firstname).'">
'; - print $objsoc->getNomUrl(1, 'contact'); - print '
'; - print $form->select_company($socid, 'socid', '', 'SelectThirdParty'); - print '
'; - print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'alpha') : $object->civility_code, 'civility_code'); - print '
poste).'">
'; - print ''.$langs->trans('CopyAddressFromSoc').''; - print '
/ '; - print $formcompany->select_ziptown((GETPOST("zipcode", 'alpha') ? GETPOST("zipcode", 'alpha') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6).' '; - print $formcompany->select_ziptown((GETPOST("town", 'alpha') ? GETPOST("town", 'alpha') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id')); - print '
'; - print img_picto('', 'globe-americas', 'class="paddingrightonly"'); - print $form->select_country((GETPOST("country_id", 'alpha') ? GETPOST("country_id", 'alpha') : $object->country_id), 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
'; - } - else - { - print '
'; - } - - if ($object->country_id) - { - print $formcompany->select_state(GETPOST("state_id", 'alpha') ? GETPOST("state_id", 'alpha') : $object->state_id, $object->country_code, 'state_id'); - } - else - { - print $countrynotdefined; - } - print '
'.$form->editfieldkey('PhonePro', 'phone_pro', '', $object, 0).''; - print img_picto('', 'object_phoning'); - print '
'.$form->editfieldkey('PhonePerso', 'phone_perso', '', $object, 0).''; - print img_picto('', 'object_phoning'); - print '
'.$form->editfieldkey('PhoneMobile', 'phone_mobile', '', $object, 0).''; - print img_picto('', 'object_phoning_mobile'); - print '
'.$form->editfieldkey('Fax', 'fax', '', $object, 0).''; - print img_picto('', 'object_phoning_fax'); - print '
'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '').''; - print img_picto('', 'object_email'); - print '
lastname).'" autofocus="autofocus">
firstname).'">
'.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'alpha') : $noemail), 1).'
'; + print $objsoc->getNomUrl(1, 'contact'); + print '
'; + print $form->select_company($socid, 'socid', '', 'SelectThirdParty'); + print '
'; - print ''; - print '
jabberid).'">
skype).'">
twitter).'">
facebook).'">
linkedin).'">
'; + print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'alpha') : $object->civility_code, 'civility_code'); + print '
'; - $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('priv', $selectarray, (GETPOST("priv", 'alpha') ?GETPOST("priv", 'alpha') : $object->priv), 0); - print '
poste).'">
'; + print ''.$langs->trans('CopyAddressFromSoc').''; + print '
/ '; + print $formcompany->select_ziptown((GETPOST("zipcode", 'alpha') ? GETPOST("zipcode", 'alpha') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6).' '; + print $formcompany->select_ziptown((GETPOST("town", 'alpha') ? GETPOST("town", 'alpha') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id')); + print '
'; + print img_picto('', 'globe-americas', 'class="paddingrightonly"'); + print $form->select_country((GETPOST("country_id", 'alpha') ? GETPOST("country_id", 'alpha') : $object->country_id), 'country_id'); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print '
'; + } else { + print '
'; + } + + if ($object->country_id) + { + print $formcompany->select_state(GETPOST("state_id", 'alpha') ? GETPOST("state_id", 'alpha') : $object->state_id, $object->country_code, 'state_id'); + } else { + print $countrynotdefined; + } + print '
'.$form->editfieldkey('PhonePro', 'phone_pro', '', $object, 0).''; + print img_picto('', 'object_phoning'); + print '
'.$form->editfieldkey('PhonePerso', 'phone_perso', '', $object, 0).''; + print img_picto('', 'object_phoning'); + print '
'.$form->editfieldkey('PhoneMobile', 'phone_mobile', '', $object, 0).''; + print img_picto('', 'object_phoning_mobile'); + print '
'.$form->editfieldkey('Fax', 'fax', '', $object, 0).''; + print img_picto('', 'object_phoning_fax'); + print '
'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '').''; + print img_picto('', 'object_email'); + print '
'.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'alpha') : $noemail), 1).'
'; + print ''; + print '
jabberid).'">
skype).'">
twitter).'">
facebook).'">
linkedin).'">
'; + $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); + print $form->selectarray('priv', $selectarray, (GETPOST("priv", 'alpha') ?GETPOST("priv", 'alpha') : $object->priv), 0); + print '
'.$langs->trans("ContactByDefaultFor").''; - $contactType = $object->listeTypeContacts('external', '', 1); - print $form->multiselectarray('roles', $contactType); - print '
'.$langs->trans("ContactByDefaultFor").''; + $contactType = $object->listeTypeContacts('external', '', 1); + print $form->multiselectarray('roles', $contactType); + print '

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

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

'.$langs->trans("PhotoFile").'
'; - print '
'; + print ''; - dol_fiche_end(); + dol_fiche_end(); - print '
'; - print ''; - print '     '; - print ''; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; - print "
"; - } - } + print ""; + } + } - if (!empty($id) && $action != 'edit' && $action != 'create') - { - $objsoc = new Societe($db); + if (!empty($id) && $action != 'edit' && $action != 'create') + { + $objsoc = new Societe($db); - // View mode + // View mode - // Show errors - dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); + // Show errors + dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); - dol_fiche_head($head, 'card', $title, -1, 'contact'); + dol_fiche_head($head, 'card', $title, -1, 'contact'); - if ($action == 'create_user') - { - // Full firstname and lastname separated with a dot : firstname.lastname - include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $login = dol_buildlogin($object->lastname, $object->firstname); + if ($action == 'create_user') + { + // Full firstname and lastname separated with a dot : firstname.lastname + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $login = dol_buildlogin($object->lastname, $object->firstname); - $generated_password = ''; - if (!$ldap_sid) // TODO ldap_sid ? - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $generated_password = getRandomPassword(false); - } - $password = $generated_password; + $generated_password = ''; + if (!$ldap_sid) // TODO ldap_sid ? + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; + $generated_password = getRandomPassword(false); + } + $password = $generated_password; - // Create a form array - $formquestion = array( - array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), - array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password), - //array('label' => $form->textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External'))) - ); - $text = $langs->trans("ConfirmCreateContact").'
'; - if (!empty($conf->societe->enabled)) - { - if ($object->socid > 0) $text .= $langs->trans("UserWillBeExternalUser"); - else $text .= $langs->trans("UserWillBeInternalUser"); - } - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("CreateDolibarrLogin"), $text, "confirm_create_user", $formquestion, 'yes'); - } + // Create a form array + $formquestion = array( + array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), + array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password), + //array('label' => $form->textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External'))) + ); + $text = $langs->trans("ConfirmCreateContact").'
'; + if (!empty($conf->societe->enabled)) + { + if ($object->socid > 0) $text .= $langs->trans("UserWillBeExternalUser"); + else $text .= $langs->trans("UserWillBeInternalUser"); + } + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("CreateDolibarrLogin"), $text, "confirm_create_user", $formquestion, 'yes'); + } - $linkback = '
'.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; - $morehtmlref = '
'; - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { - $objsoc->fetch($object->socid); - // Thirdparty - $morehtmlref .= $langs->trans('ThirdParty').' : '; - if ($objsoc->id > 0) $morehtmlref .= $objsoc->getNomUrl(1, 'contact'); - else $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); - } - $morehtmlref .= '
'; + $morehtmlref = '
'; + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) + { + $objsoc->fetch($object->socid); + // Thirdparty + $morehtmlref .= $langs->trans('ThirdParty').' : '; + if ($objsoc->id > 0) $morehtmlref .= $objsoc->getNomUrl(1, 'contact'); + else $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + } + $morehtmlref .= '
'; - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref); - print '
'; - print '
'; + print '
'; + print '
'; - print '
'; - print ''; + print '
'; + print '
'; - // Civility - print ''; + // Civility + print ''; - // Job / position - print ''; + // Job / position + print ''; - // Email - if (!empty($conf->mailing->enabled)) - { - $langs->load("mails"); - print ''; - print ''; - } + // Email + if (!empty($conf->mailing->enabled)) + { + $langs->load("mails"); + print ''; + print ''; + } - // Unsubscribe opt-out - if (!empty($conf->mailing->enabled)) - { - //print 'eee'.$object->email; - $noemail = $object->no_email; - if (empty($noemail) && !empty($object->email)) - { - $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'"; - //print $sql; - $resql = $db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - $noemail = $obj->nb; - } - } - print ''; - } + // Unsubscribe opt-out + if (!empty($conf->mailing->enabled)) + { + //print 'eee'.$object->email; + $noemail = $object->no_email; + if (empty($noemail) && !empty($object->email)) + { + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'"; + //print $sql; + $resql = $db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + $noemail = $obj->nb; + } + } + print ''; + } - print ''; + print ''; - print '
'.$langs->trans("UserTitle").''; - print $object->getCivilityLabel(); - print '
'.$langs->trans("UserTitle").''; + print $object->getCivilityLabel(); + print '
'.$langs->trans("PostOrFunction").''.$object->poste.'
'.$langs->trans("PostOrFunction").''.$object->poste.'
'.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
'.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
'.$langs->trans("No_Email").''.yn($noemail).'
'.$langs->trans("No_Email").''.yn($noemail).'
'.$langs->trans("ContactVisibility").''; - print $object->LibPubPriv($object->priv); - print '
'.$langs->trans("ContactVisibility").''; + print $object->LibPubPriv($object->priv); + print '
'; + print ''; + print '
'; - print '
'; - print '
'; + $object->fetch_thirdparty(); - print '
'; - print ''; + if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) { + if ($object->thirdparty->client == 2 || $object->thirdparty->client == 3) + { + print '
'; + + print '
'; + print '
'; + + // Level of prospect + print '"; + print ''; + + // Status of prospection + $object->loadCacheOfProspStatus(); + print ''; + + print "
'; + print ''; + print '
'; + print $langs->trans('ProspectLevel'); + print ''; + if ($action != 'editlevel' && $user->rights->societe->contact->creer) print 'id.'">'.img_edit($langs->trans('Modify'), 1).'
'; + print '
'; + if ($action == 'editlevel') { + $formcompany->formProspectContactLevel($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_prospectlevel, 'prospect_contact_level_id', 1); + } else { + print $object->getLibProspLevel(); + } + print "
'.$langs->trans("StatusProsp").''.$object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']); + print '     '; + print '
'; + foreach ($object->cacheprospectstatus as $key => $val) { + $titlealt = 'default'; + if (!empty($val['code']) && !in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt = $val['label']; + if ($object->stcomm_id != $val['id']) print ''.img_action($titlealt, $val['code'], $val['picto']).''; + } + print '
"; + print '
'; + } + } + + print '
'; + + print '
'; + print ''; // Categories if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { @@ -1394,80 +1409,78 @@ else print ''; } - if (!empty($object->socid)) { - print ''; - print ''; - } + if (!empty($object->socid)) { + print ''; + print ''; + } - // Other attributes - $cols = 3; - $parameters = array('socid'=>$socid); - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // Other attributes + $cols = 3; + $parameters = array('socid'=>$socid); + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - $object->load_ref_elements(); + $object->load_ref_elements(); - if (!empty($conf->propal->enabled)) - { - print ''; - } + if (!empty($conf->propal->enabled)) + { + print ''; + } - if (!empty($conf->commande->enabled) || !empty($conf->expedition->enabled)) - { - print ''; - } + if (!empty($conf->commande->enabled) || !empty($conf->expedition->enabled)) + { + print ''; + } - if (!empty($conf->contrat->enabled)) - { - print ''; - } + if (!empty($conf->contrat->enabled)) + { + print ''; + } - if (!empty($conf->facture->enabled)) - { - print ''; - } + if (!empty($conf->facture->enabled)) + { + print ''; + } - print ''; + print ''; - print ''; + print ''; - print "
'.$langs->trans("ContactByDefaultFor").''; - print $formcompany->showRoles("roles", $object, 'view'); - print '
'.$langs->trans("ContactByDefaultFor").''; + print $formcompany->showRoles("roles", $object, 'view'); + print '
'.$langs->trans("ContactForProposals").''; - print $object->ref_propal ? $object->ref_propal : $langs->trans("NoContactForAnyProposal"); - print '
'.$langs->trans("ContactForProposals").''; + print $object->ref_propal ? $object->ref_propal : $langs->trans("NoContactForAnyProposal"); + print '
'; - if (!empty($conf->expedition->enabled)) { print $langs->trans("ContactForOrdersOrShipments"); } - else print $langs->trans("ContactForOrders"); - print ''; - $none = $langs->trans("NoContactForAnyOrder"); - if (!empty($conf->expedition->enabled)) { $none = $langs->trans("NoContactForAnyOrderOrShipments"); } - print $object->ref_commande ? $object->ref_commande : $none; - print '
'; + if (!empty($conf->expedition->enabled)) { print $langs->trans("ContactForOrdersOrShipments"); } else print $langs->trans("ContactForOrders"); + print ''; + $none = $langs->trans("NoContactForAnyOrder"); + if (!empty($conf->expedition->enabled)) { $none = $langs->trans("NoContactForAnyOrderOrShipments"); } + print $object->ref_commande ? $object->ref_commande : $none; + print '
'.$langs->trans("ContactForContracts").''; - print $object->ref_contrat ? $object->ref_contrat : $langs->trans("NoContactForAnyContract"); - print '
'.$langs->trans("ContactForContracts").''; + print $object->ref_contrat ? $object->ref_contrat : $langs->trans("NoContactForAnyContract"); + print '
'.$langs->trans("ContactForInvoices").''; - print $object->ref_facturation ? $object->ref_facturation : $langs->trans("NoContactForAnyInvoice"); - print '
'.$langs->trans("ContactForInvoices").''; + print $object->ref_facturation ? $object->ref_facturation : $langs->trans("NoContactForAnyInvoice"); + print '
'.$langs->trans("DolibarrLogin").''; - if ($object->user_id) - { - $dolibarr_user = new User($db); - $result = $dolibarr_user->fetch($object->user_id); - print $dolibarr_user->getLoginUrl(1); - } - else print $langs->trans("NoDolibarrAccess"); - print '
'.$langs->trans("DolibarrLogin").''; + if ($object->user_id) + { + $dolibarr_user = new User($db); + $result = $dolibarr_user->fetch($object->user_id); + print $dolibarr_user->getLoginUrl(1); + } else print $langs->trans("NoDolibarrAccess"); + print '
'; - print $langs->trans("VCard").''; + print '
'; + print $langs->trans("VCard").''; print ''; print img_picto($langs->trans("Download"), 'vcard.png', 'class="paddingrightonly"'); print $langs->trans("Download"); print ''; - print '
"; + print ""; - print '
'; - print '
'; + print '
'; + print '
'; - dol_fiche_end(); + dol_fiche_end(); - // Barre d'actions - print '
'; + // Barre d'actions + print '
'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -1478,52 +1491,73 @@ else { $langs->load("mails"); print ''; - } - else - { + } else { $langs->load("mails"); print ''; } } if ($user->rights->societe->contact->creer) - { - print ''.$langs->trans('Modify').''; - } + { + print ''.$langs->trans('Modify').''; + } - if (!$object->user_id && $user->rights->user->user->creer) - { - print ''.$langs->trans("CreateDolibarrLogin").''; - } + if (!$object->user_id && $user->rights->user->user->creer) + { + print ''.$langs->trans("CreateDolibarrLogin").''; + } - // Activer - if ($object->statut == 0 && $user->rights->societe->contact->creer) - { - print ''.$langs->trans("Reactivate").''; - } - // Desactiver - if ($object->statut == 1 && $user->rights->societe->contact->creer) - { - print ''.$langs->trans("DisableUser").''; - } + // Activer + if ($object->statut == 0 && $user->rights->societe->contact->creer) + { + print ''.$langs->trans("Reactivate").''; + } + // Desactiver + if ($object->statut == 1 && $user->rights->societe->contact->creer) + { + print ''.$langs->trans("DisableUser").''; + } - // Delete - if ($user->rights->societe->contact->supprimer) - { - print ''.$langs->trans('Delete').''; - } - } + // Delete + if ($user->rights->societe->contact->supprimer) + { + print ''.$langs->trans('Delete').''; + } + } - print "
"; + print "
"; - // Presend form - $modelmail = 'contact'; - $defaulttopic = 'Information'; - $diroutput = $conf->contact->dir_output; - $trackid = 'con'.$object->id; + //Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } - include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; - } + if ($action != 'presend') + { + print '
'; + + print '
'; + + $MAXEVENT = 10; + + $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/contact/agenda.php?id='.$object->id); + + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'contact', $object->socid, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for thirdparty + + print '
'; + } + + // Presend form + $modelmail = 'contact'; + $defaulttopic = 'Information'; + $diroutput = $conf->contact->dir_output; + $trackid = 'con'.$object->id; + + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; + } } diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index d9753001db2..3922dc9069f 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -10,6 +10,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2020 Open-Dsi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -89,6 +90,8 @@ class Contact extends CommonObject 'socialnetworks' =>array('type'=>'text', 'label'=>'SocialNetworks', 'enabled'=>1, 'visible'=>-1, 'position'=>115), 'photo' =>array('type'=>'varchar(255)', 'label'=>'Photo', 'enabled'=>1, 'visible'=>-1, 'position'=>170), 'priv' =>array('type'=>'smallint(6)', 'label'=>'Private', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>175), + 'fk_stcomm' =>array('type'=>'integer', 'label'=>'Fk stcommcontact', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>220), + 'fk_prospectlevel' =>array('type'=>'varchar(12)', 'label'=>'ProspectLevel', 'enabled'=>1, 'visible'=>-1, 'position'=>255), 'no_email' =>array('type'=>'smallint(6)', 'label'=>'No email', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>180), 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'position'=>185), 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-1, 'position'=>190), @@ -209,6 +212,11 @@ class Contact extends CommonObject public $roles = array(); + public $cacheprospectstatus = array(); + public $fk_prospectlevel; + public $stcomm_id; + public $statut_commercial; + public $stcomm_picto; /** * Constructor @@ -224,6 +232,10 @@ class Contact extends CommonObject if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0; if (empty($conf->mailing->enabled)) $this->fields['no_email']['enabled'] = 0; if (!empty($conf->global->SOCIETE_DISABLE_CONTACTS)) $this->fields['thirdparty']['enabled'] = 0; + if (empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) { // Default behaviour + $this->field['fk_stcomm']['enabled'] = 0; + $this->field['fk_prospectlevel']['enabled'] = 0; + } $this->statut = 1; // By default, status is enabled // Unset fields that are disabled @@ -287,9 +299,7 @@ class Contact extends CommonObject } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->lasterror(); return -1; @@ -330,6 +340,7 @@ class Contact extends CommonObject $sql .= ", firstname"; $sql .= ", fk_user_creat"; $sql .= ", priv"; + $sql.= ", fk_stcommcontact"; $sql .= ", statut"; $sql .= ", canvas"; $sql .= ", entity"; @@ -343,6 +354,7 @@ class Contact extends CommonObject $sql .= "'".$this->db->escape($this->firstname)."',"; $sql .= " ".($user->id > 0 ? "'".$this->db->escape($user->id)."'" : "null").","; $sql .= " ".$this->db->escape($this->priv).","; + $sql.= " 0,"; $sql .= " ".$this->db->escape($this->statut).","; $sql .= " ".(!empty($this->canvas) ? "'".$this->db->escape($this->canvas)."'" : "null").","; $sql .= " ".$this->db->escape($this->entity).","; @@ -388,16 +400,12 @@ class Contact extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -2; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); @@ -471,6 +479,11 @@ class Contact extends CommonObject $sql .= ", phone_perso = ".(isset($this->phone_perso) ? "'".$this->db->escape($this->phone_perso)."'" : "null"); $sql .= ", phone_mobile = ".(isset($this->phone_mobile) ? "'".$this->db->escape($this->phone_mobile)."'" : "null"); $sql .= ", priv = '".$this->db->escape($this->priv)."'"; + $sql .= ", fk_prospectcontactlevel = '".$this->db->escape($this->fk_prospectlevel)."'"; + if (isset($this->stcomm_id)) + { + $sql .= ", fk_stcommcontact = ".($this->stcomm_id > 0 || $this->stcomm_id == -1 ? $this->stcomm_id : "0"); + } $sql .= ", statut = ".$this->db->escape($this->statut); $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$this->db->escape($user->id)."'" : "NULL"); $sql .= ", default_lang=".($this->default_lang ? "'".$this->db->escape($this->default_lang)."'" : "NULL"); @@ -596,16 +609,12 @@ class Contact extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { dol_syslog(get_class($this)."::update Error ".$this->error, LOG_ERR); $this->db->rollback(); return -$error; } - } - else - { + } else { $this->error = $this->db->lasterror().' sql='.$sql; $this->db->rollback(); return -1; @@ -761,14 +770,10 @@ class Contact extends CommonObject $error++; $this->error = $this->db->lasterror(); } - } - else - { + } else { $result = true; } - } - else - { + } else { $sql = "DELETE FROM ".MAIN_DB_PREFIX."user_alert "; $sql .= "WHERE type=1 AND fk_contact=".$this->db->escape($id)." AND fk_user=".$user->id; $result = $this->db->query($sql); @@ -791,9 +796,7 @@ class Contact extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { dol_syslog(get_class($this)."::update Error ".$this->error, LOG_ERR); $this->db->rollback(); return -$error; @@ -834,6 +837,7 @@ class Contact extends CommonObject $sql .= " c.socialnetworks,"; $sql .= " c.photo,"; $sql .= " c.priv, c.note_private, c.note_public, c.default_lang, c.canvas,"; + $sql.= " c.fk_prospectcontactlevel, c.fk_stcommcontact, st.libelle as stcomm, st.picto as stcomm_picto,"; $sql .= " c.import_key,"; $sql .= " c.datec as date_creation, c.tms as date_modification,"; $sql .= " co.label as country, co.code as country_code,"; @@ -845,9 +849,9 @@ class Contact extends CommonObject $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d ON c.fk_departement = d.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON c.rowid = u.fk_socpeople"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid"; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_stcommcontact as st ON c.fk_stcommcontact = st.id'; if ($id) $sql .= " WHERE c.rowid = ".$id; - else - { + else { $sql .= " WHERE c.entity IN (".getEntity($this->element).")"; if ($ref_ext) { $sql .= " AND c.ref_ext = '".$this->db->escape($ref_ext)."'"; @@ -867,8 +871,7 @@ class Contact extends CommonObject dol_syslog($this->error, LOG_ERR); return 2; - } - elseif ($num) // $num = 1 + } elseif ($num) // $num = 1 { $obj = $this->db->fetch_object($resql); @@ -902,6 +905,14 @@ class Contact extends CommonObject $this->poste = $obj->poste; $this->statut = $obj->statut; + $this->fk_prospectlevel = $obj->fk_prospectcontactlevel; + + $transcode=$langs->trans('StatusProspect'.$obj->fk_stcommcontact); + $libelle=($transcode!='StatusProspect'.$obj->fk_stcommcontact?$transcode:$obj->stcomm); + $this->stcomm_id = $obj->fk_stcommcontact; // id statut commercial + $this->statut_commercial = $libelle; // libelle statut commercial + $this->stcomm_picto = $obj->stcomm_picto; // Picto statut commercial + $this->phone_pro = trim($obj->phone); $this->fax = trim($obj->fax); $this->phone_perso = trim($obj->phone_perso); @@ -942,9 +953,7 @@ class Contact extends CommonObject $this->user_id = $uobj->rowid; } $this->db->free($resql); - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -970,9 +979,7 @@ class Contact extends CommonObject $this->birthday_alert = 1; } $this->db->free($resql); - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -987,15 +994,11 @@ class Contact extends CommonObject } return 1; - } - else - { + } else { $this->error = $langs->trans("RecordNotFound"); return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -1016,8 +1019,7 @@ class Contact extends CommonObject if (in_array($this->civility_id, array('MR')) || in_array($this->civility_code, array('MR'))) { $this->gender = 'man'; - } - elseif (in_array($this->civility_id, array('MME', 'MLE')) || in_array($this->civility_code, array('MME', 'MLE'))) + } elseif (in_array($this->civility_id, array('MME', 'MLE')) || in_array($this->civility_code, array('MME', 'MLE'))) { $this->gender = 'woman'; } @@ -1061,9 +1063,7 @@ class Contact extends CommonObject } $this->db->free($resql); return 0; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -1081,9 +1081,6 @@ class Contact extends CommonObject $error = 0; - //$this->old_lastname = $obj->lastname; - //$this->old_firstname = $obj->firstname; - $this->db->begin(); if (!$error) @@ -1095,7 +1092,7 @@ class Contact extends CommonObject $sql .= " WHERE ec.fk_socpeople=".$this->id; $sql .= " AND ec.fk_c_type_contact=tc.rowid"; $sql .= " AND tc.source='external'"; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); + dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1108,7 +1105,7 @@ class Contact extends CommonObject $sqldel = "DELETE FROM ".MAIN_DB_PREFIX."element_contact"; $sqldel .= " WHERE rowid = ".$obj->rowid; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); + dol_syslog(__METHOD__, LOG_DEBUG); $result = $this->db->query($sqldel); if (!$result) { @@ -1118,9 +1115,7 @@ class Contact extends CommonObject $i++; } - } - else - { + } else { $error++; $this->error = $this->db->error().' sql='.$sql; } @@ -1130,7 +1125,7 @@ class Contact extends CommonObject { // Remove Roles $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_socpeople = ".$this->id; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); + dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { @@ -1144,7 +1139,7 @@ class Contact extends CommonObject { // Remove category $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact WHERE fk_socpeople = ".$this->id; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); + dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { @@ -1158,7 +1153,7 @@ class Contact extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople"; $sql .= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); + dol_syslog(__METHOD__, LOG_DEBUG); $result = $this->db->query($sql); if (!$result) { @@ -1186,9 +1181,7 @@ class Contact extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); dol_syslog("Error ".$this->error, LOG_ERR); return -1; @@ -1235,9 +1228,7 @@ class Contact extends CommonObject } $this->db->free($resql); - } - else - { + } else { print $this->db->error(); } } @@ -1262,9 +1253,7 @@ class Contact extends CommonObject $this->db->free($resql); return $nb; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -1295,7 +1284,7 @@ class Contact extends CommonObject $label .= '
'; } - $label .= ''.$langs->trans("Contact").''; + $label .= img_picto('', $this->picto).' '.$langs->trans("Contact").''; $label .= '
'.$langs->trans("Name").': '.$this->getFullName($langs); //if ($this->civility_id) $label.= '
' . $langs->trans("Civility") . ': '.$this->civility_id; // TODO Translate cibilty_id code if (!empty($this->poste)) $label .= '
'.$langs->trans("Poste").': '.$this->poste; @@ -1525,9 +1514,7 @@ class Contact extends CommonObject { $this->db->rollback(); return -$error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -1680,9 +1667,7 @@ class Contact extends CommonObject } return $tab; - } - else - { + } else { $this->error = $this->db->error(); dol_print_error($this->db); return -1; @@ -1745,4 +1730,137 @@ class Contact extends CommonObject return $error * -1; } } + + /** + * Load array of prospect status + * + * @param int $active 1=Active only, 0=Not active only, -1=All + * @return int <0 if KO, >0 if OK + */ + public function loadCacheOfProspStatus($active = 1) + { + global $langs; + + $sql = "SELECT id, code, libelle as label, picto FROM " . MAIN_DB_PREFIX . "c_stcommcontact"; + if ($active >= 0) $sql .= " WHERE active = " . $active; + $resql = $this->db->query($sql); + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + $this->cacheprospectstatus[$obj->id] = array('id' => $obj->id, 'code' => $obj->code, 'label' => ($langs->trans("ST_" . strtoupper($obj->code)) == "ST_" . strtoupper($obj->code)) ? $obj->label : $langs->trans("ST_" . strtoupper($obj->code)), 'picto' => $obj->picto); + $i++; + } + return 1; + } + + /** + * Return prostect level + * + * @return string Libelle + */ + public function getLibProspLevel() + { + return $this->libProspLevel($this->fk_prospectlevel); + } + + /** + * Return label of prospect level + * + * @param int $fk_prospectlevel Prospect level + * @return string label of level + */ + public function libProspLevel($fk_prospectlevel) + { + global $langs; + + $lib = $langs->trans("ProspectLevel" . $fk_prospectlevel); + // If lib not found in language file, we get label from cache/databse + if ($lib == $langs->trans("ProspectLevel" . $fk_prospectlevel)) + { + $lib = $langs->getLabelFromKey($this->db, $fk_prospectlevel, 'c_prospectlevel', 'code', 'label'); + } + return $lib; + } + + + /** + * Set prospect level + * + * @param User $user Utilisateur qui definie la remise + * @return int <0 if KO, >0 if OK + * @deprecated Use update function instead + */ + public function setProspectLevel(User $user) + { + return $this->update($this->id, $user); + } + + /** + * Return status of prospect + * + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long + * @param string $label Label to use for status for added status + * @return string Libelle + */ + public function getLibProspCommStatut($mode = 0, $label = '') + { + return $this->libProspCommStatut($this->stcomm_id, $mode, $label, $this->stcomm_picto); + } + + /** + * Return label of a given status + * + * @param int|string $statut Id or code for prospection status + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * @param string $label Label to use for status for added status + * @param string $picto Name of image file to show ('filenew', ...) + * If no extension provided, we use '.png'. Image must be stored into theme/xxx/img directory. + * Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img + * Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img + * Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1) + * @return string Libelle du statut + */ + public function libProspCommStatut($statut, $mode = 0, $label = '', $picto = '') + { + global $langs; + $langs->load('customers'); + + if ($mode == 2) + { + if ($statut == '-1' || $statut == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1, $picto) . ' ' . $langs->trans("StatusProspect-1"); + elseif ($statut == '0' || $statut == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0, $picto) . ' ' . $langs->trans("StatusProspect0"); + elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto) . ' ' . $langs->trans("StatusProspect1"); + elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto) . ' ' . $langs->trans("StatusProspect2"); + elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto) . ' ' . $langs->trans("StatusProspect3"); + else { + return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto) . ' ' . (($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label); + } + } + if ($mode == 3) + { + if ($statut == '-1' || $statut == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1, $picto); + elseif ($statut == '0' || $statut == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0, $picto); + elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto); + elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto); + elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto); + else { + return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto); + } + } + if ($mode == 4) + { + if ($statut == '-1' || $statut == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1, $picto) . ' ' . $langs->trans("StatusProspect-1"); + elseif ($statut == '0' || $statut == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0, $picto) . ' ' . $langs->trans("StatusProspect0"); + elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto) . ' ' . $langs->trans("StatusProspect1"); + elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto) . ' ' . $langs->trans("StatusProspect2"); + elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto) . ' ' . $langs->trans("StatusProspect3"); + else { + return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto) . ' ' . (($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label); + } + } + + return "Error, mode/status not found"; + } } diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index ad4b5ca08f5..7655e00ea3f 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -178,8 +178,7 @@ if ($type_element == 'fichinter') $where = ' WHERE f.entity IN ('.getEntity('ficheinter').')'; $dateprint = 'f.datec'; $doc_number = 'f.ref'; -} -elseif ($type_element == 'invoice') +} elseif ($type_element == 'invoice') { // Customer : show products from invoices require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $documentstatic = new Facture($db); @@ -193,8 +192,7 @@ elseif ($type_element == 'invoice') $dateprint = 'f.datef'; $doc_number = 'f.ref'; $thirdTypeSelect = 'customer'; -} -elseif ($type_element == 'propal') +} elseif ($type_element == 'propal') { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $documentstatic = new Propal($db); @@ -208,8 +206,7 @@ elseif ($type_element == 'propal') $datePrint = 'c.datep'; $doc_number = 'c.ref'; $thirdTypeSelect = 'customer'; -} -elseif ($type_element == 'order') +} elseif ($type_element == 'order') { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $documentstatic = new Commande($db); @@ -223,8 +220,7 @@ elseif ($type_element == 'order') $dateprint = 'c.date_commande'; $doc_number = 'c.ref'; $thirdTypeSelect = 'customer'; -} -elseif ($type_element == 'supplier_invoice') +} elseif ($type_element == 'supplier_invoice') { // Supplier : Show products from invoices. require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $documentstatic = new FactureFournisseur($db); @@ -266,8 +262,7 @@ elseif ($type_element == 'supplier_order') $dateprint = 'c.date_valid'; $doc_number = 'c.ref'; $thirdTypeSelect = 'supplier'; -} -elseif ($type_element == 'contract') +} elseif ($type_element == 'contract') { // Order require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $documentstatic = new Contrat($db); @@ -423,9 +418,7 @@ if ($sql_select) if ($type_element == 'contract') { print $documentstaticline->getLibStatut(2); - } - else - { + } else { print $documentstatic->getLibStatut(2); } print ''; @@ -467,9 +460,7 @@ if ($sql_select) } $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $objp->product_label; - } - else - { + } else { $label = $objp->product_label; } @@ -501,29 +492,23 @@ if ($sql_select) $discount = new DiscountAbsolute($db); $discount->fetch($objp->fk_remise_except); echo ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessReceived", $discount->getNomUrl(0)); - } - elseif ($objp->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0) + } elseif ($objp->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0) { $discount = new DiscountAbsolute($db); $discount->fetch($objp->fk_remise_except); echo ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessPaid", $discount->getNomUrl(0)); - } - elseif ($objp->description == '(DEPOSIT)' && $objp->fk_remise_except > 0) + } elseif ($objp->description == '(DEPOSIT)' && $objp->fk_remise_except > 0) { $discount = new DiscountAbsolute($db); $discount->fetch($objp->fk_remise_except); echo ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0)); // Add date of deposit if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec).')'; - } - else - { + } else { echo ($txt ? ' - ' : '').dol_htmlentitiesbr($objp->description); } } - } - else - { + } else { if ($objp->fk_product > 0) { echo $form->textwithtooltip($text, $description, 3, '', '', $i, 0, ''); diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 842d03cb3a6..f601086ad05 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -67,9 +67,7 @@ if ($action == 'dolibarr2ldap') { setEventMessages($langs->trans("ContactSynchronized"), null, 'mesgs'); $db->commit(); - } - else - { + } else { setEventMessages($ldap->error, $ldap->errors, 'errors'); $db->rollback(); } @@ -106,9 +104,7 @@ if ($object->socid > 0) $thirdparty->fetch($object->socid); print ''.$langs->trans("ThirdParty").''.$thirdparty->getNomUrl(1).''; -} -else -{ +} else { print ''.$langs->trans("ThirdParty").''; print $langs->trans("ContactNotLinkedToCompany"); print ''; @@ -183,22 +179,16 @@ if ($result > 0) if (!is_array($records)) { print ''.$langs->trans("ErrorFailedToReadLDAP").''; - } - else - { + } else { $result = show_ldap_content($records, 0, $records['count'], true); } - } - else - { + } else { print ''.$langs->trans("LDAPRecordNotFound").' (dn='.$dn.' - search='.$search.')'; } $ldap->unbind(); $ldap->close(); -} -else -{ +} else { setEventMessages($ldap->error, $ldap->errors, 'errors'); } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 9e7485d189f..1772f94abfb 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -11,6 +11,7 @@ * Copyright (C) 2018 Juanjo Menent * Copyright (C) 2019 Frédéric France * Copyright (C) 2019 Josep Lluís Amador + * Copyright (C) 2020 Open-Dsi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -61,7 +62,7 @@ $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', $search_cti = preg_replace('/^0+/', '', preg_replace('/[^0-9]/', '', GETPOST('search_cti', 'alphanohtml'))); // Phone number without any special chars $search_phone = GETPOST("search_phone", 'alpha'); -$search_id = trim(GETPOST("search_id", "int")); +$search_id = GETPOST("search_id", "int"); $search_firstlast_only = GETPOST("search_firstlast_only", 'alpha'); $search_lastname = GETPOST("search_lastname", 'alpha'); $search_firstname = GETPOST("search_firstname", 'alpha'); @@ -76,7 +77,7 @@ $search_no_email = GETPOST("search_no_email", 'int'); if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { - $search_{$key} = GETPOST("search_".$key, 'alpha'); + $search_[$key] = GETPOST("search_".$key, 'alpha'); } } } @@ -91,6 +92,8 @@ $search_town = GETPOST('search_town', 'alpha'); $search_import_key = GETPOST("search_import_key", "alpha"); $search_country = GETPOST("search_country", 'intcomma'); $search_roles = GETPOST("search_roles", 'array'); +$search_level = GETPOST("search_level", "array"); +$search_stcomm = GETPOST('search_stcomm', 'int'); if ($search_status == '') $search_status = 1; // always display active customer first @@ -123,14 +126,12 @@ if ($type == "c") if (empty($contextpage) || $contextpage == 'contactlist') $contextpage = 'contactcustomerlist'; $titre .= ' ('.$langs->trans("ThirdPartyCustomers").')'; $urlfiche = "card.php"; -} -elseif ($type == "f") +} elseif ($type == "f") { if (empty($contextpage) || $contextpage == 'contactlist') $contextpage = 'contactsupplierlist'; $titre .= ' ('.$langs->trans("ThirdPartySuppliers").')'; $urlfiche = "card.php"; -} -elseif ($type == "o") +} elseif ($type == "o") { if (empty($contextpage) || $contextpage == 'contactlist') $contextpage = 'contactotherlist'; $titre .= ' ('.$langs->trans("OthersNotLinkedToThirdParty").')'; @@ -143,7 +144,7 @@ $hookmanager->initHooks(array('contactlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label('contact'); +$extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); @@ -157,8 +158,8 @@ $fieldstosearchall = array( 'p.phone_perso'=>"PhonePerso", 'p.phone_mobile'=>"PhoneMobile", 'p.fax'=>"Fax", - 'p.note_public'=>"NotePublic", - 'p.note_private'=>"NotePrivate", + 'p.note_public'=>"NotePublic", + 'p.note_private'=>"NotePrivate", ); // Definition of fields for list @@ -183,6 +184,11 @@ $arrayfields = array( 'p.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), 'p.import_key'=>array('label'=>"ImportId", 'checked'=>0, 'position'=>1100), ); +if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) { + $arrayfields['p.fk_prospectcontactlevel'] = array('label'=>"ProspectLevelShort", 'checked'=>1, 'position'=>210); + $arrayfields['p.fk_stcommcontact'] = array('label'=>"StatusProsp", 'checked'=>1, 'position'=>215); +} + if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { @@ -200,7 +206,13 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) - $arrayfields["ef.".$key] = array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + $arrayfields["ef.".$key] = array( + 'label'=>$extrafields->attributes[$object->table_element]['label'][$key], + 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), + 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], + 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key]), + 'langfile'=>$extrafields->attributes[$object->table_element]['langfile'][$key], + ); } } $object->fields = dol_sort_array($object->fields, 'position'); @@ -253,11 +265,13 @@ if (empty($reshook)) if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { - $search_{$key} = ""; + $search_[$key] = ""; } } } $search_priv = ""; + $search_stcomm = ''; + $search_level = ''; $search_status = -1; $search_categ = ''; $search_categ_thirdparty = ''; @@ -275,6 +289,17 @@ if (empty($reshook)) $permissiontodelete = $user->rights->societe->supprimer; $uploaddir = $conf->societe->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + + if ($action == 'setstcomm') + { + $object = new Contact($db); + $result = $object->fetch(GETPOST('stcommcontactid')); + $object->stcomm_id = dol_getIdFromCode($db, GETPOST('stcomm', 'alpha'), 'c_stcommcontact'); + $result = $object->update($object->id, $user); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + + $action = ''; + } } if ($search_priv < 0) $search_priv = ''; @@ -289,12 +314,36 @@ $formother = new FormOther($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); +if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) { + $contactstatic->loadCacheOfProspStatus(); +} + $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); +// Select every potentiels, and note each potentiels which fit in search parameters +$tab_level = array(); +$sql = "SELECT code, label, sortorder"; +$sql .= " FROM ".MAIN_DB_PREFIX."c_prospectcontactlevel"; +$sql .= " WHERE active > 0"; +$sql .= " ORDER BY sortorder"; +$resql = $db->query($sql); +if ($resql) +{ + while ($obj = $db->fetch_object($resql)) + { + // Compute level text + $level = $langs->trans($obj->code); + if ($level == $obj->code) $level = $langs->trans($obj->label); + $tab_level[$obj->code] = $level; + } +} +else dol_print_error($db); + $sql = "SELECT s.rowid as socid, s.nom as name,"; $sql .= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.zip, p.town, p.poste, p.email, p.no_email,"; $sql .= " p.socialnetworks, p.photo,"; $sql .= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_update,"; +$sql .= " st.libelle as stcomm, st.picto as stcomm_picto, p.fk_stcommcontact as stcomm_id, p.fk_prospectcontactlevel,"; $sql .= " co.label as country, co.code as country_code"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { @@ -308,6 +357,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = p.fk_pays"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_stcommcontact as st ON st.id = p.fk_stcommcontact"; if (!empty($search_categ)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_contact as cc ON p.rowid = cc.fk_socpeople"; // We need this table joined to the select in order to filter by categ if (!empty($search_categ_thirdparty)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; // We need this table joined to the select in order to filter by categ if (!empty($search_categ_supplier)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs2 ON s.rowid = cs2.fk_soc"; // We need this table joined to the select in order to filter by categ @@ -321,14 +371,14 @@ if (!empty($userid)) // propre au commercial { $sql .= " AND p.fk_user_creat=".$db->escape($userid); } +if ($search_level) $sql .= natural_search("p.fk_prospectcontactlevel", join(',', $search_level), 3); +if ($search_stcomm != '' && $search_stcomm != -2) $sql .= natural_search("p.fk_stcommcontact", $search_stcomm, 2); // Filter to exclude not owned private contacts if ($search_priv != '0' && $search_priv != '1') { $sql .= " AND (p.priv='0' OR (p.priv='1' AND p.fk_user_creat=".$user->id."))"; -} -else -{ +} else { if ($search_priv == '0') $sql .= " AND p.priv='0'"; if ($search_priv == '1') $sql .= " AND (p.priv='1' AND p.fk_user_creat=".$user->id.")"; } @@ -357,9 +407,8 @@ if (strlen($search_phone_mobile)) $sql .= natural_search('p.phone_mobile', $se if (strlen($search_fax)) $sql .= natural_search('p.fax', $search_fax); if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { - if ($value['active'] && strlen($search_{$key})) { - //$sql.= natural_search("p.socialnetworks->'$.".$key."'", $search_{$key}); - $sql .= ' AND p.socialnetworks LIKE \'%"'.$key.'":"'.$search_{$key}.'%\''; + if ($value['active'] && strlen($search_[$key])) { + $sql .= ' AND p.socialnetworks LIKE \'%"'.$key.'":"'.$search_[$key].'%\''; } } } @@ -376,16 +425,13 @@ if ($search_import_key) $sql .= natural_search("p.import_key", $sear if ($type == "o") // filtre sur type { $sql .= " AND p.fk_soc IS NULL"; -} -elseif ($type == "f") // filtre sur type +} elseif ($type == "f") // filtre sur type { $sql .= " AND s.fournisseur = 1"; -} -elseif ($type == "c") // filtre sur type +} elseif ($type == "c") // filtre sur type { $sql .= " AND s.client IN (1, 3)"; -} -elseif ($type == "p") // filtre sur type +} elseif ($type == "p") // filtre sur type { $sql .= " AND s.client IN (2, 3)"; } @@ -403,9 +449,7 @@ $sql .= $hookmanager->resPrint; if ($view == "recent") { $sql .= $db->order("p.datec", "DESC"); -} -else -{ +} else { $sql .= $db->order($sortfield, $sortorder); } @@ -413,8 +457,8 @@ else $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 { $page = 0; @@ -424,14 +468,14 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); -$result = $db->query($sql); -if (!$result) +$resql = $db->query($sql); +if (!$resql) { dol_print_error($db); exit; } -$num = $db->num_rows($result); +$num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); @@ -471,8 +515,14 @@ if ($search_email != '') $param .= '&search_email='.urlencode($search_email) if ($search_no_email != '') $param .= '&search_no_email='.urlencode($search_no_email); if ($search_status != '') $param .= '&search_status='.urlencode($search_status); if ($search_priv == '0' || $search_priv == '1') $param .= "&search_priv=".urlencode($search_priv); +if ($search_stcomm != '') $param .= '&search_stcomm='.urlencode($search_stcomm); +if (is_array($search_level) && count($search_level)) { + foreach ($search_level as $slevel) { + $param .= '&search_level[]='.urlencode($slevel); + } +} if ($search_import_key != '') $param .= '&search_import_key='.urlencode($search_import_key); -if ($optioncss != '') $param .= '&optioncss='.$optioncss; +if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); if (count($search_roles) > 0) $param .= implode('&search_roles[]=', $search_roles); // Add $param from extra fields @@ -491,7 +541,7 @@ $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $newcardbutton = ''; if ($user->rights->societe->contact->creer) { - $newcardbutton .= dolGetButtonTitle($langs->trans('NewContactAddress'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create'); + $newcardbutton .= dolGetButtonTitle($langs->trans('NewContactAddress'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create'); } print '
'; @@ -669,7 +719,7 @@ if (!empty($conf->socialnetworks->enabled)) { if (!empty($arrayfields['p.'.$key]['checked'])) { print ''; - print ''; + print ''; print ''; } } @@ -684,9 +734,28 @@ if (!empty($arrayfields['p.thirdparty']['checked'])) if (!empty($arrayfields['p.priv']['checked'])) { print ''; - $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('search_priv', $selectarray, $search_priv, 1); - print ''; + $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); + print $form->selectarray('search_priv', $selectarray, $search_priv, 1); + print ''; +} +// Prospect level +if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) +{ + print ''; + print $form->multiselectarray('search_level', $tab_level, $search_level, 0, 0, 'width75', 0, 0, '', '', '', 2); + print ''; +} +// Prospect status +if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) +{ + print ''; + $arraystcomm = array(); + foreach ($contactstatic->cacheprospectstatus as $key => $val) + { + $arraystcomm[$val['id']] = ($langs->trans("StatusProspect".$val['id']) != "StatusProspect".$val['id'] ? $langs->trans("StatusProspect".$val['id']) : $val['label']); + } + print $form->selectarray('search_stcomm', $arraystcomm, $search_stcomm, -2, 0, 0, '', 0, 0, 0, '', 'nowrap '); + print ''; } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -739,7 +808,7 @@ if (!empty($arrayfields['p.town']['checked'])) print_liste_field_ //if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder); //if (! empty($arrayfields['region.nom']['checked'])) print_liste_field_titre($arrayfields['region.nom']['label'],$_SERVER["PHP_SELF"],"region.nom","",$param,'',$sortfield,$sortorder); if (!empty($arrayfields['country.code_iso']['checked'])) { - print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "co.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "co.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($arrayfields['p.phone']['label'], $_SERVER["PHP_SELF"], "p.phone", $begin, $param, '', $sortfield, $sortorder); if (!empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($arrayfields['p.phone_perso']['label'], $_SERVER["PHP_SELF"], "p.phone_perso", $begin, $param, '', $sortfield, $sortorder); @@ -756,28 +825,30 @@ if (!empty($conf->socialnetworks->enabled)) { } if (!empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($arrayfields['p.thirdparty']['label'], $_SERVER["PHP_SELF"], "s.nom", $begin, $param, '', $sortfield, $sortorder); if (!empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'], $_SERVER["PHP_SELF"], "p.priv", $begin, $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) print_liste_field_titre($arrayfields['p.fk_prospectcontactlevel']['label'], $_SERVER["PHP_SELF"], "p.fk_prospectcontactlevel", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) print_liste_field_titre($arrayfields['p.fk_stcommcontact']['label'], $_SERVER["PHP_SELF"], "p.fk_stcommcontact", "", $param, '', $sortfield, $sortorder, 'center '); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields $parameters = array( - 'arrayfields'=>$arrayfields, - 'param'=>$param, - 'sortfield'=>$sortfield, - 'sortorder'=>$sortorder, + 'arrayfields'=>$arrayfields, + 'param'=>$param, + 'sortfield'=>$sortfield, + 'sortorder'=>$sortorder, ); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['p.datec']['checked'])) { - print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); } if (!empty($arrayfields['p.tms']['checked'])) { - print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); } if (!empty($arrayfields['p.statut']['checked'])) { - print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['p.import_key']['checked'])) { - print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center '); } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "\n"; @@ -787,7 +858,7 @@ $i = 0; $totalarray = array(); while ($i < min($num, $limit)) { - $obj = $db->fetch_object($result); + $obj = $db->fetch_object($resql); $arraysocialnetworks = (array) json_decode($obj->socialnetworks, true); $contactstatic->lastname = $obj->lastname; @@ -806,6 +877,8 @@ while ($i < min($num, $limit)) $contactstatic->country_code = $obj->country_code; $contactstatic->photo = $obj->photo; + $contactstatic->fk_prospectlevel = $obj->fk_prospectcontactlevel; + print ''; // ID @@ -913,18 +986,16 @@ while ($i < min($num, $limit)) } } } - // Company + // Company if (!empty($arrayfields['p.thirdparty']['checked'])) { print ''; if ($obj->socid) { - $objsoc = new Societe($db); - $objsoc->fetch($obj->socid); - print $objsoc->getNomUrl(1); - } - else - print ' '; + $objsoc = new Societe($db); + $objsoc->fetch($obj->socid); + print $objsoc->getNomUrl(1); + } else print ' '; print ''; if (!$i) $totalarray['nbfield']++; } @@ -936,6 +1007,30 @@ while ($i < min($num, $limit)) if (!$i) $totalarray['nbfield']++; } + if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) + { + // Prospect level + print ''; + print $contactstatic->getLibProspLevel(); + print ""; + if (!$i) $totalarray['nbfield']++; + } + + if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) + { + // Prospect status + print '
'; + print '
'.$contactstatic->libProspCommStatut($obj->stcomm_id, 2, $contactstatic->cacheprospectstatus[$obj->stcomm_id]['label'], $obj->stcomm_picto); + print '
-
'; + foreach ($contactstatic->cacheprospectstatus as $key => $val) { + $titlealt = 'default'; + if (!empty($val['code']) && !in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt = $val['label']; + if ($obj->stcomm_id != $val['id']) print ''.img_action($titlealt, $val['code'], $val['picto']).''; + } + print '
'; + if (!$i) $totalarray['nbfield']++; + } + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook @@ -987,7 +1082,7 @@ while ($i < min($num, $limit)) $i++; } -$db->free($result); +$db->free($resql); $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 5a6ea3eb032..a5a1714b6e5 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -85,21 +85,15 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact- if (!dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1, 0, $_FILES['photo']['error']) > 0) { setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); - } - else - { + } else { // Create thumbs $object->addThumbs($newfile); } } - } - else - { + } else { setEventMessages("ErrorBadImageFormat", null, 'errors'); } - } - else - { + } else { switch ($_FILES['photo']['error']) { case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini @@ -111,9 +105,7 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact- break; } } - } - else - { + } else { $error = $object->error; } } @@ -183,9 +175,7 @@ if ($action == 'edit') $objsoc->fetch($object->socid); print ''.$langs->trans("ThirdParty").''.$objsoc->getNomUrl(1).''; - } - else - { + } else { print ''.$langs->trans("ThirdParty").''; print $langs->trans("ContactNotLinkedToCompany"); print ''; @@ -207,9 +197,7 @@ if ($action == 'edit') if (!empty($object->birthday_alert)) { print ''; - } - else - { + } else { print ''; } print ''; @@ -225,9 +213,7 @@ if ($action == 'edit') print ''; print "
"; -} -else -{ +} else { // View mode dol_fiche_head($head, 'perso', $title, -1, 'contact'); @@ -301,9 +287,7 @@ else if ($object->birthday_alert) print $langs->trans("BirthdayAlertOn"); else print $langs->trans("BirthdayAlertOff"); print ''; - } - else - { + } else { print ''.$langs->trans("DateToBirth").''; } print ""; diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 75362491424..ee325317033 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -102,8 +102,7 @@ if ($company->id) $v->setEmail($company->email, 'INTERNET'); } // when e-mail of contact and company complete different use company e-mail at first (and contact e-mail at second) - else - { + else { $v->setEmail($company->email); // support by Microsoft Outlook (2019 and possible earlier) diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index 0055b0ba428..d016cb23d75 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -39,9 +39,7 @@ if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ +} else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } $search_agenda_label = GETPOST('search_agenda_label'); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 9f825cdf009..cd622b38c28 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -112,13 +112,10 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) + } elseif ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) { if (!GETPOST('dateend')) { @@ -132,9 +129,7 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -302,14 +297,11 @@ if (empty($reshook)) } $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label; - } - else - { + } else { $label = $lines[$i]->product_label; } $desc = ($lines[$i]->desc && $lines[$i]->desc != $lines[$i]->libelle) ?dol_htmlentitiesbr($lines[$i]->desc) : ''; - } - else { + } else { $desc = dol_htmlentitiesbr($lines[$i]->desc); } @@ -354,9 +346,7 @@ if (empty($reshook)) } } } - } - else - { + } else { setEventMessages($srcobject->error, $srcobject->errors, 'errors'); $error++; } @@ -367,30 +357,23 @@ if (empty($reshook)) // modified by hook if ($reshook < 0) $error++; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } - else - { + } else { $result = $object->create($user); if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { setEventMessages($object->error, $object->errors, 'errors'); } $action = 'create'; } } - } - - elseif ($action == 'classin' && $user->rights->contrat->creer) + } elseif ($action == 'classin' && $user->rights->contrat->creer) { $object->setProject(GETPOST('projectid')); } @@ -407,9 +390,7 @@ if (empty($reshook)) { $idprod = 0; $tva_tx = (GETPOST('tva_tx', 'alpha') ? GETPOST('tva_tx', 'alpha') : 0); - } - else - { + } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } @@ -480,8 +461,7 @@ if (empty($reshook)) $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; - } - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; @@ -513,9 +493,7 @@ if (empty($reshook)) if ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); - } - else - { + } else { $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); } } @@ -525,9 +503,7 @@ if (empty($reshook)) else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); $fk_unit = $prod->fk_unit; - } - else - { + } else { $pu_ht = GETPOST('price_ht'); $price_base_type = 'HT'; $tva_tx = GETPOST('tva_tx') ?str_replace('*', '', GETPOST('tva_tx')) : 0; // tva_tx field may be disabled, so we use vat rate 0 @@ -543,8 +519,7 @@ if (empty($reshook)) $fk_fournprice = $_POST['fournprice']; if (!empty($_POST['buying_price'])) $pa_ht = $_POST['buying_price']; - else - $pa_ht = null; + else $pa_ht = null; $info_bits = 0; if ($tva_npr) $info_bits |= 0x01; @@ -554,9 +529,7 @@ if (empty($reshook)) { $object->error = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); $result = -1; - } - else - { + } else { // Insert line $result = $object->addline( $desc, @@ -595,7 +568,7 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST['prod_entry_mode']); @@ -629,15 +602,11 @@ if (empty($reshook)) unset($_POST['date_endday']); unset($_POST['date_endmonth']); unset($_POST['date_endyear']); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } - } - - elseif ($action == 'updateline' && $user->rights->contrat->creer && !GETPOST('cancel', 'alpha')) { + } elseif ($action == 'updateline' && $user->rights->contrat->creer && !GETPOST('cancel', 'alpha')) { $error = 0; if (!empty($date_start_update) && !empty($date_end_update) && $date_start_update > $date_end_update) @@ -692,8 +661,7 @@ if (empty($reshook)) $fk_fournprice = $_POST['fournprice']; if (!empty($_POST['buying_price'])) $pa_ht = $_POST['buying_price']; - else - $pa_ht = null; + else $pa_ht = null; $fk_unit = GETPOST('unit', 'alpha'); @@ -744,14 +712,10 @@ if (empty($reshook)) if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - - elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) + } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->deleteline(GETPOST('lineid'), $user); @@ -759,14 +723,10 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer) + } elseif ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->validate($user); @@ -783,19 +743,15 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'reopen' && $user->rights->contrat->creer) + } elseif ($action == 'reopen' && $user->rights->contrat->creer) { $result = $object->reopen($user); if ($result < 0) @@ -822,23 +778,17 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) + } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) { $result = $object->delete($user); if ($result >= 0) { header("Location: list.php?restore_lastsearch_values=1"); return; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) + } elseif ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) { if (GETPOST('newcid') > 0) { @@ -850,18 +800,13 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); return; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("RefNewContract")), null, 'errors'); } - } - elseif ($action == 'update_extras') + } elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); @@ -881,8 +826,7 @@ if (empty($reshook)) if ($error) { $action = 'edit_extras'; } - } - elseif ($action == 'setref_supplier') + } elseif ($action == 'setref_supplier') { $cancelbutton = GETPOST('cancel', 'alpha'); if (!$cancelbutton) { @@ -896,13 +840,11 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } - } - else { + } else { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } - } - elseif ($action == 'setref_customer') + } elseif ($action == 'setref_customer') { $cancelbutton = GETPOST('cancel', 'alpha'); @@ -918,13 +860,11 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } - } - else { + } else { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } - } - elseif ($action == 'setref') + } elseif ($action == 'setref') { $cancelbutton = GETPOST('cancel', 'alpha'); @@ -958,13 +898,11 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } - } - else { + } else { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } - } - elseif ($action == 'setdate_contrat') + } elseif ($action == 'setdate_contrat') { $cancelbutton = GETPOST('cancel', 'alpha'); @@ -982,8 +920,7 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } - } - else { + } else { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } @@ -1014,16 +951,12 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1044,8 +977,7 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1057,9 +989,7 @@ if (empty($reshook)) if (!GETPOST('socid', 3)) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); - } - else - { + } else { if ($object->id > 0) { $result = $object->createFromClone($user, $socid); if ($result > 0) { @@ -1119,9 +1049,7 @@ if ($action == 'create') if ($element == 'project') { $projectid = GETPOST('originid'); - } - else - { + } else { // For compatibility if ($element == 'order' || $element == 'commande') { $element = $subelement = 'commande'; } if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } @@ -1148,8 +1076,7 @@ if ($action == 'create') // Object source contacts list $srccontactslist = $objectsrc->liste_contact(-1, 'external', 1); } - } - else { + } else { $projectid = GETPOST('projectid', 'int'); $note_private = GETPOST("note_private"); $note_public = GETPOST("note_public"); @@ -1195,12 +1122,10 @@ if ($action == 'create') print $soc->getNomUrl(1); print ''; print ''; - } - else - { + } else { print ''; print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); - print ' '.$langs->trans("AddThirdParty").''; + print ' '; print ''; } print ''."\n"; @@ -1242,7 +1167,7 @@ if ($action == 'create') print ''.$langs->trans("Project").''; $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, "projectid", 0, 0, 1, 1); - print '   id).'">'.$langs->trans("AddProject").''; + print '   id).'">'; print ""; } @@ -1291,9 +1216,7 @@ if ($action == 'create') } print "\n"; -} -else -/* *************************************************************************** */ +} else /* *************************************************************************** */ /* */ /* Mode vue et edition */ /* */ @@ -1567,7 +1490,9 @@ else // Line in view mode if ($action != 'editline' || GETPOST('rowid') != $objp->rowid) { - print ''; + $moreparam = ''; + if (! empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $objp->statut == ContratLigne::STATUS_CLOSED && $action != 'showclosedlines') $moreparam = 'style="display: none;"'; + print ''; // Label if ($objp->fk_product > 0) { @@ -1599,9 +1524,7 @@ else echo $form->textwithtooltip($text, $description, 3, '', '', $cursorline, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : '')); print ''; - } - else - { + } else { print ''.img_object($langs->trans("ShowProductOrService"), ($objp->product_type ? 'service' : 'product')).' '.dol_htmlentitiesbr($objp->description)."\n"; } // VAT @@ -1622,9 +1545,7 @@ else if ($objp->remise_percent > 0) { print ''.$objp->remise_percent."%\n"; - } - else - { + } else { print ' '; } @@ -1667,7 +1588,7 @@ else $colspan = 7; } - print ''; + print ''; print ''; // Date planned @@ -1681,8 +1602,7 @@ else $textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days"); print " ".img_warning($textlate); } - } - else print $langs->trans("Unknown"); + } else print $langs->trans("Unknown"); print '  -  '; print $langs->trans("DateEndPlanned").': '; if ($objp->date_fin) @@ -1693,8 +1613,7 @@ else $textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days"); print " ".img_warning($textlate); } - } - else print $langs->trans("Unknown"); + } else print $langs->trans("Unknown"); print ''; print ''; @@ -1705,12 +1624,11 @@ else $line = new ContratLigne($db); $line->id = $objp->rowid; $line->fetch_optionals(); - print $line->showOptionals($extrafields, 'view', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', 1); + print $line->showOptionals($extrafields, 'view', array('class'=>'oddeven','style'=>$moreparam, 'colspan'=>$colspan), '', '', 1); } } // Line in mode update - else - { + else { // Ligne carac print ''; print ''; @@ -1723,9 +1641,7 @@ else print $productstatic->getNomUrl(1, '', 32); print $objp->label ? ' - '.dol_trunc($objp->label, 32) : ''; print '
'; - } - else - { + } else { print $objp->label ? $objp->label.'
' : ''; } @@ -1801,15 +1717,15 @@ else } $db->free($result); - } - else - { + } else { dol_print_error($db); } if ($object->statut > 0) { - print ''; + $moreparam = ''; + if (! empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $object->lines[$cursorline-1]->statut == ContratLigne::STATUS_CLOSED && $action != 'showclosedlines') $moreparam = 'style="display: none;"'; + print ''; print '
'; print "\n"; } @@ -1873,9 +1789,7 @@ else if (empty($dateactend)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEndReal")), null, 'errors'); - } - else - { + } else { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne', 'int')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService", dol_print_date($dateactend, "%A %d %B %Y")), "confirm_closeline", '', 0, 1); } print '
'; @@ -1887,7 +1801,7 @@ else { print ''; - print ''; + print ''; print ''; print ''; print "\n"; - print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; } print "
'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline - 1]->getLibStatut(4).''; if ($user->socid == 0) @@ -1914,7 +1828,7 @@ else print '
'; // Si pas encore active @@ -1983,7 +1897,7 @@ else print '
'.$langs->trans("Comment").''.$langs->trans("Comment").''; print '   '; print ''; @@ -2112,8 +2026,7 @@ else if ($object->statut == 1) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->commande->order_advance->send)) { print ''; - } else - print ''; + } else print ''; } } @@ -2128,13 +2041,6 @@ else else print ''; } - if (!empty($conf->facture->enabled) && $object->statut > 0) - { - $langs->load("bills"); - if ($user->rights->facture->creer) print ''; - else print ''; - } - if (!empty($conf->commande->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices) { $langs->load("orders"); @@ -2142,9 +2048,11 @@ else else print ''; } - // Clone - if ($user->rights->contrat->creer) { - print ''; + if (!empty($conf->facture->enabled) && $object->statut > 0) + { + $langs->load("bills"); + if ($user->rights->facture->creer) print ''; + else print ''; } if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0) @@ -2152,9 +2060,7 @@ else if ($user->rights->contrat->activer) { print ''; - } - else - { + } else { print ''; } } @@ -2163,9 +2069,7 @@ else if ($user->rights->contrat->desactiver) { print ''; - } - else - { + } else { print ''; } @@ -2178,15 +2082,24 @@ else //} } + if (! empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $object->nbofservicesclosed > 0) + { + if ($action == 'showclosedlines') print ''; + else print ''; + } + + // Clone + if ($user->rights->contrat->creer) { + print ''; + } + // On peut supprimer entite si // - Droit de creer + mode brouillon (erreur creation) // - Droit de supprimer - if (($user->rights->contrat->creer && $object->statut == 0) || $user->rights->contrat->supprimer) + if (($user->rights->contrat->creer && $object->statut == $object::STATUS_DRAFT) || $user->rights->contrat->supprimer) { print ''; - } - else - { + } else { print ''; } } @@ -2213,7 +2126,7 @@ else $delallowed = $user->rights->contrat->creer; - print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); + print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); // Show links to link elements diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index a35d3c871de..ffe66208afe 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -169,8 +169,7 @@ class Contracts extends DolibarrApi } $i++; } - } - else { + } else { throw new RestException(503, 'Error when retrieve contrat list : '.$db->lasterror()); } if (!count($obj_ret)) { @@ -464,9 +463,7 @@ class Contracts extends DolibarrApi $updateRes = $this->contract->deleteline($lineid, DolibarrApiAccess::$user); if ($updateRes > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(405, $this->contract->error); } } @@ -501,9 +498,7 @@ class Contracts extends DolibarrApi if ($this->contract->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(500, $this->contract->error); } } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 1dec473edac..b555917e2f3 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -298,16 +298,12 @@ class Contrat extends CommonObject if ($numref != "") { return $numref; - } - else - { + } else { $this->error = $obj->error; dol_print_error($db, get_class($this)."::getNextValue ".$obj->error); return ""; } - } - else - { + } else { $langs->load("errors"); print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Contract")); return ""; @@ -410,9 +406,7 @@ class Contrat extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -467,9 +461,7 @@ class Contrat extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -508,13 +500,10 @@ class Contrat extends CommonObject if ($force_number) { $num = $force_number; - } - elseif (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life + } elseif (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef($this->thirdparty); - } - else - { + } else { $num = $this->ref; } $this->newref = dol_sanitizeFileName($num); @@ -591,9 +580,7 @@ class Contrat extends CommonObject $this->brouillon = 0; $this->date_validation = $now; } - } - else - { + } else { $error++; } @@ -601,9 +588,7 @@ class Contrat extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -666,9 +651,7 @@ class Contrat extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -720,8 +703,7 @@ class Contrat extends CommonObject $this->error = 'Fetch found several records.'; dol_syslog($this->error, LOG_ERR); $result = -2; - } - elseif ($num) // $num = 1 + } elseif ($num) // $num = 1 { $obj = $this->db->fetch_object($resql); if ($obj) @@ -744,6 +726,7 @@ class Contrat extends CommonObject $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; + $this->model_pdf = $obj->model_pdf; $this->modelpdf = $obj->model_pdf; $this->fk_projet = $obj->fk_project; // deprecated @@ -770,16 +753,12 @@ class Contrat extends CommonObject return $this->id; } - } - else - { + } else { dol_syslog(get_class($this)."::fetch Contract not found"); $this->error = "Contract not found"; return 0; } - } - else - { + } else { dol_syslog(get_class($this)."::fetch Error searching contract"); $this->error = $this->db->error(); return -1; @@ -939,9 +918,7 @@ class Contrat extends CommonObject $pos++; } $this->db->free($result); - } - else - { + } else { dol_syslog(get_class($this)."::Fetch Error when reading lines of contracts linked to products"); return -3; } @@ -1081,8 +1058,7 @@ class Contrat extends CommonObject $error++; } } - } - else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + } else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); @@ -1129,8 +1105,7 @@ class Contrat extends CommonObject //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object } - } - else dol_print_error($resqlcontact); + } else dol_print_error($resqlcontact); } } @@ -1145,24 +1120,18 @@ class Contrat extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { dol_syslog(get_class($this)."::create - 30 - ".$this->error, LOG_ERR); $this->db->rollback(); return -3; } - } - else - { + } else { $this->error = "Failed to add contract"; dol_syslog(get_class($this)."::create - 20 - ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $langs->trans("UnknownError: ".$this->db->error()." -", LOG_DEBUG); $this->db->rollback(); @@ -1331,9 +1300,7 @@ class Contrat extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -1426,9 +1393,7 @@ class Contrat extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -1505,9 +1470,7 @@ class Contrat extends CommonObject if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } @@ -1558,9 +1521,7 @@ class Contrat extends CommonObject if (($result = $this->defineBuyPrice($pu_ht, $remise_percent, $fk_product)) < 0) { return $result; - } - else - { + } else { $pa_ht = $result; } } @@ -1631,22 +1592,16 @@ class Contrat extends CommonObject { $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return $contractlineid; } - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->error()." sql=".$sql; return -1; } - } - else - { + } else { dol_syslog(get_class($this)."::addline ErrorTryToAddLineOnValidatedContract", LOG_ERR); return -2; } @@ -1698,9 +1653,7 @@ class Contrat extends CommonObject { $remise = round(($pu * $remise_percent / 100), 2); $price = $pu - $remise; - } - else - { + } else { $remise_percent = 0; } @@ -1750,9 +1703,7 @@ class Contrat extends CommonObject if (($result = $this->defineBuyPrice($pu, $remise_percent)) < 0) { return $result; - } - else - { + } else { $pa_ht = $result; } } @@ -1775,14 +1726,10 @@ class Contrat extends CommonObject $sql .= ", total_ttc='".price2num($total_ttc)."'"; $sql .= ", fk_product_fournisseur_price=".($fk_fournprice > 0 ? $fk_fournprice : "null"); $sql .= ", buy_price_ht='".price2num($pa_ht)."'"; - if ($date_start > 0) { $sql .= ",date_ouverture_prevue='".$this->db->idate($date_start)."'"; } - else { $sql .= ",date_ouverture_prevue=null"; } - if ($date_end > 0) { $sql .= ",date_fin_validite='".$this->db->idate($date_end)."'"; } - else { $sql .= ",date_fin_validite=null"; } - if ($date_debut_reel > 0) { $sql .= ",date_ouverture='".$this->db->idate($date_debut_reel)."'"; } - else { $sql .= ",date_ouverture=null"; } - if ($date_fin_reel > 0) { $sql .= ",date_cloture='".$this->db->idate($date_fin_reel)."'"; } - else { $sql .= ",date_cloture=null"; } + if ($date_start > 0) { $sql .= ",date_ouverture_prevue='".$this->db->idate($date_start)."'"; } else { $sql .= ",date_ouverture_prevue=null"; } + if ($date_end > 0) { $sql .= ",date_fin_validite='".$this->db->idate($date_end)."'"; } else { $sql .= ",date_fin_validite=null"; } + if ($date_debut_reel > 0) { $sql .= ",date_ouverture='".$this->db->idate($date_debut_reel)."'"; } else { $sql .= ",date_ouverture=null"; } + if ($date_fin_reel > 0) { $sql .= ",date_cloture='".$this->db->idate($date_fin_reel)."'"; } else { $sql .= ",date_cloture=null"; } $sql .= ", fk_unit=".($fk_unit ? "'".$this->db->escape($fk_unit)."'" : "null"); $sql .= " WHERE rowid = ".$rowid; @@ -1825,16 +1772,12 @@ class Contrat extends CommonObject $this->db->commit(); return 1; } - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::updateline Erreur -2"); return -2; } - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->error(); dol_syslog(get_class($this)."::updateline Erreur -1"); @@ -1895,9 +1838,7 @@ class Contrat extends CommonObject $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; return -2; } @@ -1993,9 +1934,7 @@ class Contrat extends CommonObject $text .= ($mode != 7 || $this->nbofservicesclosed > 0) ? ($this->nbofservicesclosed.ContratLigne::LibStatut(5, 3, -1, 'class="marginleft2"')) : ''; $text .= ($mode == 7 ? '' : ''); return $text; - } - else - { + } else { return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } } @@ -2029,7 +1968,7 @@ class Contrat extends CommonObject $label = ''; if ($user->rights->contrat->lire) { - $label = ''.$langs->trans("ShowContract").''; + $label = img_picto('', $this->picto).' '.$langs->trans("Contract").''; $label .= '
'.$langs->trans('Ref').': '.($this->ref ? $this->ref : $this->id); $label .= '
'.$langs->trans('RefCustomer').': '.($this->ref_customer ? $this->ref_customer : $this->ref_client); $label .= '
'.$langs->trans('RefSupplier').': '.$this->ref_supplier; @@ -2113,9 +2052,7 @@ class Contrat extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -2150,9 +2087,7 @@ class Contrat extends CommonObject $i++; } return $tab; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -2188,9 +2123,7 @@ class Contrat extends CommonObject $i++; } return $tab; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -2222,8 +2155,7 @@ class Contrat extends CommonObject $sql .= " WHERE c.statut = 1"; $sql .= " AND c.rowid = cd.fk_contrat"; $sql .= " AND cd.statut = 0"; - } - elseif ($mode == 'expired') + } elseif ($mode == 'expired') { $sql = "SELECT cd.rowid, cd.date_fin_validite as datefin"; $sql .= $this->from; @@ -2231,8 +2163,7 @@ class Contrat extends CommonObject $sql .= " AND c.rowid = cd.fk_contrat"; $sql .= " AND cd.statut = 4"; $sql .= " AND cd.date_fin_validite < '".$this->db->idate(dol_now())."'"; - } - elseif ($mode == 'active') + } elseif ($mode == 'active') { $sql = "SELECT cd.rowid, cd.date_fin_validite as datefin"; $sql .= $this->from; @@ -2258,8 +2189,7 @@ class Contrat extends CommonObject $label = $langs->trans("BoardNotActivatedServices"); $labelShort = $langs->trans("BoardNotActivatedServicesShort"); $url = DOL_URL_ROOT.'/contrat/services_list.php?mainmenu=commercial&leftmenu=contracts&mode=0&sortfield=cd.date_fin_validite&sortorder=asc'; - } - elseif ($mode == 'expired') { + } elseif ($mode == 'expired') { $warning_delay = $conf->contrat->services->expires->warning_delay; $url = DOL_URL_ROOT.'/contrat/services_list.php?mainmenu=commercial&leftmenu=contracts&mode=4&filter=expired&sortfield=cd.date_fin_validite&sortorder=asc'; $label = $langs->trans("BoardExpiredServices"); @@ -2290,9 +2220,7 @@ class Contrat extends CommonObject } return $response; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -2333,9 +2261,7 @@ class Contrat extends CommonObject } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -2384,6 +2310,8 @@ class Contrat extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; $sql .= " AND tosell = 1"; + $sql .= $this->db->plimit(100); + $resql = $this->db->query($sql); if ($resql) { @@ -2468,6 +2396,7 @@ class Contrat extends CommonObject global $conf, $langs; $langs->load("contracts"); + $outputlangs->load("products"); if (!dol_strlen($modele)) { $modele = 'strato'; @@ -2791,11 +2720,22 @@ class ContratLigne extends CommonObjectLine global $langs; $langs->load("contracts"); - if ($status == self::STATUS_INITIAL) { $labelStatus = $langs->trans("ServiceStatusInitial"); $labelStatusShort = $langs->trans("ServiceStatusInitial"); } - elseif ($status == self::STATUS_OPEN && $expired == -1) { $labelStatus = $langs->trans("ServiceStatusRunning"); $labelStatusShort = $langs->trans("ServiceStatusRunning"); } - elseif ($status == self::STATUS_OPEN && $expired == 0) { $labelStatus = $langs->trans("ServiceStatusNotLate"); $labelStatusShort = $langs->trans("ServiceStatusNotLateShort"); } - elseif ($status == self::STATUS_OPEN && $expired == 1) { $labelStatus = $langs->trans("ServiceStatusLate"); $labelStatusShort = $langs->trans("ServiceStatusLateShort"); } - elseif ($status == self::STATUS_CLOSED) { $labelStatus = $langs->trans("ServiceStatusClosed"); $labelStatusShort = $langs->trans("ServiceStatusClosed"); } + if ($status == self::STATUS_INITIAL) { + $labelStatus = $langs->trans("ServiceStatusInitial"); + $labelStatusShort = $langs->trans("ServiceStatusInitial"); + } elseif ($status == self::STATUS_OPEN && $expired == -1) { + $labelStatus = $langs->trans("ServiceStatusRunning"); + $labelStatusShort = $langs->trans("ServiceStatusRunning"); + } elseif ($status == self::STATUS_OPEN && $expired == 0) { + $labelStatus = $langs->trans("ServiceStatusNotLate"); + $labelStatusShort = $langs->trans("ServiceStatusNotLateShort"); + } elseif ($status == self::STATUS_OPEN && $expired == 1) { + $labelStatus = $langs->trans("ServiceStatusLate"); + $labelStatusShort = $langs->trans("ServiceStatusLateShort"); + } elseif ($status == self::STATUS_CLOSED) { + $labelStatus = $langs->trans("ServiceStatusClosed"); + $labelStatusShort = $langs->trans("ServiceStatusClosed"); + } $statusType = 'status'.$status; if ($status == self::STATUS_OPEN && $expired == 1) $statusType = 'status1'; @@ -2840,18 +2780,16 @@ class ContratLigne extends CommonObjectLine * Load object in memory from database * * @param int $id Id object - * @param string $ref Ref of contract + * @param string $ref Ref of contract line * @return int <0 if KO, >0 if OK */ public function fetch($id, $ref = '') { - // Check parameters if (empty($id) && empty($ref)) return -1; $sql = "SELECT"; $sql .= " t.rowid,"; - $sql .= " t.tms,"; $sql .= " t.fk_contrat,"; $sql .= " t.fk_product,"; @@ -2952,16 +2890,18 @@ class ContratLigne extends CommonObjectLine $this->fk_user_cloture = $obj->fk_user_cloture; $this->commentaire = $obj->commentaire; $this->fk_fournprice = $obj->fk_fournprice; + $marginInfos = getMarginInfos($obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, $this->fk_fournprice, $obj->pa_ht); $this->pa_ht = $marginInfos[0]; $this->fk_unit = $obj->fk_unit; + + $this->fetch_optionals(); } + $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -3046,9 +2986,7 @@ class ContratLigne extends CommonObjectLine if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; - } - else - { + } else { $this->pa_ht = $result; } } @@ -3195,9 +3133,7 @@ class ContratLigne extends CommonObjectLine { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; @@ -3278,9 +3214,7 @@ class ContratLigne extends CommonObjectLine $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->error()." sql=".$sql; return -1; @@ -3333,9 +3267,7 @@ class ContratLigne extends CommonObjectLine $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 1da2416ce84..02d9c71776d 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -70,9 +70,7 @@ if ($action == 'addcontact' && $user->rights->contrat->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); $msg = $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); @@ -90,9 +88,7 @@ if ($action == 'swapstatut' && $user->rights->contrat->creer) if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne')); - } - else - { + } else { dol_print_error($db, $object->error); } } diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index fd3b3f66e4a..d60d54258bb 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -193,9 +193,7 @@ if ($object->id) $permtoedit = $user->rights->contrat->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 2a7c9c0d91a..40a9a4100da 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -140,9 +140,7 @@ if ($resql) $i++; } $db->free($resql); -} -else -{ +} else { dol_print_error($db); } // Search by status (only expired) @@ -179,9 +177,7 @@ if ($resql) $i++; } $db->free($resql); -} -else -{ +} else { dol_print_error($db); } @@ -298,16 +294,12 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) //$tot_ttc+=$obj->total_ttc; $i++; } - } - else - { + } else { print '
'.$langs->trans("NoContracts").'

"; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -383,9 +375,7 @@ if ($result) $db->free($result); print ""; -} -else -{ +} else { dol_print_error($db); } @@ -439,9 +429,7 @@ if ($resql) $productstatic->ref = $obj->pref; $productstatic->entity = $obj->pentity; print $productstatic->getNomUrl(1, '', 20); - } - else - { + } else { print ''.img_object($langs->trans("ShowService"), "service"); if ($obj->label) print ' '.dol_trunc($obj->label, 20).''; else print ' '.dol_trunc($obj->note, 20); @@ -462,9 +450,7 @@ if ($resql) $db->free(); print ""; -} -else -{ +} else { dol_print_error($db); } @@ -519,9 +505,7 @@ if ($resql) $productstatic->ref = $obj->pref; $productstatic->entity = $obj->pentity; print $productstatic->getNomUrl(1, '', 20); - } - else - { + } else { print ''.img_object($langs->trans("ShowService"), "service"); if ($obj->label) print ' '.dol_trunc($obj->label, 20).''; else print ' '.dol_trunc($obj->note, 20); @@ -541,9 +525,7 @@ if ($resql) $db->free(); print ""; -} -else -{ +} else { dol_print_error($db); } @@ -599,9 +581,7 @@ if ($resql) $productstatic->ref = $obj->pref; $productstatic->entity = $obj->pentity; print $productstatic->getNomUrl(1, '', 20); - } - else - { + } else { print ''.img_object($langs->trans("ShowService"), "service"); if ($obj->label) print ' '.dol_trunc($obj->label, 20).''; else print ' '.dol_trunc($obj->note, 20); @@ -621,9 +601,7 @@ if ($resql) $db->free(); print ""; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index a7205730817..e15d6467755 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -50,13 +50,13 @@ $search_name = GETPOST('search_name', 'alpha'); $search_email = GETPOST('search_email', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); -$search_state = trim(GETPOST("search_state", 'alpha')); +$search_state = GETPOST("search_state", 'alpha'); $search_country = GETPOST("search_country", 'int'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); $search_contract = GETPOST('search_contract', 'alpha'); $search_ref_customer = GETPOST('search_ref_customer', 'alpha'); $search_ref_supplier = GETPOST('search_ref_supplier', 'alpha'); -$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); +$sall = (GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search_status = GETPOST('search_status', 'alpha'); $socid = GETPOST('socid', 'int'); $search_user = GETPOST('search_user', 'int'); @@ -100,7 +100,7 @@ $hookmanager->initHooks(array('contractlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label('contrat'); +$extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -708,8 +708,7 @@ while ($i < min($num, $limit)) if ($nbofsalesrepresentative > 3) { // We print only number print $nbofsalesrepresentative; - } - elseif ($nbofsalesrepresentative > 0) + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($db); $j = 0; @@ -731,9 +730,7 @@ while ($i < min($num, $limit)) } } //else print $langs->trans("NoSalesRepresentativeAffected"); - } - else - { + } else { print ' '; } print ''; diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 2b81ceff5fa..7279ab98781 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -84,7 +84,7 @@ $hookmanager->initHooks(array('contractservicelist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label('contratdet'); +$extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); @@ -98,14 +98,11 @@ if ($search_status != '') $tmp = explode('&', $search_status); $mode = $tmp[0]; if (empty($tmp[1])) $filter = ''; - else - { + else { if ($tmp[1] == 'filter=notexpired') $filter = 'notexpired'; if ($tmp[1] == 'filter=expired') $filter = 'expired'; } -} -else -{ +} else { $search_status = $mode; if ($filter == 'expired') $search_status .= '&filter=expired'; if ($filter == 'notexpired') $search_status .= '&filter=notexpired'; @@ -202,7 +199,7 @@ $now = dol_now(); $form = new Form($db); -$sql = "SELECT c.rowid as cid, c.ref, c.statut as cstatut,"; +$sql = "SELECT c.rowid as cid, c.ref, c.statut as cstatut, c.ref_customer, c.ref_supplier,"; $sql .= " s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur,"; $sql .= " cd.rowid, cd.description, cd.statut,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as label, p.fk_product_type as ptype, p.entity as pentity,"; @@ -567,6 +564,8 @@ while ($i < min($num, $limit)) $contractstatic->id = $obj->cid; $contractstatic->ref = $obj->ref ? $obj->ref : $obj->cid; + $contractstatic->ref_customer = $obj->ref_customer; + $contractstatic->ref_supplier = $obj->ref_supplier; $companystatic->id = $obj->socid; $companystatic->name = $obj->name; @@ -579,7 +578,7 @@ while ($i < min($num, $limit)) // Ref if (!empty($arrayfields['c.ref']['checked'])) { - print ''; + print ''; print $contractstatic->getNomUrl(1, 16); print ''; if (!$i) $totalarray['nbfield']++; @@ -597,9 +596,7 @@ while ($i < min($num, $limit)) print $productstatic->getNomUrl(1, '', 24); print $obj->label ? ' - '.dol_trunc($obj->label, 16) : ''; if (!empty($obj->description) && !empty($conf->global->PRODUCT_DESC_IN_LIST)) print '
'.dol_nl2br($obj->description); - } - else - { + } else { if ($obj->type == 0) print img_object($obj->description, 'product').' '.dol_trunc($obj->description, 24); if ($obj->type == 1) print img_object($obj->description, 'service').' '.dol_trunc($obj->description, 24); } @@ -682,8 +679,7 @@ while ($i < min($num, $limit)) $warning_delay = $conf->contrat->services->expires->warning_delay / 3600 / 24; $textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days"); print img_warning($textlate); - } - else print '    '; + } else print '    '; print ''; if (!$i) $totalarray['nbfield']++; } @@ -724,9 +720,7 @@ while ($i < min($num, $limit)) { // If contract is draft, we say line is also draft print $contractstatic->LibStatut(0, 5); - } - else - { + } else { print $staticcontratligne->LibStatut($obj->statut, 5, ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < $now) ? 1 : 0); } print ''; diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 66ed09413ef..09f1c7cf314 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -40,8 +40,7 @@ if ($cancel) { header("Location: ".$backtopageforcancel); exit; - } - elseif (!empty($backtopage)) + } elseif (!empty($backtopage)) { header("Location: ".$backtopage); exit; @@ -57,8 +56,7 @@ if ($action == 'add' && !empty($permissiontoadd)) { if ($object->fields[$key]['type'] == 'duration') { if (GETPOST($key.'hour') == '' && GETPOST($key.'min') == '') continue; // The field was not submited to be edited - } - else { + } else { if (!GETPOSTISSET($key)) continue; // The field was not submited to be edited } // Ignore special fields @@ -87,7 +85,7 @@ if ($action == 'add' && !empty($permissiontoadd)) $object->$key = $value; if ($val['notnull'] > 0 && $object->$key == '' && !is_null($val['default']) && $val['default'] == '(PROV)') { - $object->$key = '(PROV)'; + $object->$key = '(PROV)'; } if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default'])) { @@ -96,27 +94,29 @@ if ($action == 'add' && !empty($permissiontoadd)) } } + // Fill array 'array_options' with data from add form + if (!$error) { + $ret = $extrafields->setOptionalsFromPost(null, $object); + if ($ret < 0) $error++; + } + if (!$error) { $result = $object->create($user); if ($result > 0) { - // Creation OK + // Creation OK $urltogo = $backtopage ? str_replace('__ID__', $result, $backtopage) : $backurlforlist; $urltogo = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $urltogo); // New method to autoselect project after a New on another form object creation header("Location: ".$urltogo); exit; - } - else - { + } else { // Creation KO if (!empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); - else setEventMessages($object->error, null, 'errors'); + else setEventMessages($object->error, null, 'errors'); $action = 'create'; } - } - else - { + } else { $action = 'create'; } } @@ -129,15 +129,12 @@ if ($action == 'update' && !empty($permissiontoadd)) // Check if field was submited to be edited if ($object->fields[$key]['type'] == 'duration') { if (!GETPOSTISSET($key.'hour') || !GETPOSTISSET($key.'min')) continue; // The field was not submited to be edited - } - elseif ($object->fields[$key]['type'] == 'boolean') { + } elseif ($object->fields[$key]['type'] == 'boolean') { if (!GETPOSTISSET($key)) { $object->$key = 0; // use 0 instead null if the field is defined as not null continue; } - } - - else { + } else { if (!GETPOSTISSET($key)) continue; // The field was not submited to be edited } // Ignore special fields @@ -157,9 +154,9 @@ if ($action == 'update' && !empty($permissiontoadd)) $value = ''; } } elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) { - $value = price2num(GETPOST($key, 'none')); // To fix decimal separator according to lang setup + $value = price2num(GETPOST($key, 'none')); // To fix decimal separator according to lang setup } elseif ($object->fields[$key]['type'] == 'boolean') { - $value = (GETPOST($key) == 'on' ? 1 : 0); + $value = ((GETPOST($key, 'aZ09') == 'on' || GETPOST($key, 'aZ09') == '1') ? 1 : 0); } else { $value = GETPOST($key, 'alpha'); } @@ -174,22 +171,24 @@ if ($action == 'update' && !empty($permissiontoadd)) } } + // Fill array 'array_options' with data from add form + if (!$error) { + $ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET'); + if ($ret < 0) $error++; + } + if (!$error) { $result = $object->update($user); if ($result > 0) { $action = 'view'; - } - else - { + } else { // Creation KO setEventMessages($object->error, $object->errors, 'errors'); $action = 'edit'; } - } - else - { + } else { $action = 'edit'; } } @@ -201,16 +200,21 @@ if ($action == "update_extras" && !empty($permissiontoadd)) $attributekey = GETPOST('attribute', 'alpha'); $attributekeylong = 'options_'.$attributekey; - $object->array_options['options_'.$attributekey] = GETPOST($attributekeylong, ' alpha'); + + if (GETPOSTISSET($attributekeylong.'day') && GETPOSTISSET($attributekeylong.'month') && GETPOSTISSET($attributekeylong.'year')) { + // This is properties of a date + $object->array_options['options_'.$attributekey] = dol_mktime(GETPOST($attributekeylong.'hour', 'int'), GETPOST($attributekeylong.'min', 'int'), GETPOST($attributekeylong.'sec', 'int'), GETPOST($attributekeylong.'month', 'int'), GETPOST($attributekeylong.'day', 'int'), GETPOST($attributekeylong.'year', 'int')); + //var_dump(dol_print_date($object->array_options['options_'.$attributekey]));exit; + } else { + $object->array_options['options_'.$attributekey] = GETPOST($attributekeylong, 'alpha'); + } $result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user); if ($result > 0) { setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); $action = 'view'; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = 'edit_extras'; } @@ -219,11 +223,11 @@ if ($action == "update_extras" && !empty($permissiontoadd)) // Action to delete if ($action == 'confirm_delete' && !empty($permissiontodelete)) { - if (!($object->id > 0)) - { - dol_print_error('', 'Error, object must be fetched before being deleted'); - exit; - } + if (!($object->id > 0)) + { + dol_print_error('', 'Error, object must be fetched before being deleted'); + exit; + } $result = $object->delete($user); if ($result > 0) @@ -232,9 +236,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) setEventMessages("RecordDeleted", null, 'mesgs'); header("Location: ".$backurlforlist); exit; - } - else - { + } else { if (!empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); else setEventMessages($object->error, null, 'errors'); } @@ -243,7 +245,11 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) // Remove a line if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissiontoadd)) { - $result = $object->deleteline($user, $lineid); + if (method_exists('deleteline', $object)) { + $result = $object->deleteline($user, $lineid); // For backward compatibility + } else { + $result = $object->deleteLine($user, $lineid); + } if ($result > 0) { // Define output language @@ -262,16 +268,16 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissionto $outputlangs->setDefaultLang($newlang); } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $ret = $object->fetch($object->id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if (method_exists($object, 'generateDocument')) { + $ret = $object->fetch($object->id); // Reload to get new records + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } } setEventMessages($langs->trans('RecordDeleted'), null, 'mesgs'); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -283,24 +289,23 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontoadd) if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (!empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $model = $object->modelpdf; - $ret = $object->fetch($id); // Reload to get new records + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + if (method_exists($object, 'generateDocument')) { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (!empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + $model = $object->model_pdf; + $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + } } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -312,24 +317,23 @@ if ($action == 'confirm_close' && $confirm == 'yes' && $permissiontoadd) if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (!empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $model = $object->modelpdf; - $ret = $object->fetch($id); // Reload to get new records + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + if (method_exists($object, 'generateDocument')) { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (!empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + $model = $object->model_pdf; + $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + } } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -341,9 +345,7 @@ if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) if ($result >= 0) { // Nothing else done - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -355,24 +357,23 @@ if ($action == 'confirm_reopen' && $confirm == 'yes' && $permissiontoadd) if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (!empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $model = $object->modelpdf; - $ret = $object->fetch($id); // Reload to get new records + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + if (method_exists($object, 'generateDocument')) { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (!empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + $model = $object->model_pdf; + $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + } } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -383,24 +384,20 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && !empty($permissiontoadd)) if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); - } - else - { - $objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone or if createFromClone modifies the object. We use native clone to keep this->db valid. + } else { + $objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone or if createFromClone modifies the object. We use native clone to keep this->db valid. //$objectutil->date = dol_mktime(12, 0, 0, GETPOST('newdatemonth', 'int'), GETPOST('newdateday', 'int'), GETPOST('newdateyear', 'int')); - // ... - $result = $objectutil->createFromClone($user, (($object->id > 0) ? $object->id : $id)); - if (is_object($result) || $result > 0) + // ... + $result = $objectutil->createFromClone($user, (($object->id > 0) ? $object->id : $id)); + if (is_object($result) || $result > 0) { $newid = 0; if (is_object($result)) $newid = $result->id; else $newid = $result; header("Location: ".$_SERVER['PHP_SELF'].'?id='.$newid); // Open record of new object exit; - } - else - { - setEventMessages($objectutil->error, $objectutil->errors, 'errors'); + } else { + setEventMessages($objectutil->error, $objectutil->errors, 'errors'); $action = ''; } } diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index ce582040ac9..20bd19625cc 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -37,9 +37,7 @@ if ($action == 'builddoc' && $permissiontoadd) if (is_numeric(GETPOST('model', 'alpha'))) { $error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Model")); - } - else - { + } else { // Reload to get all modified line records and be ready for hooks $ret = $object->fetch($id); $ret = $object->fetch_thirdparty(); @@ -84,14 +82,12 @@ if ($action == 'builddoc' && $permissiontoadd) if (empty($hideref)) $hideref = 0; if (empty($moreparams)) $moreparams = null; - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; - } - else - { + } else { if (empty($donotredirect)) // This is set when include is done by bulk action "Bill Orders" { setEventMessages($langs->trans("FileGenerated"), null); @@ -134,8 +130,7 @@ if ($action == 'remove_file' && $permissiontoadd) header('Location: '.$urltoredirect); exit; - } - else { + } else { setEventMessages('BugFoundVarUploaddirnotDefined', null, 'errors'); } } diff --git a/htdocs/core/actions_comments.inc.php b/htdocs/core/actions_comments.inc.php index 07829999c10..c352f07f9f7 100644 --- a/htdocs/core/actions_comments.inc.php +++ b/htdocs/core/actions_comments.inc.php @@ -49,9 +49,7 @@ if ($action == 'addcomment') setEventMessages($langs->trans("CommentAdded"), null, 'mesgs'); header('Location: '.$varpage.'?id='.$id.($withproject ? '&withproject=1' : '')); exit; - } - else - { + } else { setEventMessages($comment->error, $comment->errors, 'errors'); $action = ''; } @@ -67,9 +65,7 @@ if ($action === 'updatecomment') setEventMessages($langs->trans("CommentAdded"), null, 'mesgs'); header('Location: '.$varpage.'?id='.$id.($withproject ? '&withproject=1#comment' : '')); exit; - } - else - { + } else { setEventMessages($comment->error, $comment->errors, 'errors'); $action = ''; } @@ -84,9 +80,7 @@ if ($action == 'deletecomment') setEventMessages($langs->trans("CommentDeleted"), null, 'mesgs'); header('Location: '.$varpage.'?id='.$id.($withproject ? '&withproject=1' : '')); exit; - } - else - { + } else { setEventMessages($comment->error, $comment->errors, 'errors'); $action = ''; } diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index bb5a7516fb2..46a6a31c202 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -122,9 +122,7 @@ if ($action == 'add') $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); $action = 'create'; } - } - else - { + } else { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); @@ -149,9 +147,7 @@ if ($action == 'add') { $params['options'] = array($parameters=>null); } - } - else - { + } else { //Esle it's separated key/value and coma list foreach ($parameters_array as $param_ligne) { @@ -191,25 +187,19 @@ if ($action == 'add') setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { $error++; $mesg = $extrafields->error; setEventMessages($mesg, null, 'errors'); } - } - else - { + } else { $error++; $langs->load("errors"); $mesg = $langs->trans("ErrorFieldCanNotContainSpecialNorUpperCharacters", $langs->transnoentities("AttributeCode")); setEventMessages($mesg, null, 'errors'); $action = 'create'; } - } - else - { + } else { setEventMessages($mesg, null, 'errors'); } } @@ -293,9 +283,7 @@ if ($action == 'update') $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); $action = 'edit'; } - } - else - { + } else { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); @@ -319,9 +307,7 @@ if ($action == 'update') { $params['options'] = array($parameters=>null); } - } - else - { + } else { //Esle it's separated key/value and coma list foreach ($parameters_array as $param_ligne) { @@ -361,24 +347,18 @@ if ($action == 'update') setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { $error++; $mesg = $extrafields->error; setEventMessages($mesg, null, 'errors'); } - } - else - { + } else { $error++; $langs->load("errors"); $mesg = $langs->trans("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities("AttributeCode")); setEventMessages($mesg, null, 'errors'); } - } - else - { + } else { setEventMessages($mesg, null, 'errors'); } } @@ -394,11 +374,8 @@ if ($action == 'delete') { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else $mesg = $extrafields->error; - } - else - { + } else $mesg = $extrafields->error; + } else { $error++; $langs->load("errors"); $mesg = $langs->trans("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities("AttributeCode")); diff --git a/htdocs/core/actions_fetchobject.inc.php b/htdocs/core/actions_fetchobject.inc.php index 268d37d92d2..d4cdbb66a21 100644 --- a/htdocs/core/actions_fetchobject.inc.php +++ b/htdocs/core/actions_fetchobject.inc.php @@ -37,18 +37,17 @@ if (($id > 0 || (!empty($ref) && !in_array($action, array('create', 'createtask' { $object->fetch_thirdparty(); $id = $object->id; - } - else - { + } else { if (empty($object->error) && !count($object->errors)) { if ($ret < 0) // if $ret == 0, it means not found. { setEventMessages('Fetch on object (type '.get_class($object).') return an error without filling $object->error nor $object->errors', null, 'errors'); } + } else { + setEventMessages($object->error, $object->errors, 'errors'); } - else setEventMessages($object->error, $object->errors, 'errors'); - $action = ''; + $action = ''; } } } diff --git a/htdocs/core/actions_lineupdown.inc.php b/htdocs/core/actions_lineupdown.inc.php index b0556d6399f..e5507eeafc0 100644 --- a/htdocs/core/actions_lineupdown.inc.php +++ b/htdocs/core/actions_lineupdown.inc.php @@ -43,7 +43,7 @@ if ($action == 'up' && $permissiontoedit) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('rowid')); @@ -64,7 +64,7 @@ if ($action == 'down' && $permissiontoedit) $outputlangs->setDefaultLang($newlang); } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('rowid')); diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index 2542cf23268..7884fc09e67 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -41,8 +41,7 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC)) $error++; if ($_FILES['userfile']['error'][$key] == 1 || $_FILES['userfile']['error'][$key] == 2) { setEventMessages($langs->trans('ErrorFileSizeTooLarge'), null, 'errors'); - } - else { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors'); } } @@ -58,15 +57,13 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC)) if (!empty($upload_dirold) && !empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $result = dol_add_file_process($upload_dirold, $allowoverwrite, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs); - } - elseif (!empty($upload_dir)) + } elseif (!empty($upload_dir)) { $result = dol_add_file_process($upload_dir, $allowoverwrite, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs); } } } -} -elseif (GETPOST('linkit', 'none') && !empty($conf->global->MAIN_UPLOAD_DOC)) +} elseif (GETPOST('linkit', 'none') && !empty($conf->global->MAIN_UPLOAD_DOC)) { $link = GETPOST('link', 'alpha'); if ($link) @@ -86,8 +83,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') if (GETPOST('section', 'alpha')) { // For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir $file = $upload_dir.(preg_match('/\/$/', $upload_dir) ? '' : '/').$urlfile; - } - else // For a delete from the file manager into another module, or from documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile. + } else // For a delete from the file manager into another module, or from documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile. { $urlfile = basename($urlfile); $file = $upload_dir.(preg_match('/\/$/', $upload_dir) ? '' : '/').$urlfile; @@ -124,8 +120,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') } else { setEventMessages($langs->trans("ErrorFailToDeleteFile", $urlfile), null, 'errors'); } - } - elseif ($linkid) // delete of external link + } elseif ($linkid) // delete of external link { require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $link = new Link($db); @@ -148,16 +143,13 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') if ($backtopage) { header('Location: '.$backtopage); exit; - } - else - { + } else { $tmpurl = $_SERVER["PHP_SELF"].'?id='.$object->id.(GETPOST('section_dir', 'alpha') ? '§ion_dir='.urlencode(GETPOST('section_dir', 'alpha')) : '').(!empty($withproject) ? '&withproject=1' : ''); header('Location: '.$tmpurl); exit; } } -} -elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha')) +} elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha')) { require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $langs->load('link'); @@ -176,13 +168,10 @@ elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST(' { setEventMessages($langs->trans("ErrorFailedToUpdateLink", $link->label), null, 'mesgs'); } - } - else - { + } else { //error fetching } -} -elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha')) +} elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha')) { // For documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile. if (!empty($upload_dir)) @@ -197,7 +186,13 @@ elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha')) // Because if we put the documents directory into a directory inside web root (very bad), this allows to execute on demand arbitrary code. if (isAFileWithExecutableContent($filenameto) && empty($conf->global->MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED)) { - $filenameto .= '.noexe'; + // $upload_dir ends with a slash, so be must be sure the medias dir to compare to ends with slash too. + $publicmediasdirwithslash = $conf->medias->multidir_output[$conf->entity]; + if (! preg_match('/\/$/', $publicmediasdirwithslash)) $publicmediasdirwithslash.='/'; + + if (strpos($upload_dir, $publicmediasdirwithslash) !== 0) { // We never add .noexe on files into media directory + $filenameto .= '.noexe'; + } } if ($filenamefrom && $filenameto) @@ -211,8 +206,10 @@ elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha')) if (empty($reshook)) { - if (!file_exists($destpath)) - { + if (preg_match('/^\./', $filenameto)) { + $langs->load("errors"); // lang must be loaded because we can't rely on loading during output, we need var substitution to be done now. + setEventMessages($langs->trans("ErrorFilenameCantStartWithDot", $filenameto), null, 'errors'); + } elseif (!file_exists($destpath)) { $result = dol_move($srcpath, $destpath); if ($result) { @@ -235,16 +232,12 @@ elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha')) } setEventMessages($langs->trans("FileRenamed"), null); - } - else - { - $langs->load("errors"); // key must be loaded because we can't rely on loading during output, we need var substitution to be done now. + } else { + $langs->load("errors"); // lang must be loaded because we can't rely on loading during output, we need var substitution to be done now. setEventMessages($langs->trans("ErrorFailToRenameFile", $filenamefrom, $filenameto), null, 'errors'); } - } - else - { - $langs->load("errors"); // key must be loaded because we can't rely on loading during output, we need var substitution to be done now. + } else { + $langs->load("errors"); // lang must be loaded because we can't rely on loading during output, we need var substitution to be done now. setEventMessages($langs->trans("ErrorDestinationAlreadyExists", $filenameto), null, 'errors'); } } @@ -269,9 +262,7 @@ elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha')) require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $ecmfile->share = getRandomPassword(true); } - } - else - { + } else { $ecmfile->share = ''; } $result = $ecmfile->update($user); diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index ebae28e9582..612f988305f 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -46,7 +46,7 @@ if (empty($objectclass) || empty($uploaddir)) // For backward compatibility if (!empty($permtoread) && empty($permissiontoread)) $permissiontoread = $permtoread; if (!empty($permtocreate) && empty($permissiontoadd)) $permissiontoadd = $permtocreate; -if (!empty($permtodelete) && empty($permissiontodelete)) $permissiontoread = $permtodelete; +if (!empty($permtodelete) && empty($permissiontodelete)) $permissiontodelete = $permtodelete; // Mass actions. Controls on number of lines checked. @@ -180,8 +180,7 @@ if (!$error && $massaction == 'confirm_presend') if ($val == 'thirdparty') // Id of third party or user { $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; - } - elseif ($val && method_exists($thirdparty, 'contact_get_property')) // Id of contact + } elseif ($val && method_exists($thirdparty, 'contact_get_property')) // Id of contact { $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); $sendtoid[] = $val; @@ -210,8 +209,7 @@ if (!$error && $massaction == 'confirm_presend') if ($val == 'thirdparty') // Id of third party { $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; - } - elseif ($val) // Id du contact + } elseif ($val) // Id du contact { $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); //$sendtoid[] = $val; TODO Add also id of contact in CC ? @@ -256,20 +254,17 @@ if (!$error && $massaction == 'confirm_presend') if ($objectobj->element == 'societe') { $sendto = $objectobj->email; - } - elseif ($objectobj->element == 'expensereport') + } elseif ($objectobj->element == 'expensereport') { $fuser = new User($db); $fuser->fetch($objectobj->fk_user_author); $sendto = $fuser->email; - } - elseif ($objectobj->element == 'holiday') + } elseif ($objectobj->element == 'holiday') { $fuser = new User($db); $fuser->fetch($objectobj->fk_user); $sendto = $fuser->email; - } - elseif ($objectobj->element == 'facture' && !empty($listofobjectcontacts[$objectid])) + } elseif ($objectobj->element == 'facture' && !empty($listofobjectcontacts[$objectid])) { $emails_to_sends = array(); $objectobj->fetch_thirdparty(); @@ -283,9 +278,7 @@ if (!$error && $massaction == 'confirm_presend') if (count($emails_to_sends) > 0) { $sendto = implode(',', $emails_to_sends); } - } - else - { + } else { $objectobj->fetch_thirdparty(); $sendto = $objectobj->thirdparty->email; } @@ -336,9 +329,7 @@ if (!$error && $massaction == 'confirm_presend') 'names'=>array($filename), 'mimes'=>array($mime) ); - } - else - { + } else { $nbignored++; $langs->load("errors"); $resaction .= '
'.$langs->trans('ErrorCantReadFile', $file).'

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

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

'; + else $textifempty = $langs->trans('NoFileFound'); + } else $textifempty = ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("ECMSelectASection")); - if ($module == 'medias') - { - $useinecm = 6; - $modulepart = 'medias'; - $perm = ($user->rights->website->write || $user->rights->emailing->creer); - $title = 'none'; - } - elseif ($module == 'ecm') // DMS/ECM -> manual structure - { - if ($user->rights->ecm->read) - { - // Buttons: Preview - $useinecm = 2; - } + if ($module == 'medias') + { + $useinecm = 6; + $modulepart = 'medias'; + $perm = ($user->rights->website->write || $user->rights->emailing->creer); + $title = 'none'; + } elseif ($module == 'ecm') // DMS/ECM -> manual structure + { + if ($user->rights->ecm->read) + { + // Buttons: Preview + $useinecm = 2; + } - if ($user->rights->ecm->upload) - { - // Buttons: Preview + Delete - $useinecm = 4; - } + if ($user->rights->ecm->upload) + { + // Buttons: Preview + Delete + $useinecm = 4; + } - if ($user->rights->ecm->setup) - { - // Buttons: Preview + Delete + Edit - $useinecm = 5; - } + if ($user->rights->ecm->setup) + { + // Buttons: Preview + Delete + Edit + $useinecm = 5; + } - $perm = $user->rights->ecm->upload; - $modulepart = 'ecm'; - $title = ''; // Use default - } - else - { - $useinecm = 5; - $modulepart = 'ecm'; - $perm = $user->rights->ecm->upload; - $title = ''; // Use default - } + $perm = $user->rights->ecm->upload; + $modulepart = 'ecm'; + $title = ''; // Use default + } else { + $useinecm = 5; + $modulepart = 'ecm'; + $perm = $user->rights->ecm->upload; + $title = ''; // Use default + } - // When we show list of files for ECM files, $filearray contains file list, and directory is defined with modulepart + section into $param - // When we show list of files for a directory, $filearray ciontains file list, and directory is defined with modulepart + $relativepath - //var_dump("title=".$title." modulepart=".$modulepart." useinecm=".$useinecm." perm=".$perm." relativepath=".$relativepath." param=".$param." url=".$url); - $formfile->list_of_documents($filearray, '', $modulepart, $param, 1, $relativepath, $perm, $useinecm, $textifempty, $maxlengthname, $title, $url, 0, $perm); - } + // When we show list of files for ECM files, $filearray contains file list, and directory is defined with modulepart + section into $param + // When we show list of files for a directory, $filearray ciontains file list, and directory is defined with modulepart + $relativepath + //var_dump("section=".$section." title=".$title." modulepart=".$modulepart." useinecm=".$useinecm." perm=".$perm." relativepath=".$relativepath." param=".$param." url=".$url); + $formfile->list_of_documents($filearray, '', $modulepart, $param, 1, $relativepath, $perm, $useinecm, $textifempty, $maxlengthname, $title, $url, 0, $perm); + } } @@ -355,7 +350,7 @@ if ($useajax || $action == 'delete') $section_id = $section; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; - $useglobalvars = 1; + $form = new Form($db); $formquestion['urlfile'] = array('type'=>'hidden', 'value'=>$urlfile, 'name'=>'urlfile'); // We must always put field, even if empty because it is filled by javascript later $formquestion['section'] = array('type'=>'hidden', 'value'=>$section, 'name'=>'section'); // We must always put field, even if empty because it is filled by javascript later diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 3e54532668a..620643da8f2 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -49,8 +49,7 @@ if (!isset($mode) || $mode != 'noajax') // For ajax call $preopened = GETPOST('preopened'); if ($selecteddir != '/') $selecteddir = preg_replace('/\/$/', '', $selecteddir); // We removed last '/' except if it is '/' -} -else // For no ajax call +} else // For no ajax call { //if (GETPOST('preopened')) { $_GET['dir'] = $_POST['dir'] = GETPOST('preopened'); } @@ -73,8 +72,7 @@ if ($modulepart == 'ecm') { $fullpathselecteddir = $conf->ecm->dir_output.'/'.($selecteddir != '/' ? $selecteddir : ''); $fullpathpreopened = $conf->ecm->dir_output.'/'.($preopened != '/' ? $preopened : ''); -} -elseif ($modulepart == 'medias') +} elseif ($modulepart == 'medias') { $fullpathselecteddir = $dolibarr_main_data_root.'/medias/'.($selecteddir != '/' ? $selecteddir : ''); $fullpathpreopened = $dolibarr_main_data_root.'/medias/'.($preopened != '/' ? $preopened : ''); @@ -95,8 +93,7 @@ if (preg_match('/\.\./', $fullpathselecteddir) || preg_match('/[<>|]/', $fullpat if ($modulepart == 'ecm') { if (!$user->rights->ecm->read) accessforbidden(); -} -elseif ($modulepart == 'medias') +} elseif ($modulepart == 'medias') { // Always allowed } @@ -471,8 +468,7 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, if ($modulepart == 'ecm') { $newfullpathselecteddir = $conf->ecm->dir_output.'/'.($val['fullrelativename'] != '/' ? $val['fullrelativename'] : ''); - } - elseif ($modulepart == 'medias') + } elseif ($modulepart == 'medias') { $newfullpathselecteddir = $dolibarr_main_data_root.'/medias/'.($val['fullrelativename'] != '/' ? $val['fullrelativename'] : ''); } @@ -486,7 +482,6 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, echo "\n"; } - } - else print "PermissionDenied"; + } else print "PermissionDenied"; } } diff --git a/htdocs/core/ajax/check_notifications.php b/htdocs/core/ajax/check_notifications.php index d8f4985f6d8..f8a30e69aa9 100644 --- a/htdocs/core/ajax/check_notifications.php +++ b/htdocs/core/ajax/check_notifications.php @@ -1,7 +1,7 @@ * Copyright (C) 2017 Juanjo Menent - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,14 +18,73 @@ */ if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal +if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library +//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', '1'); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("XFRAMEOPTIONS_ALLOWALL")) define('XFRAMEOPTIONS_ALLOWALL', '1'); // Do not add the HTTP header 'X-Frame-Options: SAMEORIGIN' but 'X-Frame-Options: ALLOWALL' + require '../../main.inc.php'; +$time = (int) GETPOST('time', 'int'); // Use the time parameter that is always increased by time_update, even if call is late +//$time=dol_now(); +$action = GETPOST('action', 'aZ09'); +$listofreminderids = GETPOST('listofreminderids', 'aZ09'); + + +/* + * Actions + */ + +if ($action == 'stopreminder') { + dol_syslog("Clear notification for listofreminderids=".$listofreminderids); + $listofreminderidsarray = explode('-', GETPOST('listofreminderids', 'aZ09')); + + // Set the reminder as done + foreach ($listofreminderidsarray as $listofreminderid) { + if (empty($listofreminderid)) continue; + //$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'action_reminder WHERE rowid = '.$listofreminderid.' AND fk_user = '.$user->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'actioncomm_reminder SET status = 1'; + $sql .= ' WHERE status = 0 AND rowid = '.$listofreminderid.' AND fk_user = '.$user->id.' AND entity = '.$conf->entity; + $resql = $db->query($sql); + if (!$resql) { + dol_print_error($db); + } + } + + include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + + // Clean database + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'actioncomm_reminder'; + $sql .= " WHERE dateremind < '".$db->idate(dol_time_plus_duree(dol_now(), -1, 'm'))."'"; + $resql = $db->query($sql); + if (!$resql) { + dol_print_error($db); + } + + exit; +} + /* * View @@ -35,10 +94,6 @@ top_httphead('text/html'); // TODO Use a json mime type global $user, $db, $langs, $conf; -$time = (int) GETPOST('time', 'int'); // Use the time parameter that is always increased by time_update, even if call is late -//$time=dol_now(); - - $eventfound = array(); //Uncomment this to force a test //$eventfound[]=array('type'=>'agenda', 'id'=>1, 'tipo'=>'eee', 'location'=>'aaa'); @@ -46,7 +101,8 @@ $eventfound = array(); //dol_syslog('time='.$time.' $_SESSION[auto_ck_events_not_before]='.$_SESSION['auto_check_events_not_before']); // TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when several tabs are opened. -if ($time >= $_SESSION['auto_check_events_not_before']) +// This need to extend period to be sure to not miss and save in session what we notified to avoid duplicate (save is not done yet). +if ($time >= $_SESSION['auto_check_events_not_before'] || GETPOST('forcechecknow', 'int')) { $time_update = (int) $conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY; // Always defined if (!empty($_SESSION['auto_check_events_not_before'])) @@ -60,15 +116,13 @@ if ($time >= $_SESSION['auto_check_events_not_before']) dol_syslog("We ask to check browser notification on a too large period. We fix this with current date."); $starttime = $time; } - } - else - { + } else { $starttime = $time; } $_SESSION['auto_check_events_not_before'] = $time + $time_update; - // Force save of session change we did. + // Force save of the session change we did. // WARNING: Any change in sessions after that will not be saved ! session_write_close(); @@ -77,41 +131,40 @@ if ($time >= $_SESSION['auto_check_events_not_before']) dol_syslog('NEW $_SESSION[auto_check_events_not_before]='.$_SESSION['auto_check_events_not_before']); - $sql = 'SELECT id'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm a, '.MAIN_DB_PREFIX.'actioncomm_resources ar'; - $sql .= ' WHERE a.id = ar.fk_actioncomm'; - // TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when several tabs are opened. - // This need to extend period to be sure to not miss and save in session what we notified to avoid duplicate (save is not done yet). - $sql .= " AND datep BETWEEN '".$db->idate($starttime)."' AND '".$db->idate($time + $time_update - 1)."'"; - $sql .= ' AND a.code <> "AC_OTH_AUTO"'; - $sql .= ' AND ar.element_type = "user"'; - $sql .= ' AND ar.fk_element = '.$user->id; + $sql = 'SELECT a.id, a.code, a.datep, a.label, a.location, ar.rowid as id_reminder, ar.dateremind, ar.fk_user as id_user_reminder'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a'; + if (!empty($user->conf->MAIN_USER_WANT_ALL_EVENTS_NOTIFICATIONS)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.$user->id; + $sql .= ' WHERE a.code <> "AC_OTH_AUTO"'; + $sql .= ' AND ('; + $sql .= " (ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".$conf->entity; + $sql .= " OR (a.datep BETWEEN '".$db->idate($starttime)."' AND '".$db->idate($time + $time_update - 1)."')"; + $sql .= ' )'; + } else { + $sql .= ' JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.$user->id; + $sql .= " AND ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".$conf->entity; + } $sql .= ' LIMIT 10'; // Avoid too many notification at once $resql = $db->query($sql); if ($resql) { - $actionmod = new ActionComm($db); - while ($obj = $db->fetch_object($resql)) { - // Load translation files required by the page - $langs->loadLangs(array('agenda', 'commercial')); - - $actionmod->fetch($obj->id); - // Message must be formated and translated to be used with javascript directly $event = array(); $event['type'] = 'agenda'; - $event['id'] = $actionmod->id; - $event['tipo'] = $langs->transnoentities('Action'.$actionmod->code); - $event['titulo'] = $actionmod->label; - $event['location'] = $langs->transnoentities('Location').': '.$actionmod->location; + $event['id'] = $obj->id; + $event['id_reminder'] = $obj->id_reminder; + $event['id_user'] = $obj->id_user_reminder; + $event['code'] = $obj->code; + $event['label'] = $obj->label; + $event['location'] = $obj->location; + $event['reminder_date_formated'] = dol_print_date($db->jdate($obj->dateremind), 'standard'); + $event['event_date_start_formated'] = dol_print_date($db->jdate($obj->datep), 'standard'); $eventfound[] = $event; } - } - else - { + } else { dol_syslog("Error sql = ".$db->lasterror(), LOG_ERR); } } diff --git a/htdocs/core/ajax/constantonoff.php b/htdocs/core/ajax/constantonoff.php index c7e5bbd8991..1ed8ca34076 100644 --- a/htdocs/core/ajax/constantonoff.php +++ b/htdocs/core/ajax/constantonoff.php @@ -57,8 +57,7 @@ if (!empty($action) && !empty($name)) if ($action == 'set') { dolibarr_set_const($db, $name, $value, 'chaine', 0, '', $entity); - } - elseif ($action == 'del') + } elseif ($action == 'del') { dolibarr_del_const($db, $name, $entity); } diff --git a/htdocs/core/ajax/extraparams.php b/htdocs/core/ajax/extraparams.php index a3db4505f70..16f39af9bde 100644 --- a/htdocs/core/ajax/extraparams.php +++ b/htdocs/core/ajax/extraparams.php @@ -51,20 +51,38 @@ if (!empty($id) && !empty($element) && !empty($htmlelement) && !empty($type)) $classpath = $subelement = $element; // For compatibility - if ($element == 'order' || $element == 'commande') { $classpath = $subelement = 'commande'; } - elseif ($element == 'propal') { $classpath = 'comm/propal'; $subelement = 'propal'; } - elseif ($element == 'facture') { $classpath = 'compta/facture'; $subelement = 'facture'; } - elseif ($element == 'contract') { $classpath = $subelement = 'contrat'; } - elseif ($element == 'shipping') { $classpath = $subelement = 'expedition'; } - elseif ($element == 'deplacement') { $classpath = 'compta/deplacement'; $subelement = 'deplacement'; } - elseif ($element == 'order_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.commande'; } - elseif ($element == 'invoice_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.facture'; } + if ($element == 'order' || $element == 'commande') { + $classpath = $subelement = 'commande'; + } elseif ($element == 'propal') { + $classpath = 'comm/propal'; + $subelement = 'propal'; + } elseif ($element == 'facture') { + $classpath = 'compta/facture'; + $subelement = 'facture'; + } elseif ($element == 'contract') { + $classpath = $subelement = 'contrat'; + } elseif ($element == 'shipping') { + $classpath = $subelement = 'expedition'; + } elseif ($element == 'deplacement') { + $classpath = 'compta/deplacement'; + $subelement = 'deplacement'; + } elseif ($element == 'order_supplier') { + $classpath = 'fourn'; + $subelement = 'fournisseur.commande'; + } elseif ($element == 'invoice_supplier') { + $classpath = 'fourn'; + $subelement = 'fournisseur.facture'; + } dol_include_once('/'.$classpath.'/class/'.$subelement.'.class.php'); - if ($element == 'order_supplier') { $classname = 'CommandeFournisseur'; } - elseif ($element == 'invoice_supplier') { $classname = 'FactureFournisseur'; } - else $classname = ucfirst($subelement); + if ($element == 'order_supplier') { + $classname = 'CommandeFournisseur'; + } elseif ($element == 'invoice_supplier') { + $classname = 'FactureFournisseur'; + } else { + $classname = ucfirst($subelement); + } $object = new $classname($db); $object->fetch($id); diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index 14258e1ebb1..b1a72868312 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -62,8 +62,7 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e elseif ($element == 'order_supplier') { $element = 'fournisseur'; $subelement = 'commande'; - } - elseif ($element == 'invoice_supplier') { + } elseif ($element == 'invoice_supplier') { $element = 'fournisseur'; $subelement = 'facture'; } @@ -83,8 +82,7 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e { $ret = $form->$methodname(); if ($ret > 0) echo json_encode($form->$cachename); - } - elseif (!empty($ext_element)) + } elseif (!empty($ext_element)) { $module = $subelement = $ext_element; if (preg_match('/^([^_]+)_([^_]+)/i', $ext_element, $regs)) @@ -99,16 +97,12 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e $ret = $object->$methodname($fk_element); if ($ret > 0) echo json_encode($object->$cachename); } - } - else - { + } else { $object = new GenericObject($db); $value = $object->$loadmethod($table_element, $fk_element, $field); echo $value; } - } - else - { + } else { echo $langs->transnoentities('NotEnoughPermissions'); } } diff --git a/htdocs/core/ajax/objectonoff.php b/htdocs/core/ajax/objectonoff.php index 6466df89a07..6c9f97bfbb0 100644 --- a/htdocs/core/ajax/objectonoff.php +++ b/htdocs/core/ajax/objectonoff.php @@ -58,11 +58,9 @@ print ''."\n"; // Registering the location of boxes -if ((!empty($_POST['roworder'])) && (!empty($_POST['table_element_line'])) - && (!empty($_POST['fk_element'])) && (!empty($_POST['element_id']))) +if (GETPOST('roworder', 'alpha') && GETPOST('table_element_line', 'alpha', 2) + && GETPOST('fk_element', 'alpha', 2) && GETPOST('element_id', 'int', 2)) { $roworder = GETPOST('roworder', 'alpha', 2); $table_element_line = GETPOST('table_element_line', 'alpha', 2); diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php index 0eb0545a9ea..8273683b8de 100644 --- a/htdocs/core/ajax/saveinplace.php +++ b/htdocs/core/ajax/saveinplace.php @@ -59,51 +59,60 @@ top_httphead(); if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_element)) { $ext_element = GETPOST('ext_element', 'alpha', 2); - $field = substr($field, 8); // remove prefix val_ + $field = substr($field, 8); // remove prefix val_ $type = GETPOST('type', 'alpha', 2); - $value = ($type == 'ckeditor' ? GETPOST('value', '', 2) : GETPOST('value', 'alpha', 2)); - $loadmethod = GETPOST('loadmethod', 'alpha', 2); - $savemethod = GETPOST('savemethod', 'alpha', 2); + $value = ($type == 'ckeditor' ? GETPOST('value', '', 2) : GETPOST('value', 'alpha', 2)); + $loadmethod = GETPOST('loadmethod', 'alpha', 2); + $savemethod = GETPOST('savemethod', 'alpha', 2); $savemethodname = (!empty($savemethod) ? $savemethod : 'setValueFrom'); - $newelement = $element; + $newelement = $element; $view = ''; $format = 'text'; $return = array(); $error = 0; - if ($element != 'order_supplier' && $element != 'invoice_supplier' && preg_match('/^([^_]+)_([^_]+)/i', $element, $regs)) - { + if ($element != 'order_supplier' && $element != 'invoice_supplier' && preg_match('/^([^_]+)_([^_]+)/i', $element, $regs)) { $element = $regs[1]; $subelement = $regs[2]; } - if ($element == 'propal') $newelement = 'propale'; - elseif ($element == 'fichinter') $newelement = 'ficheinter'; - elseif ($element == 'product') $newelement = 'produit'; - elseif ($element == 'member') $newelement = 'adherent'; - elseif ($element == 'order_supplier') { + if ($element == 'propal') { + $newelement = 'propale'; + } elseif ($element == 'fichinter') { + $newelement = 'ficheinter'; + } elseif ($element == 'product') { + $newelement = 'produit'; + } elseif ($element == 'member') { + $newelement = 'adherent'; + } elseif ($element == 'order_supplier') { $newelement = 'fournisseur'; $subelement = 'commande'; - } - elseif ($element == 'invoice_supplier') { + } elseif ($element == 'invoice_supplier') { $newelement = 'fournisseur'; $subelement = 'facture'; + } else { + $newelement = $element; } - else $newelement = $element; $_POST['action'] = 'update'; // Hack so restrictarea will test permissions on write too $feature = $newelement; $feature2 = $subelement; $object_id = $fk_element; - if ($feature == 'expedition' || $feature == 'shipping') - { + if ($feature == 'expedition' || $feature == 'shipping') { $feature = 'commande'; $object_id = 0; } - if ($feature == 'shipping') $feature = 'commande'; - if ($feature == 'payment') { $feature = 'facture'; } - if ($feature == 'payment_supplier') { $feature = 'fournisseur'; $feature2 = 'facture'; } + if ($feature == 'shipping') { + $feature = 'commande'; + } + if ($feature == 'payment') { + $feature = 'facture'; + } + if ($feature == 'payment_supplier') { + $feature = 'fournisseur'; + $feature2 = 'facture'; + } //var_dump(GETPOST('action','aZ09')); //var_dump($newelement.'-'.$subelement."-".$feature."-".$object_id); $check_access = restrictedArea($user, $feature, $object_id, '', $feature2); @@ -130,15 +139,11 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e $error++; $return['error'] = $langs->trans('ErrorBadValue'); } - } - elseif ($type == 'datepicker') - { + } elseif ($type == 'datepicker') { $timestamp = GETPOST('timestamp', 'int', 2); $format = 'date'; $newvalue = ($timestamp / 1000); - } - elseif ($type == 'select') - { + } elseif ($type == 'select') { $loadmethodname = 'load_cache_'.$loadmethod; $loadcachename = 'cache_'.$loadmethod; $loadviewname = 'view_'.$loadmethod; @@ -157,15 +162,11 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e $loadview = $form->$loadviewname; $view = $loadview[$newvalue]; } - } - else - { + } else { $error++; $return['error'] = $form->error; } - } - else - { + } else { $module = $subelement = $ext_element; if (preg_match('/^([^_]+)_([^_]+)/i', $ext_element, $regs)) { @@ -187,9 +188,7 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e $loadview = $object->$loadviewname; $view = $loadview[$newvalue]; } - } - else - { + } else { $error++; $return['error'] = $object->error; } @@ -215,17 +214,13 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e $return['value'] = $value; $return['view'] = (!empty($view) ? $view : $value); - } - else - { + } else { $return['error'] = $object->error; } } echo json_encode($return); - } - else - { + } else { echo $langs->trans('NotEnoughPermissions'); } } diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index 31a95d1e02c..00b66ced374 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -119,6 +119,17 @@ if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFOR $arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_invoice').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } +// Miscellaneous payments +if (!empty($conf->banque->enabled) && empty($conf->global->MAIN_SEARCHFORM_MISC_PAYMENTS_DISABLED) && $user->rights->banque->lire) +{ + $arrayresult['searchintomiscpayments'] = array( + 'position'=>180, + 'img'=>'object_payment', + 'label'=>$langs->trans("SearchIntoMiscPayments", $search_boxvalue), + 'text'=>img_picto('', 'object_payment').' '.$langs->trans("SearchIntoMiscPayments", $search_boxvalue), + 'url'=>DOL_URL_ROOT.'/compta/bank/various_payment/list.php?leftmenu=tax_various'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); +} + if (!empty($conf->contrat->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->rights->contrat->lire) { $arrayresult['searchintocontract'] = array('position'=>130, 'img'=>'object_contract', 'label'=>$langs->trans("SearchIntoContracts", $search_boxvalue), 'text'=>img_picto('', 'object_contract').' '.$langs->trans("SearchIntoContracts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contrat/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); @@ -146,28 +157,18 @@ if (!empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLI $arrayresult['searchintoleaves'] = array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('', 'object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } - -/* Do we really need this. We already have a select for users, and we should be able to filter into user list on employee flag -if (! empty($conf->hrm->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_EMPLOYEE) && $user->rights->hrm->employee->read) -{ - $langs->load("hrm"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/hrm/employee/list.php', DOL_URL_ROOT.'/hrm/employee/list.php', $langs->trans("Employees"), 'employee', 'search_all', 'M', 'searchleftemployee', img_object('','user')); -} -*/ - // Execute hook addSearchEntry $parameters = array('search_boxvalue'=>$search_boxvalue, 'arrayresult'=>$arrayresult); $reshook = $hookmanager->executeHooks('addSearchEntry', $parameters); if (empty($reshook)) { $arrayresult = array_merge($arrayresult, $hookmanager->resArray); -} -else $arrayresult = $hookmanager->resArray; +} else $arrayresult = $hookmanager->resArray; -// This allow to keep a search entry to the top +// This pushes a search entry to the top if (!empty($conf->global->DEFAULT_SEARCH_INTO_MODULE)) { $key = 'searchinto'.$conf->global->DEFAULT_SEARCH_INTO_MODULE; - if (array_key_exists($key, $arrayresult)) $arrayresult[$key]['position'] = -10; + if (array_key_exists($key, $arrayresult)) $arrayresult[$key]['position'] = -1000; } // Sort on position diff --git a/htdocs/core/ajax/vatrates.php b/htdocs/core/ajax/vatrates.php index 9edcad9f4fa..b0ab6ed2a7e 100644 --- a/htdocs/core/ajax/vatrates.php +++ b/htdocs/core/ajax/vatrates.php @@ -52,9 +52,7 @@ if (!empty($id) && !empty($action) && !empty($htmlname)) { $seller = $mysoc; $buyer = $soc; - } - else - { + } else { $buyer = $mysoc; $seller = $soc; } diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index 850d25bae47..dfa1f3f8419 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-204 Laurent Destailleur +/* Copyright (C) 2010 Regis Houssin + * Copyright (C) 2011-2014 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -75,8 +75,7 @@ if (!empty($_GET['zipcode']) || !empty($_GET['town'])) if ($town) $sql .= " AND z.town LIKE '%".$db->escape($town)."%'"; $sql .= " ORDER BY z.zip, z.town"; $sql .= $db->plimit(100); // Avoid pb with bad criteria - } - else // Use table of third parties + } else // Use table of third parties { $sql = "SELECT DISTINCT s.zip, s.town, s.fk_departement as fk_county, s.fk_pays as fk_country"; $sql .= ", c.code as country_code, c.label as country"; @@ -128,9 +127,7 @@ if (!empty($_GET['zipcode']) || !empty($_GET['town'])) } echo json_encode($return_arr); -} -else -{ +} else { } $db->close(); diff --git a/htdocs/core/antispamimage.php b/htdocs/core/antispamimage.php index 68e585c3ea0..7d6512a64a9 100644 --- a/htdocs/core/antispamimage.php +++ b/htdocs/core/antispamimage.php @@ -43,7 +43,7 @@ $number = strlen($letters); $string = ''; for ($i = 0; $i < $length; $i++) { - $string .= $letters{mt_rand(0, $number - 1)}; + $string .= $letters[mt_rand(0, $number - 1)]; } //print $string; diff --git a/htdocs/core/boxes/box_accountancy_last_manual_entries.php b/htdocs/core/boxes/box_accountancy_last_manual_entries.php index 6198c90e663..76c3fa5eb47 100644 --- a/htdocs/core/boxes/box_accountancy_last_manual_entries.php +++ b/htdocs/core/boxes/box_accountancy_last_manual_entries.php @@ -84,7 +84,7 @@ class box_accountancy_last_manual_entries extends ModeleBoxes $sql = "SELECT DISTINCT b.piece_num"; $sql .= ", b.doc_date as date_movement"; $sql .= ", b.label_operation"; - $sql .= ", b.montant"; + $sql .= ", b.montant as amount"; $sql .= ", b.code_journal"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b"; $sql .= " WHERE b.fk_doc = 0"; @@ -103,7 +103,7 @@ class box_accountancy_last_manual_entries extends ModeleBoxes $date = $this->db->jdate($objp->date_movement); $journal = $objp->code_journal; $label = $objp->label_operation; - $amount = $objp->montant; + $amount = $objp->amount; $bookkeepingstatic->id = $objp->id; $bookkeepingstatic->piece_num = $objp->piece_num; diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index 448e7d915c9..a951402fd7b 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -244,9 +244,7 @@ class box_actions extends ModeleBoxes $out .= '}, '.($conf->global->SHOW_DIALOG_HOMEPAGE * 1000).');'; } $out .= ''; - } - else - { + } else { $out .= ''; diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 8fc7b8766e4..a59edbbf337 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -141,9 +141,7 @@ class box_activity extends ModeleBoxes } else { dol_print_error($this->db); } - } - else - { + } else { $data = dol_readcachefile($cachedir, $filename); } diff --git a/htdocs/core/boxes/box_birthdays.php b/htdocs/core/boxes/box_birthdays.php index 17dd29057b3..e6d032d41f8 100644 --- a/htdocs/core/boxes/box_birthdays.php +++ b/htdocs/core/boxes/box_birthdays.php @@ -132,16 +132,14 @@ class box_birthdays extends ModeleBoxes if ($num == 0) $this->info_box_contents[$line][0] = array('td' => 'class="center opacitymedium"', 'text'=>$langs->trans("None")); $this->db->free($result); - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => '', 'maxlength'=>500, 'text' => ($this->db->error().' sql='.$sql) ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_birthdays_members.php b/htdocs/core/boxes/box_birthdays_members.php index 010bf8e7f21..e49d21ba387 100644 --- a/htdocs/core/boxes/box_birthdays_members.php +++ b/htdocs/core/boxes/box_birthdays_members.php @@ -133,16 +133,14 @@ class box_birthdays_members extends ModeleBoxes if ($num == 0) $this->info_box_contents[$line][0] = array('td' => 'class="center opacitymedium"', 'text'=>$langs->trans("None")); $this->db->free($result); - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => '', 'maxlength'=>500, 'text' => ($this->db->error().' sql='.$sql) ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php index f5bbf7021e9..c81e226decb 100644 --- a/htdocs/core/boxes/box_bookmarks.php +++ b/htdocs/core/boxes/box_bookmarks.php @@ -79,9 +79,7 @@ class box_bookmarks extends ModeleBoxes if ($user->rights->bookmark->creer) { $this->info_box_head['subpicto'] = 'bookmark'; $this->info_box_head['subtext'] = $langs->trans("BookmarksManagement"); - } - else - { + } else { $this->info_box_head['subpicto'] = 'bookmark'; $this->info_box_head['subtext'] = $langs->trans("ListOfBookmark"); } diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 70718db55b5..00cad787e0b 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -154,16 +154,14 @@ class box_clients extends ModeleBoxes ); $this->db->free($result); - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => '', 'maxlength'=>500, 'text' => ($this->db->error().' sql='.$sql) ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index caea252c571..7141728c23d 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -94,7 +94,7 @@ class box_contacts extends ModeleBoxes $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid"; if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE sp.entity IN (".getEntity('socpeople').")"; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND sp.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($user->socid) $sql .= " AND sp.fk_soc = ".$user->socid; $sql .= " ORDER BY sp.tms DESC"; $sql .= $this->db->plimit($max, 0); diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php index 93ac43d6c22..d5cc859eaa7 100644 --- a/htdocs/core/boxes/box_external_rss.php +++ b/htdocs/core/boxes/box_external_rss.php @@ -101,15 +101,15 @@ class box_external_rss extends ModeleBoxes if ($result < 0 || !empty($rssparser->error)) { // Show warning - $title .= " ".img_error($langs->trans("FailedToRefreshDataInfoNotUpToDate", ($rssparser->getLastFetchDate() ?dol_print_date($rssparser->getLastFetchDate(), "dayhourtext") : $langs->trans("Unknown")))); + $errormessage = $langs->trans("FailedToRefreshDataInfoNotUpToDate", ($rssparser->getLastFetchDate() ? dol_print_date($rssparser->getLastFetchDate(), "dayhourtext") : $langs->trans("Unknown"))); + if ($rssparser->error) $errormessage .= " - ".$rssparser->error; + $title .= " ".img_error($errormessage); $this->info_box_head = array('text' => $title, 'limit' => 0); - } - else - { + } else { $this->info_box_head = array( 'text' => $title, 'sublink' => $link, - 'subtext'=>$langs->trans("LastRefreshDate").': '.($rssparser->getLastFetchDate() ?dol_print_date($rssparser->getLastFetchDate(), "dayhourtext") : $langs->trans("Unknown")), + 'subtext'=>$langs->trans("LastRefreshDate").': '.($rssparser->getLastFetchDate() ? dol_print_date($rssparser->getLastFetchDate(), "dayhourtext") : $langs->trans("Unknown")), 'subpicto'=>'globe', 'target'=>'_blank', ); diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index a374094ea89..f5fe3e76dde 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -186,17 +186,14 @@ class box_factures_imp extends ModeleBoxes ); $this->db->free($result); - } - else - { + } else { $this->info_box_contents[0][0] = array( 'td' => '', 'maxlength'=>500, 'text' => ($this->db->error().' sql='.$sql), ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index 4125ce92eaa..2c104bea729 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -151,18 +151,14 @@ class box_ficheinter extends ModeleBoxes ); $this->db->free($resql); - } - else - { + } else { $this->info_box_contents[0][0] = array( 'td' => '', 'maxlength'=>500, 'text' => ($this->db->error().' sql='.$sql), ); } - } - else - { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php index 46dfdff6d23..66497c2e94f 100644 --- a/htdocs/core/boxes/box_goodcustomers.php +++ b/htdocs/core/boxes/box_goodcustomers.php @@ -148,16 +148,14 @@ class box_goodcustomers extends ModeleBoxes ); $this->db->free($result); - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => '', 'maxlength'=>500, 'text' => ($this->db->error().' sql='.$sql), ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index e78b6e235b1..9d5aeda7b36 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -111,9 +111,7 @@ class box_graph_invoices_permonth extends ModeleBoxes $endyear = GETPOST($param_year, 'int'); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); - } - else - { + } else { $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true); $endyear = $tmparray['year']; $shownb = $tmparray['shownb']; @@ -153,9 +151,7 @@ class box_graph_invoices_permonth extends ModeleBoxes if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); - } - else - { + } else { $legend[] = $i; } $i++; @@ -200,9 +196,7 @@ class box_graph_invoices_permonth extends ModeleBoxes if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); - } - else - { + } else { $legend[] = $i; } $i++; @@ -270,13 +264,10 @@ class box_graph_invoices_permonth extends ModeleBoxes $stringtoshow .= ''; } $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'class="nohover center"', 'textnoformat'=>$stringtoshow); - } - else - { + } else { $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'class="nohover left"', 'maxlength'=>500, 'text' => $mesg); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 52dcdc995cd..b9fde24b759 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -108,9 +108,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $endyear = GETPOST($param_year, 'int'); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); - } - else - { + } else { $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true); $endyear = $tmparray['year']; $shownb = $tmparray['shownb']; @@ -151,9 +149,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); - } - else - { + } else { $legend[] = $i; } $i++; @@ -197,9 +193,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); - } - else - { + } else { $legend[] = $i; } $i++; @@ -267,9 +261,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $stringtoshow .= ''; } $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'class="nohover center"', 'textnoformat'=>$stringtoshow); - } - else - { + } else { $this->info_box_contents[0][0] = array( 'tr'=>'class="oddeven nohover"', 'td' => 'class="nohover left"', @@ -277,8 +269,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes 'text' => $mesg, ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 45459805f00..2ff1a579798 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -111,9 +111,7 @@ class box_graph_orders_permonth extends ModeleBoxes $endyear = GETPOST($param_year, 'int'); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); - } - else - { + } else { $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true); $endyear = $tmparray['year']; $shownb = $tmparray['shownb']; @@ -152,9 +150,7 @@ class box_graph_orders_permonth extends ModeleBoxes if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); - } - else - { + } else { $legend[] = $i; } $i++; @@ -196,9 +192,7 @@ class box_graph_orders_permonth extends ModeleBoxes if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); - } - else - { + } else { $legend[] = $i; } $i++; @@ -270,9 +264,7 @@ class box_graph_orders_permonth extends ModeleBoxes 'td' => 'class="nohover center"', 'textnoformat'=>$stringtoshow, ); - } - else - { + } else { $this->info_box_contents[0][0] = array( 'tr'=>'class="oddeven nohover"', 'td' => 'class="nohover left"', @@ -280,8 +272,7 @@ class box_graph_orders_permonth extends ModeleBoxes 'text' => $mesg, ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 99426be8cb1..fb40ee1f68f 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -110,9 +110,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $endyear = GETPOST($param_year, 'int'); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); - } - else - { + } else { $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true); $endyear = $tmparray['year']; $shownb = $tmparray['shownb']; @@ -151,9 +149,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); - } - else - { + } else { $legend[] = $i; } $i++; @@ -195,9 +191,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); - } - else - { + } else { $legend[] = $i; } $i++; @@ -269,9 +263,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes 'td' => 'class="nohover center"', 'textnoformat'=>$stringtoshow, ); - } - else - { + } else { $this->info_box_contents[0][0] = array( 'tr'=>'class="oddeven nohover"', 'td' => 'class="nohover left"', @@ -279,8 +271,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes 'text' => $mesg, ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index e8337d74303..957277005e7 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -94,9 +94,7 @@ class box_graph_product_distribution extends ModeleBoxes $showinvoicenb = GETPOST($param_showinvoicenb, 'alpha'); $showpropalnb = GETPOST($param_showpropalnb, 'alpha'); $showordernb = GETPOST($param_showordernb, 'alpha'); - } - else - { + } else { $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true); $year = $tmparray['year']; $showinvoicenb = $tmparray['showinvoicenb']; @@ -135,66 +133,6 @@ class box_graph_product_distribution extends ModeleBoxes $WIDTH = ($nbofgraph >= 2 || !empty($conf->dol_optimize_smallscreen)) ? '160' : '320'; $HEIGHT = '192'; - if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) - { - // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) - if ($showinvoicenb) - { - $langs->load("bills"); - include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; - - $showpointvalue = 1; $nocolor = 0; - $mode = 'customer'; - $stats_invoice = new FactureStats($this->db, $socid, $mode, ($userid > 0 ? $userid : 0)); - $data1 = $stats_invoice->getAllByProductEntry($year, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), 5); - - if (empty($data1)) - { - $showpointvalue = 0; - $nocolor = 1; - $data1 = array(array(0=>$langs->trans("None"), 1=>1)); - } - $filenamenb = $dir."/prodserforinvoice-".$year.".png"; - $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=productstats&file=prodserforinvoice-'.$year.'.png'; - - $px1 = new DolGraph(); - $mesg = $px1->isGraphKo(); - if (!$mesg) - { - $i = 0; $legend = array(); - - foreach ($data1 as $key => $val) - { - $data1[$key][0] = dol_trunc($data1[$key][0], 32); - $legend[] = $data1[$key][0]; - $i++; - } - - $px1->SetData($data1); - unset($data1); - - if ($nocolor) $px1->SetDataColor(array(array(220, 220, 220))); - $px1->SetLegend($legend); - $px1->setShowLegend(2); - $px1->setShowPointValue($showpointvalue); - $px1->setShowPercent(0); - $px1->SetMaxValue($px1->GetCeilMaxValue()); - //$px1->SetWidth($WIDTH); - $px1->SetHeight($HEIGHT); - //$px1->SetYLabel($langs->trans("NumberOfBills")); - $px1->SetShading(3); - $px1->SetHorizTickIncrement(1); - $px1->SetCssPrefix("cssboxes"); - //$px1->mode='depth'; - $px1->SetType(array('pie')); - $px1->SetTitle($langs->trans("ForObject", $langs->transnoentitiesnoconv("Invoices"))); - $px1->combine = 0.05; - - $px1->draw($filenamenb, $fileurlnb); - } - } - } - if (!empty($conf->propal->enabled) && !empty($user->rights->propale->lire)) { // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) @@ -314,6 +252,67 @@ class box_graph_product_distribution extends ModeleBoxes } } + + if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) + { + // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) + if ($showinvoicenb) + { + $langs->load("bills"); + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; + + $showpointvalue = 1; $nocolor = 0; + $mode = 'customer'; + $stats_invoice = new FactureStats($this->db, $socid, $mode, ($userid > 0 ? $userid : 0)); + $data1 = $stats_invoice->getAllByProductEntry($year, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), 5); + + if (empty($data1)) + { + $showpointvalue = 0; + $nocolor = 1; + $data1 = array(array(0=>$langs->trans("None"), 1=>1)); + } + $filenamenb = $dir."/prodserforinvoice-".$year.".png"; + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=productstats&file=prodserforinvoice-'.$year.'.png'; + + $px1 = new DolGraph(); + $mesg = $px1->isGraphKo(); + if (!$mesg) + { + $i = 0; $legend = array(); + + foreach ($data1 as $key => $val) + { + $data1[$key][0] = dol_trunc($data1[$key][0], 32); + $legend[] = $data1[$key][0]; + $i++; + } + + $px1->SetData($data1); + unset($data1); + + if ($nocolor) $px1->SetDataColor(array(array(220, 220, 220))); + $px1->SetLegend($legend); + $px1->setShowLegend(2); + $px1->setShowPointValue($showpointvalue); + $px1->setShowPercent(0); + $px1->SetMaxValue($px1->GetCeilMaxValue()); + //$px1->SetWidth($WIDTH); + $px1->SetHeight($HEIGHT); + //$px1->SetYLabel($langs->trans("NumberOfBills")); + $px1->SetShading(3); + $px1->SetHorizTickIncrement(1); + $px1->SetCssPrefix("cssboxes"); + //$px1->mode='depth'; + $px1->SetType(array('pie')); + $px1->SetTitle($langs->trans("ForObject", $langs->transnoentitiesnoconv("Invoices"))); + $px1->combine = 0.05; + + $px1->draw($filenamenb, $fileurlnb); + } + } + } + if (empty($nbofgraph)) { $langs->load("errors"); @@ -341,11 +340,6 @@ class box_graph_product_distribution extends ModeleBoxes $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - if (!empty($conf->facture->enabled) || !empty($user->rights->facture->lire)) - { - $stringtoshow .= ' '.$langs->trans("ForCustomersInvoices"); - $stringtoshow .= '   '; - } if (!empty($conf->propal->enabled) || !empty($user->rights->propale->lire)) { $stringtoshow .= ' '.$langs->trans("ForProposals"); @@ -355,6 +349,11 @@ class box_graph_product_distribution extends ModeleBoxes { $stringtoshow .= ' '.$langs->trans("ForCustomersOrders"); } + if (!empty($conf->facture->enabled) || !empty($user->rights->facture->lire)) + { + $stringtoshow .= ' '.$langs->trans("ForCustomersInvoices"); + $stringtoshow .= '   '; + } $stringtoshow .= '
'; $stringtoshow .= $langs->trans("Year").' '; $stringtoshow .= ''; @@ -363,29 +362,29 @@ class box_graph_product_distribution extends ModeleBoxes if ($nbofgraph == 1) { - if ($showinvoicenb) $stringtoshow .= $px1->show(); - elseif ($showpropalnb) $stringtoshow .= $px2->show(); - else $stringtoshow .= $px3->show(); + if ($showpropalnb) $stringtoshow .= $px2->show(); + elseif ($showordernb) $stringtoshow .= $px3->show(); + else $stringtoshow .= $px1->show(); } if ($nbofgraph == 2) { $stringtoshow .= '
'; - if ($showinvoicenb) $stringtoshow .= $px1->show(); - elseif ($showpropalnb) $stringtoshow .= $px2->show(); + if ($showpropalnb) $stringtoshow .= $px2->show(); + elseif ($showordernb) $stringtoshow .= $px3->show(); $stringtoshow .= '
'; - if ($showordernb) $stringtoshow .= $px3->show(); - elseif ($showpropalnb) $stringtoshow .= $px2->show(); + if ($showinvoicenb) $stringtoshow .= $px1->show(); + elseif ($showordernb) $stringtoshow .= $px3->show(); $stringtoshow .= '
'; } if ($nbofgraph == 3) { $stringtoshow .= '
'; - $stringtoshow .= $px1->show(); - $stringtoshow .= '
'; $stringtoshow .= $px2->show(); + $stringtoshow .= '
'; + $stringtoshow .= $px3->show(); $stringtoshow .= '
'; $stringtoshow .= '
'; - $stringtoshow .= $px3->show(); + $stringtoshow .= $px1->show(); $stringtoshow .= '
'; } $this->info_box_contents[0][0] = array( @@ -393,9 +392,7 @@ class box_graph_product_distribution extends ModeleBoxes 'td' => 'class="nohover center"', 'textnoformat'=>$stringtoshow, ); - } - else - { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'maxlength'=>500, diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 42b95e516b5..4231638948a 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -111,9 +111,7 @@ class box_graph_propales_permonth extends ModeleBoxes $endyear = GETPOST($param_year, 'int'); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); - } - else - { + } else { $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true); $endyear = $tmparray['year']; $shownb = $tmparray['shownb']; @@ -150,9 +148,7 @@ class box_graph_propales_permonth extends ModeleBoxes if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); - } - else - { + } else { $legend[] = $i; } $i++; @@ -196,9 +192,7 @@ class box_graph_propales_permonth extends ModeleBoxes if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); - } - else - { + } else { $legend[] = $i; } $i++; @@ -270,9 +264,7 @@ class box_graph_propales_permonth extends ModeleBoxes 'td' => 'class="nohover center"', 'textnoformat'=>$stringtoshow, ); - } - else - { + } else { $this->info_box_contents[0][0] = array( 'tr'=>'class="oddeven nohover"', 'td' => 'class="nohover left"', @@ -280,8 +272,7 @@ class box_graph_propales_permonth extends ModeleBoxes 'text' => $mesg, ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 374e9ab1bae..8dffe4adf20 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -149,8 +149,7 @@ class box_produits extends ModeleBoxes if (empty($conf->dynamicprices->enabled) || empty($objp->fk_price_expression)) { $price_base_type = $langs->trans($objp->price_base_type); $price = ($objp->price_base_type == 'HT') ?price($objp->price) : $price = price($objp->price_ttc); - } - else //Parse the dynamic price + } else //Parse the dynamic price { $productstatic->fetch($objp->rowid, '', '', 1); $priceparser = new PriceParser($this->db); @@ -159,9 +158,7 @@ class box_produits extends ModeleBoxes if ($objp->price_base_type == 'HT') { $price_base_type = $langs->trans("HT"); - } - else - { + } else { $price_result = $price_result * (1 + ($productstatic->tva_tx / 100)); $price_base_type = $langs->trans("TTC"); } diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index f4a433c013d..5b17ef22ddf 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -88,7 +88,9 @@ class box_produits_alerte_stock extends ModeleBoxes if (($user->rights->produit->lire || $user->rights->service->lire) && $user->rights->stock->lire) { - $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.seuil_stock_alerte, p.entity,"; + $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.barcode, p.seuil_stock_alerte, p.entity,"; + $sql .= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export,"; + $sql .= " p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export,"; $sql .= " SUM(".$this->db->ifsql("s.reel IS NULL", "0", "s.reel").") as total_stock"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as s on p.rowid = s.fk_product"; @@ -103,8 +105,10 @@ class box_produits_alerte_stock extends ModeleBoxes $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; } - $sql .= " GROUP BY p.rowid, p.ref, p.label, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.seuil_stock_alerte, p.entity"; - $sql .= " HAVING SUM(".$this->db->ifsql("s.reel IS NULL", "0", "s.reel").") < p.seuil_stock_alerte"; + $sql .= " GROUP BY p.rowid, p.ref, p.label, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.barcode, p.seuil_stock_alerte, p.entity,"; + $sql .= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export,"; + $sql .= " p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export"; + $sql .= " HAVING SUM(".$this->db->ifsql("s.reel IS NULL", "0", "s.reel").") < p.seuil_stock_alerte"; $sql .= $this->db->order('p.seuil_stock_alerte', 'DESC'); $sql .= $this->db->plimit($max, 0); @@ -142,6 +146,15 @@ class box_produits_alerte_stock extends ModeleBoxes $productstatic->type = $objp->fk_product_type; $productstatic->label = $objp->label; $productstatic->entity = $objp->entity; + $productstatic->barcode = $objp->barcode; + $productstatic->status = $objp->tosell; + $productstatic->status_buy = $objp->tobuy; + $productstatic->accountancy_code_sell = $objp->accountancy_code_sell; + $productstatic->accountancy_code_sell_intra = $objp->accountancy_code_sell_intra; + $productstatic->accountancy_code_sell_export = $objp->accountancy_code_sell_export; + $productstatic->accountancy_code_buy = $objp->accountancy_code_buy; + $productstatic->accountancy_code_buy_intra = $objp->accountancy_code_buy_intra; + $productstatic->accountancy_code_buy_export = $objp->accountancy_code_buy_export; $this->info_box_contents[$line][] = array( 'td' => '', @@ -158,8 +171,7 @@ class box_produits_alerte_stock extends ModeleBoxes { $price_base_type = $langs->trans($objp->price_base_type); $price = ($objp->price_base_type == 'HT') ?price($objp->price) : $price = price($objp->price_ttc); - } - else //Parse the dynamic price + } else //Parse the dynamic price { $productstatic->fetch($objp->rowid, '', '', 1); $priceparser = new PriceParser($this->db); @@ -168,9 +180,7 @@ class box_produits_alerte_stock extends ModeleBoxes if ($objp->price_base_type == 'HT') { $price_base_type = $langs->trans("HT"); - } - else - { + } else { $price_result = $price_result * (1 + ($productstatic->tva_tx / 100)); $price_base_type = $langs->trans("TTC"); } @@ -215,17 +225,14 @@ class box_produits_alerte_stock extends ModeleBoxes ); $this->db->free($result); - } - else - { + } else { $this->info_box_contents[0][0] = array( 'td' => '', 'maxlength'=>500, 'text' => ($this->db->error().' sql='.$sql), ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index c99f07ff311..e8b056322da 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -146,8 +146,7 @@ class box_project extends ModeleBoxes 'td' => 'class="right"', 'text' => round($objTask->totprogress / $objTask->nb, 0)."%", ); - else - $this->info_box_contents[$i][] = array('td' => 'class="right"', 'text' => "N/A "); + else $this->info_box_contents[$i][] = array('td' => 'class="right"', 'text' => "N/A "); $totalnbTask += $objTask->nb; } else { $this->info_box_contents[$i][] = array('td' => 'class="right"', 'text' => round(0)); diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 7167097672b..d528a4d68ca 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -90,7 +90,7 @@ class box_services_contracts extends ModeleBoxes $sql = "SELECT s.nom as name, s.rowid as socid, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,"; $sql .= " c.rowid, c.ref, c.statut as contract_status, c.ref_customer, c.ref_supplier,"; - $sql .= " cd.rowid as cdid, cd.label, cd.description, cd.tms as datem, cd.statut, cd.product_type as type,"; + $sql .= " cd.rowid as cdid, cd.label, cd.description, cd.tms as datem, cd.statut as contractline_status, cd.product_type as type, cd.date_fin_validite as date_line,"; $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as plabel, p.fk_product_type as ptype, p.entity, p.tobuy, p.tosell"; $sql .= " FROM (".MAIN_DB_PREFIX."societe as s"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."contrat as c ON s.rowid = c.fk_soc"; @@ -113,6 +113,8 @@ class box_services_contracts extends ModeleBoxes while ($i < $num) { + $late = ''; + $objp = $this->db->fetch_object($result); $datem = $this->db->jdate($objp->datem); @@ -123,12 +125,13 @@ class box_services_contracts extends ModeleBoxes $contractlinestatic->type = $objp->type; $contractlinestatic->product_id = $objp->product_id; $contractlinestatic->product_ref = $objp->product_ref; + $contractlinestatic->statut = $objp->contractline_status; - $contractstatic->statut = $objp->contract_status; $contractstatic->id = $objp->rowid; $contractstatic->ref = $objp->ref; $contractstatic->ref_customer = $objp->ref_customer; $contractstatic->ref_supplier = $objp->ref_supplier; + $contractstatic->statut = $objp->contract_status; $thirdpartytmp->name = $objp->name; $thirdpartytmp->id = $objp->socid; @@ -140,22 +143,8 @@ class box_services_contracts extends ModeleBoxes $thirdpartytmp->code_compta = $objp->code_compta; $thirdpartytmp->code_compta_fournisseur = $objp->code_compta_fournisseur; - // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS) && $objp->product_id > 0) // if option multilang is on - { - $sqld = "SELECT label"; - $sqld .= " FROM ".MAIN_DB_PREFIX."product_lang"; - $sqld .= " WHERE fk_product=".$objp->product_id; - $sqld .= " AND lang='".$langs->getDefaultLang()."'"; - $sqld .= " LIMIT 1"; - - $resultd = $this->db->query($sqld); - if ($resultd) - { - $objtp = $this->db->fetch_object($resultd); - if ($objtp->label != '') $contractlinestatic->label = $objtp->label; - } - } + $dateline = $this->db->jdate($objp->date_line); + if ($contractstatic->statut == Contrat::STATUS_VALIDATED && $objp->contractline_status == ContratLigne::STATUS_OPEN && !empty($dateline) && ($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late = img_warning($langs->trans("Late")); // Label if ($objp->product_id > 0) @@ -185,10 +174,8 @@ class box_services_contracts extends ModeleBoxes $description = ''; // Already added into main visible desc } - $s = $form->textwithtooltip($text, $description, 3, '', '', $cursorline, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : '')); - } - else - { + $s = $form->textwithtooltip($text, $description, 3, '', '', '', 0, (!empty($objp->fk_parent_line) ?img_picto('', 'rightarrow') : '')); + } else { $s = img_object($langs->trans("ShowProductOrService"), ($objp->product_type ? 'service' : 'product')).' '.dol_htmlentitiesbr($objp->description); } @@ -214,11 +201,12 @@ class box_services_contracts extends ModeleBoxes $this->info_box_contents[$i][] = array( 'td' => '', 'text' => dol_print_date($datem, 'day'), + 'text2'=> $late, ); $this->info_box_contents[$i][] = array( 'td' => 'class="right" width="18"', - 'text' => $contractlinestatic->LibStatut($objp->statut, 3) + 'text' => $contractlinestatic->getLibStatut(3) ); $i++; @@ -229,17 +217,14 @@ class box_services_contracts extends ModeleBoxes ); $this->db->free($result); - } - else - { + } else { $this->info_box_contents[0][0] = array( 'td' => '', 'maxlength' => 500, 'text' => ($this->db->error().' sql='.$sql), ); } - } - else { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index 94b4764eeae..d7b3433f6d2 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -170,18 +170,14 @@ class box_services_expired extends ModeleBoxes } $this->db->free($resql); - } - else - { + } else { $this->info_box_contents[0][] = array( 'td' => '', 'maxlength'=>500, 'text' => ($this->db->error().' sql='.$sql), ); } - } - else - { + } else { $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_shipments.php b/htdocs/core/boxes/box_shipments.php index 278ad974cf5..61942d03f45 100644 --- a/htdocs/core/boxes/box_shipments.php +++ b/htdocs/core/boxes/box_shipments.php @@ -103,10 +103,10 @@ class box_shipments extends ModeleBoxes $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping' AND el.sourcetype IN ('commande')"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid AND el.sourcetype IN ('commande') AND el.targettype = 'shipping'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; $sql .= " WHERE e.entity = ".$conf->entity; if (!empty($conf->global->ORDER_BOX_LAST_SHIPMENTS_VALIDATED_ONLY)) $sql .= " AND e.fk_statut = 1"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= " AND sc.fk_user = ".$user->id; + if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND sc.fk_user = ".$user->id; else $sql .= " ORDER BY e.date_delivery, e.ref DESC "; $sql .= $this->db->plimit($max, 0); @@ -133,7 +133,7 @@ class box_shipments extends ModeleBoxes $societestatic->logo = $objp->logo; $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $shipmentstatic->getNomUrl(1), 'asis' => 1, ); @@ -145,7 +145,7 @@ class box_shipments extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $orderstatic->getNomUrl(1), 'asis' => 1, ); diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index c019062313c..5ba940f2af2 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -167,9 +167,7 @@ class box_supplier_orders extends ModeleBoxes 'text' => ($this->db->error().' sql='.$sql), ); } - } - else - { + } else { $this->info_box_contents[0][] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php index f70f5bef450..952e0b78d92 100644 --- a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php +++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php @@ -174,9 +174,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes 'text' => ($this->db->error().' sql='.$sql), ); } - } - else - { + } else { $this->info_box_contents[0][] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index f9a974ae1c5..9c6020bebdc 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -93,15 +93,13 @@ class box_task extends ModeleBoxes $filterValue = 'all'; if (in_array(GETPOST($cookie_name), array('all', 'im_project_contact', 'im_task_contact'))) { $filterValue = GETPOST($cookie_name); - } - elseif (!empty($_COOKIE[$cookie_name])) { + } elseif (!empty($_COOKIE[$cookie_name])) { $filterValue = $_COOKIE[$cookie_name]; } if ($filterValue == 'im_task_contact') { $textHead .= ' : '.$langs->trans("WhichIamLinkedTo"); - } - elseif ($filterValue == 'im_project_contact') { + } elseif ($filterValue == 'im_project_contact') { $textHead .= ' : '.$langs->trans("WhichIamLinkedToProject"); } @@ -158,8 +156,7 @@ class box_task extends ModeleBoxes if ($filterValue === 'im_task_contact') { $sql .= " JOIN ".MAIN_DB_PREFIX."element_contact as ec ON (ec.element_id = pt.rowid AND ec.fk_socpeople = '".$user->id."' )"; $sql .= " JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON (ec.fk_c_type_contact = tc.rowid AND tc.element = 'project_task' AND tc.source = 'internal' )"; - } - elseif ($filterValue === 'im_project_contact') { + } elseif ($filterValue === 'im_project_contact') { $sql .= " JOIN ".MAIN_DB_PREFIX."element_contact as ec ON (ec.element_id = p.rowid AND ec.fk_socpeople = '".$user->id."' )"; $sql .= " JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON (ec.fk_c_type_contact = tc.rowid AND tc.element = 'project' AND tc.source = 'internal' )"; } @@ -192,7 +189,7 @@ class box_task extends ModeleBoxes $projectstatic->ref = $objp->project_ref; $projectstatic->title = $objp->project_title; - $label = $projectstatic->getNomUrl(1).' '.$taskstatic->getNomUrl(1).' '.dol_htmlentities($taskstatic->label); + $label = $projectstatic->getNomUrl(1).'   '.$taskstatic->getNomUrl(1).' '.dol_htmlentities($taskstatic->label); $boxcontent = getTaskProgressView($taskstatic, $label, true, false, false); diff --git a/htdocs/core/boxes/box_validated_projects.php b/htdocs/core/boxes/box_validated_projects.php new file mode 100644 index 00000000000..378aea61df5 --- /dev/null +++ b/htdocs/core/boxes/box_validated_projects.php @@ -0,0 +1,195 @@ + + * Copyright (C) 2014 Marcos García + * Copyright (C) 2015 Frederic France + * Copyright (C) 2016 Juan José Menent + * Copyright (C) 2020 Pierre Ardoin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/core/boxes/box_validated_projects.php + * \ingroup projet + * \brief Module to show validated projects whose tasks are assigned to the connected person, without any time entered by the connected person + */ +include_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php"; + +/** + * Class to manage the box to show last projet + */ +class box_validated_projects extends ModeleBoxes +{ + public $boxcode="validated_project"; + public $boximg="object_projectpub"; + public $boxlabel; + //var $depends = array("projet"); + + /** + * @var DoliDB Database handler. + */ + public $db; + + public $param; + + public $info_box_head = array(); + public $info_box_contents = array(); + + /** + * Constructor + * + * @param DoliDB $db Database handler + * @param string $param More parameters + */ + public function __construct($db, $param = '') + { + global $user, $langs; + + // Load translation files required by the page + $langs->loadLangs(array('boxes', 'projects')); + + $this->db = $db; + $this->boxlabel = "ValidatedProjects"; + + $this->hidden = ! ($user->rights->projet->lire); + } + + /** + * Load data for box to show them later + * + * @param int $max Maximum number of records to load + * @return void + */ + public function loadBox($max = 5) + { + global $conf, $user, $langs; + + $this->max=$max; + + $totalMnt = 0; + $totalnb = 0; + $totalnbTask=0; + + $textHead = $langs->trans("ValidatedProjects"); + $this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead)); + + // list the summary of the orders + if ($user->rights->projet->lire) { + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + $projectstatic = new Project($this->db); + + $socid=0; + //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. + + // Get list of project id allowed to user (in a string list separated by coma) + $projectsListId=''; + if (! $user->rights->projet->all->lire) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, $socid); + + $sql = "SELECT p.rowid, p.ref as Ref, p.fk_soc as Client, p.dateo as startDate,"; + $sql.= " (SELECT COUNT(t.rowid) FROM ".MAIN_DB_PREFIX."projet_task AS t"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact AS c ON t.rowid = c.element_id"; + $sql.= " WHERE t.fk_projet = p.rowid AND c.fk_c_type_contact != 160 AND c.fk_socpeople = ".$user->id." AND t.rowid NOT IN (SELECT fk_task FROM ".MAIN_DB_PREFIX."projet_task_time WHERE fk_user =".$user->id.")) AS 'taskNumber'"; + $sql.= " FROM ".MAIN_DB_PREFIX."projet AS p"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task AS t ON p.rowid = t.fk_projet"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact AS c ON t.rowid = c.element_id"; + $sql.= " WHERE p.fk_statut = 1"; // Only open projects + $sql.= " AND t.rowid NOT IN (SELECT fk_task FROM ".MAIN_DB_PREFIX."projet_task_time WHERE fk_user =".$user->id.")"; + $sql.= " AND c.fk_socpeople = ".$user->id; + $sql.= " GROUP BY p.ref"; + $sql.= " ORDER BY p.dateo ASC"; + + $result = $this->db->query($sql); + if ($result) { + $num = $this->db->num_rows($result); + $i = 0; + $this->info_box_contents[$i][] = array( + 'td' => 'class="nowraponall"', + 'text' => "Reference projet", + ); + $this->info_box_contents[$i][] = array( + 'td' => 'class="center"', + 'text' => 'Client', + ); + $this->info_box_contents[$i][] = array( + 'td' => 'class="center"', + 'text' => 'Date debut de projet', + ); + $this->info_box_contents[$i][] = array( + 'td' => 'class="center"', + 'text' => 'Nombre de mes tâches sans temps saisi', + ); + $i++; + + while ($i < min($num+1, $max+1)) { + $objp = $this->db->fetch_object($result); + + $projectstatic->id = $objp->rowid; + $projectstatic->ref = $objp->Ref; + $projectstatic->customer = $objp->Client; + $projectstatic->startDate = $objp->startDate; + $projectstatic->taskNumber = $objp->taskNumber; + + $this->info_box_contents[$i][] = array( + 'td' => 'class="nowraponall"', + 'text' => $projectstatic->getNomUrl(1), + 'asis' => 1 + ); + + $sql = 'SELECT rowid, nom FROM '.MAIN_DB_PREFIX.'societe WHERE rowid ='.$objp->Client; + $resql = $this->db->query($sql); + if ($resql){ + $socstatic = new Societe($this->db); + $obj = $this->db->fetch_object($resql); + $this->info_box_contents[$i][] = array( + 'td' => 'class="tdoverflowmax150 maxwidth200onsmartphone"', + 'text' => $obj->nom, + 'asis' => 1, + 'url' => DOL_URL_ROOT.'/societe/card.php?socid='.$obj->rowid + ); + } + else { + dol_print_error($this->db); + } + + $this->info_box_contents[$i][] = array( + 'td' => 'class="center"', + 'text' => $objp->startDate, + ); + + $this->info_box_contents[$i][] = array( + 'td' => 'class="center"', + 'text' => $objp->taskNumber." ".$langs->trans("Tasks"), + 'asis' => 1, + ); + $i++; + } + }else { + dol_print_error($this->db); + } + } + } + + /** + * Method to show box + * + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string + * @return string + */ + public function showBox($head = null, $contents = null, $nooutput = 0) + { + return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); + } +} diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 01fbcdef47b..e5fa9d8fb0d 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -161,14 +161,10 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box $this->box_order = $obj->box_order; $this->fk_user = $obj->fk_user; return 1; - } - else - { + } else { return -1; } - } - else - { + } else { return -1; } } @@ -438,13 +434,10 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box { $langs->load("errors"); print '
'.$langs->trans("Error").' : '.$langs->trans("ErrorDuplicateWidget", $modName, "").'
'; - } - else - { + } else { try { include_once $newdir.'/'.$file; - } - catch (Exception $e) + } catch (Exception $e) { print $e->getMessage(); } diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 5c7251c40e2..a90e3a2cf26 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -32,7 +32,7 @@ /** * Class to send emails (with attachments or not) - * Usage: $mailfile = new CMailFile($subject,$sendto,$replyto,$message,$filepath,$mimetype,$filename,$cc,$ccc,$deliveryreceipt,$msgishtml,$errors_to,$css,$trackid,$moreinheader,$sendcontext); + * Usage: $mailfile = new CMailFile($subject,$sendto,$replyto,$message,$filepath,$mimetype,$filename,$cc,$ccc,$deliveryreceipt,$msgishtml,$errors_to,$css,$trackid,$moreinheader,$sendcontext,$replyto); * $mailfile->sendfile(); */ class CMailFile @@ -41,47 +41,47 @@ class CMailFile public $sendmode; public $sendsetup; - public $subject; // Topic: Subject of email - public $addr_from; // From: Label and EMail of sender (must include '<>'). For example '' or 'John Doe ' or ''). Note that with gmail smtps, value here is forced by google to account (but not the reply-to). + public $subject; // Topic: Subject of email + public $addr_from; // From: Label and EMail of sender (must include '<>'). For example '' or 'John Doe ' or ''). Note that with gmail smtps, value here is forced by google to account (but not the reply-to). // Sender: Who send the email ("Sender" has sent emails on behalf of "From"). // Use it when the "From" is an email of a domain that is a SPF protected domain, and sending smtp server is not this domain. In such case, add Sender field with an email of the protected domain. // Return-Path: Email where to send bounds. - public $reply_to; // Reply-To: Email where to send replies from mailer software (mailer use From if reply-to not defined, Gmail use gmail account if reply-to not defined) - public $errors_to; // Errors-To: Email where to send errors. - public $addr_to; - public $addr_cc; - public $addr_bcc; - public $trackid; + public $reply_to; // Reply-To: Email where to send replies from mailer software (mailer use From if reply-to not defined, Gmail use gmail account if reply-to not defined) + public $errors_to; // Errors-To: Email where to send errors. + public $addr_to; + public $addr_cc; + public $addr_bcc; + public $trackid; - public $mixed_boundary; - public $related_boundary; - public $alternative_boundary; - public $deliveryreceipt; + public $mixed_boundary; + public $related_boundary; + public $alternative_boundary; + public $deliveryreceipt; - public $eol; - public $eol2; + public $eol; + public $eol2; /** * @var string Error code (or message) */ public $error = ''; - public $smtps; // Contains SMTPs object (if this method is used) - public $phpmailer; // Contains PHPMailer object (if this method is used) + public $smtps; // Contains SMTPs object (if this method is used) + public $phpmailer; // Contains PHPMailer object (if this method is used) /** * @var string CSS */ public $css; //! Defined css style for body background - public $styleCSS; + public $styleCSS; //! Defined background directly in body tag - public $bodyCSS; + public $bodyCSS; - public $msgid; - public $headers; - public $message; - /** + public $msgid; + public $headers; + public $message; + /** * @var array fullfilenames list (full path of filename on file system) */ public $filename_list = array(); @@ -95,21 +95,21 @@ class CMailFile public $mimefilename_list = array(); // Image - public $html; - public $image_boundary; - public $atleastoneimage = 0; // at least one image file with file=xxx.ext into content (TODO Debug this. How can this case be tested. Remove if not used). - public $html_images = array(); - public $images_encoded = array(); - public $image_types = array( - 'gif' => 'image/gif', + public $html; + public $image_boundary; + public $atleastoneimage = 0; // at least one image file with file=xxx.ext into content (TODO Debug this. How can this case be tested. Remove if not used). + public $html_images = array(); + public $images_encoded = array(); + public $image_types = array( + 'gif' => 'image/gif', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'jpe' => 'image/jpeg', 'bmp' => 'image/bmp', 'png' => 'image/png', 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - ); + 'tiff' => 'image/tiff', + ); /** @@ -147,7 +147,7 @@ class CMailFile // Add autocopy to (Note: Adding bcc for specific modules are also done from pages) if (!empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)) $addr_bcc .= ($addr_bcc ? ', ' : '').$conf->global->MAIN_MAIL_AUTOCOPY_TO; - $this->subject = $subject; + $this->subject = $subject; $this->addr_to = $to; $this->addr_from = $from; $this->msg = $msg; @@ -168,9 +168,13 @@ class CMailFile // Define this->sendmode $this->sendmode = ''; - if ($this->sendcontext == 'emailing' && !empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') - { - $this->sendmode = $conf->global->MAIN_MAIL_SENDMODE_EMAILING; + if (!empty($this->sendcontext)) { + $smtpContextKey = strtoupper($this->sendcontext); + $keyForSMTPSendMode = 'MAIN_MAIL_SENDMODE_'.$smtpContextKey; + $smtpContextSendMode = $conf->global->{$keyForSMTPSendMode}; + if (!empty($smtpContextSendMode) && $smtpContextSendMode != 'default') { + $this->sendmode = $smtpContextSendMode; + } } if (empty($this->sendmode)) $this->sendmode = $conf->global->MAIN_MAIL_SENDMODE; if (empty($this->sendmode)) $this->sendmode = 'mail'; @@ -195,7 +199,7 @@ class CMailFile // On defini alternative_boundary $this->alternative_boundary = 'mul_'.dol_hash(uniqid("dolibarr3"), 3); // Force md5 hash (does not contains special chars) - dol_syslog("CMailFile::CMailfile: sendmode=".$this->sendmode." charset=".$conf->file->character_set_client." from=$from, to=$to, addr_cc=$addr_cc, addr_bcc=$addr_bcc, errors_to=$errors_to, trackid=$trackid sendcontext=$sendcontext", LOG_DEBUG); + dol_syslog("CMailFile::CMailfile: sendmode=".$this->sendmode." charset=".$conf->file->character_set_client." from=$from, to=$to, addr_cc=$addr_cc, addr_bcc=$addr_bcc, errors_to=$errors_to, replyto=$replyto trackid=$trackid sendcontext=$sendcontext", LOG_DEBUG); dol_syslog("CMailFile::CMailfile: subject=".$subject.", deliveryreceipt=".$deliveryreceipt.", msgishtml=".$msgishtml, LOG_DEBUG); if (empty($subject)) @@ -206,8 +210,8 @@ class CMailFile } if (empty($msg)) { - dol_syslog("CMailFile::CMailfile: Try to send an email with empty body"); - $msg = '.'; // Avoid empty message (with empty message content, you will see a multipart structure) + dol_syslog("CMailFile::CMailfile: Try to send an email with empty body"); + $msg = '.'; // Avoid empty message (with empty message content, you will see a multipart structure) } // Detect if message is HTML (use fast method) @@ -215,9 +219,7 @@ class CMailFile { $this->msgishtml = 0; if (dol_textishtml($msg)) $this->msgishtml = 1; - } - else - { + } else { $this->msgishtml = $msgishtml; } @@ -270,6 +272,28 @@ class CMailFile } } + $this->addr_to = $to; + $this->addr_cc = $addr_cc; + $this->addr_bcc = $addr_bcc; + $this->reply_to = $replyto; + $this->addr_from = $from; + $this->subject = $subject; + $this->errors_to = $errors_to; + $this->deliveryreceipt = $deliveryreceipt; + $this->trackid = $trackid; + + if (!empty($conf->global->MAIN_MAIL_FORCE_SENDTO)) + { + $this->addr_to = $conf->global->MAIN_MAIL_FORCE_SENDTO; + $this->addr_cc = ''; + $this->addr_bcc = ''; + } + + // Add autocopy to (Note: Adding bcc for specific modules are also done from pages) + if (!empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)) { + $addr_bcc .= ($addr_bcc ? ', ' : '').$conf->global->MAIN_MAIL_AUTOCOPY_TO; + } + // We set all data according to choosed sending method. // We also set a value for ->msgid if ($this->sendmode == 'mail') @@ -319,8 +343,7 @@ class CMailFile $this->message = 'This is a message with multiple parts in MIME format.'.$this->eol; $this->message .= $text_body.$files_encoded; $this->message .= "--".$this->mixed_boundary."--".$this->eol; - } - elseif ($this->sendmode == 'smtps') + } elseif ($this->sendmode == 'smtps') { // Use SMTPS library // ------------------------------------------ @@ -330,16 +353,16 @@ class CMailFile $smtps->setCharSet($conf->file->character_set_client); // Encode subject if required. - $subjecttouse = $subject; + $subjecttouse = $this->subject; if (!ascii_check($subjecttouse)) { $subjecttouse = $this->encodetorfc2822($subjecttouse); } $smtps->setSubject($subjecttouse); - $smtps->setTO($this->getValidAddress($to, 0, 1)); - $smtps->setFrom($this->getValidAddress($from, 0, 1)); - $smtps->setTrackId($trackid); - $smtps->setReplyTo($this->getValidAddress($replyto, 0, 1)); + $smtps->setTO($this->getValidAddress($this->addr_to, 0, 1)); + $smtps->setFrom($this->getValidAddress($this->addr_from, 0, 1)); + $smtps->setTrackId($this->trackid); + $smtps->setReplyTo($this->getValidAddress($this->reply_to, 0, 1)); if (!empty($moreinheader)) $smtps->setMoreInHeader($moreinheader); @@ -377,83 +400,94 @@ class CMailFile } } - $smtps->setCC($addr_cc); - $smtps->setBCC($addr_bcc); - $smtps->setErrorsTo($errors_to); - $smtps->setDeliveryReceipt($deliveryreceipt); + $smtps->setCC($this->addr_cc); + $smtps->setBCC($this->addr_bcc); + $smtps->setErrorsTo($this->errors_to); + $smtps->setDeliveryReceipt($this->deliveryreceipt); $host = dol_getprefix('email'); - $this->msgid = time().'.SMTPs-dolibarr-'.$trackid.'@'.$host; + $this->msgid = time().'.SMTPs-dolibarr-'.$this->trackid.'@'.$host; $this->smtps = $smtps; - } - elseif ($this->sendmode == 'swiftmailer') - { + } elseif ($this->sendmode == 'swiftmailer') { // Use Swift Mailer library - $host = dol_getprefix('email'); + $host = dol_getprefix('email'); - require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php'; - // egulias autoloader lib - require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/autoload.php'; + // egulias autoloader lib + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/autoload.php'; - require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/swift_required.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/swift_required.php'; - // Create the message - //$this->message = Swift_Message::newInstance(); - $this->message = new Swift_Message(); - //$this->message = new Swift_SignedMessage(); - // Adding a trackid header to a message - $headers = $this->message->getHeaders(); - $headers->addTextHeader('X-Dolibarr-TRACKID', $trackid.'@'.$host); - $this->msgid = time().'.swiftmailer-dolibarr-'.$trackid.'@'.$host; - $headerID = $this->msgid; - $msgid = $headers->get('Message-ID'); - $msgid->setId($headerID); - $headers->addIdHeader('References', $headerID); - // TODO if (! empty($moreinheader)) ... + // Create the message + //$this->message = Swift_Message::newInstance(); + $this->message = new Swift_Message(); + //$this->message = new Swift_SignedMessage(); + // Adding a trackid header to a message + $headers = $this->message->getHeaders(); + $headers->addTextHeader('X-Dolibarr-TRACKID', $this->trackid.'@'.$host); + $this->msgid = time().'.swiftmailer-dolibarr-'.$this->trackid.'@'.$host; + $headerID = $this->msgid; + $msgid = $headers->get('Message-ID'); + $msgid->setId($headerID); + $headers->addIdHeader('References', $headerID); + // TODO if (! empty($moreinheader)) ... - // Give the message a subject - try { - $result = $this->message->setSubject($subject); - } catch (Exception $e) { - $this->errors[] = $e->getMessage(); - } + // Give the message a subject + try { + $result = $this->message->setSubject($this->subject); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + } - // Set the From address with an associative array - //$this->message->setFrom(array('john@doe.com' => 'John Doe')); - if (!empty($from)) { - try { - $result = $this->message->setFrom($this->getArrayAddress($from)); - } catch (Exception $e) { - $this->errors[] = $e->getMessage(); - } - } + // Set the From address with an associative array + //$this->message->setFrom(array('john@doe.com' => 'John Doe')); + if (!empty($this->addr_from)) { + try { + if (!empty($conf->global->MAIN_FORCE_DISABLE_MAIL_SPOOFING)) { + // Prevent email spoofing for smtp server with a strict configuration + $regexp = '/([a-z0-9_\.\-\+])+\@(([a-z0-9\-])+\.)+([a-z0-9]{2,4})+/i'; // This regular expression extracts all emails from a string + $emailMatchs = preg_match_all($regexp, $from, $adressEmailFrom); + $adressEmailFrom = reset($adressEmailFrom); + if ($emailMatchs !== false && filter_var($conf->global->MAIN_MAIL_SMTPS_ID, FILTER_VALIDATE_EMAIL) && $conf->global->MAIN_MAIL_SMTPS_ID !== $adressEmailFrom) + { + $result = $this->message->setFrom($conf->global->MAIN_MAIL_SMTPS_ID); + } else { + $result = $this->message->setFrom($this->getArrayAddress($this->addr_from)); + } + } else { + $result = $this->message->setFrom($this->getArrayAddress($this->addr_from)); + } + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + } + } - // Set the To addresses with an associative array - if (!empty($to)) { - try { - $result = $this->message->setTo($this->getArrayAddress($to)); - } catch (Exception $e) { - $this->errors[] = $e->getMessage(); - } - } + // Set the To addresses with an associative array + if (!empty($this->addr_to)) { + try { + $result = $this->message->setTo($this->getArrayAddress($this->addr_to)); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + } + } - if (!empty($replyto)) { - try { - $result = $this->message->SetReplyTo($this->getArrayAddress($replyto)); - } catch (Exception $e) { - $this->errors[] = $e->getMessage(); - } - } + if (!empty($this->reply_to)) { + try { + $result = $this->message->SetReplyTo($this->getArrayAddress($this->reply_to)); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + } + } - try { - $result = $this->message->setCharSet($conf->file->character_set_client); - } catch (Exception $e) { - $this->errors[] = $e->getMessage(); - } + try { + $result = $this->message->setCharSet($conf->file->character_set_client); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + } - if (!empty($this->html)) { + if (!empty($this->html)) { if (!empty($css)) { $this->css = $css; $this->buildCSS(); @@ -491,17 +525,18 @@ class CMailFile { //$this->message->attach(Swift_Attachment::fromPath($filename_list[$i],$mimetype_list[$i])); $attachment = Swift_Attachment::fromPath($filename_list[$i], $mimetype_list[$i]); + if (!empty($mimefilename_list[$i])) { + $attachment->setFilename($mimefilename_list[$i]); + } $this->message->attach($attachment); } } - if (!empty($addr_cc)) $this->message->setCc($this->getArrayAddress($addr_cc)); - if (!empty($addr_bcc)) $this->message->setBcc($this->getArrayAddress($addr_bcc)); - //if (! empty($errors_to)) $this->message->setErrorsTo($this->getArrayAddress($errors_to); - if (isset($deliveryreceipt) && $deliveryreceipt == 1) $this->message->setReadReceiptTo($this->getArrayAddress($from)); - } - else - { + if (!empty($this->addr_cc)) $this->message->setCc($this->getArrayAddress($this->addr_cc)); + if (!empty($this->addr_bcc)) $this->message->setBcc($this->getArrayAddress($this->addr_bcc)); + //if (! empty($this->errors_to)) $this->message->setErrorsTo($this->getArrayAddress($this->errors_to)); + if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) $this->message->setReadReceiptTo($this->getArrayAddress($this->addr_from)); + } else { // Send mail method not correctly defined // -------------------------------------- $this->error = 'Bad value for sendmode'; @@ -546,26 +581,26 @@ class CMailFile $sendingmode = $this->sendmode; if ($this->context == 'emailing' && !empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail') { - // List of sending methods - $listofmethods = array(); - $listofmethods['mail'] = 'PHP mail function'; - //$listofmethods['simplemail']='Simplemail class'; - $listofmethods['smtps'] = 'SMTP/SMTPS socket library'; + // List of sending methods + $listofmethods = array(); + $listofmethods['mail'] = 'PHP mail function'; + //$listofmethods['simplemail']='Simplemail class'; + $listofmethods['smtps'] = 'SMTP/SMTPS socket library'; - // EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent. - // You ensure that every user is using its own SMTP server when using the mass emailing module. - $linktoadminemailbefore = ''; - $linktoadminemailend = ''; - $this->error = $langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]); - $this->errors[] = $langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]); - $this->error .= '
'.$langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']); - $this->errors[] = $langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']); - if (!empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) - { - $this->error .= '
'.$langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS); - $this->errors[] = $langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS); - } - return false; + // EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent. + // You ensure that every user is using its own SMTP server when using the mass emailing module. + $linktoadminemailbefore = ''; + $linktoadminemailend = ''; + $this->error = $langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]); + $this->errors[] = $langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]); + $this->error .= '
'.$langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']); + $this->errors[] = $langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']); + if (!empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) + { + $this->error .= '
'.$langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS); + $this->errors[] = $langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS); + } + return false; } // Check number of recipient is lower or equal than MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL @@ -607,21 +642,18 @@ class CMailFile $keyforsmtppw = 'MAIN_MAIL_SMTPS_PW'; $keyfortls = 'MAIN_MAIL_EMAIL_TLS'; $keyforstarttls = 'MAIN_MAIL_EMAIL_STARTTLS'; - if ($this->sendcontext == 'emailing' && !empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') - { - $keyforsmtpserver = 'MAIN_MAIL_SMTP_SERVER_EMAILING'; - $keyforsmtpport = 'MAIN_MAIL_SMTP_PORT_EMAILING'; - $keyforsmtpid = 'MAIN_MAIL_SMTPS_ID_EMAILING'; - $keyforsmtppw = 'MAIN_MAIL_SMTPS_PW_EMAILING'; - $keyfortls = 'MAIN_MAIL_EMAIL_TLS_EMAILING'; - $keyforstarttls = 'MAIN_MAIL_EMAIL_STARTTLS_EMAILING'; - } - - if (!empty($conf->global->MAIN_MAIL_FORCE_SENDTO)) - { - $this->addr_to = $conf->global->MAIN_MAIL_FORCE_SENDTO; - $this->addr_cc = ''; - $this->addr_bcc = ''; + if (!empty($this->sendcontext)) { + $smtpContextKey = strtoupper($this->sendcontext); + $keyForSMTPSendMode = 'MAIN_MAIL_SENDMODE_'.$smtpContextKey; + $smtpContextSendMode = $conf->global->{$keyForSMTPSendMode}; + if (!empty($smtpContextSendMode) && $smtpContextSendMode != 'default') { + $keyforsmtpserver = 'MAIN_MAIL_SMTP_SERVER_'.$smtpContextKey; + $keyforsmtpport = 'MAIN_MAIL_SMTP_PORT_'.$smtpContextKey; + $keyforsmtpid = 'MAIN_MAIL_SMTPS_ID_'.$smtpContextKey; + $keyforsmtppw = 'MAIN_MAIL_SMTPS_PW_'.$smtpContextKey; + $keyfortls = 'MAIN_MAIL_EMAIL_TLS_'.$smtpContextKey; + $keyforstarttls = 'MAIN_MAIL_EMAIL_STARTTLS_'.$smtpContextKey; + } } // Action according to choosed sending method @@ -707,9 +739,7 @@ class CMailFile $this->error .= ".
"; $this->error .= $langs->trans("ErrorPhpMailDelivery"); dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); - } - else - { + } else { dol_syslog("CMailFile::sendfile: mail end success", LOG_DEBUG); } } @@ -722,8 +752,7 @@ class CMailFile // Restore parameters if (!empty($conf->global->$keyforsmtpserver)) ini_restore('SMTP'); if (!empty($conf->global->$keyforsmtpport)) ini_restore('smtp_port'); - } - elseif ($this->sendmode == 'smtps') + } elseif ($this->sendmode == 'smtps') { if (!is_object($this->smtps)) { @@ -768,14 +797,14 @@ class CMailFile $from = $this->smtps->getFrom('org'); if ($res && !$from) { - $this->error = "Failed to send mail with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport."
Sender address '$from' invalid"; + $this->error = "Failed to send mail with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport." - Sender address '$from' invalid"; dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); $res = false; } $dest = $this->smtps->getTo(); if ($res && !$dest) { - $this->error = "Failed to send mail with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport."
Recipient address '$dest' invalid"; + $this->error = "Failed to send mail with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport." - Recipient address '$dest' invalid"; dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); $res = false; } @@ -794,20 +823,17 @@ class CMailFile { dol_syslog("CMailFile::sendfile: mail end success", LOG_DEBUG); $res = true; - } - else - { + } else { if (empty($this->error)) $this->error = $result; - dol_syslog("CMailFile::sendfile: mail end error with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport."
".$this->error, LOG_ERR); + dol_syslog("CMailFile::sendfile: mail end error with smtps lib to HOST=".$server.", PORT=".$conf->global->$keyforsmtpport." - ".$this->error, LOG_ERR); $res = false; } } - } - elseif ($this->sendmode == 'swiftmailer') + } elseif ($this->sendmode == 'swiftmailer') { - // Use Swift Mailer library - // ------------------------------------------ - require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/swift_required.php'; + // Use Swift Mailer library + // ------------------------------------------ + require_once DOL_DOCUMENT_ROOT.'/includes/swiftmailer/lib/swift_required.php'; // Clean parameters if (empty($conf->global->$keyforsmtpserver)) $conf->global->$keyforsmtpserver = ini_get('SMTP'); @@ -826,22 +852,22 @@ class CMailFile //$smtps->_msgReplyTo = 'reply@web.com'; // Switch content encoding to base64 - avoid the doubledot issue with quoted-printable - $contentEncoderBase64 = new Swift_Mime_ContentEncoder_Base64ContentEncoder(); - $this->message->setEncoder($contentEncoderBase64); + $contentEncoderBase64 = new Swift_Mime_ContentEncoder_Base64ContentEncoder(); + $this->message->setEncoder($contentEncoderBase64); // Create the Mailer using your created Transport $this->mailer = new Swift_Mailer($this->transport); - // DKIM SIGN - if ($conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED) { - $privateKey = $conf->global->MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY; - $domainName = $conf->global->MAIN_MAIL_EMAIL_DKIM_DOMAIN; - $selector = $conf->global->MAIN_MAIL_EMAIL_DKIM_SELECTOR; - $signer = new Swift_Signers_DKIMSigner($privateKey, $domainName, $selector); - $this->message->attachSigner($signer->ignoreHeader('Return-Path')); - } + // DKIM SIGN + if ($conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED) { + $privateKey = $conf->global->MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY; + $domainName = $conf->global->MAIN_MAIL_EMAIL_DKIM_DOMAIN; + $selector = $conf->global->MAIN_MAIL_EMAIL_DKIM_SELECTOR; + $signer = new Swift_Signers_DKIMSigner($privateKey, $domainName, $selector); + $this->message->attachSigner($signer->ignoreHeader('Return-Path')); + } - if (!empty($conf->global->MAIN_MAIL_DEBUG)) { + if (!empty($conf->global->MAIN_MAIL_DEBUG)) { // To use the ArrayLogger $this->logger = new Swift_Plugins_Loggers_ArrayLogger(); // Or to use the Echo Logger @@ -860,14 +886,10 @@ class CMailFile if (!empty($this->error) || !$result) { dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); $res = false; - } - else - { + } else { dol_syslog("CMailFile::sendfile: mail end success", LOG_DEBUG); } - } - else - { + } else { // Send mail method not correctly defined // -------------------------------------- @@ -883,9 +905,7 @@ class CMailFile return $reshook; } - } - else - { + } else { $this->error = 'No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS'; dol_syslog("CMailFile::sendfile: ".$this->error, LOG_WARNING); } @@ -907,7 +927,7 @@ class CMailFile return '=?'.$conf->file->character_set_client.'?B?'.base64_encode($stringtoencode).'?='; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Read a file on disk and return encoded content for emails (mode = 'mail') * @@ -916,7 +936,7 @@ class CMailFile */ private function _encode_file($sourcefile) { - // phpcs:enable + // phpcs:enable $newsourcefile = dol_osencode($sourcefile); if (is_readable($newsourcefile)) @@ -924,9 +944,7 @@ class CMailFile $contents = file_get_contents($newsourcefile); // Need PHP 4.3 $encoded = chunk_split(base64_encode($contents), 76, $this->eol); // 76 max is defined into http://tools.ietf.org/html/rfc2047 return $encoded; - } - else - { + } else { $this->error = "Error: Can't read file '".$sourcefile."' into _encode_file"; dol_syslog("CMailFile::encode_file: ".$this->error, LOG_ERR); return -1; @@ -934,7 +952,7 @@ class CMailFile } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Write content of a SMTP request into a dump file (mode = all) * Used for debugging. @@ -944,7 +962,7 @@ class CMailFile */ public function dump_mail() { - // phpcs:enable + // phpcs:enable global $conf, $dolibarr_main_data_root; if (@is_writeable($dolibarr_main_data_root)) // Avoid fatal error on fopen with open_basedir @@ -957,12 +975,10 @@ class CMailFile fputs($fp, $this->headers); fputs($fp, $this->eol); // This eol is added by the mail function, so we add it in log fputs($fp, $this->message); - } - elseif ($this->sendmode == 'smtps') + } elseif ($this->sendmode == 'smtps') { fputs($fp, $this->smtps->log); // this->smtps->log is filled only if MAIN_MAIL_DEBUG was set to on - } - elseif ($this->sendmode == 'swiftmailer') + } elseif ($this->sendmode == 'swiftmailer') { fputs($fp, $this->logger->dump()); // this->logger is filled only if MAIN_MAIL_DEBUG was set to on } @@ -991,9 +1007,7 @@ class CMailFile $out .= ">"; $out .= $msg; $out .= ""; - } - else - { + } else { $out = $msg; } @@ -1029,7 +1043,7 @@ class CMailFile } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Create SMTP headers (mode = 'mail') * @@ -1037,7 +1051,7 @@ class CMailFile */ public function write_smtpheaders() { - // phpcs:enable + // phpcs:enable global $conf; $out = ""; @@ -1074,9 +1088,7 @@ class CMailFile $out .= 'Message-ID: <'.$this->msgid.">".$this->eol2; // Uppercase seems replaced by phpmail $out .= 'References: <'.$this->msgid.">".$this->eol2; $out .= 'X-Dolibarr-TRACKID: '.$trackid.'@'.$host.$this->eol2; - } - else - { + } else { $this->msgid = time().'.phpmail@'.$host; $out .= 'Message-ID: <'.$this->msgid.">".$this->eol2; } @@ -1095,7 +1107,7 @@ class CMailFile } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Create header MIME (mode = 'mail') * @@ -1105,7 +1117,7 @@ class CMailFile */ public function write_mimeheaders($filename_list, $mimefilename_list) { - // phpcs:enable + // phpcs:enable $mimedone = 0; $out = ""; @@ -1126,7 +1138,7 @@ class CMailFile return $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return email content (mode = 'mail') * @@ -1135,7 +1147,7 @@ class CMailFile */ public function write_body($msgtext) { - // phpcs:enable + // phpcs:enable global $conf; $out = ''; @@ -1205,9 +1217,7 @@ class CMailFile { $out .= "--".$this->alternative_boundary."--".$this->eol; } - } - else - { + } else { $out .= "Content-Type: text/plain; charset=".$conf->file->character_set_client.$this->eol; //$out.= "Content-Transfer-Encoding: 7bit".$this->eol; $out .= $this->eol.$strContent.$this->eol; @@ -1228,7 +1238,7 @@ class CMailFile return $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Attach file to email (mode = 'mail') * @@ -1239,7 +1249,7 @@ class CMailFile */ public function write_files($filename_list, $mimetype_list, $mimefilename_list) { - // phpcs:enable + // phpcs:enable $out = ''; $filename_list_size = count($filename_list); @@ -1265,9 +1275,7 @@ class CMailFile $out .= $encoded; $out .= $this->eol; //$out.= $this->eol; - } - else - { + } else { return $encoded; } } @@ -1277,7 +1285,7 @@ class CMailFile } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Attach an image to email (mode = 'mail') * @@ -1286,7 +1294,7 @@ class CMailFile */ public function write_images($images_list) { - // phpcs:enable + // phpcs:enable $out = ''; if (is_array($images_list)) @@ -1310,7 +1318,7 @@ class CMailFile } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Try to create a socket connection * @@ -1320,7 +1328,7 @@ class CMailFile */ public function check_server_port($host, $port) { - // phpcs:enable + // phpcs:enable global $conf; $_retVal = 0; @@ -1351,7 +1359,7 @@ class CMailFile dol_syslog("Try socket connection to host=".$host." port=".$port); //See if we can connect to the SMTP server - if ($socket = @fsockopen( + if ($socket = @fsockopen( $host, // Host to test, IP or domain. Add ssl:// for SSL/TLS. $port, // which Port number to use $errno, // actual system level error @@ -1365,16 +1373,14 @@ class CMailFile // Check response from Server if ($_retVal = $this->server_parse($socket, "220")) $_retVal = $socket; - } - else - { + } else { $this->error = utf8_check('Error '.$errno.' - '.$errstr) ? 'Error '.$errno.' - '.$errstr : utf8_encode('Error '.$errno.' - '.$errstr); } } return $_retVal; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * This function has been modified as provided by SirSir to allow multiline responses when * using SMTP Extensions. @@ -1385,7 +1391,7 @@ class CMailFile */ public function server_parse($socket, $response) { - // phpcs:enable + // phpcs:enable $_retVal = true; // Indicates if Object was created or not $server_response = ''; @@ -1487,16 +1493,12 @@ class CMailFile } $i++; } - } - else - { + } else { return -1; } return 1; - } - else - { + } else { return 0; } } @@ -1513,8 +1515,8 @@ class CMailFile * If format 2: 'john@doe.com' * If format 3: '' or '"John Doe" ' or '"=?UTF-8?B?Sm9obiBEb2U=?=" ' * If format 4: 'John Doe' or 'john@doe.com' if no label exists - * If format 5: John Doe or john@doe.com if no label exists - * @see getArrayAddress() + * If format 5: John Doe or john@doe.com if no label exists + * @see getArrayAddress() */ public static function getValidAddress($address, $format, $encode = 0, $maxnumberofemail = 0) { @@ -1532,9 +1534,7 @@ class CMailFile { $name = trim($regs[1]); $email = trim($regs[2]); - } - else - { + } else { $name = ''; $email = trim($val); } @@ -1544,10 +1544,10 @@ class CMailFile $i++; $newemail = ''; - if ($format == 5) { - $newemail = $name ? $name : $email; - $newemail = ''.$newemail.''; - } + if ($format == 5) { + $newemail = $name ? $name : $email; + $newemail = ''.$newemail.''; + } if ($format == 4) { $newemail = $name ? $name : $email; @@ -1603,9 +1603,7 @@ class CMailFile { $name = trim($regs[1]); $email = trim($regs[2]); - } - else - { + } else { $name = null; $email = trim($val); } diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index 4cd06a81233..4f1959d2707 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -131,7 +131,7 @@ class CSMSFile $sms->nostop = $this->nostop; $sms->socid = $this->socid; - $sms->contactid = $this->contactid; + $sms->contact_id = $this->contact_id; $sms->project = $this->fk_project; $res = $sms->SmsSend(); @@ -140,21 +140,17 @@ class CSMSFile { $this->error = $sms->error; dol_syslog("CSMSFile::sendfile: sms send error=".$this->error, LOG_ERR); - } - else - { + } else { dol_syslog("CSMSFile::sendfile: sms send success with id=".$res, LOG_DEBUG); //var_dump($res); // 1973128 if (!empty($conf->global->MAIN_SMS_DEBUG)) $this->dump_sms_result($res); } - } - elseif (!empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' + } elseif (!empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' { $tmp = explode('@', $conf->global->MAIN_SMS_SENDMODE); $classfile = $tmp[0]; $module = (empty($tmp[1]) ? $tmp[0] : $tmp[1]); dol_include_once('/'.$module.'/class/'.$classfile.'.class.php'); - try - { + try { $classname = ucfirst($classfile); $sms = new $classname($this->db); $sms->expe = $this->addr_from; @@ -166,7 +162,7 @@ class CSMSFile $sms->nostop = $this->nostop; $sms->socid = $this->socid; - $sms->contactid = $this->contactid; + $sms->contact_id = $this->contact_id; $sms->fk_project = $this->fk_project; $res = $sms->SmsSend(); @@ -176,29 +172,22 @@ class CSMSFile if ($res <= 0) { dol_syslog("CSMSFile::sendfile: sms send error=".$this->error, LOG_ERR); - } - else - { + } else { dol_syslog("CSMSFile::sendfile: sms send success with id=".$res, LOG_DEBUG); //var_dump($res); // 1973128 if (!empty($conf->global->MAIN_SMS_DEBUG)) $this->dump_sms_result($res); } - } - catch (Exception $e) + } catch (Exception $e) { dol_print_error('', 'Error to get list of senders: '.$e->getMessage()); } - } - else - { + } else { // Send sms method not correctly defined // -------------------------------------- return 'Bad value for MAIN_SMS_SENDMODE constant'; } - } - else - { + } else { $this->error = 'No sms sent. Feature is disabled by option MAIN_DISABLE_ALL_SMS'; dol_syslog("CSMSFile::sendfile: ".$this->error, LOG_WARNING); } diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index a70a2f9cafc..cf671eb57ca 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -138,9 +138,7 @@ class Ccountry // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -184,13 +182,10 @@ class Ccountry // extends CommonObject $this->db->free($resql); return 1; - } - else { + } else { return 0; } - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -243,9 +238,7 @@ class Ccountry // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -283,9 +276,7 @@ class Ccountry // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index eff934b635f..91fba374181 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -156,9 +156,7 @@ class Comment extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -216,9 +214,7 @@ class Comment extends CommonObject if ($num_rows) return 1; else return 0; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -280,9 +276,7 @@ class Comment extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index df80aab7a1f..f610e6bb952 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -218,8 +218,8 @@ abstract class CommonDocGenerator 'company_idprof6'=>$object->idprof6, 'company_note_public'=>$object->note_public, 'company_note_private'=>$object->note_private, - 'company_default_bank_iban'=>$object->bank_account->iban, - 'company_default_bank_bic'=>$object->bank_account->bic + 'company_default_bank_iban'=>(is_object($object->bank_account) ? $object->bank_account->iban : ''), + 'company_default_bank_bic'=>(is_object($object->bank_account) ? $object->bank_account->bic : '') ); // Retrieve extrafields @@ -794,12 +794,10 @@ abstract class CommonDocGenerator $object->array_options['options_'.$key.'_currency'] = price($object->array_options['options_'.$key], 0, $outputlangs, 0, 0, -1, $conf->currency); //Add value to store price with currency $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency'])); - } - elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'select') + } elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'select') { $object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_'.$key]]; - } - elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') { + } elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') { $valArray = explode(',', $object->array_options['options_'.$key]); $output = array(); foreach ($extrafields->attributes[$object->table_element]['param'][$key]['options'] as $keyopt=>$valopt) { @@ -808,8 +806,7 @@ abstract class CommonDocGenerator } } $object->array_options['options_'.$key] = implode(', ', $output); - } - elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'date') + } elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'date') { if (strlen($object->array_options['options_'.$key]) > 0) { @@ -817,17 +814,14 @@ abstract class CommonDocGenerator $object->array_options['options_'.$key] = dol_print_date($date, 'day'); // using company output language $object->array_options['options_'.$key.'_locale'] = dol_print_date($date, 'day', 'tzserver', $outputlangs); // using output language format $object->array_options['options_'.$key.'_rfc'] = dol_print_date($date, 'dayrfc'); // international format - } - else - { + } else { $object->array_options['options_'.$key] = ''; $object->array_options['options_'.$key.'_locale'] = ''; $object->array_options['options_'.$key.'_rfc'] = ''; } $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); - } - elseif ($extrafields->attributes[$object->table_element]['label'][$key] == 'datetime') + } elseif ($extrafields->attributes[$object->table_element]['label'][$key] == 'datetime') { $datetime = $object->array_options['options_'.$key]; $object->array_options['options_'.$key] = ($datetime != "0000-00-00 00:00:00" ?dol_print_date($object->array_options['options_'.$key], 'dayhour') : ''); // using company output language @@ -835,8 +829,7 @@ abstract class CommonDocGenerator $object->array_options['options_'.$key.'_rfc'] = ($datetime != "0000-00-00 00:00:00" ?dol_print_date($object->array_options['options_'.$key], 'dayhourrfc') : ''); // international format $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); - } - elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'link') + } elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'link') { $id = $object->array_options['options_'.$key]; if ($id != "") @@ -946,8 +939,7 @@ abstract class CommonDocGenerator if (empty($colDef['width'])) { $countFlexCol++; - } - else { + } else { $totalDefinedColWidth += $colDef['width']; } } @@ -957,16 +949,14 @@ abstract class CommonDocGenerator // setting empty conf with default if (!empty($colDef['title'])) { $colDef['title'] = array_replace($this->defaultTitlesFieldsStyle, $colDef['title']); - } - else { + } else { $colDef['title'] = $this->defaultTitlesFieldsStyle; } // setting empty conf with default if (!empty($colDef['content'])) { $colDef['content'] = array_replace($this->defaultContentsFieldsStyle, $colDef['content']); - } - else { + } else { $colDef['content'] = $this->defaultContentsFieldsStyle; } @@ -1082,7 +1072,8 @@ abstract class CommonDocGenerator $parameters = array( 'curY' => &$curY, 'columnText' => $columnText, - 'colKey' => $colKey + 'colKey' => $colKey, + 'pdf' => &$pdf, ); $reshook = $hookmanager->executeHooks('printStdColumnContent', $parameters, $this); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -1296,7 +1287,7 @@ abstract class CommonDocGenerator { // Sort extrafields by rank uasort($fields, function ($a, $b) { - return ($a->rank > $b->rank) ? -1 : 1; + return ($a->rank > $b->rank) ? 1 : -1; }); // define some HTML content with style @@ -1322,8 +1313,7 @@ abstract class CommonDocGenerator $html .= $field->content; $i++; } - } - elseif ($params['display'] == 'table') { + } elseif ($params['display'] == 'table') { // Display in table format $html .= ''; @@ -1388,8 +1378,7 @@ abstract class CommonDocGenerator { if (!empty($this->cols[$colKey]['status'])) { return true; - } - else return false; + } else return false; } /** @@ -1439,8 +1428,7 @@ abstract class CommonDocGenerator if (is_object($outputlangsbis)) { // set cell padding with column title definition $pdf->setCellPaddings($colDef['title']['padding'][3], $colDef['title']['padding'][0], $colDef['title']['padding'][1], 0.5); - } - else { + } else { // set cell padding with column title definition $pdf->setCellPaddings($colDef['title']['padding'][3], $colDef['title']['padding'][0], $colDef['title']['padding'][1], $colDef['title']['padding'][2]); } diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index c37ece437d4..9e78d186172 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -140,9 +140,7 @@ abstract class CommonInvoice extends CommonObject $this->db->free($resql); if ($multicurrency) return $obj->multicurrency_amount; else return $obj->amount; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -170,9 +168,7 @@ abstract class CommonInvoice extends CommonObject if ($result >= 0) { return $result; - } - else - { + } else { $this->error = $discountstatic->error; return -1; } @@ -193,9 +189,7 @@ abstract class CommonInvoice extends CommonObject if ($result >= 0) { return $result; - } - else - { + } else { $this->error = $discountstatic->error; return -1; } @@ -216,9 +210,7 @@ abstract class CommonInvoice extends CommonObject if ($result >= 0) { return $result; - } - else - { + } else { $this->error = $discountstatic->error; return -1; } @@ -248,9 +240,7 @@ abstract class CommonInvoice extends CommonObject $idarray[] = $row[0]; $i++; } - } - else - { + } else { dol_print_error($this->db); } return $idarray; @@ -284,15 +274,11 @@ abstract class CommonInvoice extends CommonObject { // If there is any return $obj->rowid; - } - else - { + } else { // If no invoice replaces it return 0; } - } - else - { + } else { return -1; } } @@ -311,6 +297,7 @@ abstract class CommonInvoice extends CommonObject $table2 = 'paiement'; $field = 'fk_facture'; $field2 = 'fk_paiement'; + $field3=', p.ref_ext'; $sharedentity = 'facture'; if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') { @@ -318,10 +305,11 @@ abstract class CommonInvoice extends CommonObject $table2 = 'paiementfourn'; $field = 'fk_facturefourn'; $field2 = 'fk_paiementfourn'; + $field3=''; $sharedentity = 'facture_fourn'; } - $sql = 'SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code'; + $sql = 'SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code'.$field3; $sql .= ' FROM '.MAIN_DB_PREFIX.$table.' as pf, '.MAIN_DB_PREFIX.$table2.' as p, '.MAIN_DB_PREFIX.'c_paiement as t'; $sql .= ' WHERE pf.'.$field.' = '.$this->id; //$sql.= ' WHERE pf.'.$field.' = 1'; @@ -339,7 +327,11 @@ abstract class CommonInvoice extends CommonObject while ($i < $num) { $obj = $this->db->fetch_object($resql); - $retarray[] = array('amount'=>$obj->amount, 'type'=>$obj->code, 'date'=>$obj->datep, 'num'=>$obj->num, 'ref'=>$obj->ref); + $tmp = array('amount'=>$obj->amount,'type'=>$obj->code, 'date'=>$obj->datep, 'num'=>$obj->num, 'ref'=>$obj->ref); + if (!empty($field3)) { + $tmp['ref_ext'] = $obj->ref_ext; + } + $retarray[]=$tmp; $i++; } $this->db->free($resql); @@ -352,8 +344,7 @@ abstract class CommonInvoice extends CommonObject $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$this->id; $sql .= ' AND (f.type = 2 OR f.type = 0 OR f.type = 3)'; // Find discount coming from credit note or excess received or deposits (payments from deposits are always null except if FACTURE_DEPOSITS_ARE_JUST_PAYMENTS is set) - } - elseif ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') + } elseif ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') { $sql = 'SELECT rc.amount_ttc as amount, rc.multicurrency_amount_ttc as multicurrency_amount, rc.datec as date, f.ref as ref, rc.description as type'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; @@ -372,15 +363,12 @@ abstract class CommonInvoice extends CommonObject $obj = $this->db->fetch_object($resql); if ($multicurrency) { $retarray[] = array('amount'=>$obj->multicurrency_amount, 'type'=>$obj->type, 'date'=>$obj->date, 'num'=>'0', 'ref'=>$obj->ref); - } - else { + } else { $retarray[] = array('amount'=>$obj->amount, 'type'=>$obj->type, 'date'=>$obj->date, 'num'=>'', 'ref'=>$obj->ref); } $i++; } - } - else - { + } else { $this->error = $this->db->lasterror(); dol_print_error($this->db); return array(); @@ -389,9 +377,7 @@ abstract class CommonInvoice extends CommonObject } return $retarray; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_print_error($this->db); return array(); @@ -482,9 +468,7 @@ abstract class CommonInvoice extends CommonObject { $alreadydispatched = $obj->nb; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -549,41 +533,33 @@ abstract class CommonInvoice extends CommonObject if ($status == 0) { $labelStatus = $langs->trans('BillStatusDraft'); $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusDraft'); - } - elseif (($status == 3 || $status == 2) && $alreadypaid <= 0) { + } elseif (($status == 3 || $status == 2) && $alreadypaid <= 0) { $labelStatus = $langs->trans('BillStatusClosedUnpaid'); $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusClosedUnpaid'); $statusType = 'status5'; - } - elseif (($status == 3 || $status == 2) && $alreadypaid > 0) { + } elseif (($status == 3 || $status == 2) && $alreadypaid > 0) { $labelStatus = $langs->trans('BillStatusClosedPaidPartially'); $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusClosedPaidPartially'); $statusType = 'status9'; - } - elseif ($alreadypaid <= 0) { + } elseif ($alreadypaid <= 0) { $labelStatus = $langs->trans('BillStatusNotPaid'); $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusNotPaid'); $statusType = 'status1'; - } - else { + } else { $labelStatus = $langs->trans('BillStatusStarted'); $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusStarted'); $statusType = 'status3'; } - } - else - { + } else { $statusType = 'status6'; if ($type == self::TYPE_CREDIT_NOTE) { $labelStatus = $langs->trans('BillStatusPaidBackOrConverted'); // credit note $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted'); // credit note - } - elseif ($type == self::TYPE_DEPOSIT) { + } elseif ($type == self::TYPE_DEPOSIT) { $labelStatus = $langs->trans('BillStatusConverted'); // deposit invoice $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusConverted'); // deposit invoice - } - else { + } else { $labelStatus = $langs->trans('BillStatusPaid'); $labelStatusShort = $langs->trans('Bill'.$prefix.'StatusPaid'); } @@ -629,9 +605,7 @@ abstract class CommonInvoice extends CommonObject $cdr_type = $obj->type_cdr; $cdr_decalage = $obj->decalage; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -657,9 +631,7 @@ abstract class CommonInvoice extends CommonObject { $mois = 1; $annee += 1; - } - else - { + } else { $mois += 1; } // We move at the beginning of the next month, and we take a day off @@ -682,11 +654,153 @@ abstract class CommonInvoice extends CommonObject if ($diff < 0) $datelim = $date_lim_current; else $datelim = $date_lim_next; + } else { + return 'Bad value for type_cdr in database for record cond_reglement = '.$cond_reglement; } - else return 'Bad value for type_cdr in database for record cond_reglement = '.$cond_reglement; return $datelim; } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Create a withdrawal request for a direct debit order or a credit transfer order. + * Use the remain to pay excluding all existing open direct debit requests. + * + * @param User $fuser User asking the direct debit transfer + * @param float $amount Amount we request direct debit for + * @param string $type 'direct-debit' or 'bank-transfer' + * @param string $sourcetype Source ('facture' or 'supplier_invoice') + * @return int <0 if KO, >0 if OK + */ + public function demande_prelevement($fuser, $amount = 0, $type = 'direct-debit', $sourcetype = 'facture') + { + // phpcs:enable + global $conf; + + $error = 0; + + dol_syslog(get_class($this)."::demande_prelevement", LOG_DEBUG); + + if ($this->statut > self::STATUS_DRAFT && $this->paye == 0) + { + require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; + $bac = new CompanyBankAccount($this->db); + $bac->fetch(0, $this->socid); + + $sql = 'SELECT count(*)'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'prelevement_facture_demande'; + if ($type == 'bank-transfer') { + $sql .= ' WHERE fk_facture_fourn = '.$this->id; + } else { + $sql .= ' WHERE fk_facture = '.$this->id; + } + $sql .= ' AND ext_payment_id IS NULL'; // To exclude record done for some online payments + $sql .= ' AND traite = 0'; + + dol_syslog(get_class($this)."::demande_prelevement", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $row = $this->db->fetch_row($resql); + if ($row[0] == 0) + { + $now = dol_now(); + + $totalpaye = $this->getSommePaiement(); + $totalcreditnotes = $this->getSumCreditNotesUsed(); + $totaldeposits = $this->getSumDepositsUsed(); + //print "totalpaye=".$totalpaye." totalcreditnotes=".$totalcreditnotes." totaldeposts=".$totaldeposits; + + // We can also use bcadd to avoid pb with floating points + // For example print 239.2 - 229.3 - 9.9; does not return 0. + //$resteapayer=bcadd($this->total_ttc,$totalpaye,$conf->global->MAIN_MAX_DECIMALS_TOT); + //$resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT); + if (empty($amount)) $amount = price2num($this->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); + + if (is_numeric($amount) && $amount != 0) + { + $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'prelevement_facture_demande('; + if ($type == 'bank-transfer') { + $sql .= 'fk_facture_fourn, '; + } else { + $sql .= 'fk_facture, '; + } + $sql .= ' amount, date_demande, fk_user_demande, code_banque, code_guichet, number, cle_rib, sourcetype, entity)'; + $sql .= ' VALUES ('.$this->id; + $sql .= ",'".price2num($amount)."'"; + $sql .= ",'".$this->db->idate($now)."'"; + $sql .= ",".$fuser->id; + $sql .= ",'".$this->db->escape($bac->code_banque)."'"; + $sql .= ",'".$this->db->escape($bac->code_guichet)."'"; + $sql .= ",'".$this->db->escape($bac->number)."'"; + $sql .= ",'".$this->db->escape($bac->cle_rib)."'"; + $sql .= ",'".$this->db->escape($sourcetype)."'"; + $sql .= ",".$conf->entity; + $sql .= ")"; + + dol_syslog(get_class($this)."::demande_prelevement", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + $this->error = $this->db->lasterror(); + dol_syslog(get_class($this).'::demandeprelevement Erreur'); + $error++; + } + } else { + $this->error = 'WithdrawRequestErrorNilAmount'; + dol_syslog(get_class($this).'::demandeprelevement WithdrawRequestErrorNilAmount'); + $error++; + } + + if (!$error) { + // Force payment mode of invoice to withdraw + $payment_mode_id = dol_getIdFromCode($this->db, 'PRE', 'c_paiement', 'code', 'id', 1); + if ($payment_mode_id > 0) { + $result = $this->setPaymentMethods($payment_mode_id); + } + } + + if ($error) return -1; + return 1; + } else { + $this->error = "A request already exists"; + dol_syslog(get_class($this).'::demandeprelevement Impossible de creer une demande, demande deja en cours'); + return 0; + } + } else { + $this->error = $this->db->error(); + dol_syslog(get_class($this).'::demandeprelevement Erreur -2'); + return -2; + } + } else { + $this->error = "Status of invoice does not allow this"; + dol_syslog(get_class($this)."::demandeprelevement ".$this->error." $this->statut, $this->paye, $this->mode_reglement_id"); + return -3; + } + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Remove a direct debit request or a credit transfer request + * + * @param User $fuser User making delete + * @param int $did ID of request to delete + * @return int <0 if OK, >0 if KO + */ + public function demande_prelevement_delete($fuser, $did) + { + // phpcs:enable + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'prelevement_facture_demande'; + $sql .= ' WHERE rowid = '.$did; + $sql .= ' AND traite = 0'; + if ($this->db->query($sql)) + { + return 0; + } else { + $this->error = $this->db->lasterror(); + dol_syslog(get_class($this).'::demande_prelevement_delete Error '.$this->error); + return -1; + } + } } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6148b55a5cf..55b5628705d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2010-2015 Juanjo Menent + * Copyright (C) 2010-2020 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2011-2019 Philippe Grand * Copyright (C) 2012-2015 Marcos García @@ -222,9 +222,9 @@ abstract class CommonObject * @var string * @see getFullAddress(), isInEEC(), country */ - public $country_code; + public $country_code; - /** + /** * @var string * @see getFullAddress() */ @@ -238,21 +238,27 @@ abstract class CommonObject /** * @var string - * @see getFullAddress(), state + * @see getFullAddress(), $state */ - public $state_code; + public $state_code; - /** - * @var string - * @see getFullAddress(), region + /** + * @var int + * @see getFullAddress(), $region_code, $region */ - public $region; + public $region_id; /** * @var string - * @see getFullAddress(), region + * @see getFullAddress(), $region_id, $region */ - public $region_code; + public $region_code; + + /** + * @var string + * @see getFullAddress(), $region_id, $region_code + */ + public $region; /** * @var int @@ -314,7 +320,7 @@ abstract class CommonObject * @var string * @see SetDocModel() */ - public $modelpdf; + public $model_pdf; /** * @var string @@ -410,25 +416,25 @@ abstract class CommonObject */ public $name; - /** - * @var string The lastname - */ + /** + * @var string The lastname + */ public $lastname; - /** - * @var string The firstname - */ + /** + * @var string The firstname + */ public $firstname; - /** - * @var string The civility code, not an integer - */ + /** + * @var string The civility code, not an integer + */ public $civility_id; // Dates /** - * @var integer|string date_creation - */ + * @var integer|string date_creation + */ public $date_creation; /** @@ -443,10 +449,20 @@ abstract class CommonObject public $next_prev_filter; + /** + * @var array List of child tables. To test if we can delete object. + */ + protected $childtables = array(); + + /** + * @var array List of child tables. To know object to delete on cascade. + * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will + * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object + */ + protected $childtablesoncascade = array(); // No constructor as it is an abstract class - /** * Check an object id/ref exists * If you don't need/want to instantiate object and just need to know if object exists, use this method instead of fetch @@ -505,16 +521,16 @@ abstract class CommonObject */ public function getFormatedCustomerRef($objref) { - global $hookmanager; + global $hookmanager; - $parameters = array('objref'=>$objref); - $action = ''; - $reshook = $hookmanager->executeHooks('getFormatedCustomerRef', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) - { - return $hookmanager->resArray['objref']; - } - return $objref.(isset($hookmanager->resArray['objref']) ? $hookmanager->resArray['objref'] : ''); + $parameters = array('objref'=>$objref); + $action = ''; + $reshook = $hookmanager->executeHooks('getFormatedCustomerRef', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) + { + return $hookmanager->resArray['objref']; + } + return $objref.(isset($hookmanager->resArray['objref']) ? $hookmanager->resArray['objref'] : ''); } /** @@ -525,16 +541,16 @@ abstract class CommonObject */ public function getFormatedSupplierRef($objref) { - global $hookmanager; + global $hookmanager; - $parameters = array('objref'=>$objref); - $action = ''; - $reshook = $hookmanager->executeHooks('getFormatedSupplierRef', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) - { - return $hookmanager->resArray['objref']; - } - return $objref.(isset($hookmanager->resArray['objref']) ? $hookmanager->resArray['objref'] : ''); + $parameters = array('objref'=>$objref); + $action = ''; + $reshook = $hookmanager->executeHooks('getFormatedSupplierRef', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) + { + return $hookmanager->resArray['objref']; + } + return $objref.(isset($hookmanager->resArray['objref']) ? $hookmanager->resArray['objref'] : ''); } /** @@ -606,15 +622,15 @@ abstract class CommonObject $this->country = $tmparray['label']; } - if ($withregion && $this->state_id && (empty($this->state_code) || empty($this->state) || empty($this->region) || empty($this->region_code))) - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; - $tmparray = getState($this->state_id, 'all', 0, 1); + if ($withregion && $this->state_id && (empty($this->state_code) || empty($this->state) || empty($this->region) || empty($this->region_code))) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; + $tmparray = getState($this->state_id, 'all', 0, 1); $this->state_code = $tmparray['code']; $this->state = $tmparray['label']; $this->region_code = $tmparray['region_code']; $this->region = $tmparray['region']; - } + } return dol_format_address($this, $withcountry, $sep, '', 0, $extralangcode); } @@ -635,6 +651,7 @@ abstract class CommonObject $contactid = 0; $thirdpartyid = 0; + $elementforaltlanguage = $this->element; if ($this->element == 'societe') { $thirdpartyid = $this->id; @@ -682,10 +699,11 @@ abstract class CommonObject include_once DOL_DOCUMENT_ROOT.'/core/class/extralanguages.class.php'; $extralanguages = new ExtraLanguages($this->db); } - $extralanguages->fetch_name_extralanguages('societe'); + $extralanguages->fetch_name_extralanguages($elementforaltlanguage); - if (!empty($extralanguages->attributes['societe']['address']) || !empty($extralanguages->attributes['societe']['town'])) + if (!empty($extralanguages->attributes[$elementforaltlanguage]['address']) || !empty($extralanguages->attributes[$elementforaltlanguage]['town'])) { + $out .= "\n"; $this->fetchValuesForExtraLanguages(); if (!is_object($form)) $form = new Form($this->db); $htmltext = ''; @@ -703,12 +721,11 @@ abstract class CommonObject if (!in_array($this->country_code, $countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress && empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) { - if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 && $this->region) { - $out .= ($outdone ? ' - ' : '').$this->region.' - '.$this->state; - } - else { - $out .= ($outdone ? ' - ' : '').$this->state; - } + if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 && $this->region) { + $out .= ($outdone ? ' - ' : '').$this->region.' - '.$this->state; + } else { + $out .= ($outdone ? ' - ' : '').$this->state; + } $outdone++; } @@ -747,8 +764,8 @@ abstract class CommonObject } if (!empty($this->url)) { - //$out.=dol_print_url($this->url,'_goout',0,1);//steve changed to blank - $out .= dol_print_url($this->url, '_blank', 0, 1); + //$out.=dol_print_url($this->url,'_goout',0,1);//steve changed to blank + $out .= dol_print_url($this->url, '_blank', 0, 1); $outdone++; } @@ -833,10 +850,8 @@ abstract class CommonObject $this->errors = $ecmfile->errors; } */ - } - else return ''; - } - elseif (empty($ecmfile->share)) + } else return ''; + } elseif (empty($ecmfile->share)) { // Add entry into index if ($initsharekey) @@ -844,8 +859,7 @@ abstract class CommonObject require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $ecmfile->share = getRandomPassword(true); $ecmfile->update($user); - } - else return ''; + } else return ''; } // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); @@ -867,9 +881,7 @@ abstract class CommonObject if ($relativelink) { $linktoreturn = 'document.php'.($paramlink ? '?'.$paramlink : ''); - } - else - { + } else { $linktoreturn = $urlwithroot.'/document.php'.($paramlink ? '?'.$paramlink : ''); } @@ -878,7 +890,7 @@ abstract class CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Add a link between element $this->element and a contact * @@ -890,7 +902,7 @@ abstract class CommonObject */ public function add_contact($fk_socpeople, $type_contact, $source = 'external', $notrigger = 0) { - // phpcs:enable + // phpcs:enable global $user, $langs; @@ -916,9 +928,7 @@ abstract class CommonObject if (is_numeric($type_contact)) { $id_type_contact = $type_contact; - } - else - { + } else { // We look for id type_contact $sql = "SELECT tc.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."c_type_contact as tc"; @@ -981,18 +991,14 @@ abstract class CommonObject $this->db->commit(); return 1; - } - else - { + } else { if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error = $this->db->errno(); $this->db->rollback(); echo 'err rollback'; return -2; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -1001,7 +1007,7 @@ abstract class CommonObject } else return 0; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Copy contact from one element to current * @@ -1011,7 +1017,7 @@ abstract class CommonObject */ public function copy_linked_contact($objFrom, $source = 'internal') { - // phpcs:enable + // phpcs:enable $contacts = $objFrom->liste_contact(-1, $source); foreach ($contacts as $contact) { @@ -1024,7 +1030,7 @@ abstract class CommonObject return 1; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update a link to contact line * @@ -1036,7 +1042,7 @@ abstract class CommonObject */ public function update_contact($rowid, $statut, $type_contact_id = 0, $fk_socpeople = 0) { - // phpcs:enable + // phpcs:enable // Insert into database $sql = "UPDATE ".MAIN_DB_PREFIX."element_contact set"; $sql .= " statut = ".$statut; @@ -1047,15 +1053,13 @@ abstract class CommonObject if ($resql) { return 0; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Delete a link to contact line * @@ -1065,7 +1069,7 @@ abstract class CommonObject */ public function delete_contact($rowid, $notrigger = 0) { - // phpcs:enable + // phpcs:enable global $user; @@ -1085,16 +1089,14 @@ abstract class CommonObject $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Delete all links between an object $this and all its contacts * @@ -1104,7 +1106,7 @@ abstract class CommonObject */ public function delete_linked_contact($source = '', $code = '') { - // phpcs:enable + // phpcs:enable $temp = array(); $typeContact = $this->liste_type_contact($source, '', 0, 0, $code); @@ -1123,15 +1125,13 @@ abstract class CommonObject if ($this->db->query($sql)) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Get array of all contacts for an object * @@ -1143,7 +1143,7 @@ abstract class CommonObject */ public function liste_contact($status = -1, $source = 'external', $list = 0, $code = '') { - // phpcs:enable + // phpcs:enable global $langs; $tab = array(); @@ -1185,9 +1185,7 @@ abstract class CommonObject 'nom'=>$obj->lastname, // For backward compatibility 'civility'=>$obj->civility, 'lastname'=>$obj->lastname, 'firstname'=>$obj->firstname, 'email'=>$obj->email, 'login'=>$obj->login, 'photo'=>$obj->photo, 'statuscontact'=>$obj->statuscontact, 'rowid'=>$obj->rowid, 'code'=>$obj->code, 'libelle'=>$libelle_type, 'status'=>$obj->statuslink, 'fk_c_type_contact'=>$obj->fk_c_type_contact); - } - else - { + } else { $tab[$i] = $obj->id; } @@ -1195,9 +1193,7 @@ abstract class CommonObject } return $tab; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_print_error($this->db); return -1; @@ -1231,16 +1227,14 @@ abstract class CommonObject $result = $this->update_contact($rowid, $newstatut); $this->db->free($resql); return $result; - } - else - { + } else { $this->error = $this->db->error(); dol_print_error($this->db); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return array with list of possible values for type of contacts * @@ -1253,7 +1247,7 @@ abstract class CommonObject */ public function liste_type_contact($source = 'internal', $order = 'position', $option = 0, $activeonly = 0, $code = '') { - // phpcs:enable + // phpcs:enable global $langs; if (empty($order)) $order = 'position'; @@ -1285,9 +1279,7 @@ abstract class CommonObject $i++; } return $tab; - } - else - { + } else { $this->error = $this->db->lasterror(); //dol_print_error($this->db); return null; @@ -1311,6 +1303,8 @@ abstract class CommonObject // phpcs:enable global $langs, $conf; + $langs->loadLangs(array('bills', 'contracts', 'interventions', 'orders', 'projects', 'propal', 'ticket', 'agenda')); + $tab = array(); $sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle, tc.position, tc.element"; @@ -1368,9 +1362,7 @@ abstract class CommonObject } } return $tab; - } - else - { + } else { $this->error = $this->db->lasterror(); return null; } @@ -1430,9 +1422,7 @@ abstract class CommonObject $result[$i] = $obj->fk_socpeople; $i++; } - } - else - { + } else { $this->error = $this->db->error(); return null; } @@ -1440,17 +1430,17 @@ abstract class CommonObject return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Load object contact with id=$this->contactid into $this->contact + * Load object contact with id=$this->contact_id into $this->contact * - * @param int $contactid Id du contact. Use this->contactid if empty. + * @param int $contactid Id du contact. Use this->contact_id if empty. * @return int <0 if KO, >0 if OK */ public function fetch_contact($contactid = null) { - // phpcs:enable - if (empty($contactid)) $contactid = $this->contactid; + // phpcs:enable + if (empty($contactid)) $contactid = $this->contact_id; if (empty($contactid)) return 0; @@ -1461,7 +1451,7 @@ abstract class CommonObject return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load the third party of object, from id $this->socid or $this->fk_soc, into this->thirdparty * @@ -1470,7 +1460,7 @@ abstract class CommonObject */ public function fetch_thirdparty($force_thirdparty_id = 0) { - // phpcs:enable + // phpcs:enable global $conf; if (empty($this->socid) && empty($this->fk_soc) && empty($this->fk_thirdparty) && empty($force_thirdparty_id)) @@ -1493,8 +1483,7 @@ abstract class CommonObject } return $result; - } else - return -1; + } else return -1; } @@ -1524,7 +1513,7 @@ abstract class CommonObject return $this->fetch($result->rowid); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load data for barcode into properties ->barcode_type* * Properties ->barcode_type that is id of barcode. Type is used to find other properties, but @@ -1534,7 +1523,7 @@ abstract class CommonObject */ public function fetch_barcode() { - // phpcs:enable + // phpcs:enable global $conf; dol_syslog(get_class($this).'::fetch_barcode this->element='.$this->element.' this->barcode_type='.$this->barcode_type); @@ -1564,9 +1553,7 @@ abstract class CommonObject $this->barcode_type_label = $obj->label; $this->barcode_type_coder = $obj->coder; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1575,7 +1562,7 @@ abstract class CommonObject return 0; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load the project with id $this->fk_project into this->project * @@ -1583,7 +1570,7 @@ abstract class CommonObject */ public function fetch_projet() { - // phpcs:enable + // phpcs:enable include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; if (empty($this->fk_project) && !empty($this->fk_projet)) $this->fk_project = $this->fk_projet; // For backward compatibility @@ -1597,7 +1584,7 @@ abstract class CommonObject return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load the product with id $this->fk_product into this->product * @@ -1605,7 +1592,7 @@ abstract class CommonObject */ public function fetch_product() { - // phpcs:enable + // phpcs:enable include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; if (empty($this->fk_product)) return 0; @@ -1617,7 +1604,7 @@ abstract class CommonObject return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load the user with id $userid into this->user * @@ -1626,14 +1613,14 @@ abstract class CommonObject */ public function fetch_user($userid) { - // phpcs:enable + // phpcs:enable $user = new User($this->db); $result = $user->fetch($userid); $this->user = $user; return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Read linked origin object * @@ -1641,10 +1628,10 @@ abstract class CommonObject */ public function fetch_origin() { - // phpcs:enable + // phpcs:enable if ($this->origin == 'shipping') $this->origin = 'expedition'; if ($this->origin == 'delivery') $this->origin = 'livraison'; - if ($this->origin == 'order_supplier') $this->origin = 'commandeFournisseur'; + if ($this->origin == 'order_supplier') $this->origin = 'commandeFournisseur'; $origin = $this->origin; @@ -1654,14 +1641,14 @@ abstract class CommonObject } /** - * Load object from specific field - * - * @param string $table Table element or element line - * @param string $field Field selected - * @param string $key Import key - * @param string $element Element name - * @return int <0 if KO, >0 if OK - */ + * Load object from specific field + * + * @param string $table Table element or element line + * @param string $field Field selected + * @param string $key Import key + * @param string $element Element name + * @return int <0 if KO, >0 if OK + */ public function fetchObjectFrom($table, $field, $key, $element = null) { global $conf; @@ -1773,9 +1760,7 @@ abstract class CommonObject if (empty($this->fields) && method_exists($this, 'fetch')) { $result = $this->fetch($id); - } - else - { + } else { $result = $this->fetchCommon($id); } if ($result >= 0) $result = $this->call_trigger($trigkey, (!empty($fuser) && is_object($fuser)) ? $fuser : $user); // This may set this->errors @@ -1787,22 +1772,18 @@ abstract class CommonObject if (property_exists($this, $field)) $this->$field = $value; $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load properties id_previous and id_next by comparing $fieldid with $this->ref * @@ -1813,7 +1794,7 @@ abstract class CommonObject */ public function load_previous_next_ref($filter, $fieldid, $nodbprefix = 0) { - // phpcs:enable + // phpcs:enable global $conf, $user; if (!$this->table_element) @@ -1840,11 +1821,10 @@ abstract class CommonObject if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) { $tmparray = explode('@', $this->ismultientitymanaged); $sql .= ", ".MAIN_DB_PREFIX.$tmparray[1]." as ".($tmparray[1] == 'societe' ? 's' : 'parenttable'); // If we need to link to this table to limit select to entity - } - elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid + } elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid elseif ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid if ($this->restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$aliastablesociete.".rowid = sc.fk_soc"; - $sql .= " WHERE te.".$fieldid." < '".$this->db->escape($this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) + $sql .= " WHERE te.".$fieldid." < '".$this->db->escape($fieldid == 'rowid' ? $this->id : $this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) if ($this->restrictiononfksoc == 1 && !$user->rights->societe->client->voir && !$socid) $sql .= " AND sc.fk_user = ".$user->id; if ($this->restrictiononfksoc == 2 && !$user->rights->societe->client->voir && !$socid) $sql .= " AND (sc.fk_user = ".$user->id.' OR te.fk_soc IS NULL)'; if (!empty($filter)) @@ -1855,8 +1835,7 @@ abstract class CommonObject if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) { $tmparray = explode('@', $this->ismultientitymanaged); $sql .= ' AND te.'.$tmparray[0].' = '.($tmparray[1] == 'societe' ? 's' : 'parenttable').'.rowid'; // If we need to link to this table to limit select to entity - } - elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid + } elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { if ($this->element == 'user' && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) { @@ -1887,17 +1866,18 @@ abstract class CommonObject $row = $this->db->fetch_row($result); $this->ref_previous = $row[0]; - $sql = "SELECT MIN(te.".$fieldid.")"; $sql .= " FROM ".(empty($nodbprefix) ?MAIN_DB_PREFIX:'').$this->table_element." as te"; if ($this->element == 'user' && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= ",".MAIN_DB_PREFIX."usergroup_user as ug"; } - if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 'fk_soc@societe') $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to entity - elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid + if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) { + $tmparray = explode('@', $this->ismultientitymanaged); + $sql .= ", ".MAIN_DB_PREFIX.$tmparray[1]." as ".($tmparray[1] == 'societe' ? 's' : 'parenttable'); // If we need to link to this table to limit select to entity + } elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid elseif ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid if ($this->restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$aliastablesociete.".rowid = sc.fk_soc"; - $sql .= " WHERE te.".$fieldid." > '".$this->db->escape($this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) + $sql .= " WHERE te.".$fieldid." > '".$this->db->escape($fieldid == 'rowid' ? $this->id : $this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) if ($this->restrictiononfksoc == 1 && !$user->rights->societe->client->voir && !$socid) $sql .= " AND sc.fk_user = ".$user->id; if ($this->restrictiononfksoc == 2 && !$user->rights->societe->client->voir && !$socid) $sql .= " AND (sc.fk_user = ".$user->id.' OR te.fk_soc IS NULL)'; if (!empty($filter)) @@ -1905,8 +1885,10 @@ abstract class CommonObject if (!preg_match('/^\s*AND/i', $filter)) $sql .= " AND "; // For backward compatibility $sql .= $filter; } - if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 'fk_soc@societe') $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to entity - elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid + if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) { + $tmparray = explode('@', $this->ismultientitymanaged); + $sql .= ' AND te.'.$tmparray[0].' = '.($tmparray[1] == 'societe' ? 's' : 'parenttable').'.rowid'; // If we need to link to this table to limit select to entity + } elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { if ($this->element == 'user' && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) { @@ -1919,6 +1901,10 @@ abstract class CommonObject $sql .= ' AND te.entity IN ('.getEntity($this->element).')'; } } + if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged) && $this->element != 'societe') { + $tmparray = explode('@', $this->ismultientitymanaged); + $sql .= ' AND parenttable.entity IN ('.getEntity($tmparray[1]).')'; + } if ($this->restrictiononfksoc == 1 && $socid && $this->element != 'societe') $sql .= ' AND te.fk_soc = '.$socid; if ($this->restrictiononfksoc == 2 && $socid && $this->element != 'societe') $sql .= ' AND (te.fk_soc = '.$socid.' OR te.fk_soc IS NULL)'; if ($this->restrictiononfksoc && $socid && $this->element == 'societe') $sql .= ' AND te.rowid = '.$socid; @@ -1954,7 +1940,7 @@ abstract class CommonObject while ($i < $num) { if ($source == 'thirdparty') $contactAlreadySelected[$i] = $tab[$i]['socid']; - else $contactAlreadySelected[$i] = $tab[$i]['id']; + else $contactAlreadySelected[$i] = $tab[$i]['id']; $i++; } return $contactAlreadySelected; @@ -1981,14 +1967,12 @@ abstract class CommonObject if ($projectid) $sql .= ' SET fk_project = '.$projectid; else $sql .= ' SET fk_project = NULL'; $sql .= ' WHERE rowid = '.$this->id; - } - elseif ($this->table_element == 'actioncomm') // Special case for actioncomm + } elseif ($this->table_element == 'actioncomm') // Special case for actioncomm { if ($projectid) $sql .= ' SET fk_project = '.$projectid; else $sql .= ' SET fk_project = NULL'; $sql .= ' WHERE id = '.$this->id; - } - else // Special case for old architecture objects + } else // Special case for old architecture objects { if ($projectid) $sql .= ' SET fk_projet = '.$projectid; else $sql .= ' SET fk_projet = NULL'; @@ -2000,9 +1984,7 @@ abstract class CommonObject { $this->fk_project = $projectid; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -2034,16 +2016,12 @@ abstract class CommonObject // for supplier if (get_class($this) == 'Fournisseur') $this->mode_reglement_supplier_id = $id; return 1; - } - else - { + } else { dol_syslog(get_class($this).'::setPaymentMethods Erreur '.$sql.' - '.$this->db->error()); $this->error = $this->db->error(); return -1; } - } - else - { + } else { dol_syslog(get_class($this).'::setPaymentMethods, status of the object is incompatible'); $this->error = 'Status of the object is incompatible '.$this->statut; return -2; @@ -2075,16 +2053,12 @@ abstract class CommonObject if ($rate) $this->setMulticurrencyRate($rate, 2); return 1; - } - else - { + } else { dol_syslog(get_class($this).'::setMulticurrencyCode Erreur '.$sql.' - '.$this->db->error()); $this->error = $this->db->error(); return -1; } - } - else - { + } else { dol_syslog(get_class($this).'::setMulticurrencyCode, status of the object is incompatible'); $this->error = 'Status of the object is incompatible '.$this->statut; return -2; @@ -2183,16 +2157,12 @@ abstract class CommonObject } return 1; - } - else - { + } else { dol_syslog(get_class($this).'::setMulticurrencyRate Erreur '.$sql.' - '.$this->db->error()); $this->error = $this->db->error(); return -1; } - } - else - { + } else { dol_syslog(get_class($this).'::setMulticurrencyRate, status of the object is incompatible'); $this->error = 'Status of the object is incompatible '.$this->statut; return -2; @@ -2226,16 +2196,12 @@ abstract class CommonObject if (get_class($this) == 'Fournisseur') $this->cond_reglement_supplier_id = $id; $this->cond_reglement = $id; // for compatibility return 1; - } - else - { + } else { dol_syslog(get_class($this).'::setPaymentTerms Erreur '.$sql.' - '.$this->db->error()); $this->error = $this->db->error(); return -1; } - } - else - { + } else { dol_syslog(get_class($this).'::setPaymentTerms, status of the object is incompatible'); $this->error = 'Status of the object is incompatible '.$this->statut; return -2; @@ -2251,33 +2217,29 @@ abstract class CommonObject */ public function setRetainedWarrantyPaymentTerms($id) { - dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms('.$id.')'); - if ($this->statut >= 0 || $this->element == 'societe') - { - $fieldname = 'retained_warranty_fk_cond_reglement'; + dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms('.$id.')'); + if ($this->statut >= 0 || $this->element == 'societe') + { + $fieldname = 'retained_warranty_fk_cond_reglement'; - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET '.$fieldname.' = '.$id; - $sql .= ' WHERE rowid='.$this->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET '.$fieldname.' = '.$id; + $sql .= ' WHERE rowid='.$this->id; - if ($this->db->query($sql)) - { - $this->retained_warranty_fk_cond_reglement = $id; - return 1; - } - else - { - dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms Erreur '.$sql.' - '.$this->db->error()); - $this->error = $this->db->error(); - return -1; - } - } - else - { - dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms, status of the object is incompatible'); - $this->error = 'Status of the object is incompatible '.$this->statut; - return -2; - } + if ($this->db->query($sql)) + { + $this->retained_warranty_fk_cond_reglement = $id; + return 1; + } else { + dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms Erreur '.$sql.' - '.$this->db->error()); + $this->error = $this->db->error(); + return -1; + } + } else { + dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms, status of the object is incompatible'); + $this->error = 'Status of the object is incompatible '.$this->statut; + return -2; + } } /** @@ -2299,9 +2261,7 @@ abstract class CommonObject { $this->fk_delivery_address = $id; return 1; - } - else - { + } else { $this->error = $this->db->error(); dol_syslog(get_class($this).'::setDeliveryAddress Erreur '.$sql.' - '.$this->error); return -1; @@ -2423,11 +2383,10 @@ abstract class CommonObject $resql = $this->db->query($sql); if ($resql) { - $this->modelpdf = $modelpdf; + $this->model_pdf = $modelpdf; + $this->modelpdf = $modelpdf; // For bakward compatibility return 1; - } - else - { + } else { dol_print_error($this->db); return 0; } @@ -2469,9 +2428,7 @@ abstract class CommonObject dol_syslog(get_class($this).'::setBankAccount Error '.$sql.' - '.$this->db->error()); $this->error = $this->db->lasterror(); $error++; - } - else - { + } else { if (!$notrigger) { // Call trigger @@ -2485,9 +2442,7 @@ abstract class CommonObject { $this->db->rollback(); return -1; - } - else - { + } else { $this->fk_account = ($fk_account == 'NULL') ?null:$fk_account; $this->db->commit(); return 1; @@ -2497,7 +2452,7 @@ abstract class CommonObject // TODO: Move line related operations to CommonObjectLine? - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Save a new position (field rang) for details lines. * You can choose to set position for lines with already a position or lines without any position defined. @@ -2509,7 +2464,7 @@ abstract class CommonObject */ public function line_order($renum = false, $rowidorder = 'ASC', $fk_parent_line = true) { - // phpcs:enable + // phpcs:enable if (!$this->table_element_line) { dol_syslog(get_class($this)."::line_order was called on objet with property table_element_line not defined", LOG_ERR); @@ -2534,8 +2489,7 @@ abstract class CommonObject { $row = $this->db->fetch_row($resql); $nl = $row[0]; - } - else dol_print_error($this->db); + } else dol_print_error($this->db); if ($nl > 0) { // The goal of this part is to reorder all lines, with all children lines sharing the same @@ -2577,9 +2531,7 @@ abstract class CommonObject $this->updateRangOfLine($row, ($key + 1)); } } - } - else - { + } else { dol_print_error($this->db); } } @@ -2589,10 +2541,11 @@ abstract class CommonObject /** * Get children of line * - * @param int $id Id of parent line - * @return array Array with list of children lines id + * @param int $id Id of parent line + * @param int $includealltree 0 = 1st level child, 1 = All level child + * @return array Array with list of children lines id */ - public function getChildrenOfLine($id) + public function getChildrenOfLine($id, $includealltree = 0) { $rows = array(); @@ -2605,20 +2558,17 @@ abstract class CommonObject $resql = $this->db->query($sql); if ($resql) { - $i = 0; - $num = $this->db->num_rows($resql); - while ($i < $num) - { - $row = $this->db->fetch_row($resql); - $rows[$i] = $row[0]; - $i++; + if ($this->db->num_rows($resql) > 0) { + while ($row = $this->db->fetch_row($resql)) { + $rows[] = $row[0]; + if (!empty($includealltree)) $rows = array_merge($rows, $this->getChildrenOfLine($row[0]), $includealltree); + } } } - return $rows; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update a line to have a lower rank * @@ -2628,7 +2578,7 @@ abstract class CommonObject */ public function line_up($rowid, $fk_parent_line = true) { - // phpcs:enable + // phpcs:enable $this->line_order(false, 'ASC', $fk_parent_line); // Get rang of line @@ -2638,7 +2588,7 @@ abstract class CommonObject $this->updateLineUp($rowid, $rang); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update a line to have a higher rank * @@ -2648,7 +2598,7 @@ abstract class CommonObject */ public function line_down($rowid, $fk_parent_line = true) { - // phpcs:enable + // phpcs:enable $this->line_order(false, 'ASC', $fk_parent_line); // Get rang of line @@ -2683,7 +2633,7 @@ abstract class CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update position of line with ajax (rang) * @@ -2692,7 +2642,7 @@ abstract class CommonObject */ public function line_ajaxorder($rows) { - // phpcs:enable + // phpcs:enable $num = count($rows); for ($i = 0; $i < $num; $i++) { @@ -2725,9 +2675,7 @@ abstract class CommonObject { dol_print_error($this->db); } - } - else - { + } else { dol_print_error($this->db); } } @@ -2759,9 +2707,7 @@ abstract class CommonObject { dol_print_error($this->db); } - } - else - { + } else { dol_print_error($this->db); } } @@ -2806,7 +2752,7 @@ abstract class CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Get max value used for position of line (rang) * @@ -2815,8 +2761,8 @@ abstract class CommonObject */ public function line_max($fk_parent_line = 0) { - // phpcs:enable - $positionfield = 'rang'; + // phpcs:enable + $positionfield = 'rang'; if ($this->table_element == 'bom') $positionfield = 'position'; // Search the last rang with fk_parent_line @@ -2834,16 +2780,13 @@ abstract class CommonObject if (!empty($row[0])) { return $row[0]; - } - else - { + } else { return $this->getRangOfLine($fk_parent_line); } } } // If not, search the last rang of element - else - { + else { $sql = 'SELECT max('.$positionfield.') FROM '.MAIN_DB_PREFIX.$this->table_element_line; $sql .= ' WHERE '.$this->fk_element.' = '.$this->id; @@ -2857,7 +2800,7 @@ abstract class CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update external ref of element * @@ -2866,7 +2809,7 @@ abstract class CommonObject */ public function update_ref_ext($ref_ext) { - // phpcs:enable + // phpcs:enable if (!$this->table_element) { dol_syslog(get_class($this)."::update_ref_ext was called on objet with property table_element not defined", LOG_ERR); @@ -2882,15 +2825,13 @@ abstract class CommonObject { $this->ref_ext = $ref_ext; return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update note of element * @@ -2900,7 +2841,7 @@ abstract class CommonObject */ public function update_note($note, $suffix = '') { - // phpcs:enable + // phpcs:enable global $user; if (!$this->table_element) @@ -2915,12 +2856,14 @@ abstract class CommonObject dol_syslog(get_class($this)."::update_note Parameter suffix must be empty, '_private' or '_public'", LOG_ERR); return -2; } + + $newsuffix = $suffix; + // Special cas - //var_dump($this->table_element);exit; - if ($this->table_element == 'product') $suffix = ''; + if ($this->table_element == 'product' && $newsuffix == '_private') $newsuffix = ''; $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= " SET note".$suffix." = ".(!empty($note) ? ("'".$this->db->escape($note)."'") : "NULL"); + $sql .= " SET note".$newsuffix." = ".(!empty($note) ? ("'".$this->db->escape($note)."'") : "NULL"); $sql .= " ,".(in_array($this->table_element, array('actioncomm', 'adherent', 'advtargetemailing', 'cronjob', 'establishment')) ? "fk_user_mod" : "fk_user_modif")." = ".$user->id; $sql .= " WHERE rowid =".$this->id; @@ -2929,21 +2872,18 @@ abstract class CommonObject { if ($suffix == '_public') $this->note_public = $note; elseif ($suffix == '_private') $this->note_private = $note; - else - { + else { $this->note = $note; // deprecated $this->note_private = $note; } return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update public note (kept for backward compatibility) * @@ -2954,11 +2894,11 @@ abstract class CommonObject */ public function update_note_public($note) { - // phpcs:enable + // phpcs:enable return $this->update_note($note, '_public'); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update total_ht, total_ttc, total_vat, total_localtax1, total_localtax2 for an object (sum of lines). * Must be called at end of methods addline or updateline. @@ -2971,16 +2911,16 @@ abstract class CommonObject */ public function update_price($exclspec = 0, $roundingadjust = 'none', $nodatabaseupdate = 0, $seller = null) { - // phpcs:enable + // phpcs:enable global $conf, $hookmanager, $action; - $parameters = array('exclspec' => $exclspec, 'roundingadjust' => $roundingadjust, 'nodatabaseupdate' => $nodatabaseupdate, 'seller' => $seller); - $reshook = $hookmanager->executeHooks('updateTotalPrice', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) { - return 1; // replacement code - } elseif ($reshook < 0) { - return -1; // failure - } // reshook = 0 => execute normal code + $parameters = array('exclspec' => $exclspec, 'roundingadjust' => $roundingadjust, 'nodatabaseupdate' => $nodatabaseupdate, 'seller' => $seller); + $reshook = $hookmanager->executeHooks('updateTotalPrice', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) { + return 1; // replacement code + } elseif ($reshook < 0) { + return -1; // failure + } // reshook = 0 => execute normal code // Some external module want no update price after a trigger because they have another method to calculate the total (ex: with an extrafield) $MODULE = ""; @@ -3119,7 +3059,12 @@ abstract class CommonObject //print 'Line '.$i.' rowid='.$obj->rowid.' vat_rate='.$obj->vatrate.' total_ht='.$obj->total_ht.' total_tva='.$obj->total_tva.' total_ttc='.$obj->total_ttc.' total_ht_by_vats='.$total_ht_by_vats[$obj->vatrate].' total_tva_by_vats='.$total_tva_by_vats[$obj->vatrate].' (new calculation = '.$tmpvat.') total_ttc_by_vats='.$total_ttc_by_vats[$obj->vatrate].($diff?" => DIFF":"")."
\n"; if ($diff) { - if (abs($diff) > 0.1) { dol_syslog('A rounding difference was detected into TOTAL but is too high to be corrected', LOG_WARNING); exit; } + if (abs($diff) > 0.1) { + $errmsg = 'A rounding difference was detected into TOTAL but is too high to be corrected. Some data in your line may be corrupted. Try to edit each line manually.'; + dol_syslog($errmsg, LOG_WARNING); + dol_print_error('', $errmsg); + exit; + } $sqlfix = "UPDATE ".MAIN_DB_PREFIX.$this->table_element_line." SET ".$fieldtva." = ".($obj->total_tva - $diff).", total_ttc = ".($obj->total_ttc - $diff)." WHERE rowid = ".$obj->rowid; dol_syslog('We found a difference of '.$diff.' for line rowid = '.$obj->rowid.". We fix the total_vat and total_ttc of line by running sqlfix = ".$sqlfix); $resqlfix = $this->db->query($sqlfix); @@ -3197,14 +3142,10 @@ abstract class CommonObject if (!$error) { return 1; - } - else - { + } else { return -1; } - } - else - { + } else { dol_print_error($this->db, 'Bad request in update_price'); return -1; } @@ -3249,9 +3190,7 @@ abstract class CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return 0; @@ -3324,15 +3263,12 @@ abstract class CommonObject { $sql .= "fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."'"; if ($withtargettype) $sql .= " AND targettype = '".$targettype."'"; - } - elseif ($justtarget) + } elseif ($justtarget) { $sql .= "fk_target = ".$targetid." AND targettype = '".$targettype."'"; if ($withsourcetype) $sql .= " AND sourcetype = '".$sourcetype."'"; } - } - else - { + } else { $sql .= "(fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."')"; $sql .= " ".$clause." (fk_target = ".$targetid." AND targettype = '".$targettype."')"; } @@ -3352,14 +3288,11 @@ abstract class CommonObject if ($justsource) { $this->linkedObjectsIds[$obj->targettype][$obj->rowid] = $obj->fk_target; - } - elseif ($justtarget) + } elseif ($justtarget) { $this->linkedObjectsIds[$obj->sourcetype][$obj->rowid] = $obj->fk_source; } - } - else - { + } else { if ($obj->fk_source == $sourceid && $obj->sourcetype == $sourcetype) { $this->linkedObjectsIds[$obj->targettype][$obj->rowid] = $obj->fk_target; @@ -3390,32 +3323,23 @@ abstract class CommonObject // To work with non standard classpath or module name if ($objecttype == 'facture') { $classpath = 'compta/facture/class'; - } - elseif ($objecttype == 'facturerec') { + } elseif ($objecttype == 'facturerec') { $classpath = 'compta/facture/class'; $module = 'facture'; - } - elseif ($objecttype == 'propal') { + } elseif ($objecttype == 'propal') { $classpath = 'comm/propal/class'; - } - elseif ($objecttype == 'supplier_proposal') { + } elseif ($objecttype == 'supplier_proposal') { $classpath = 'supplier_proposal/class'; - } - elseif ($objecttype == 'shipping') { + } elseif ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; - } - elseif ($objecttype == 'delivery') { + } elseif ($objecttype == 'delivery') { $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; - } - elseif ($objecttype == 'invoice_supplier' || $objecttype == 'order_supplier') { + } elseif ($objecttype == 'invoice_supplier' || $objecttype == 'order_supplier') { $classpath = 'fourn/class'; $module = 'fournisseur'; - } - elseif ($objecttype == 'fichinter') { + } elseif ($objecttype == 'fichinter') { $classpath = 'fichinter/class'; $subelement = 'fichinter'; $module = 'ficheinter'; - } - elseif ($objecttype == 'subscription') { + } elseif ($objecttype == 'subscription') { $classpath = 'adherents/class'; $module = 'adherent'; - } - elseif ($objecttype == 'contact') { + } elseif ($objecttype == 'contact') { $module = 'societe'; } @@ -3424,23 +3348,17 @@ abstract class CommonObject if ($objecttype == 'order') { $classfile = 'commande'; $classname = 'Commande'; - } - elseif ($objecttype == 'invoice_supplier') { + } elseif ($objecttype == 'invoice_supplier') { $classfile = 'fournisseur.facture'; $classname = 'FactureFournisseur'; - } - elseif ($objecttype == 'order_supplier') { + } elseif ($objecttype == 'order_supplier') { $classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur'; - } - elseif ($objecttype == 'supplier_proposal') { + } elseif ($objecttype == 'supplier_proposal') { $classfile = 'supplier_proposal'; $classname = 'SupplierProposal'; - } - elseif ($objecttype == 'facturerec') { + } elseif ($objecttype == 'facturerec') { $classfile = 'facture-rec'; $classname = 'FactureRec'; - } - elseif ($objecttype == 'subscription') { + } elseif ($objecttype == 'subscription') { $classfile = 'subscription'; $classname = 'Subscription'; - } - elseif ($objecttype == 'project' || $objecttype == 'projet') { + } elseif ($objecttype == 'project' || $objecttype == 'projet') { $classpath = 'projet/class'; $classfile = 'project'; $classname = 'Project'; } @@ -3464,17 +3382,13 @@ abstract class CommonObject } } } - } - else - { + } else { unset($this->linkedObjectsIds[$objecttype]); } } } return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -3505,8 +3419,7 @@ abstract class CommonObject $sql .= ", sourcetype = '".$this->db->escape($sourcetype)."'"; $sql .= " WHERE fk_target = ".$this->id; $sql .= " AND targettype = '".$this->db->escape($this->element)."'"; - } - elseif ($updatetarget) + } elseif ($updatetarget) { $sql .= "fk_target = ".$targetid; $sql .= ", targettype = '".$this->db->escape($targettype)."'"; @@ -3518,9 +3431,7 @@ abstract class CommonObject if ($this->db->query($sql)) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -3555,21 +3466,16 @@ abstract class CommonObject if ($rowid > 0) { $sql .= " rowid = ".$rowid; - } - else - { + } else { if ($deletesource) { $sql .= " fk_source = ".$sourceid." AND sourcetype = '".$this->db->escape($sourcetype)."'"; $sql .= " AND fk_target = ".$this->id." AND targettype = '".$this->db->escape($this->element)."'"; - } - elseif ($deletetarget) + } elseif ($deletetarget) { $sql .= " fk_target = ".$targetid." AND targettype = '".$this->db->escape($targettype)."'"; $sql .= " AND fk_source = ".$this->id." AND sourcetype = '".$this->db->escape($this->element)."'"; - } - else - { + } else { $sql .= " (fk_source = ".$this->id." AND sourcetype = '".$this->db->escape($this->element)."')"; $sql .= " OR"; $sql .= " (fk_target = ".$this->id." AND targettype = '".$this->db->escape($this->element)."')"; @@ -3580,9 +3486,7 @@ abstract class CommonObject if ($this->db->query($sql)) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errors[] = $this->error; return -1; @@ -3659,16 +3563,12 @@ abstract class CommonObject } return 1; - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::setStatut ".$this->error, LOG_ERR); return -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -3707,11 +3607,8 @@ abstract class CommonObject { $this->canvas = $obj->canvas; return 1; - } - else return 0; - } - else - { + } else return 0; + } else { dol_print_error($this->db); return -1; } @@ -3784,16 +3681,13 @@ abstract class CommonObject if (is_numeric($elementname)) // old usage { $this->errors[] = $langs->trans("ErrorRecordHasAtLeastOneChildOfType", $table); - } - else // new usage: $elementname=Translation key + } else // new usage: $elementname=Translation key { $this->errors[] = $langs->trans("ErrorRecordHasAtLeastOneChildOfType", $langs->transnoentitiesnoconv($elementname)); } break; // We found at least one, we stop here } - } - else - { + } else { $this->errors[] = $this->db->lasterror(); return -1; } @@ -3802,8 +3696,7 @@ abstract class CommonObject { $this->errors[] = "ErrorRecordHasChildren"; return $haschild; - } - else return 0; + } else return 0; } /** @@ -3895,8 +3788,7 @@ abstract class CommonObject { if (empty($totalToShip)) $totalToShip = 0; // Avoid warning because $totalToShip is '' $totalToShip += $line->qty_shipped; // defined for shipment only - } - elseif ($line->element == 'commandefournisseurdispatch' && isset($line->qty)) + } elseif ($line->element == 'commandefournisseurdispatch' && isset($line->qty)) { if (empty($totalToShip)) $totalToShip = 0; $totalToShip += $line->qty; // defined for reception only @@ -3906,13 +3798,12 @@ abstract class CommonObject if ($this->element == 'shipping') { // for shipments $qty = $line->qty_shipped ? $line->qty_shipped : 0; - } - else { + } else { $qty = $line->qty ? $line->qty : 0; } $weight = $line->weight ? $line->weight : 0; - ($weight == 0 && !empty($line->product->weight)) ? $weight = $line->product->weight : 0; + ($weight == 0 && !empty($line->product->weight)) ? $weight = $line->product->weight : 0; $volume = $line->volume ? $line->volume : 0; ($volume == 0 && !empty($line->product->volume)) ? $volume = $line->product->volume : 0; @@ -3934,8 +3825,7 @@ abstract class CommonObject { $trueWeightUnit = pow(10, $weightUnit); $totalWeight += $weight * $qty * $trueWeightUnit; - } - else { + } else { if ($weight_units == 99) { // conversion 1 Pound = 0.45359237 KG $trueWeightUnit = 0.45359237; @@ -3944,8 +3834,7 @@ abstract class CommonObject // conversion 1 Ounce = 0.0283495 KG $trueWeightUnit = 0.0283495; $totalWeight += $weight * $qty * $trueWeightUnit; - } - else { + } else { $totalWeight += $weight * $qty; // This may be wrong if we mix different units } } @@ -3955,9 +3844,7 @@ abstract class CommonObject $trueVolumeUnit = pow(10, $volumeUnit); //print $line->volume; $totalVolume += $volume * $qty * $trueVolumeUnit; - } - else - { + } else { $totalVolume += $volume * $qty; // This may be wrong if we mix different units } } @@ -3988,16 +3875,14 @@ abstract class CommonObject $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return 1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return incoterms informations * TODO Use a cache for label get @@ -4006,8 +3891,9 @@ abstract class CommonObject */ public function display_incoterms() { - // phpcs:enable + // phpcs:enable $out = ''; + $this->label_incoterms = ''; if (!empty($this->fk_incoterms)) { @@ -4020,7 +3906,7 @@ abstract class CommonObject } } - $out .= (($res->code && $this->location_incoterms) ? ' - ' : '').$this->location_incoterms; + $out .= (($out && $this->location_incoterms) ? ' - ' : '').$this->location_incoterms; return $out; } @@ -4041,14 +3927,10 @@ abstract class CommonObject { $res = $this->db->fetch_object($resql); return 'Incoterm : '.$res->code.' - '.$this->location_incoterms; - } - else - { + } else { return ''; } - } - else - { + } else { $this->errors[] = $this->db->lasterror(); return false; } @@ -4084,14 +3966,11 @@ abstract class CommonObject $this->label_incoterms = $obj->libelle; } return 1; - } - else - { + } else { $this->errors[] = $this->db->lasterror(); return -1; } - } - else return -1; + } else return -1; } @@ -4132,9 +4011,7 @@ abstract class CommonObject if (!empty($module)) { $tpl = dol_buildpath($reldir.'/objectline_create.tpl.php'); - } - else - { + } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_create.tpl.php'; } @@ -4199,9 +4076,7 @@ abstract class CommonObject if (!empty($module)) { $tpl = dol_buildpath($reldir.'/objectline_title.tpl.php'); - } - else - { + } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_title.tpl.php'; } if (empty($conf->file->strict_mode)) { @@ -4228,9 +4103,7 @@ abstract class CommonObject { $parameters = array('line'=>$line, 'num'=>$num, 'i'=>$i, 'dateSelector'=>$dateSelector, 'seller'=>$seller, 'buyer'=>$buyer, 'selected'=>$selected, 'table_element_line'=>$line->table_element); $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - } - else - { + } else { $parameters = array('line'=>$line, 'num'=>$num, 'i'=>$i, 'dateSelector'=>$dateSelector, 'seller'=>$seller, 'buyer'=>$buyer, 'selected'=>$selected, 'table_element_line'=>$line->table_element, 'fk_parent_line'=>$line->fk_parent_line); $reshook = $hookmanager->executeHooks('printObjectSubLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks } @@ -4311,9 +4184,7 @@ abstract class CommonObject } $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $line->product_label; - } - else - { + } else { $label = $line->product_label; } @@ -4332,9 +4203,7 @@ abstract class CommonObject if (!empty($module)) { $tpl = dol_buildpath($reldir.'/objectline_view.tpl.php'); - } - else - { + } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_view.tpl.php'; } @@ -4363,9 +4232,7 @@ abstract class CommonObject if (!empty($module)) { $tpl = dol_buildpath($reldir.'/objectline_edit.tpl.php'); - } - else - { + } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_edit.tpl.php'; } @@ -4409,8 +4276,8 @@ abstract class CommonObject print '
'; } print ''; - print ''; - print ''; + print ''; + print ''; $i = 0; if (!empty($this->lines)) @@ -4425,9 +4292,7 @@ abstract class CommonObject $action = ''; $hookmanager->executeHooks('printOriginObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks } - } - else - { + } else { $this->printOriginLine($line, '', $restrictlist, '/core/tpl', $selectedLines); } @@ -4457,23 +4322,19 @@ abstract class CommonObject if (!empty($line->date_start)) { $date_start = $line->date_start; - } - else - { + } else { $date_start = $line->date_debut_prevue; if ($line->date_debut_reel) $date_start = $line->date_debut_reel; } if (!empty($line->date_end)) { $date_end = $line->date_end; - } - else - { + } else { $date_end = $line->date_fin_prevue; if ($line->date_fin_reel) $date_end = $line->date_fin_reel; } - $this->tpl['id'] = $line->id; + $this->tpl['id'] = $line->id; $this->tpl['label'] = ''; if (!empty($line->fk_parent_line)) $this->tpl['label'] .= img_picto('', 'rightarrow'); @@ -4483,8 +4344,7 @@ abstract class CommonObject $discount = new DiscountAbsolute($this->db); $discount->fk_soc = $this->socid; $this->tpl['label'] .= $discount->getNomUrl(0, 'discount'); - } - elseif (!empty($line->fk_product)) + } elseif (!empty($line->fk_product)) { $productstatic = new Product($this->db); $productstatic->id = $line->fk_product; @@ -4502,9 +4362,7 @@ abstract class CommonObject { $this->tpl['label'] .= get_date_range($date_start, $date_end); } - } - else - { + } else { $this->tpl['label'] .= ($line->product_type == -1 ? ' ' : ($line->product_type == 1 ? img_object($langs->trans(''), 'service') : img_object($langs->trans(''), 'product'))); if (!empty($line->desc)) { $this->tpl['label'] .= $line->desc; @@ -4526,39 +4384,32 @@ abstract class CommonObject $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); $this->tpl['description'] = $langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0)); - } - elseif ($line->desc == '(DEPOSIT)') // TODO Not sure this is used for source object + } elseif ($line->desc == '(DEPOSIT)') // TODO Not sure this is used for source object { $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); $this->tpl['description'] = $langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0)); - } - elseif ($line->desc == '(EXCESS RECEIVED)') + } elseif ($line->desc == '(EXCESS RECEIVED)') { $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); $this->tpl['description'] = $langs->transnoentities("DiscountFromExcessReceived", $discount->getNomUrl(0)); - } - elseif ($line->desc == '(EXCESS PAID)') + } elseif ($line->desc == '(EXCESS PAID)') { $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); $this->tpl['description'] = $langs->transnoentities("DiscountFromExcessPaid", $discount->getNomUrl(0)); - } - else - { + } else { $this->tpl['description'] = dol_trunc($line->desc, 60); } - } - else - { + } else { $this->tpl['description'] = ' '; } - // VAT Rate - $this->tpl['vat_rate'] = vatrate($line->tva_tx, true); - $this->tpl['vat_rate'] .= (($line->info_bits & 1) == 1) ? '*' : ''; - if (!empty($line->vat_src_code) && !preg_match('/\(/', $this->tpl['vat_rate'])) $this->tpl['vat_rate'] .= ' ('.$line->vat_src_code.')'; + // VAT Rate + $this->tpl['vat_rate'] = vatrate($line->tva_tx, true); + $this->tpl['vat_rate'] .= (($line->info_bits & 1) == 1) ? '*' : ''; + if (!empty($line->vat_src_code) && !preg_match('/\(/', $this->tpl['vat_rate'])) $this->tpl['vat_rate'] .= ' ('.$line->vat_src_code.')'; $this->tpl['price'] = price($line->subprice); $this->tpl['multicurrency_price'] = price($line->multicurrency_subprice); @@ -4578,9 +4429,7 @@ abstract class CommonObject if (!empty($module)) { $tpl = dol_buildpath($reldir.'/originproductline.tpl.php'); - } - else - { + } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/originproductline.tpl.php'; } @@ -4594,7 +4443,7 @@ abstract class CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Add resources to the current object : add entry into llx_element_resources * Need $this->element & $this->id @@ -4607,7 +4456,7 @@ abstract class CommonObject */ public function add_element_resource($resource_id, $resource_type, $busy = 0, $mandatory = 0) { - // phpcs:enable + // phpcs:enable $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_resources ("; @@ -4631,16 +4480,14 @@ abstract class CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Delete a link to resource line * @@ -4651,7 +4498,7 @@ abstract class CommonObject */ public function delete_resource($rowid, $element, $notrigger = 0) { - // phpcs:enable + // phpcs:enable global $user; $this->db->begin(); @@ -4667,9 +4514,7 @@ abstract class CommonObject $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; - } - else - { + } else { if (!$notrigger) { $result = $this->call_trigger(strtoupper($element).'_DELETE_RESOURCE', $user); @@ -4703,7 +4548,7 @@ abstract class CommonObject * Common function for all objects extending CommonObject for generating documents * * @param string $modelspath Relative folder where generators are placed - * @param string $modele Generator to use. Caller must set it to obj->modelpdf or GETPOST('modelpdf','alpha') for example. + * @param string $modele Generator to use. Caller must set it to obj->model_pdf or GETPOST('model_pdf','alpha') for example. * @param Translate $outputlangs Output language to use * @param int $hidedetails 1 to hide details. 0 by default * @param int $hidedesc 1 to hide product description. 0 by default @@ -4723,252 +4568,246 @@ abstract class CommonObject if (empty($reshook)) { - dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); + dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); - // Increase limit for PDF build - $err = error_reporting(); - error_reporting(0); - @set_time_limit(120); - error_reporting($err); + // Increase limit for PDF build + $err = error_reporting(); + error_reporting(0); + @set_time_limit(120); + error_reporting($err); - // If selected model is a filename template (then $modele="modelname" or "modelname:filename") - $tmp = explode(':', $modele, 2); - if (!empty($tmp[1])) - { - $modele = $tmp[0]; - $srctemplatepath = $tmp[1]; - } + // If selected model is a filename template (then $modele="modelname" or "modelname:filename") + $tmp = explode(':', $modele, 2); + if (!empty($tmp[1])) + { + $modele = $tmp[0]; + $srctemplatepath = $tmp[1]; + } - // Search template files + // Search template files $file = ''; $classname = ''; - $filefound = 0; - $dirmodels = array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels = array_merge($dirmodels, $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { - foreach (array('doc', 'pdf') as $prefix) - { - if (in_array(get_class($this), array('Adherent'))) $file = $prefix."_".$modele.".class.php"; // Member module use prefix_module.class.php - else $file = $prefix."_".$modele.".modules.php"; + $filefound = ''; + $dirmodels = array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels = array_merge($dirmodels, $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) + { + foreach (array('doc', 'pdf') as $prefix) + { + if (in_array(get_class($this), array('Adherent'))) $file = $prefix."_".$modele.".class.php"; // Member module use prefix_module.class.php + else $file = $prefix."_".$modele.".modules.php"; - // On verifie l'emplacement du modele - $file = dol_buildpath($reldir.$modelspath.$file, 0); - if (file_exists($file)) - { - $filefound = 1; - $classname = $prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } + // On verifie l'emplacement du modele + $file = dol_buildpath($reldir.$modelspath.$file, 0); + if (file_exists($file)) + { + $filefound = $file; + $classname = $prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } - // If generator was found - if ($filefound) - { - global $db; // Required to solve a conception default making an include of code using $db instead of $this->db just after. + // If generator was found + if ($filefound) + { + global $db; // Required to solve a conception default making an include of code using $db instead of $this->db just after. - require_once $file; + require_once $file; - $obj = new $classname($this->db); + $obj = new $classname($this->db); - // If generator is ODT, we must have srctemplatepath defined, if not we set it. - if ($obj->type == 'odt' && empty($srctemplatepath)) - { - $varfortemplatedir = $obj->scandir; - if ($varfortemplatedir && !empty($conf->global->$varfortemplatedir)) - { - $dirtoscan = $conf->global->$varfortemplatedir; + // If generator is ODT, we must have srctemplatepath defined, if not we set it. + if ($obj->type == 'odt' && empty($srctemplatepath)) + { + $varfortemplatedir = $obj->scandir; + if ($varfortemplatedir && !empty($conf->global->$varfortemplatedir)) + { + $dirtoscan = $conf->global->$varfortemplatedir; - $listoffiles = array(); + $listoffiles = array(); - // Now we add first model found in directories scanned - $listofdir = explode(',', $dirtoscan); - foreach ($listofdir as $key => $tmpdir) - { - $tmpdir = trim($tmpdir); - $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); - if (!$tmpdir) { unset($listofdir[$key]); continue; } - if (is_dir($tmpdir)) - { - $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0); - if (count($tmpfiles)) $listoffiles = array_merge($listoffiles, $tmpfiles); - } - } + // Now we add first model found in directories scanned + $listofdir = explode(',', $dirtoscan); + foreach ($listofdir as $key => $tmpdir) + { + $tmpdir = trim($tmpdir); + $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); + if (!$tmpdir) { unset($listofdir[$key]); continue; } + if (is_dir($tmpdir)) + { + $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0); + if (count($tmpfiles)) $listoffiles = array_merge($listoffiles, $tmpfiles); + } + } - if (count($listoffiles)) - { - foreach ($listoffiles as $record) - { - $srctemplatepath = $record['fullname']; - break; - } - } - } + if (count($listoffiles)) + { + foreach ($listoffiles as $record) + { + $srctemplatepath = $record['fullname']; + break; + } + } + } - if (empty($srctemplatepath)) - { - $this->error = 'ErrorGenerationAskedForOdtTemplateWithSrcFileNotDefined'; - return -1; - } - } + if (empty($srctemplatepath)) + { + $this->error = 'ErrorGenerationAskedForOdtTemplateWithSrcFileNotDefined'; + return -1; + } + } - if ($obj->type == 'odt' && !empty($srctemplatepath)) - { - if (!dol_is_file($srctemplatepath)) - { - dol_syslog("Failed to locate template file ".$srctemplatepath, LOG_WARNING); - $this->error = 'ErrorGenerationAskedForOdtTemplateWithSrcFileNotFound'; - return -1; - } - } + if ($obj->type == 'odt' && !empty($srctemplatepath)) + { + if (!dol_is_file($srctemplatepath)) + { + dol_syslog("Failed to locate template file ".$srctemplatepath, LOG_WARNING); + $this->error = 'ErrorGenerationAskedForOdtTemplateWithSrcFileNotFound'; + return -1; + } + } - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output = $outputlangs->charset_output; + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output = $outputlangs->charset_output; - if (in_array(get_class($this), array('Adherent'))) - { - $arrayofrecords = array(); // The write_file of templates of adherent class need this var - $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, 'member', 1, $moreparams); - } - else - { - $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $moreparams); - } - // After call of write_file $obj->result['fullpath'] is set with generated file. It will be used to update the ECM database index. + if (in_array(get_class($this), array('Adherent'))) + { + $arrayofrecords = array(); // The write_file of templates of adherent class need this var + $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, 'member', 1, $moreparams); + } else { + $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $moreparams); + } + // After call of write_file $obj->result['fullpath'] is set with generated file. It will be used to update the ECM database index. - if ($resultwritefile > 0) - { - $outputlangs->charset_output = $sav_charset_output; + if ($resultwritefile > 0) + { + $outputlangs->charset_output = $sav_charset_output; - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); + // We delete old preview + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); - // Index file in database - if (!empty($obj->result['fullpath'])) - { - $destfull = $obj->result['fullpath']; - $upload_dir = dirname($destfull); - $destfile = basename($destfull); - $rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $upload_dir); + // Index file in database + if (!empty($obj->result['fullpath'])) + { + $destfull = $obj->result['fullpath']; + $upload_dir = dirname($destfull); + $destfile = basename($destfull); + $rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $upload_dir); - if (!preg_match('/[\\/]temp[\\/]|[\\/]thumbs|\.meta$/', $rel_dir)) // If not a tmp dir - { - $filename = basename($destfile); - $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); - $rel_dir = preg_replace('/^[\\/]/', '', $rel_dir); + if (!preg_match('/[\\/]temp[\\/]|[\\/]thumbs|\.meta$/', $rel_dir)) // If not a tmp dir + { + $filename = basename($destfile); + $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); + $rel_dir = preg_replace('/^[\\/]/', '', $rel_dir); - include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; - $ecmfile = new EcmFiles($this->db); - $result = $ecmfile->fetch(0, '', ($rel_dir ? $rel_dir.'/' : '').$filename); + include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; + $ecmfile = new EcmFiles($this->db); + $result = $ecmfile->fetch(0, '', ($rel_dir ? $rel_dir.'/' : '').$filename); - // Set the public "share" key - $setsharekey = false; - if ($this->element == 'propal') - { - $useonlinesignature = $conf->global->MAIN_FEATURES_LEVEL; // Replace this with 1 when feature to make online signature is ok - if ($useonlinesignature) $setsharekey = true; - if (!empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey = true; - } - if ($this->element == 'commande' && !empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) { - $setsharekey = true; - } - if ($this->element == 'facture' && !empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) { - $setsharekey = true; - } - if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) { - $setsharekey = true; - } + // Set the public "share" key + $setsharekey = false; + if ($this->element == 'propal') + { + $useonlinesignature = $conf->global->MAIN_FEATURES_LEVEL; // Replace this with 1 when feature to make online signature is ok + if ($useonlinesignature) $setsharekey = true; + if (!empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey = true; + } + if ($this->element == 'commande' && !empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) { + $setsharekey = true; + } + if ($this->element == 'facture' && !empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) { + $setsharekey = true; + } + if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) { + $setsharekey = true; + } - if ($setsharekey) { - if (empty($ecmfile->share)) // Because object not found or share not set yet - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $ecmfile->share = getRandomPassword(true); - } - } + if ($setsharekey) { + if (empty($ecmfile->share)) // Because object not found or share not set yet + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; + $ecmfile->share = getRandomPassword(true); + } + } - if ($result > 0) - { - $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content - $ecmfile->fullpath_orig = ''; - $ecmfile->gen_or_uploaded = 'generated'; - $ecmfile->description = ''; // indexed content - $ecmfile->keyword = ''; // keyword content - $result = $ecmfile->update($user); - if ($result < 0) { - setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); - } - } - else - { - $ecmfile->entity = $conf->entity; - $ecmfile->filepath = $rel_dir; - $ecmfile->filename = $filename; - $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content - $ecmfile->fullpath_orig = ''; - $ecmfile->gen_or_uploaded = 'generated'; - $ecmfile->description = ''; // indexed content - $ecmfile->keyword = ''; // keyword content - $ecmfile->src_object_type = $this->table_element; - $ecmfile->src_object_id = $this->id; + if ($result > 0) + { + $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content + $ecmfile->fullpath_orig = ''; + $ecmfile->gen_or_uploaded = 'generated'; + $ecmfile->description = ''; // indexed content + $ecmfile->keyword = ''; // keyword content + $result = $ecmfile->update($user); + if ($result < 0) { + setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); + } + } else { + $ecmfile->entity = $conf->entity; + $ecmfile->filepath = $rel_dir; + $ecmfile->filename = $filename; + $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content + $ecmfile->fullpath_orig = ''; + $ecmfile->gen_or_uploaded = 'generated'; + $ecmfile->description = ''; // indexed content + $ecmfile->keyword = ''; // keyword content + $ecmfile->src_object_type = $this->table_element; + $ecmfile->src_object_id = $this->id; - $result = $ecmfile->create($user); - if ($result < 0) { - setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); - } - } + $result = $ecmfile->create($user); + if ($result < 0) { + setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); + } + } - /*$this->result['fullname']=$destfull; + /*$this->result['fullname']=$destfull; $this->result['filepath']=$ecmfile->filepath; $this->result['filename']=$ecmfile->filename;*/ - //var_dump($obj->update_main_doc_field);exit; + //var_dump($obj->update_main_doc_field);exit; - // Update the last_main_doc field into main object (if documenent generator has property ->update_main_doc_field set) - $update_main_doc_field = 0; - if (!empty($obj->update_main_doc_field)) $update_main_doc_field = 1; - if ($update_main_doc_field && !empty($this->table_element)) - { - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath.'/'.$ecmfile->filename)."'"; - $sql .= ' WHERE rowid = '.$this->id; + // Update the last_main_doc field into main object (if documenent generator has property ->update_main_doc_field set) + $update_main_doc_field = 0; + if (!empty($obj->update_main_doc_field)) $update_main_doc_field = 1; + if ($update_main_doc_field && !empty($this->table_element)) + { + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath.'/'.$ecmfile->filename)."'"; + $sql .= ' WHERE rowid = '.$this->id; - $resql = $this->db->query($sql); - if (!$resql) { + $resql = $this->db->query($sql); + if (!$resql) { dol_print_error($this->db); } else { - $this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; - } - } - } - } - else - { - dol_syslog('Method ->write_file was called on object '.get_class($obj).' and return a success but the return array ->result["fullpath"] was not set.', LOG_WARNING); - } + $this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; + } + } + } + } else { + dol_syslog('Method ->write_file was called on object '.get_class($obj).' and return a success but the return array ->result["fullpath"] was not set.', LOG_WARNING); + } - // Success in building document. We build meta file. - dol_meta_create($this); + // Success in building document. We build meta file. + dol_meta_create($this); - return 1; - } - else - { - $outputlangs->charset_output = $sav_charset_output; - dol_print_error($this->db, "Error generating document for ".__CLASS__.". Error: ".$obj->error, $obj->errors); - return -1; - } - } - else - { - $this->error = $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $file); - dol_print_error('', $this->error); - return -1; - } - } - else return $reshook; + return 1; + } else { + $outputlangs->charset_output = $sav_charset_output; + dol_print_error($this->db, "Error generating document for ".__CLASS__.". Error: ".$obj->error, $obj->errors); + return -1; + } + } else { + if (!$filefound) { + $this->error = $langs->trans("Error").' Failed to load doc generator with modelpaths='.$modelspath.' - modele='.$modele; + dol_print_error('', $this->error); + } else { + $this->error = $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $filefound); + dol_print_error('', $this->error); + } + return -1; + } + } else return $reshook; } /** @@ -5073,9 +4912,7 @@ abstract class CommonObject if (!empty($this->errors)) { $this->errors = array_unique(array_merge($this->errors, $interface->errors)); // We use array_unique because when a trigger call another trigger on same object, this->errors is added twice. - } - else - { + } else { $this->errors = $interface->errors; } } @@ -5136,9 +4973,7 @@ abstract class CommonObject if (preg_match('/date/', $type)) { $this->array_languages[$key][$codelang] = $this->db->jdate($value); - } - else - { + } else { $this->array_languages[$key][$codelang] = $value; } @@ -5150,9 +4985,7 @@ abstract class CommonObject if ($numrows) return $numrows; else return 0; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -5201,14 +5034,12 @@ abstract class CommonObject // Clean parameters // TODO GMT date in memory must be GMT so we should add gm=true in parameters $value_key = dol_mktime(0, 0, 0, $_POST[$postfieldkey."month"], $_POST[$postfieldkey."day"], $_POST[$postfieldkey."year"]); - } - elseif (in_array($key_type, array('datetime'))) + } elseif (in_array($key_type, array('datetime'))) { // Clean parameters // TODO GMT date in memory must be GMT so we should add gm=true in parameters $value_key = dol_mktime($_POST[$postfieldkey."hour"], $_POST[$postfieldkey."min"], 0, $_POST[$postfieldkey."month"], $_POST[$postfieldkey."day"], $_POST[$postfieldkey."year"]); - } - elseif (in_array($key_type, array('checkbox', 'chkbxlst'))) + } elseif (in_array($key_type, array('checkbox', 'chkbxlst'))) { $value_arr = GETPOST($postfieldkey, 'array'); // check if an array if (!empty($value_arr)) { @@ -5216,14 +5047,11 @@ abstract class CommonObject } else { $value_key = ''; } - } - elseif (in_array($key_type, array('price', 'double'))) + } elseif (in_array($key_type, array('price', 'double'))) { $value_arr = GETPOST($postfieldkey, 'alpha'); $value_key = price2num($value_arr); - } - else - { + } else { $value_key = GETPOST($postfieldkey); if (in_array($key_type, array('link')) && $value_key == '-1') $value_key = ''; } @@ -5303,9 +5131,7 @@ abstract class CommonObject $extrafields->fetch_name_optionals_label($this->table_element); } $optionsArray = (!empty($extrafields->attributes[$this->table_element]['label']) ? $extrafields->attributes[$this->table_element]['label'] : null); - } - else - { + } else { global $extrafields; dol_syslog("Warning: fetch_optionals was called with param optionsArray defined when you should pass null now", LOG_WARNING); } @@ -5325,7 +5151,7 @@ abstract class CommonObject } } $sql .= " FROM ".MAIN_DB_PREFIX.$table_element."_extrafields"; - $sql .= " WHERE fk_object = ".$rowid; + $sql .= " WHERE fk_object = ".((int) $rowid); //dol_syslog(get_class($this)."::fetch_optionals get extrafields data for ".$this->table_element, LOG_DEBUG); // Too verbose $resql = $this->db->query($sql); @@ -5346,9 +5172,7 @@ abstract class CommonObject { //var_dump($extrafields->attributes[$this->table_element]['type'][$key]); $this->array_options["options_".$key] = $this->db->jdate($value); - } - else - { + } else { $this->array_options["options_".$key] = $value; } @@ -5372,9 +5196,7 @@ abstract class CommonObject if ($numrows) return $numrows; else return 0; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -5407,9 +5229,7 @@ abstract class CommonObject $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return 1; } @@ -5468,7 +5288,7 @@ abstract class CommonObject if ($this->array_options[$key] === '') $mandatorypb = true; if ($mandatorypb) { - dol_syslog("Mandatory extra field ".$key." is empty"); + dol_syslog("Mandatory extra field ".$key." is empty"); $this->errors[] = $langs->trans('ErrorFieldRequired', $attributeLabel); return -1; } @@ -5482,11 +5302,9 @@ abstract class CommonObject if (!empty($conf->global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { $value = dol_eval($attrfieldcomputed, 1, 0); - dol_syslog($langs->trans("Extrafieldcomputed")." sur ".$attributeLabel."(".$value.")", LOG_DEBUG); - $new_array_options[$key] = $value; - } - else - { + dol_syslog($langs->trans("Extrafieldcomputed")." sur ".$attributeLabel."(".$value.")", LOG_DEBUG); + $new_array_options[$key] = $value; + } else { $new_array_options[$key] = null; } } @@ -5498,21 +5316,20 @@ abstract class CommonObject { $this->errors[] = $langs->trans("ExtraFieldHasWrongValue", $attributeLabel); return -1; - } - elseif ($value == '') + } elseif ($value == '') { $new_array_options[$key] = null; } break; - case 'double': + case 'price': + case 'double': $value = price2num($value); if (!is_numeric($value) && $value != '') { - dol_syslog($langs->trans("ExtraFieldHasWrongValue")." sur ".$attributeLabel."(".$value."is not '".$attributeType."')", LOG_DEBUG); + dol_syslog($langs->trans("ExtraFieldHasWrongValue")." for ".$attributeLabel."(".$value."is not '".$attributeType."')", LOG_DEBUG); $this->errors[] = $langs->trans("ExtraFieldHasWrongValue", $attributeLabel); return -1; - } - elseif ($value == '') + } elseif ($value == '') { $new_array_options[$key] = null; } @@ -5543,28 +5360,20 @@ abstract class CommonObject if ($this->array_options[$key] == $this->oldcopy->array_options[$key]) // If old value crypted in database is same than submited new value, it means we don't change it, so we don't update. { $new_array_options[$key] = $this->array_options[$key]; // Value is kept - } - else - { + } else { // var_dump($algo); $newvalue = dol_hash($this->array_options[$key], $algo); $new_array_options[$key] = $newvalue; } - } - else - { + } else { $new_array_options[$key] = $this->array_options[$key]; // Value is kept } } - } - else // Common usage + } else // Common usage { $new_array_options[$key] = $this->array_options[$key]; } break; - case 'price': - $new_array_options[$key] = price2num($this->array_options[$key]); - break; case 'date': case 'datetime': // If data is a string instead of a timestamp, we convert it @@ -5584,24 +5393,20 @@ abstract class CommonObject if ($value == '-1') // -1 is key for no defined in combo list of objects { $new_array_options[$key] = ''; - } - elseif ($value) + } elseif ($value) { $object = new $InfoFieldList[0]($this->db); if (is_numeric($value)) $res = $object->fetch($value); else $res = $object->fetch('', $value); if ($res > 0) $new_array_options[$key] = $object->id; - else - { + else { $this->error = "Id/Ref '".$value."' for object '".$object->element."' not found"; $this->db->rollback(); return -1; } } - } - else - { + } else { dol_syslog('Error bad setup of extrafield', LOG_WARNING); } break; @@ -5629,13 +5434,13 @@ abstract class CommonObject // We must insert a default value for fields for other entities that are mandatory to avoid not null error if (is_array($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'])) { - foreach ($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'] as $tmpkey => $tmpval) - { - if (!isset($extrafields->attributes[$this->table_element]['type'][$tmpkey])) // If field not already added previously - { - $sql .= ",".$tmpkey; - } - } + foreach ($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'] as $tmpkey => $tmpval) + { + if (!isset($extrafields->attributes[$this->table_element]['type'][$tmpkey])) // If field not already added previously + { + $sql .= ",".$tmpkey; + } + } } $sql .= ") VALUES (".$this->id; @@ -5648,9 +5453,7 @@ abstract class CommonObject if ($new_array_options[$key] != '' || $new_array_options[$key] == '0') { $sql .= ",'".$this->db->escape($new_array_options[$key])."'"; - } - else - { + } else { $sql .= ",null"; } } @@ -5658,14 +5461,14 @@ abstract class CommonObject // We must insert a default value for fields for other entities that are mandatory to avoid not null error if (is_array($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'])) { - foreach ($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'] as $tmpkey => $tmpval) - { - if (!isset($extrafields->attributes[$this->table_element]['type'][$tmpkey])) // If field not already added previously - { - if (in_array($tmpval, array('int', 'double'))) $sql .= ", 0"; - else $sql .= ", ''"; - } - } + foreach ($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'] as $tmpkey => $tmpval) + { + if (!isset($extrafields->attributes[$this->table_element]['type'][$tmpkey])) // If field not already added previously + { + if (in_array($tmpval, array('int', 'double', 'price'))) $sql .= ", 0"; + else $sql .= ", ''"; + } + } } $sql .= ")"; @@ -5691,14 +5494,11 @@ abstract class CommonObject { $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return 1; } - } - else return 0; + } else return 0; } /** @@ -5741,8 +5541,7 @@ abstract class CommonObject { $this->errors[] = $langs->trans("ExtraLanguageHasWrongValue", $attributeLabel); return -1; - } - elseif ($value == '') + } elseif ($value == '') { $new_array_languages[$key] = null; } @@ -5754,8 +5553,7 @@ abstract class CommonObject dol_syslog($langs->trans("ExtraLanguageHasWrongValue")." sur ".$attributeLabel."(".$value."is not '".$attributeType."')", LOG_DEBUG); $this->errors[] = $langs->trans("ExtraLanguageHasWrongValue", $attributeLabel); return -1; - } - elseif ($value == '') + } elseif ($value == '') { $new_array_languages[$key] = null; } @@ -5814,21 +5612,18 @@ abstract class CommonObject { $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return 1; } - } - else return 0; + } else return 0; } /** * Update an extra field value for the current object. * Data to describe values to update are stored into $this->array_options=array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...) * - * @param string $key Key of the extrafield (without starting 'options_') + * @param string $key Key of the extrafield to update (without starting 'options_') * @param string $trigger If defined, call also the trigger (for example COMPANY_MODIFY) * @param User $userused Object user * @return int -1=error, O=did nothing, 1=OK @@ -5869,8 +5664,7 @@ abstract class CommonObject { $this->errors[] = $langs->trans("ExtraFieldHasWrongValue", $attributeLabel); return -1; - } - elseif ($value === '') + } elseif ($value === '') { $this->array_options["options_".$key] = null; } @@ -5882,8 +5676,7 @@ abstract class CommonObject dol_syslog($langs->trans("ExtraFieldHasWrongValue")." sur ".$attributeLabel."(".$value."is not '".$attributeType."')", LOG_DEBUG); $this->errors[] = $langs->trans("ExtraFieldHasWrongValue", $attributeLabel); return -1; - } - elseif ($value === '') + } elseif ($value === '') { $this->array_options["options_".$key] = null; } @@ -5944,14 +5737,11 @@ abstract class CommonObject dol_syslog(__METHOD__.$this->error, LOG_ERR); $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return 1; } - } - else return 0; + } else return 0; } /** @@ -6007,38 +5797,38 @@ abstract class CommonObject } $out = ''; - $type = ''; - $param = array(); - $param['options'] = array(); - $reg = array(); - $size = $this->fields[$key]['size']; - // Because we work on extrafields - if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N'); - $type = 'link'; - } elseif (preg_match('/^(integer|link):(.*):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N'); - $type = 'link'; - } elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[2].':'.$reg[3] => 'N'); - $type = 'link'; - } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); - $type = 'sellist'; - } elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) { - $param['options'] = array(); - $type = 'varchar'; - $size = $reg[1]; - } elseif (preg_match('/varchar/', $val['type'])) { - $param['options'] = array(); - $type = 'varchar'; - } elseif (is_array($this->fields[$key]['arrayofkeyval'])) { - $param['options'] = $this->fields[$key]['arrayofkeyval']; - $type = 'select'; - } else { - $param['options'] = array(); - $type = $this->fields[$key]['type']; - } + $type = ''; + $param = array(); + $param['options'] = array(); + $reg = array(); + $size = $this->fields[$key]['size']; + // Because we work on extrafields + if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N'); + $type = 'link'; + } elseif (preg_match('/^(integer|link):(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N'); + $type = 'link'; + } elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[2].':'.$reg[3] => 'N'); + $type = 'link'; + } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); + $type = 'sellist'; + } elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) { + $param['options'] = array(); + $type = 'varchar'; + $size = $reg[1]; + } elseif (preg_match('/varchar/', $val['type'])) { + $param['options'] = array(); + $type = 'varchar'; + } elseif (is_array($this->fields[$key]['arrayofkeyval'])) { + $param['options'] = $this->fields[$key]['arrayofkeyval']; + $type = 'select'; + } else { + $param['options'] = array(); + $type = $this->fields[$key]['type']; + } $label = $this->fields[$key]['label']; //$elementtype=$this->fields[$key]['elementtype']; // Seems not used @@ -6046,6 +5836,7 @@ abstract class CommonObject $computed = $this->fields[$key]['computed']; $unique = $this->fields[$key]['unique']; $required = $this->fields[$key]['required']; + $autofocusoncreate = $this->fields[$key]['autofocusoncreate']; $langfile = $this->fields[$key]['langfile']; $list = $this->fields[$key]['list']; @@ -6062,40 +5853,31 @@ abstract class CommonObject // Set value of $morecss. For this, we use in priority showsize from parameters, then $val['css'] then autodefine if (empty($morecss) && !empty($val['css'])) { - $morecss = $val['css']; - } - elseif (empty($morecss)) + $morecss = $val['css']; + } elseif (empty($morecss)) { if ($type == 'date') { $morecss = 'minwidth100imp'; - } - elseif ($type == 'datetime' || $type == 'link') + } elseif ($type == 'datetime' || $type == 'link') // link means an foreign key to another primary id { $morecss = 'minwidth200imp'; - } - elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) + } elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) { $morecss = 'maxwidth75'; } elseif ($type == 'url') { $morecss = 'minwidth400'; - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { $morecss = ''; - } - else - { + } else { if (round($size) < 12) { $morecss = 'minwidth100'; - } - elseif (round($size) <= 48) + } elseif (round($size) <= 48) { $morecss = 'minwidth200'; - } - else - { + } else { $morecss = 'minwidth400'; } } @@ -6113,56 +5895,44 @@ abstract class CommonObject // TODO Must also support $moreparam $out = $form->selectDate($value, $keyprefix.$key.$keysuffix, $showtime, $showtime, $required, '', 1, (($keyprefix != 'search_' && $keyprefix != 'search_options_') ? 1 : 0), 0, 1); - } - elseif (in_array($type, array('duration'))) + } elseif (in_array($type, array('duration'))) { $out = $form->select_duration($keyprefix.$key.$keysuffix, $value, 0, 'text', 0, 1); - } - elseif (in_array($type, array('int', 'integer'))) + } elseif (in_array($type, array('int', 'integer'))) { $tmp = explode(',', $size); $newsize = $tmp[0]; - $out = ''; - } - elseif (in_array($type, array('real'))) + $out = ''; + } elseif (in_array($type, array('real'))) { - $out = ''; - } - elseif (preg_match('/varchar/', $type)) + $out = ''; + } elseif (preg_match('/varchar/', $type)) { - $out = ''; - } - elseif (in_array($type, array('mail', 'phone', 'url'))) + $out = ''; + } elseif (in_array($type, array('mail', 'phone', 'url'))) { - $out = ''; - } - elseif ($type == 'text') + $out = ''; + } elseif ($type == 'text') { if (!preg_match('/search_/', $keyprefix)) // If keyprefix is search_ or search_options_, we must just use a simple text field { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, false, ROWS_5, '90%'); $out = $doleditor->Create(1); - } - else - { + } else { $out = ''; } - } - elseif ($type == 'html') + } elseif ($type == 'html') { if (!preg_match('/search_/', $keyprefix)) // If keyprefix is search_ or search_options_, we must just use a simple text field { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, !empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, '90%'); $out = $doleditor->Create(1); - } - else - { + } else { $out = ''; } - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { $checked = ''; if (!empty($value)) { @@ -6171,22 +5941,19 @@ abstract class CommonObject $checked = ' value="1" '; } $out = ''; - } - elseif ($type == 'price') + } elseif ($type == 'price') { if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format. $value = price($value); } $out = ' '.$langs->getCurrencySymbol($conf->currency); - } - elseif (preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) + } elseif (preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) { if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format. $value = price($value); } $out = ' '; - } - elseif ($type == 'select') + } elseif ($type == 'select') { $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) @@ -6196,7 +5963,7 @@ abstract class CommonObject } $out .= ''; - } - elseif ($type == 'sellist') + } elseif ($type == 'sellist') { $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) @@ -6275,14 +6041,10 @@ abstract class CommonObject { $sql .= ' as main, '.MAIN_DB_PREFIX.$InfoFieldList[0].'_extrafields as extra'; $sqlwhere .= ' WHERE extra.fk_object=main.'.$InfoFieldList[2].' AND '.$InfoFieldList[4]; - } - else - { + } else { $sqlwhere .= ' WHERE '.$InfoFieldList[4]; } - } - else - { + } else { $sqlwhere .= ' WHERE 1=1'; } // Some tables may have field, some other not. For the moment we disable it. @@ -6310,16 +6072,14 @@ abstract class CommonObject // Several field into label (eq table:code|libelle:rowid) $notrans = false; $fields_label = explode('|', $InfoFieldList[1]); - if (is_array($fields_label)) + if (count($fields_label) > 1) { $notrans = true; foreach ($fields_label as $field_toshow) { $labeltoshow .= $obj->$field_toshow.' '; } - } - else - { + } else { $labeltoshow = $obj->{$InfoFieldList[1]}; } $labeltoshow = dol_trunc($labeltoshow, 45); @@ -6336,16 +6096,13 @@ abstract class CommonObject } } $out .= ''; - } - else - { + } else { if (!$notrans) { $translabel = $langs->trans($obj->{$InfoFieldList[1]}); if ($translabel != $obj->{$InfoFieldList[1]}) { $labeltoshow = dol_trunc($translabel, 18); - } - else { + } else { $labeltoshow = dol_trunc($obj->{$InfoFieldList[1]}, 18); } } @@ -6369,19 +6126,16 @@ abstract class CommonObject $i++; } $this->db->free($resql); - } - else { + } else { print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.
'; } } $out .= ''; - } - elseif ($type == 'checkbox') + } elseif ($type == 'checkbox') { $value_arr = explode(',', $value); $out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, '', 0, '100%'); - } - elseif ($type == 'radio') + } elseif ($type == 'radio') { $out = ''; foreach ($param['options'] as $keyopt => $val) @@ -6392,13 +6146,11 @@ abstract class CommonObject $out .= ($value == $keyopt ? 'checked' : ''); $out .= '/>
'; } - } - elseif ($type == 'chkbxlst') + } elseif ($type == 'chkbxlst') { if (is_array($value)) { $value_arr = $value; - } - else { + } else { $value_arr = explode(',', $value); } @@ -6482,7 +6234,7 @@ abstract class CommonObject $notrans = false; // Several field into label (eq table:code|libelle:rowid) $fields_label = explode('|', $InfoFieldList[1]); - if (is_array($fields_label)) { + if (count($fields_label) > 1) { $notrans = true; foreach ($fields_label as $field_toshow) { $labeltoshow .= $obj->$field_toshow.' '; @@ -6536,17 +6288,18 @@ abstract class CommonObject print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.
'; } } - } - elseif ($type == 'link') + } elseif ($type == 'link') { $param_list = array_keys($param['options']); // $param_list='ObjectName:classPath[:AddCreateButtonOrNot[:Filter]]' $param_list_array = explode(':', $param_list[0]); $showempty = (($required && $default != '') ? 0 : 1); + if (!empty($param_list_array[2])) { // If the entry into $fields is set to add a create button + $morecss .= ' widthcentpercentminusx'; + } $out = $form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss, $moreparam, 0, empty($val['disabled']) ? 0 : 1); - if (!empty($param_list_array[2])) // If we set to add a create button - { + if (!empty($param_list_array[2])) { // If the entry into $fields is set to add a create button if (!GETPOSTISSET('backtopage') && empty($val['disabled']) && empty($nonewbutton)) // To avoid to open several times the 'Create Object' button and to avoid to have button if field is protected by a "disabled". { list($class, $classfile) = explode(':', $param_list[0]); @@ -6560,13 +6313,11 @@ abstract class CommonObject $out .= ''; } } - } - elseif ($type == 'password') + } elseif ($type == 'password') { // If prefix is 'search_', field is used as a filter, we use a common text field. $out = ''; - } - elseif ($type == 'array') + } elseif ($type == 'array') { $newval = $val; $newval['type'] = 'varchar(256)'; @@ -6645,8 +6396,7 @@ abstract class CommonObject { $type = 'varchar'; // convert varchar(xx) int varchar $size = $reg[1]; - } - elseif (preg_match('/varchar/', $type)) $type = 'varchar'; // convert varchar(xx) int varchar + } elseif (preg_match('/varchar/', $type)) $type = 'varchar'; // convert varchar(xx) int varchar if (is_array($val['arrayofkeyval'])) $type = 'select'; if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) $type = 'link'; @@ -6662,11 +6412,10 @@ abstract class CommonObject { $type = 'link'; $param['options'] = array($reg[1].':'.$reg[2]=>$reg[1].':'.$reg[2]); + } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); + $type = 'sellist'; } - elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); - $type = 'sellist'; - } $langfile = $val['langfile']; $list = $val['list']; @@ -6688,35 +6437,26 @@ abstract class CommonObject if ($type == 'date') { $morecss = 'minwidth100imp'; - } - elseif ($type == 'datetime' || $type == 'timestamp') + } elseif ($type == 'datetime' || $type == 'timestamp') { $morecss = 'minwidth200imp'; - } - elseif (in_array($type, array('int', 'double', 'price'))) + } elseif (in_array($type, array('int', 'double', 'price'))) { $morecss = 'maxwidth75'; - } - elseif ($type == 'url') + } elseif ($type == 'url') { $morecss = 'minwidth400'; - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { $morecss = ''; - } - else - { + } else { if (round($size) < 12) { $morecss = 'minwidth100'; - } - elseif (round($size) <= 48) + } elseif (round($size) <= 48) { $morecss = 'minwidth200'; - } - else - { + } else { $morecss = 'minwidth400'; } } @@ -6732,59 +6472,49 @@ abstract class CommonObject } else { $value = ''; } - } - elseif ($type == 'datetime' || $type == 'timestamp') + } elseif ($type == 'datetime' || $type == 'timestamp') { if (!empty($value)) { $value = dol_print_date($value, 'dayhour'); } else { $value = ''; } - } - elseif ($type == 'duration') + } elseif ($type == 'duration') { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; if (!is_null($value) && $value !== '') { $value = convertSecondToTime($value, 'allhourmin'); } - } - elseif ($type == 'double' || $type == 'real') + } elseif ($type == 'double' || $type == 'real') { if (!is_null($value) && $value !== '') { $value = price($value); } - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { $checked = ''; if (!empty($value)) { $checked = ' checked '; } $value = ''; - } - elseif ($type == 'mail') + } elseif ($type == 'mail') { $value = dol_print_email($value, 0, 0, 0, 64, 1, 1); - } - elseif ($type == 'url') + } elseif ($type == 'url') { $value = dol_print_url($value, '_blank', 32, 1); - } - elseif ($type == 'phone') + } elseif ($type == 'phone') { $value = dol_print_phone($value, '', 0, 0, '', ' ', 1); - } - elseif ($type == 'price') + } elseif ($type == 'price') { if (!is_null($value) && $value !== '') { $value = price($value, 0, $langs, 0, 0, -1, $conf->currency); } - } - elseif ($type == 'select') + } elseif ($type == 'select') { $value = $param['options'][$value]; - } - elseif ($type == 'sellist') + } elseif ($type == 'sellist') { $param_list = array_keys($param['options']); $InfoFieldList = explode(":", $param_list[0]); @@ -6845,9 +6575,7 @@ abstract class CommonObject $value .= $obj->$field_toshow.' '; } } - } - else - { + } else { $translabel = ''; if (!empty($obj->{$InfoFieldList[1]})) { $translabel = $langs->trans($obj->{$InfoFieldList[1]}); @@ -6858,14 +6586,11 @@ abstract class CommonObject $value = $obj->{$InfoFieldList[1]}; } } - } - else dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING); - } - elseif ($type == 'radio') + } else dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING); + } elseif ($type == 'radio') { $value = $param['options'][$value]; - } - elseif ($type == 'checkbox') + } elseif ($type == 'checkbox') { $value_arr = explode(',', $value); $value = ''; @@ -6877,8 +6602,7 @@ abstract class CommonObject } $value = '
    '.implode(' ', $toprint).'
'; } - } - elseif ($type == 'chkbxlst') + } elseif ($type == 'chkbxlst') { $value_arr = explode(',', $value); @@ -6945,8 +6669,7 @@ abstract class CommonObject } else { dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING); } - } - elseif ($type == 'link') + } elseif ($type == 'link') { $out = ''; @@ -6968,29 +6691,23 @@ abstract class CommonObject $object->fetch($value); $value = $object->getNomUrl($getnomurlparam); } - } - else - { + } else { dol_syslog('Error bad setup of extrafield', LOG_WARNING); return 'Error bad setup of extrafield'; } - } - else $value = ''; - } - elseif ($type == 'text' || $type == 'html') + } else $value = ''; + } elseif ($type == 'text' || $type == 'html') { $value = dol_htmlentitiesbr($value); - } - elseif ($type == 'password') + } elseif ($type == 'password') { $value = preg_replace('/./i', '*', $value); - } - elseif ($type == 'array') + } elseif ($type == 'array') { $value = implode('
', $value); } - //print $type.'-'.$size; + //print $type.'-'.$size.'-'.$value; $out = $value; return $out; @@ -7011,241 +6728,245 @@ abstract class CommonObject */ public function showOptionals($extrafields, $mode = 'view', $params = null, $keysuffix = '', $keyprefix = '', $onetrtd = 0) { - global $db, $conf, $langs, $action, $form; + global $db, $conf, $langs, $action, $form, $hookmanager; if (!is_object($form)) $form = new Form($db); $out = ''; - if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0) + $parameters = array(); + $reshook = $hookmanager->executeHooks('showOptionals', $parameters, $this, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) { - $out .= "\n"; - $out .= ' '; - $out .= "\n"; - - $extrafields_collapse_num = ''; - $e = 0; - foreach ($extrafields->attributes[$this->table_element]['label'] as $key=>$label) + if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0) { - // Show only the key field in params - if (is_array($params) && array_key_exists('onlykey', $params) && $key != $params['onlykey']) continue; + $out .= "\n"; + $out .= ' '; + $out .= "\n"; - // @todo Add test also on 'enabled' (different than 'list' that is 'visibility') - $enabled = 1; - if ($enabled && isset($extrafields->attributes[$this->table_element]['enabled'][$key])) + $extrafields_collapse_num = ''; + $e = 0; + foreach ($extrafields->attributes[$this->table_element]['label'] as $key=>$label) { - $enabled = dol_eval($extrafields->attributes[$this->table_element]['enabled'][$key], 1); - } - if (empty($enabled)) continue; + // Show only the key field in params + if (is_array($params) && array_key_exists('onlykey', $params) && $key != $params['onlykey']) continue; - $visibility = 1; - if ($visibility && isset($extrafields->attributes[$this->table_element]['list'][$key])) - { - $visibility = dol_eval($extrafields->attributes[$this->table_element]['list'][$key], 1); - } - - $perms = 1; - if ($perms && isset($extrafields->attributes[$this->table_element]['perms'][$key])) - { - $perms = dol_eval($extrafields->attributes[$this->table_element]['perms'][$key], 1); - } - - if (($mode == 'create') && abs($visibility) != 1 && abs($visibility) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list - elseif (($mode == 'edit') && abs($visibility) != 1 && abs($visibility) != 3 && abs($visibility) != 4) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list and <> 4 = not visible at the creation - elseif ($mode == 'view' && empty($visibility)) continue; - if (empty($perms)) continue; - // Load language if required - if (!empty($extrafields->attributes[$this->table_element]['langfile'][$key])) { - $langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]); - } - - $colspan = ''; - if (is_array($params) && count($params) > 0) { - if (array_key_exists('cols', $params)) { - $colspan = $params['cols']; + // @todo Add test also on 'enabled' (different than 'list' that is 'visibility') + $enabled = 1; + if ($enabled && isset($extrafields->attributes[$this->table_element]['enabled'][$key])) + { + $enabled = dol_eval($extrafields->attributes[$this->table_element]['enabled'][$key], 1); } - elseif (array_key_exists('colspan', $params)) { // For backward compatibility. Use cols instead now. - $reg = array(); - if (preg_match('/colspan="(\d+)"/', $params['colspan'], $reg)) { - $colspan = $reg[1]; - } - else { - $colspan = $params['colspan']; - } + if (empty($enabled)) continue; + + $visibility = 1; + if ($visibility && isset($extrafields->attributes[$this->table_element]['list'][$key])) + { + $visibility = dol_eval($extrafields->attributes[$this->table_element]['list'][$key], 1); } - } - switch ($mode) { - case "view": - $value = $this->array_options["options_".$key.$keysuffix]; - break; - case "create": - case "edit": - $getposttemp = GETPOST($keyprefix.'options_'.$key.$keysuffix, 'none'); // GETPOST can get value from GET, POST or setup of default values. - // GETPOST("options_" . $key) can be 'abc' or array(0=>'abc') - if (is_array($getposttemp) || $getposttemp != '' || GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)) - { - if (is_array($getposttemp)) { - // $getposttemp is an array but following code expects a comma separated string - $value = implode(",", $getposttemp); - } else { - $value = $getposttemp; - } - } else { - $value = $this->array_options["options_".$key]; // No GET, no POST, no default value, so we take value of object. - } - //var_dump($keyprefix.' - '.$key.' - '.$keysuffix.' - '.$keyprefix.'options_'.$key.$keysuffix.' - '.$this->array_options["options_".$key.$keysuffix].' - '.$getposttemp.' - '.$value); - break; - } + $perms = 1; + if ($perms && isset($extrafields->attributes[$this->table_element]['perms'][$key])) + { + $perms = dol_eval($extrafields->attributes[$this->table_element]['perms'][$key], 1); + } - if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate') - { - $extrafields_collapse_num = ''; - $extrafield_param = $extrafields->attributes[$this->table_element]['param'][$key]; - if (!empty($extrafield_param) && is_array($extrafield_param)) { - $extrafield_param_list = array_keys($extrafield_param['options']); + if (($mode == 'create') && abs($visibility) != 1 && abs($visibility) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list + elseif (($mode == 'edit') && abs($visibility) != 1 && abs($visibility) != 3 && abs($visibility) != 4) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list and <> 4 = not visible at the creation + elseif ($mode == 'view' && empty($visibility)) continue; + if (empty($perms)) continue; + // Load language if required + if (!empty($extrafields->attributes[$this->table_element]['langfile'][$key])) { + $langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]); + } - if (count($extrafield_param_list) > 0) { - $extrafield_collapse_display_value = intval($extrafield_param_list[0]); - - if ($extrafield_collapse_display_value == 1 || $extrafield_collapse_display_value == 2) { - $extrafields_collapse_num = $extrafields->attributes[$this->table_element]['pos'][$key]; - } - } - } - - $out .= $extrafields->showSeparator($key, $this, ($colspan + 1)); - } - else - { - $class = (!empty($extrafields->attributes[$this->table_element]['hidden'][$key]) ? 'hideobject ' : ''); - $csstyle = ''; + $colspan = ''; if (is_array($params) && count($params) > 0) { - if (array_key_exists('class', $params)) { - $class .= $params['class'].' '; - } - if (array_key_exists('style', $params)) { - $csstyle = $params['style']; + if (array_key_exists('cols', $params)) { + $colspan = $params['cols']; + } elseif (array_key_exists('colspan', $params)) { // For backward compatibility. Use cols instead now. + $reg = array(); + if (preg_match('/colspan="(\d+)"/', $params['colspan'], $reg)) { + $colspan = $reg[1]; + } else { + $colspan = $params['colspan']; + } } } - // add html5 elements - $domData = ' data-element="extrafield"'; - $domData .= ' data-targetelement="'.$this->element.'"'; - $domData .= ' data-targetid="'.$this->id.'"'; - - $html_id = (empty($this->id) ? '' : 'extrarow-'.$this->element.'_'.$key.'_'.$this->id); - - $out .= ''; - - if (!empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan = '0'; } - - if ($action == 'selectlines') { $colspan++; } - - // Convert date into timestamp format (value in memory must be a timestamp) - if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('date', 'datetime'))) - { - $datenotinstring = $this->array_options['options_'.$key]; - if (!is_numeric($this->array_options['options_'.$key])) // For backward compatibility - { - $datenotinstring = $this->db->jdate($datenotinstring); - } - $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ?dol_mktime(GETPOST($keyprefix.'options_'.$key.$keysuffix."hour", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."min", 'int', 3), 0, GETPOST($keyprefix.'options_'.$key.$keysuffix."month", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year", 'int', 3)) : $datenotinstring; - } - // Convert float submited string into real php numeric (value in memory must be a php numeric) - if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('price', 'double'))) - { - $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ?price2num(GETPOST($keyprefix.'options_'.$key.$keysuffix, 'alpha', 3)) : $this->array_options['options_'.$key]; - } - // HTML, select, integer and text add default value - if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'select', 'int'))) - { - if ($action == 'create') $value = $extrafields->attributes[$this->table_element]['default'][$key]; - else $value = $this->array_options['options_'.$key]; - } - - $labeltoshow = $langs->trans($label); - $helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]); - - $out .= ''; - - $html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : ''; - - $out .= ''; - - /*for($ii = 0; $ii < ($colspan - 1); $ii++) + if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate') { - $out .=''; - }*/ + $extrafields_collapse_num = ''; + $extrafield_param = $extrafields->attributes[$this->table_element]['param'][$key]; + if (!empty($extrafield_param) && is_array($extrafield_param)) { + $extrafield_param_list = array_keys($extrafield_param['options']); - if (!empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= ''; - else $out .= ''; - $e++; - } - } - $out .= "\n"; - // Add code to manage list depending on others - if (!empty($conf->use_javascript_ajax)) { - $out .= ' - '."\n"; - $out .= ' '."\n"; + $out .= $extrafields->showSeparator($key, $this, ($colspan + 1)); + } else { + $class = (!empty($extrafields->attributes[$this->table_element]['hidden'][$key]) ? 'hideobject ' : ''); + $csstyle = ''; + if (is_array($params) && count($params) > 0) { + if (array_key_exists('class', $params)) { + $class .= $params['class'].' '; + } + if (array_key_exists('style', $params)) { + $csstyle = $params['style']; + } + } + + // add html5 elements + $domData = ' data-element="extrafield"'; + $domData .= ' data-targetelement="'.$this->element.'"'; + $domData .= ' data-targetid="'.$this->id.'"'; + + $html_id = (empty($this->id) ? '' : 'extrarow-'.$this->element.'_'.$key.'_'.$this->id); + + if (!empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan = '0'; } + + if ($action == 'selectlines') { $colspan++; } + + // Convert date into timestamp format (value in memory must be a timestamp) + if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('date', 'datetime'))) + { + $datenotinstring = $this->array_options['options_'.$key]; + if (!is_numeric($this->array_options['options_'.$key])) // For backward compatibility + { + $datenotinstring = $this->db->jdate($datenotinstring); + } + $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ?dol_mktime(GETPOST($keyprefix.'options_'.$key.$keysuffix."hour", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."min", 'int', 3), 0, GETPOST($keyprefix.'options_'.$key.$keysuffix."month", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year", 'int', 3)) : $datenotinstring; + } + // Convert float submited string into real php numeric (value in memory must be a php numeric) + if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('price', 'double'))) + { + $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ?price2num(GETPOST($keyprefix.'options_'.$key.$keysuffix, 'alpha', 3)) : $this->array_options['options_'.$key]; + } + // HTML, select, integer and text add default value + if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'select', 'int'))) + { + if ($action == 'create') $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ? GETPOST($keyprefix.'options_'.$key.$keysuffix, 'none', 3) : $extrafields->attributes[$this->table_element]['default'][$key]; + else $value = $this->array_options['options_'.$key]; + } + + $labeltoshow = $langs->trans($label); + $helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]); + + $out .= ''; + $out .= ''; + + $html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : ''; + + $out .= ''; + + /*for($ii = 0; $ii < ($colspan - 1); $ii++) + { + $out .=''; + }*/ + + if (!empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= ''; + else $out .= ''; + $e++; + } + } + $out .= "\n"; + // Add code to manage list depending on others + if (!empty($conf->use_javascript_ajax)) { + $out .= ' + '."\n"; + } + + $out .= ' '."\n"; } } + + $out .= $hookmanager->resPrint; + return $out; } @@ -7314,9 +7035,7 @@ abstract class CommonObject if (($unitPrice > 0) && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) // In most cases, test here is false { $buyPrice = $unitPrice * (1 - $discountPercent / 100); - } - else - { + } else { // Get cost price for margin calculation if (!empty($fk_product)) { @@ -7333,13 +7052,11 @@ abstract class CommonObject if ($product->cost_price > 0) { $buyPrice = $product->cost_price; - } - elseif ($product->pmp > 0) + } elseif ($product->pmp > 0) { $buyPrice = $product->pmp; } - } - elseif (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') + } elseif (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $product = new Product($this->db); @@ -7362,8 +7079,7 @@ abstract class CommonObject if (($result = $productFournisseur->find_min_price_product_fournisseur($fk_product)) > 0) { $buyPrice = $productFournisseur->fourn_unitprice; - } - elseif ($result < 0) + } elseif ($result < 0) { $this->errors[] = $productFournisseur->error; return -2; @@ -7374,7 +7090,7 @@ abstract class CommonObject return $buyPrice; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show photos of an object (nbmax maximum), into several columns * @@ -7394,7 +7110,7 @@ abstract class CommonObject */ public function show_photos($modulepart, $sdir, $size = 0, $nbmax = 0, $nbbyrow = 5, $showfilename = 0, $showaction = 0, $maxHeight = 120, $maxWidth = 160, $nolink = 0, $notitle = 0, $usesharelink = 0) { - // phpcs:enable + // phpcs:enable global $conf, $user, $langs; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -7476,8 +7192,7 @@ abstract class CommonObject if ($nbphoto % $nbbyrow == 1) $return .= ''; $return .= ''; if (($nbphoto % $nbbyrow) == 0) $return .= ''; - } - elseif ($nbbyrow < 0) $return .= ''; + } elseif ($nbbyrow < 0) $return .= ''; } if (empty($size)) { // Format origine @@ -7647,8 +7355,7 @@ abstract class CommonObject { if (isset($info['type']) && ($info['type'] == 'duration')) return true; else return false; - } - else return false; + } else return false; } /** @@ -7663,8 +7370,7 @@ abstract class CommonObject { if (isset($info['type']) && ($info['type'] == 'int' || preg_match('/^integer/i', $info['type']))) return true; else return false; - } - else return false; + } else return false; } /** @@ -7768,13 +7474,10 @@ abstract class CommonObject if (empty($this->{$field})) { $queryarray[$field] = null; - } - else - { + } else { $queryarray[$field] = $this->db->idate($this->{$field}); } - } - elseif ($this->isArray($info)) + } elseif ($this->isArray($info)) { if (!empty($this->{$field})) { if (!is_array($this->{$field})) { @@ -7784,28 +7487,22 @@ abstract class CommonObject } else { $queryarray[$field] = null; } - } - elseif ($this->isDuration($info)) + } elseif ($this->isDuration($info)) { // $this->{$field} may be null, '', 0, '0', 123, '123' if ($this->{$field} != '' || !empty($info['notnull'])) $queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1 else $queryarray[$field] = null; - } - elseif ($this->isInt($info) || $this->isFloat($info)) + } elseif ($this->isInt($info) || $this->isFloat($info)) { if ($field == 'entity' && is_null($this->{$field})) $queryarray[$field] = $conf->entity; - else - { + else { // $this->{$field} may be null, '', 0, '0', 123, '123' if ($this->{$field} != '' || !empty($info['notnull'])) { if ($this->isInt($info)) $queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1 if ($this->isFloat($info)) $queryarray[$field] = (double) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1 - } - else $queryarray[$field] = null; + } else $queryarray[$field] = null; } - } - else - { + } else { $queryarray[$field] = $this->{$field}; } @@ -7820,7 +7517,7 @@ abstract class CommonObject * Function to load data from a SQL pointer into properties of current object $this * * @param stdClass $obj Contain data of object from database - * @return void + * @return void */ public function setVarsFromFetchObj(&$obj) { @@ -7830,8 +7527,7 @@ abstract class CommonObject { if (empty($obj->{$field}) || $obj->{$field} === '0000-00-00 00:00:00' || $obj->{$field} === '1000-01-01 00:00:00') $this->{$field} = 0; else $this->{$field} = strtotime($obj->{$field}); - } - elseif ($this->isArray($info)) + } elseif ($this->isArray($info)) { if (!empty($obj->{$field})) { $this->{$field} = @unserialize($obj->{$field}); @@ -7840,19 +7536,15 @@ abstract class CommonObject } else { $this->{$field} = array(); } - } - elseif ($this->isInt($info)) + } elseif ($this->isInt($info)) { if ($field == 'rowid') $this->id = (int) $obj->{$field}; - else - { + else { if ($this->isForcedToNullIfZero($info)) { if (empty($obj->{$field})) $this->{$field} = null; else $this->{$field} = (double) $obj->{$field}; - } - else - { + } else { if (!is_null($obj->{$field}) || (isset($info['notnull']) && $info['notnull'] == 1)) { $this->{$field} = (int) $obj->{$field}; } else { @@ -7860,25 +7552,20 @@ abstract class CommonObject } } } - } - elseif ($this->isFloat($info)) + } elseif ($this->isFloat($info)) { if ($this->isForcedToNullIfZero($info)) { if (empty($obj->{$field})) $this->{$field} = null; else $this->{$field} = (double) $obj->{$field}; - } - else - { + } else { if (!is_null($obj->{$field}) || (isset($info['notnull']) && $info['notnull'] == 1)) { $this->{$field} = (double) $obj->{$field}; } else { $this->{$field} = null; } } - } - else - { + } else { $this->{$field} = $obj->{$field}; } } @@ -7909,6 +7596,10 @@ abstract class CommonObject { if (is_null($value)) return 'NULL'; elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) return $this->db->escape("$value"); + elseif ($fieldsentry['type'] == 'boolean') { + if ($value) return 'true'; + else return 'false'; + } else return "'".$this->db->escape($value)."'"; } @@ -7937,11 +7628,11 @@ abstract class CommonObject if (array_key_exists('ref', $fieldvalues)) $fieldvalues['ref'] = dol_string_nospecial($fieldvalues['ref']); // If field is a ref, we sanitize data $keys = array(); - $values = array(); + $values = array(); // Array to store string forged for SQL syntax foreach ($fieldvalues as $k => $v) { $keys[$k] = $k; $value = $this->fields[$k]; - $values[$k] = $this->quote($v, $value); + $values[$k] = $this->quote($v, $value); // May return string 'NULL' if $value is null } // Clean and check mandatory @@ -7951,13 +7642,18 @@ abstract class CommonObject if (preg_match('/^integer:/i', $this->fields[$key]['type']) && $values[$key] == '-1') $values[$key] = ''; if (!empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') $values[$key] = ''; - //var_dump($key.'-'.$values[$key].'-'.($this->fields[$key]['notnull'] == 1)); - if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && !isset($values[$key]) && is_null($this->fields[$key]['default'])) + if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && (!isset($values[$key]) || $values[$key] === 'NULL') && is_null($this->fields[$key]['default'])) { $error++; $this->errors[] = $langs->trans("ErrorFieldRequired", $this->fields[$key]['label']); } + // If value is null and there is a default value for field + if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && (!isset($values[$key]) || $values[$key] === 'NULL') && !is_null($this->fields[$key]['default'])) + { + $values[$key] = $this->fields[$key]['default']; + } + // If field is an implicit foreign key field if (preg_match('/^integer:/i', $this->fields[$key]['type']) && empty($values[$key])) { if (isset($this->fields[$key]['default'])) $values[$key] = $this->fields[$key]['default']; @@ -7991,19 +7687,19 @@ abstract class CommonObject // If we have a field ref with a default value of (PROV) if (!$error) { - if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && !is_null($this->fields['ref']['default']) && $this->fields['ref']['default'] == '(PROV)') - { - $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE (ref = '(PROV)' OR ref = '') AND rowid = ".$this->id; - $resqlupdate = $this->db->query($sql); + if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && !is_null($this->fields['ref']['default']) && $this->fields['ref']['default'] == '(PROV)') + { + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE (ref = '(PROV)' OR ref = '') AND rowid = ".$this->id; + $resqlupdate = $this->db->query($sql); - if ($resqlupdate === false) - { - $error++; - $this->errors[] = $this->db->lasterror(); - } else { - $this->ref = '(PROV'.$this->id.')'; - } - } + if ($resqlupdate === false) + { + $error++; + $this->errors[] = $this->db->lasterror(); + } else { + $this->ref = '(PROV'.$this->id.')'; + } + } } // Create extrafields @@ -8076,11 +7772,11 @@ abstract class CommonObject $sql = 'SELECT '.$fieldlist; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element; - if (!empty($id)) $sql .= ' WHERE rowid = '.$id; + if (!empty($id)) $sql .= ' WHERE rowid = '.$id; elseif (!empty($ref)) $sql .= " WHERE ref = ".$this->quote($ref, $this->fields['ref']); else $sql .= ' WHERE 1 = 1'; // usage with empty id and empty ref is very rare if (empty($id) && isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' AND entity IN ('.getEntity($this->table_element).')'; - if ($morewhere) $sql .= $morewhere; + if ($morewhere) $sql .= $morewhere; $sql .= ' LIMIT 1'; // This is a fetch, to be sure to get only one record $res = $this->db->query($sql); @@ -8090,15 +7786,16 @@ abstract class CommonObject if ($obj) { $this->setVarsFromFetchObj($obj); + + // Retreive all extrafield + // fetch optionals attributes and labels + $this->fetch_optionals(); + return $this->id; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errors[] = $this->error; return -1; @@ -8126,6 +7823,9 @@ abstract class CommonObject $sql .= ' FROM '.MAIN_DB_PREFIX.$objectline->table_element; $sql .= ' WHERE fk_'.$this->element.' = '.$this->id; if ($morewhere) $sql .= $morewhere; + if (isset($objectline->fields['position'])) { + $sql .= $this->db->order('position', 'ASC'); + } $resql = $this->db->query($sql); if ($resql) @@ -8146,9 +7846,7 @@ abstract class CommonObject } return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errors[] = $this->error; return -1; @@ -8275,8 +7973,7 @@ abstract class CommonObject return -1; } } - } - elseif (!empty($this->fk_element) && !empty($this->childtables)) // If object has childs linked with a foreign key field, we check all child tables. + } elseif (!empty($this->fk_element) && !empty($this->childtables)) // If object has childs linked with a foreign key field, we check all child tables. { $objectisused = $this->isObjectUsed($this->id); if (!empty($objectisused)) @@ -8290,20 +7987,47 @@ abstract class CommonObject } // Delete cascade first - if (!empty($this->childtablesoncascade)) { - foreach ($this->childtablesoncascade as $table) - { - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$table.' WHERE '.$this->fk_element.' = '.$this->id; - $resql = $this->db->query($sql); - if (!$resql) - { - $this->error = $this->db->lasterror(); - $this->errors[] = $this->error; - $this->db->rollback(); - return -1; - } - } - } + if (is_array($this->childtablesoncascade) && !empty($this->childtablesoncascade)) { + foreach ($this->childtablesoncascade as $table) + { + $deleteFromObject = explode(':', $table); + if (count($deleteFromObject) >= 2) { + $className = str_replace('@', '', $deleteFromObject[0]); + $filePath = $deleteFromObject[1]; + $columnName = $deleteFromObject[2]; + if (dol_include_once($filePath)) { + $childObject = new $className($this->db); + if (method_exists($childObject, 'deleteByParentField')) { + $result = $childObject->deleteByParentField($this->id, $columnName); + if ($result < 0) { + $error++; + $this->errors[] = $childObject->error; + break; + } + } else { + $error++; + $this->errors[] = "You defined a cascade delete on an object $childObject but there is no method deleteByParentField for it"; + break; + } + } else { + $error++; + $this->errors[] = 'Cannot include child class file '.$filePath; + break; + } + } else { + // Delete record in child table + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$table.' WHERE '.$this->fk_element.' = '.$this->id; + + $resql = $this->db->query($sql); + if (!$resql) { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + break; + } + } + } + } if (!$error) { if (!$notrigger) { @@ -8341,6 +8065,66 @@ abstract class CommonObject } } + /** + * Delete all child object from a parent ID + * + * @param int $parentId Parent Id + * @param string $parentField Name of Foreign key parent column + * @return int <0 if KO, >0 if OK + * @throws Exception + */ + public function deleteByParentField($parentId = 0, $parentField = '') + { + global $user; + + $error = 0; + $deleted = 0; + + if (!empty($parentId) && !empty($parentField)) { + $this->db->begin(); + + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX.$this->table_element; + $sql .= ' WHERE '.$parentField.' = '.(int) $parentId; + + $resql = $this->db->query($sql); + if (!$resql) { + $this->errors[] = $this->db->lasterror(); + $error++; + } else { + while ($obj = $this->db->fetch_object($resql)) { + $result = $this->fetch($obj->rowid); + if ($result < 0) { + $error++; + $this->errors[] = $this->error; + } else { + if (get_class($this) == 'Contact') { // TODO special code because delete() for contact has not been standardized like other delete. + $result = $this->delete(); + } else { + $result = $this->delete($user); + } + if ($result < 0) { + $error++; + $this->errors[] = $this->error; + } else { + $deleted++; + } + } + } + } + + if (empty($error)) { + $this->db->commit(); + return $deleted; + } else { + $this->error = implode(', ', $this->errors); + $this->db->rollback(); + return $error * -1; + } + } + + return $deleted; + } + /** * Delete a line of object in database * @@ -8378,9 +8162,8 @@ abstract class CommonObject if (empty($error)) { // Remove extrafields - if (!$error) - { - $tmpobjectline = new $tmpforobjectlineclass($this->db); + $tmpobjectline = new $tmpforobjectlineclass($this->db); + if (!isset($tmpobjectline->isextrafieldmanaged) || !empty($tmpobjectline->isextrafieldmanaged)) { $tmpobjectline->id = $idline; $result = $tmpobjectline->deleteExtraFields(); if ($result < 0) @@ -8442,9 +8225,7 @@ abstract class CommonObject $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -8460,7 +8241,7 @@ abstract class CommonObject */ public function initAsSpecimenCommon() { - global $user; + global $user; $this->id = 0; if (array_key_exists('label', $this->fields)) $this->label = 'This is label'; @@ -8496,40 +8277,121 @@ abstract class CommonObject return count($this->comments); } - /** - * Return nb comments already posted - * - * @return int - */ - public function getNbComments() - { - return count($this->comments); - } + /** + * Return nb comments already posted + * + * @return int + */ + public function getNbComments() + { + return count($this->comments); + } - /** - * Trim object parameters - * @param string[] $parameters array of parameters to trim - * - * @return void - */ - public function trimParameters($parameters) - { - if (!is_array($parameters)) return; - foreach ($parameters as $parameter) { - if (isset($this->$parameter)) { - $this->$parameter = trim($this->$parameter); - } - } - } + /** + * Trim object parameters + * @param string[] $parameters array of parameters to trim + * + * @return void + */ + public function trimParameters($parameters) + { + if (!is_array($parameters)) return; + foreach ($parameters as $parameter) { + if (isset($this->$parameter)) { + $this->$parameter = trim($this->$parameter); + } + } + } - /** - * copy related categories to another object - * - * @param int $fromId Id object source - * @param int $toId Id object cible - * @param string $type Type of category ('product', ...) - * @return int < 0 si erreur, > 0 si ok - */ + /* Part for categories/tags */ + + /** + * Sets object to given categories. + * + * Deletes object from existing categories not supplied. + * Adds it to non existing supplied categories. + * Existing categories are left untouch. + * + * @param string $type_categ Category type ('customer', 'supplier', 'website_page', ...) + * @return int Array of category objects or < 0 if KO + */ + public function getCategoriesCommon($type_categ) + { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + + // Get current categories + $c = new Categorie($this->db); + $existing = $c->containing($this->id, $type_categ, 'id'); + + return $existing; + } + + /** + * Sets object to given categories. + * + * Deletes object from existing categories not supplied. + * Adds it to non existing supplied categories. + * Existing categories are left untouch. + * + * @param int[]|int $categories Category ID or array of Categories IDs + * @param string $type_categ Category type ('customer', 'supplier', 'website_page', ...) + * @return int <0 if KO, >0 if OK + */ + public function setCategoriesCommon($categories, $type_categ) + { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + + // Handle single category + if (!is_array($categories)) { + $categories = array($categories); + } + + // Get current categories + $c = new Categorie($this->db); + $existing = $c->containing($this->id, $type_categ, 'id'); + + // Diff + if (is_array($existing)) { + $to_del = array_diff($existing, $categories); + $to_add = array_diff($categories, $existing); + } else { + $to_del = array(); // Nothing to delete + $to_add = $categories; + } + + $error = 0; + + // Process + foreach ($to_del as $del) { + if ($c->fetch($del) > 0) { + $c->del_type($this, $type_categ); + } + } + foreach ($to_add as $add) { + if ($c->fetch($add) > 0) + { + $result = $c->add_type($this, $type_categ); + if ($result < 0) + { + $error++; + $this->error = $c->error; + $this->errors = $c->errors; + break; + } + } + } + + return $error ? -1 : 1; + } + + /** + * Copy related categories to another object + * + * @param int $fromId Id object source + * @param int $toId Id object cible + * @param string $type Type of category ('product', ...) + * @return int < 0 si erreur, > 0 si ok + */ public function cloneCategories($fromId, $toId, $type = '') { $this->db->begin(); @@ -8553,4 +8415,49 @@ abstract class CommonObject $this->db->commit(); return 1; } + + /** + * Delete related files of object in database + * + * @return bool + */ + public function deleteEcmFiles() + { + global $conf; + + $this->db->begin(); + + switch ($this->element){ + case 'propal': + $element = 'propale'; + break; + case 'product': + $element = 'produit'; + break; + case 'order_supplier': + $element ='fournisseur/commande'; + break; + case 'invoice_supplier': + $element = 'fournisseur/facture/' . get_exdir($this->id, 2, 0, 1, $this, 'invoice_supplier'); + break; + case 'shipping': + $element = 'expedition/sending'; + break; + default: + $element = $this->element; + } + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."ecm_files"; + $sql.= " WHERE filename LIKE '".$this->db->escape($this->ref)."%'"; + $sql.= " AND filepath = '".$element."/".$this->db->escape($this->ref)."' AND entity = ".$conf->entity; + + if (!$this->db->query($sql)) { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return false; + } + + $this->db->commit(); + return true; + } } diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index f04e2da11ee..c7e95aa1fbc 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -51,11 +51,21 @@ abstract class CommonObjectLine extends CommonObject /** - * Returns the translation key from units dictionary. + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } + + /** + * Returns the label, shot_label or code found in units dictionary from ->fk_unit. * A langs->trans() must be called on result to get translated value. * - * @param string $type Label type (long or short). This can be a translation key. - * @return string|int <0 if ko, label if ok + * @param string $type Label type ('long', 'short' or 'code'). This can be a translation key. + * @return string|int <0 if KO, label if OK (Example: 'long', 'short' or 'unitCODE') */ public function getLabelOfUnit($type = 'long') { @@ -69,22 +79,19 @@ abstract class CommonObjectLine extends CommonObject $label_type = 'label'; - if ($type == 'short') - { - $label_type = 'short_label'; - } + $label_type = 'label'; + if ($type == 'short') $label_type = 'short_label'; + elseif ($type == 'code') $label_type = 'code'; - $sql = 'select '.$label_type.' from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit; + $sql = 'select '.$label_type.', code from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit; $resql = $this->db->query($sql); - if ($resql && $this->db->num_rows($resql) > 0) - { + if ($resql && $this->db->num_rows($resql) > 0) { $res = $this->db->fetch_array($resql); - $label = $res[$label_type]; + if ($label_type == 'code') $label = 'unit'.$res['code']; + else $label = $res[$label_type]; $this->db->free($resql); return $label; - } - else - { + } else { $this->error = $this->db->error().' sql='.$sql; dol_syslog(get_class($this)."::getLabelOfUnit Error ".$this->error, LOG_ERR); return -1; diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index 50330f26b17..6c832c4788d 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -175,8 +175,7 @@ abstract class CommonStickerGenerator $hauteur = abs($y1 - $y2); if ($length > $hauteur) { $Pointilles = ($length / $nbPointilles) / 2; // taille des pointilles - } - else { + } else { $Pointilles = ($hauteur / $nbPointilles) / 2; } for ($i = $x1; $i <= $x2; $i += $Pointilles + $Pointilles) { diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 10d6fedf0e0..8cfeea86d95 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -1,9 +1,7 @@ * Copyright (C) 2003 Xavier Dutoit - * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2006 Jean Heimburger * @@ -185,7 +183,7 @@ class Conf //if (! defined("$key")) define("$key", $value); // In some cases, the constant might be already forced (Example: SYSLOG_HANDLERS during install) $this->global->$key = $value; - if ($value && preg_match('/^MAIN_MODULE_/', $key)) + if ($value && strpos($key, 'MAIN_MODULE_') === 0) { $reg = array(); // If this is constant for a new tab page activated by a module. It initializes modules_parts['tabs']. @@ -193,7 +191,7 @@ class Conf { $partname = 'tabs'; $params = explode(':', $value, 2); - if (!isset($this->modules_parts[$partname]) || !is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } + if (!is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } $this->modules_parts[$partname][$params[0]][] = $value; // $value may be a string or an array } // If this is constant for all generic part activated by a module. It initializes @@ -205,7 +203,7 @@ class Conf { $modulename = strtolower($reg[1]); $partname = strtolower($reg[2]); - if (!isset($this->modules_parts[$partname]) || !is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } + if (!is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } $arrValue = json_decode($value, true); if (is_array($arrValue) && !empty($arrValue)) $value = $arrValue; elseif (in_array($partname, array('login', 'menus', 'substitutions', 'triggers', 'tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/'; @@ -251,8 +249,7 @@ class Conf { try { date_default_timezone_set($this->global->MAIN_SERVER_TZ); - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog("Error: Bad value for parameter MAIN_SERVER_TZ=".$this->global->MAIN_SERVER_TZ, LOG_ERR); } @@ -273,14 +270,7 @@ class Conf if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD = "eldy_menu.php"; if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE = "eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE = "eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones - // Clean var use vat for company if (!isset($this->global->FACTURE_TVAOPTION)) $this->global->FACTURE_TVAOPTION = 1; - elseif (!empty($this->global->FACTURE_TVAOPTION) && !is_numeric($this->global->FACTURE_TVAOPTION)) - { - // Old value of option, we clean to use new value (0 or 1) - if ($this->global->FACTURE_TVAOPTION != "franchise") $this->global->FACTURE_TVAOPTION = 1; - else $this->global->FACTURE_TVAOPTION = 0; - } // Variable globales LDAP if (empty($this->global->LDAP_FIELD_FULLNAME)) $this->global->LDAP_FIELD_FULLNAME = ''; @@ -334,9 +324,7 @@ class Conf // For backward compatibility $this->$module->$dirname = $rootfordata."/".$name; - } - else - { + } else { // For multicompany sharings $this->$module->$multidirname = array($this->entity => $rootfortemp."/".$name."/temp"); @@ -412,28 +400,22 @@ class Conf $this->fournisseur->payment->dir_output = $rootfordata."/fournisseur/payment"; // For backward compatibility $this->fournisseur->payment->dir_temp = $rootfortemp."/fournisseur/payment/temp"; // For backward compatibility - // To prepare split of module fournisseur into fournisseur + supplier_order + supplier_invoice - if (!empty($this->fournisseur->enabled) && empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // By default, if module supplier is on, we set new properties + // To prepare split of module fournisseur into module 'fournisseur' + supplier_order + supplier_invoice + if (!empty($this->fournisseur->enabled) && empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // By default, if module supplier is on, and we don't use yet the new modules, we set artificialy the module properties { - if (empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // This can be set to 1 once modules purchase order and supplier invoice exists - { - $this->supplier_order = new stdClass(); - $this->supplier_order->enabled = 1; - $this->supplier_order->multidir_output = array($this->entity => $rootfordata."/fournisseur/commande"); - $this->supplier_order->multidir_temp = array($this->entity => $rootfortemp."/fournisseur/commande/temp"); - $this->supplier_order->dir_output = $rootfordata."/fournisseur/commande"; // For backward compatibility - $this->supplier_order->dir_temp = $rootfortemp."/fournisseur/commande/temp"; // For backward compatibility - } + $this->supplier_order = new stdClass(); + $this->supplier_order->enabled = 1; + $this->supplier_order->multidir_output = array($this->entity => $rootfordata."/fournisseur/commande"); + $this->supplier_order->multidir_temp = array($this->entity => $rootfortemp."/fournisseur/commande/temp"); + $this->supplier_order->dir_output = $rootfordata."/fournisseur/commande"; // For backward compatibility + $this->supplier_order->dir_temp = $rootfortemp."/fournisseur/commande/temp"; // For backward compatibility - if (empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // This can be set to 1 once modules purchase order and supplier invoice exists - { - $this->supplier_invoice = new stdClass(); - $this->supplier_invoice->enabled = 1; - $this->supplier_invoice->multidir_output = array($this->entity => $rootfordata."/fournisseur/facture"); - $this->supplier_invoice->multidir_temp = array($this->entity => $rootfortemp."/fournisseur/facture/temp"); - $this->supplier_invoice->dir_output = $rootfordata."/fournisseur/facture"; // For backward compatibility - $this->supplier_invoice->dir_temp = $rootfortemp."/fournisseur/facture/temp"; // For backward compatibility - } + $this->supplier_invoice = new stdClass(); + $this->supplier_invoice->enabled = 1; + $this->supplier_invoice->multidir_output = array($this->entity => $rootfordata."/fournisseur/facture"); + $this->supplier_invoice->multidir_temp = array($this->entity => $rootfortemp."/fournisseur/facture/temp"); + $this->supplier_invoice->dir_output = $rootfordata."/fournisseur/facture"; // For backward compatibility + $this->supplier_invoice->dir_temp = $rootfortemp."/fournisseur/facture/temp"; // For backward compatibility } } @@ -501,7 +483,9 @@ class Conf $this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE = 0; $this->global->STOCK_CALCULATE_ON_SUPPLIER_BILL = 0; $this->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER = 0; - if (empty($this->reception->enabled))$this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER = 1; + if (empty($this->reception->enabled)) { + $this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER = 1; + } else { $this->global->STOCK_CALCULATE_ON_RECEPTION = 1; $this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE = 0; @@ -619,58 +603,58 @@ class Conf // Avoid strict errors. TODO: Replace xxx->warning_delay with a property ->warning_delay_xxx if (isset($this->agenda)) { $this->adherent->subscription = new stdClass(); - $this->adherent->subscription->warning_delay = (isset($this->global->MAIN_DELAY_MEMBERS) ? $this->global->MAIN_DELAY_MEMBERS : 0) * 24 * 60 * 60; + $this->adherent->subscription->warning_delay = (isset($this->global->MAIN_DELAY_MEMBERS) ? $this->global->MAIN_DELAY_MEMBERS : 0) * 86400; } if (isset($this->agenda)) { - $this->agenda->warning_delay = (isset($this->global->MAIN_DELAY_ACTIONS_TODO) ? $this->global->MAIN_DELAY_ACTIONS_TODO : 7) * 24 * 60 * 60; + $this->agenda->warning_delay = (isset($this->global->MAIN_DELAY_ACTIONS_TODO) ? $this->global->MAIN_DELAY_ACTIONS_TODO : 7) * 86400; } if (isset($this->projet)) { - $this->projet->warning_delay = (isset($this->global->MAIN_DELAY_PROJECT_TO_CLOSE) ? $this->global->MAIN_DELAY_PROJECT_TO_CLOSE : 7) * 24 * 60 * 60; + $this->projet->warning_delay = (isset($this->global->MAIN_DELAY_PROJECT_TO_CLOSE) ? $this->global->MAIN_DELAY_PROJECT_TO_CLOSE : 7) * 86400; $this->projet->task = new StdClass(); - $this->projet->task->warning_delay = (isset($this->global->MAIN_DELAY_TASKS_TODO) ? $this->global->MAIN_DELAY_TASKS_TODO : 7) * 24 * 60 * 60; + $this->projet->task->warning_delay = (isset($this->global->MAIN_DELAY_TASKS_TODO) ? $this->global->MAIN_DELAY_TASKS_TODO : 7) * 86400; } if (isset($this->commande)) { $this->commande->client = new stdClass(); $this->commande->fournisseur = new stdClass(); - $this->commande->client->warning_delay = (isset($this->global->MAIN_DELAY_ORDERS_TO_PROCESS) ? $this->global->MAIN_DELAY_ORDERS_TO_PROCESS : 2) * 24 * 60 * 60; - $this->commande->fournisseur->warning_delay = (isset($this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS) ? $this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS : 7) * 24 * 60 * 60; + $this->commande->client->warning_delay = (isset($this->global->MAIN_DELAY_ORDERS_TO_PROCESS) ? $this->global->MAIN_DELAY_ORDERS_TO_PROCESS : 2) * 86400; + $this->commande->fournisseur->warning_delay = (isset($this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS) ? $this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS : 7) * 86400; } if (isset($this->propal)) { $this->propal->cloture = new stdClass(); $this->propal->facturation = new stdClass(); - $this->propal->cloture->warning_delay = (isset($this->global->MAIN_DELAY_PROPALS_TO_CLOSE) ? $this->global->MAIN_DELAY_PROPALS_TO_CLOSE : 0) * 24 * 60 * 60; - $this->propal->facturation->warning_delay = (isset($this->global->MAIN_DELAY_PROPALS_TO_BILL) ? $this->global->MAIN_DELAY_PROPALS_TO_BILL : 0) * 24 * 60 * 60; + $this->propal->cloture->warning_delay = (isset($this->global->MAIN_DELAY_PROPALS_TO_CLOSE) ? $this->global->MAIN_DELAY_PROPALS_TO_CLOSE : 0) * 86400; + $this->propal->facturation->warning_delay = (isset($this->global->MAIN_DELAY_PROPALS_TO_BILL) ? $this->global->MAIN_DELAY_PROPALS_TO_BILL : 0) * 86400; } if (isset($this->facture)) { $this->facture->client = new stdClass(); $this->facture->fournisseur = new stdClass(); - $this->facture->client->warning_delay = (isset($this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED) ? $this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED : 0) * 24 * 60 * 60; - $this->facture->fournisseur->warning_delay = (isset($this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY) ? $this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY : 0) * 24 * 60 * 60; + $this->facture->client->warning_delay = (isset($this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED) ? $this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED : 0) * 86400; + $this->facture->fournisseur->warning_delay = (isset($this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY) ? $this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY : 0) * 86400; } if (isset($this->contrat)) { $this->contrat->services = new stdClass(); $this->contrat->services->inactifs = new stdClass(); $this->contrat->services->expires = new stdClass(); - $this->contrat->services->inactifs->warning_delay = (isset($this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES) ? $this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES : 0) * 24 * 60 * 60; - $this->contrat->services->expires->warning_delay = (isset($this->global->MAIN_DELAY_RUNNING_SERVICES) ? $this->global->MAIN_DELAY_RUNNING_SERVICES : 0) * 24 * 60 * 60; + $this->contrat->services->inactifs->warning_delay = (isset($this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES) ? $this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES : 0) * 86400; + $this->contrat->services->expires->warning_delay = (isset($this->global->MAIN_DELAY_RUNNING_SERVICES) ? $this->global->MAIN_DELAY_RUNNING_SERVICES : 0) * 86400; } if (isset($this->commande)) { $this->bank->rappro = new stdClass(); $this->bank->cheque = new stdClass(); - $this->bank->rappro->warning_delay = (isset($this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE) ? $this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE : 0) * 24 * 60 * 60; - $this->bank->cheque->warning_delay = (isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT) ? $this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT : 0) * 24 * 60 * 60; + $this->bank->rappro->warning_delay = (isset($this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE) ? $this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE : 0) * 86400; + $this->bank->cheque->warning_delay = (isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT) ? $this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT : 0) * 86400; } if (isset($this->expensereport)) { $this->expensereport->approve = new stdClass(); - $this->expensereport->approve->warning_delay = (isset($this->global->MAIN_DELAY_EXPENSEREPORTS) ? $this->global->MAIN_DELAY_EXPENSEREPORTS : 0) * 24 * 60 * 60; + $this->expensereport->approve->warning_delay = (isset($this->global->MAIN_DELAY_EXPENSEREPORTS) ? $this->global->MAIN_DELAY_EXPENSEREPORTS : 0) * 86400; $this->expensereport->payment = new stdClass(); - $this->expensereport->payment->warning_delay = (isset($this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY) ? $this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY : 0) * 24 * 60 * 60; + $this->expensereport->payment->warning_delay = (isset($this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY) ? $this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY : 0) * 86400; } if (isset($this->holiday)) { $this->holiday->approve = new stdClass(); - $this->holiday->approve->warning_delay = (isset($this->global->MAIN_DELAY_HOLIDAYS) ? $this->global->MAIN_DELAY_HOLIDAYS : 0) * 24 * 60 * 60; + $this->holiday->approve->warning_delay = (isset($this->global->MAIN_DELAY_HOLIDAYS) ? $this->global->MAIN_DELAY_HOLIDAYS : 0) * 86400; } if (!empty($this->global->PRODUIT_MULTIPRICES) && empty($this->global->PRODUIT_MULTIPRICES_LIMIT)) @@ -714,39 +698,42 @@ class Conf if (is_object($mc)) $mc->setValues($this); } - // We init log handlers - if (!empty($this->global->SYSLOG_HANDLERS)) { - $handlers = json_decode($this->global->SYSLOG_HANDLERS); - } else { - $handlers = array(); - } - foreach ($handlers as $handler) { - $handler_files = array(); - $dirsyslogs = array_merge(array('/core/modules/syslog/'), $this->modules_parts['syslog']); - foreach ($dirsyslogs as $reldir) { - $dir = dol_buildpath($reldir, 0); - $newdir = dol_osencode($dir); - if (is_dir($newdir)) { - $file = $newdir.$handler.'.php'; - if (file_exists($file)) { - $handler_files[] = $file; + if (!empty($this->syslog->enabled)) { + // We init log handlers + if (!empty($this->global->SYSLOG_HANDLERS)) { + $handlers = json_decode($this->global->SYSLOG_HANDLERS); + } else { + $handlers = array(); + } + foreach ($handlers as $handler) { + $handler_file_found = ''; + $dirsyslogs = array_merge(array('/core/modules/syslog/'), $this->modules_parts['syslog']); + foreach ($dirsyslogs as $reldir) { + $dir = dol_buildpath($reldir, 0); + $newdir = dol_osencode($dir); + if (is_dir($newdir)) { + $file = $newdir.$handler.'.php'; + if (file_exists($file)) { + $handler_file_found = $file; + break; + } } } - } - if (empty($handler_files)) { - throw new Exception('Missing log handler file '.$handler.'.php'); - } + if (empty($handler_file_found)) { + throw new Exception('Missing log handler file '.$handler.'.php'); + } - require_once $handler_files[0]; - $loghandlerinstance = new $handler(); - if (!$loghandlerinstance instanceof LogHandlerInterface) { - throw new Exception('Log handler does not extend LogHandlerInterface'); - } + require_once $handler_file_found; + $loghandlerinstance = new $handler(); + if (!$loghandlerinstance instanceof LogHandlerInterface) { + throw new Exception('Log handler does not extend LogHandlerInterface'); + } - if (empty($this->loghandlers[$handler])) { - $this->loghandlers[$handler] = $loghandlerinstance; + if (empty($this->loghandlers[$handler])) { + $this->loghandlers[$handler] = $loghandlerinstance; + } } - } + } } } diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php index 999b01341f0..ad7d93506f4 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -31,408 +31,385 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class CoreObject extends CommonObject { - public $withChild = true; + public $withChild = true; - /** - * @var Array $_fields Fields to synchronize with Database - */ - protected $fields = array(); + /** + * @var Array $_fields Fields to synchronize with Database + */ + protected $fields = array(); - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct(DoliDB &$db) - { - $this->db = $db; - } + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct(DoliDB &$db) + { + $this->db = $db; + } - /** - * Function to init fields - * - * @return bool - */ - protected function init() - { - $this->id = 0; - $this->datec = 0; - $this->tms = 0; + /** + * Function to init fields + * + * @return bool + */ + protected function init() + { + $this->id = 0; + $this->datec = 0; + $this->tms = 0; - if (!empty($this->fields)) - { - foreach ($this->fields as $field=>$info) - { - if ($this->isDate($info)) $this->{$field} = time(); - elseif ($this->isArray($info)) $this->{$field} = array(); - elseif ($this->isInt($info)) $this->{$field} = (int) 0; - elseif ($this->isFloat($info)) $this->{$field} = (double) 0; - else $this->{$field} = ''; - } + if (!empty($this->fields)) + { + foreach ($this->fields as $field=>$info) + { + if ($this->isDate($info)) $this->{$field} = time(); + elseif ($this->isArray($info)) $this->{$field} = array(); + elseif ($this->isInt($info)) $this->{$field} = (int) 0; + elseif ($this->isFloat($info)) $this->{$field} = (double) 0; + else $this->{$field} = ''; + } - $this->to_delete = false; - $this->is_clone = false; + $this->to_delete = false; + $this->is_clone = false; - return true; - } - else - { - return false; - } - } + return true; + } else { + return false; + } + } - /** - * Test type of field - * - * @param string $field name of field - * @param string $type type of field to test - * @return boolean value of field or false - */ - private function checkFieldType($field, $type) - { - if (isset($this->fields[$field]) && method_exists($this, 'is_'.$type)) - { - return $this->{'is_'.$type}($this->fields[$field]); - } - else - { - return false; - } - } + /** + * Test type of field + * + * @param string $field name of field + * @param string $type type of field to test + * @return boolean value of field or false + */ + private function checkFieldType($field, $type) + { + if (isset($this->fields[$field]) && method_exists($this, 'is_'.$type)) + { + return $this->{'is_'.$type}($this->fields[$field]); + } else { + return false; + } + } - /** - * Get object and children from database - * - * @param int $id Id of object to load - * @param bool $loadChild used to load children from database - * @return int >0 if OK, <0 if KO, 0 if not found - */ - public function fetch($id, $loadChild = true) - { - $res = $this->fetchCommon($id); - if ($res > 0) { - if ($loadChild) $this->fetchChild(); - } + /** + * Get object and children from database + * + * @param int $id Id of object to load + * @param bool $loadChild used to load children from database + * @return int >0 if OK, <0 if KO, 0 if not found + */ + public function fetch($id, $loadChild = true) + { + $res = $this->fetchCommon($id); + if ($res > 0) { + if ($loadChild) $this->fetchChild(); + } - return $res; - } + return $res; + } - /** - * Function to instantiate a new child - * - * @param string $tabName Table name of child - * @param int $id If id is given, we try to return his key if exist or load if we try_to_load - * @param string $key Attribute name of the object id - * @param bool $try_to_load Force the fetch if an id is given - * @return int - */ - public function addChild($tabName, $id = 0, $key = 'id', $try_to_load = false) - { - if (!empty($id)) - { - foreach ($this->{$tabName} as $k=>&$object) - { - if ($object->{$key} === $id) return $k; - } - } + /** + * Function to instantiate a new child + * + * @param string $tabName Table name of child + * @param int $id If id is given, we try to return his key if exist or load if we try_to_load + * @param string $key Attribute name of the object id + * @param bool $try_to_load Force the fetch if an id is given + * @return int + */ + public function addChild($tabName, $id = 0, $key = 'id', $try_to_load = false) + { + if (!empty($id)) + { + foreach ($this->{$tabName} as $k=>&$object) + { + if ($object->{$key} === $id) return $k; + } + } - $k = count($this->{$tabName}); + $k = count($this->{$tabName}); - $className = ucfirst($tabName); - $this->{$tabName}[$k] = new $className($this->db); - if ($id > 0 && $key === 'id' && $try_to_load) - { - $this->{$tabName}[$k]->fetch($id); - } + $className = ucfirst($tabName); + $this->{$tabName}[$k] = new $className($this->db); + if ($id > 0 && $key === 'id' && $try_to_load) + { + $this->{$tabName}[$k]->fetch($id); + } - return $k; - } + return $k; + } - /** - * Function to set a child as to delete - * - * @param string $tabName Table name of child - * @param int $id Id of child to set as to delete - * @param string $key Attribute name of the object id - * @return bool - */ - public function removeChild($tabName, $id, $key = 'id') - { - foreach ($this->{$tabName} as &$object) - { - if ($object->{$key} == $id) - { - $object->to_delete = true; - return true; - } - } - return false; - } + /** + * Function to set a child as to delete + * + * @param string $tabName Table name of child + * @param int $id Id of child to set as to delete + * @param string $key Attribute name of the object id + * @return bool + */ + public function removeChild($tabName, $id, $key = 'id') + { + foreach ($this->{$tabName} as &$object) + { + if ($object->{$key} == $id) + { + $object->to_delete = true; + return true; + } + } + return false; + } - /** - * Function to fetch children objects - * - * @return void - */ - public function fetchChild() - { - if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) - { - foreach ($this->childtables as &$childTable) - { - $className = ucfirst($childTable); + /** + * Function to fetch children objects + * + * @return void + */ + public function fetchChild() + { + if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) + { + foreach ($this->childtables as &$childTable) + { + $className = ucfirst($childTable); - $this->{$className} = array(); + $this->{$className} = array(); - $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$childTable.' WHERE '.$this->fk_element.' = '.$this->id; - $res = $this->db->query($sql); + $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$childTable.' WHERE '.$this->fk_element.' = '.$this->id; + $res = $this->db->query($sql); - if ($res) - { - while ($obj = $this->db->fetch_object($res)) - { - $o = new $className($this->db); - $o->fetch($obj->rowid); + if ($res) + { + while ($obj = $this->db->fetch_object($res)) + { + $o = new $className($this->db); + $o->fetch($obj->rowid); - $this->{$className}[] = $o; - } - } - else - { - $this->errors[] = $this->db->lasterror(); - } - } - } - } + $this->{$className}[] = $o; + } + } else { + $this->errors[] = $this->db->lasterror(); + } + } + } + } - /** - * Function to update children data - * - * @param User $user user object - * @return void - */ - public function saveChild(User &$user) - { - if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) - { - foreach ($this->childtables as &$childTable) - { - $className = ucfirst($childTable); - if (!empty($this->{$className})) - { - foreach ($this->{$className} as $i => &$object) - { - $object->{$this->fk_element} = $this->id; + /** + * Function to update children data + * + * @param User $user user object + * @return void + */ + public function saveChild(User &$user) + { + if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) + { + foreach ($this->childtables as &$childTable) + { + $className = ucfirst($childTable); + if (!empty($this->{$className})) + { + foreach ($this->{$className} as $i => &$object) + { + $object->{$this->fk_element} = $this->id; - $object->update($user); - if ($this->unsetChildDeleted && isset($object->to_delete) && $object->to_delete == true) unset($this->{$className}[$i]); - } - } - } - } - } + $object->update($user); + if ($this->unsetChildDeleted && isset($object->to_delete) && $object->to_delete == true) unset($this->{$className}[$i]); + } + } + } + } + } - /** - * Function to update object or create or delete if needed - * - * @param User $user User object - * @return int < 0 if KO, > 0 if OK - */ - public function update(User &$user) - { - if (empty($this->id)) return $this->create($user); // To test, with that, no need to test on high level object, the core decide it, update just needed - elseif (isset($this->to_delete) && $this->to_delete == true) return $this->delete($user); + /** + * Function to update object or create or delete if needed + * + * @param User $user User object + * @return int < 0 if KO, > 0 if OK + */ + public function update(User &$user) + { + if (empty($this->id)) return $this->create($user); // To test, with that, no need to test on high level object, the core decide it, update just needed + elseif (isset($this->to_delete) && $this->to_delete == true) return $this->delete($user); - $error = 0; - $this->db->begin(); + $error = 0; + $this->db->begin(); - $res = $this->updateCommon($user); - if ($res) - { - $result = $this->call_trigger(strtoupper($this->element).'_UPDATE', $user); - if ($result < 0) $error++; - else $this->saveChild($user); - } - else - { - $error++; - $this->error = $this->db->lasterror(); - $this->errors[] = $this->error; - } + $res = $this->updateCommon($user); + if ($res) + { + $result = $this->call_trigger(strtoupper($this->element).'_UPDATE', $user); + if ($result < 0) $error++; + else $this->saveChild($user); + } else { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } - if (empty($error)) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -1; - } - } + if (empty($error)) + { + $this->db->commit(); + return $this->id; + } else { + $this->db->rollback(); + return -1; + } + } - /** - * Function to create object in database - * - * @param User $user user object - * @return int < 0 if KO, > 0 if OK - */ - public function create(User &$user) - { - if ($this->id > 0) return $this->update($user); + /** + * Function to create object in database + * + * @param User $user User object + * @return int < 0 if KO, > 0 if OK + */ + public function create(User $user) + { + if ($this->id > 0) return $this->update($user); - $error = 0; - $this->db->begin(); + $error = 0; + $this->db->begin(); - $res = $this->createCommon($user); - if ($res) - { - $this->id = $this->db->last_insert_id($this->table_element); + $res = $this->createCommon($user); + if ($res) + { + $this->id = $this->db->last_insert_id($this->table_element); - $result = $this->call_trigger(strtoupper($this->element).'_CREATE', $user); - if ($result < 0) $error++; - else $this->saveChild($user); - } - else - { - $error++; - $this->error = $this->db->lasterror(); - $this->errors[] = $this->error; - } + $result = $this->call_trigger(strtoupper($this->element).'_CREATE', $user); + if ($result < 0) $error++; + else $this->saveChild($user); + } else { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } - if (empty($error)) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -1; - } - } + if (empty($error)) + { + $this->db->commit(); + return $this->id; + } else { + $this->db->rollback(); + return -1; + } + } - /** - * Function to delete object in database - * - * @param User $user user object - * @return int < 0 if KO, > 0 if OK - */ - public function delete(User &$user) - { - if ($this->id <= 0) return 0; + /** + * Function to delete object in database + * + * @param User $user user object + * @return int < 0 if KO, > 0 if OK + */ + public function delete(User &$user) + { + if ($this->id <= 0) return 0; - $error = 0; - $this->db->begin(); + $error = 0; + $this->db->begin(); - $result = $this->call_trigger(strtoupper($this->element).'_DELETE', $user); - if ($result < 0) $error++; + $result = $this->call_trigger(strtoupper($this->element).'_DELETE', $user); + if ($result < 0) $error++; - if (!$error) - { - $this->deleteCommon($user); - if ($this->withChild && !empty($this->childtables)) - { - foreach ($this->childtables as &$childTable) - { - $className = ucfirst($childTable); - if (!empty($this->{$className})) - { - foreach ($this->{$className} as &$object) - { - $object->delete($user); - } - } - } - } - } + if (!$error) + { + $this->deleteCommon($user); + if ($this->withChild && !empty($this->childtables)) + { + foreach ($this->childtables as &$childTable) + { + $className = ucfirst($childTable); + if (!empty($this->{$className})) + { + foreach ($this->{$className} as &$object) + { + $object->delete($user); + } + } + } + } + } - if (empty($error)) - { - $this->db->commit(); - return 1; - } - else - { - $this->error = $this->db->lasterror(); - $this->errors[] = $this->error; - $this->db->rollback(); - return -1; - } - } + if (empty($error)) + { + $this->db->commit(); + return 1; + } else { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + $this->db->rollback(); + return -1; + } + } - /** - * Function to get a formatted date - * - * @param string $field Attribute to return - * @param string $format Output date format - * @return string - */ - public function getDate($field, $format = '') - { - if (empty($this->{$field})) return ''; - else - { - return dol_print_date($this->{$field}, $format); - } - } + /** + * Function to get a formatted date + * + * @param string $field Attribute to return + * @param string $format Output date format + * @return string + */ + public function getDate($field, $format = '') + { + if (empty($this->{$field})) return ''; + else { + return dol_print_date($this->{$field}, $format); + } + } - /** - * Function to set date in field - * - * @param string $field field to set - * @param string $date formatted date to convert - * @return mixed - */ - public function setDate($field, $date) - { - if (empty($date)) - { - $this->{$field} = 0; - } - else - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - $this->{$field} = dol_stringtotime($date); - } + /** + * Function to set date in field + * + * @param string $field field to set + * @param string $date formatted date to convert + * @return mixed + */ + public function setDate($field, $date) + { + if (empty($date)) + { + $this->{$field} = 0; + } else { + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + $this->{$field} = dol_stringtotime($date); + } - return $this->{$field}; - } + return $this->{$field}; + } - /** - * Function to update current object - * - * @param array $Tab Array of values - * @return int - */ - public function setValues(&$Tab) - { - foreach ($Tab as $key => $value) - { - if ($this->checkFieldType($key, 'date')) - { - $this->setDate($key, $value); - } - elseif ($this->checkFieldType($key, 'float')) - { - $this->{$key} = (double) price2num($value); - } - elseif ($this->checkFieldType($key, 'int')) { - $this->{$key} = (int) price2num($value); - } - else - { - $this->{$key} = dol_string_nohtmltag($value); - } - } + /** + * Function to update current object + * + * @param array $Tab Array of values + * @return int + */ + public function setValues(&$Tab) + { + foreach ($Tab as $key => $value) + { + if ($this->checkFieldType($key, 'date')) + { + $this->setDate($key, $value); + } elseif ($this->checkFieldType($key, 'float')) + { + $this->{$key} = (double) price2num($value); + } elseif ($this->checkFieldType($key, 'int')) { + $this->{$key} = (int) price2num($value); + } else { + $this->{$key} = dol_string_nohtmltag($value); + } + } - return 1; - } + return 1; + } } diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index 406615aada6..34ef707b674 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -132,9 +132,7 @@ class Cstate // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -176,9 +174,7 @@ class Cstate // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -264,9 +260,7 @@ class Cstate // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index 2524445b294..07d3563088e 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -136,9 +136,7 @@ class Ctypent // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -185,9 +183,7 @@ class Ctypent // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -240,9 +236,7 @@ class Ctypent // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -280,9 +274,7 @@ class Ctypent // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } diff --git a/htdocs/core/class/cunits.class.php b/htdocs/core/class/cunits.class.php index 096ae47a7b8..ac7b07ea5a9 100644 --- a/htdocs/core/class/cunits.class.php +++ b/htdocs/core/class/cunits.class.php @@ -135,9 +135,7 @@ class CUnits // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -195,9 +193,7 @@ class CUnits // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -236,14 +232,11 @@ class CUnits // extends CommonObject foreach ($filter as $key => $value) { if ($key == 't.rowid' || $key == 't.active' || $key == 't.scale') { $sqlwhere[] = $key.'='.(int) $value; - } - elseif (strpos($key, 'date') !== false) { + } elseif (strpos($key, 'date') !== false) { $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; - } - elseif ($key == 't.unit_type' || $key == 't.code' || $key == 't.short_label') { + } elseif ($key == 't.unit_type' || $key == 't.code' || $key == 't.short_label') { $sqlwhere[] = $key.' = \''.$this->db->escape($value).'\''; - } - else { + } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } } @@ -339,9 +332,7 @@ class CUnits // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -379,9 +370,7 @@ class CUnits // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -397,10 +386,9 @@ class CUnits // extends CommonObject public function getUnitFromCode($code, $mode = 'code') { - if($mode == 'short_label'){ + if ($mode == 'short_label'){ return dol_getIdFromCode($this->db, $code, 'c_units', 'short_label', 'rowid'); - } - elseif($mode == 'code'){ + } elseif ($mode == 'code'){ return dol_getIdFromCode($this->db, $code, 'c_units', 'code', 'rowid'); } @@ -424,10 +412,10 @@ class CUnits // extends CommonObject // convert to standard unit $value = $value * $scaleUnitPow; - if($fk_new_unit !=0 ){ + if ($fk_new_unit !=0 ){ // Calcul en unité de base $scaleUnitPow = $this->scaleOfUnitPow($fk_new_unit); - if(!empty($scaleUnitPow)) + if (!empty($scaleUnitPow)) { // convert to new unit $value = $value / $scaleUnitPow; @@ -436,11 +424,9 @@ class CUnits // extends CommonObject return round($value, 2); } - - /** * get scale of unit factor - * @param $id int id of unit in dictionary + * @param int $id id of unit in dictionary * @return float|int */ public function scaleOfUnitPow($id) @@ -448,9 +434,9 @@ class CUnits // extends CommonObject $base = 10; // TODO : add base col into unit dictionary table $unit = $this->db->getRow('SELECT scale, unit_type from '.MAIN_DB_PREFIX.'c_units WHERE rowid = '.intval($id)); - if($unit){ + if ($unit) { // TODO : if base exist in unit dictionary table remove this convertion exception and update convertion infos in database exemple time hour currently scale 3600 will become scale 2 base 60 - if($unit->unit_type == 'time'){ + if ($unit->unit_type == 'time') { return doubleval($unit->scale); } diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 724b2a778d8..4cddc65d636 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -187,15 +187,11 @@ class DiscountAbsolute $this->db->free($resql); return 1; - } - else - { + } else { $this->db->free($resql); return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -264,9 +260,7 @@ class DiscountAbsolute { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_remise_except"); return $this->id; - } - else - { + } else { $this->error = $this->db->lasterror().' - sql='.$sql; return -1; } @@ -303,9 +297,7 @@ class DiscountAbsolute $this->error = 'ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved'; return -2; } - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -331,9 +323,7 @@ class DiscountAbsolute $this->error = 'ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved'; return -2; } - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -368,15 +358,12 @@ class DiscountAbsolute { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } - } - elseif ($this->fk_invoice_supplier_source) { + } elseif ($this->fk_invoice_supplier_source) { $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn"; $sql .= " set paye=0, fk_statut=1"; $sql .= " WHERE (type = 2 or type = 3) AND rowid=".$this->fk_invoice_supplier_source; @@ -387,22 +374,16 @@ class DiscountAbsolute { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } - } - else - { + } else { $this->db->commit(); return 1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -458,9 +439,7 @@ class DiscountAbsolute $this->fk_facture = $rowidinvoice; } return 1; - } - else - { + } else { $this->error = $this->db->error(); return -3; } @@ -490,9 +469,7 @@ class DiscountAbsolute if ($resql) { return 1; - } - else - { + } else { $this->error = $this->db->error(); return -3; } @@ -568,16 +545,13 @@ class DiscountAbsolute $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql .= ' AND f.type = 3'; - } - elseif ($invoice->element == 'invoice_supplier') + } elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql .= ' WHERE rc.fk_invoice_supplier_source=f.rowid AND rc.fk_invoice_supplier = '.$invoice->id; $sql .= ' AND f.type = 3'; - } - else - { + } else { $this->error = get_class($this)."::getSumDepositsUsed was called with a bad object as a first parameter"; dol_print_error($this->error); return -1; @@ -589,9 +563,7 @@ class DiscountAbsolute $obj = $this->db->fetch_object($resql); if ($multicurrency == 1) return $obj->multicurrency_amount; else return $obj->amount; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -614,16 +586,13 @@ class DiscountAbsolute $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql .= ' AND f.type IN ('.$invoice::TYPE_STANDARD.', '.$invoice::TYPE_CREDIT_NOTE.', '.$invoice::TYPE_SITUATION.')'; // Find discount coming from credit note or excess received - } - elseif ($invoice->element == 'invoice_supplier') + } elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql .= ' WHERE rc.fk_invoice_supplier_source=f.rowid AND rc.fk_invoice_supplier = '.$invoice->id; $sql .= ' AND f.type IN ('.$invoice::TYPE_STANDARD.', '.$invoice::TYPE_CREDIT_NOTE.')'; // Find discount coming from credit note or excess paid - } - else - { + } else { $this->error = get_class($this)."::getSumCreditNotesUsed was called with a bad object as a first parameter"; dol_print_error($this->error); return -1; @@ -635,9 +604,7 @@ class DiscountAbsolute $obj = $this->db->fetch_object($resql); if ($multicurrency == 1) return $obj->multicurrency_amount; else return $obj->amount; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -658,15 +625,12 @@ class DiscountAbsolute $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc'; $sql .= ' WHERE rc.fk_facture IS NULL AND rc.fk_facture_source = '.$invoice->id; - } - elseif ($invoice->element == 'invoice_supplier') + } elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc'; $sql .= ' WHERE rc.fk_invoice_supplier IS NULL AND rc.fk_invoice_supplier_source = '.$invoice->id; - } - else - { + } else { $this->error = get_class($this)."::getSumCreditNotesUsed was called with a bad object as a first parameter"; dol_print_error($this->error); return -1; @@ -678,9 +642,7 @@ class DiscountAbsolute $obj = $this->db->fetch_object($resql); if ($multicurrency) return $obj->multicurrency_amount; else return $obj->amount; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index d4ee7ccaced..55474850b8e 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -88,7 +88,12 @@ class DolEditor // Define some properties if (in_array($this->tool, array('textarea', 'ckeditor', 'ace'))) { - $this->content = $content; + if ($this->tool == 'ckeditor' && ! dol_textishtml($content)) { // We force content to be into HTML if we are using an advanced editor if content is not HTML. + $this->content = dol_nl2br($content); + } + else { + $this->content = $content; + } $this->htmlname = $htmlname; $this->toolbarname = $shorttoolbarname; $this->toolbarstartexpanded = $toolbarstartexpanded; @@ -125,11 +130,6 @@ class DolEditor $found = 0; $out = ''; - if ($this->tool == 'fckeditor') // not used anymore - { - $found = 1; - $this->editor->Create(); - } if (in_array($this->tool, array('textarea', 'ckeditor'))) { $found = 1; diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index 24e0a6de275..2b148a96e8a 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -55,16 +55,14 @@ class DolGeoIP { require_once DOL_DOCUMENT_ROOT.'/includes/geoip2/geoip2.phar'; } - } - elseif ($type == 'city') + } elseif ($type == 'city') { // geoip may have been already included with PEAR if ($geoipversion == '2' || ($geoipversion != 'php' && !function_exists('geoip_country_code_by_name'))) { require_once DOL_DOCUMENT_ROOT.'/includes/geoip2/geoip2.phar'; } - } - else { print 'ErrorBadParameterInConstructor'; return 0; } + } else { print 'ErrorBadParameterInConstructor'; return 0; } // Here, function exists (embedded into PHP or exists because we made include) if (empty($type) || empty($datfile)) @@ -85,20 +83,16 @@ class DolGeoIP { try { $this->gi = new GeoIp2\Database\Reader($datfile); // '/usr/local/share/GeoIP/GeoIP2-City.mmdb' - } - catch (Exception $e) + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR); return 0; } - } - elseif (function_exists('geoip_open')) + } elseif (function_exists('geoip_open')) { $this->gi = geoip_open($datfile, GEOIP_STANDARD); - } - else - { + } else { $this->gi = 'NOGI'; // We are using embedded php geoip functions //print 'function_exists(geoip_country_code_by_name))='.function_exists('geoip_country_code_by_name'); //print geoip_database_info(); @@ -126,9 +120,7 @@ class DolGeoIP { // geoip_country_code_by_addr does not exists return strtolower(geoip_country_code_by_name($ip)); - } - else - { + } else { if (preg_match('/^[0-9]+.[0-9]+\.[0-9]+\.[0-9]+/', $ip)) { if ($geoipversion == '2') @@ -136,33 +128,25 @@ class DolGeoIP try { $record = $this->gi->country($ip); return strtolower($record->country->isoCode); - } - catch (Exception $e) { + } catch (Exception $e) { //return $e->getMessage(); return ''; } - } - else - { + } else { if (!function_exists('geoip_country_code_by_addr')) return strtolower(geoip_country_code_by_name($this->gi, $ip)); return strtolower(geoip_country_code_by_addr($this->gi, $ip)); } - } - else - { + } else { if ($geoipversion == '2') { try { $record = $this->gi->country($ip); return strtolower($record->country->isoCode); - } - catch (Exception $e) { + } catch (Exception $e) { //return $e->getMessage(); return ''; } - } - else - { + } else { if (!function_exists('geoip_country_code_by_addr_v6')) return strtolower(geoip_country_code_by_name_v6($this->gi, $ip)); return strtolower(geoip_country_code_by_addr_v6($this->gi, $ip)); } @@ -193,14 +177,11 @@ class DolGeoIP try { $record = $this->gi->country($name); return $record->country->isoCode; - } - catch (Exception $e) { + } catch (Exception $e) { //return $e->getMessage(); return ''; } - } - else - { + } else { return geoip_country_code_by_name($this->gi, $name); } } diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 551fe2b82c0..0a1686c3585 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -472,14 +472,10 @@ class DolGraph { //print 'ee'.join(',',$theme_bgcoloronglet); $this->bgcolor = $theme_bgcoloronglet; - } - else - { + } else { $this->bgcolor = $theme_bgcolor; } - } - else - { + } else { $this->bgcolor = $bg_color; } } @@ -502,14 +498,10 @@ class DolGraph { //print 'ee'.join(',',$theme_bgcoloronglet); $this->bgcolorgrid = $theme_bgcoloronglet; - } - else - { + } else { $this->bgcolorgrid = $theme_bgcolor; } - } - else - { + } else { $this->bgcolorgrid = $bg_colorgrid; } } @@ -725,9 +717,7 @@ class DolGraph foreach ($values as $x => $y) { if (isset($y)) $serie[$i] .= 'd'.$i.'.push({"label":"'.dol_escape_js($legends[$x]).'", "data":'.$y.'});'."\n"; } - } - else - { + } else { foreach ($values as $x => $y) { if (isset($y)) $serie[$i] .= 'd'.$i.'.push(['.$x.', '.$y.']);'."\n"; } @@ -758,9 +748,7 @@ class DolGraph if ($nblot < 0) { $this->stringtoshow .= ''."\n"; - } - else - { + } else { while ($i < $nblot) { $this->stringtoshow .= ''."\n"; @@ -835,8 +823,7 @@ class DolGraph }'."\n"; } // Other cases, graph of type 'bars', 'lines' - else - { + else { // Add code to support tooltips // TODO: remove js css and use graph-tooltip-inner class instead by adding css in each themes $this->stringtoshow .= ' @@ -895,13 +882,12 @@ class DolGraph $color = sprintf("%02x%02x%02x", $this->datacolor[$i][0], $this->datacolor[$i][1], $this->datacolor[$i][2]); $this->stringtoshow .= '{ '; if (! isset($this->type[$i]) || $this->type[$i] == 'bars') { - if($nblot == 3) { - if($i == $firstlot) $align = 'right'; - elseif($i == $firstlot + 1) $align = 'center'; + if ($nblot == 3) { + if ($i == $firstlot) $align = 'right'; + elseif ($i == $firstlot + 1) $align = 'center'; else $align = 'left'; $this->stringtoshow .= 'bars: { lineWidth: 1, show: true, align: "'.$align.'", barWidth: 0.45 }, '; - } - else $this->stringtoshow.='bars: { lineWidth: 1, show: true, align: "'.($i==$firstlot?'center':'left').'", barWidth: 0.5 }, '; + } else $this->stringtoshow.='bars: { lineWidth: 1, show: true, align: "'.($i==$firstlot?'center':'left').'", barWidth: 0.5 }, '; } if (isset($this->type[$i]) && ($this->type[$i] == 'lines' || $this->type[$i] == 'linesnopoint')) $this->stringtoshow .= 'lines: { show: true, fill: false }, points: { show: '.($this->type[$i] == 'linesnopoint' ? 'false' : 'true').' }, '; $this->stringtoshow .= 'color: "#'.$color.'", label: "'.(isset($this->Legend[$i]) ? dol_escape_js($this->Legend[$i]) : '').'", data: d'.$i.' }'; @@ -1058,9 +1044,7 @@ class DolGraph if ($nblot < 0) { $this->stringtoshow .= ''; - } - else - { + } else { while ($i < $nblot) { //$this->stringtoshow .= ''."\n"; @@ -1103,8 +1087,7 @@ class DolGraph if (strpos($tmp, '-') !== false) { $foundnegativecolor++; $color = '#FFFFFF'; // If $val is '-123' - } - else $color = "#".$tmp; // If $val is '123' or '#123' + } else $color = "#".$tmp; // If $val is '123' or '#123' } $this->stringtoshow .= "'".$color."'"; $i++; @@ -1144,7 +1127,7 @@ class DolGraph foreach ($legends as $val) // Loop on each serie { if ($i > 0) $this->stringtoshow .= ', '; - $this->stringtoshow .= "'".$val."'"; + $this->stringtoshow .= "'".dol_escape_js(dol_trunc($val, 32))."'"; $i++; } @@ -1170,8 +1153,7 @@ class DolGraph $this->stringtoshow .= '});'."\n"; } // Other cases, graph of type 'bars', 'lines', 'linesnopoint' - else - { + else { $type = 'bar'; if (!isset($this->type[$firstlot]) || $this->type[$firstlot] == 'bars') $type = 'bar'; if (isset($this->type[$firstlot]) && ($this->type[$firstlot] == 'lines' || $this->type[$firstlot] == 'linesnopoint')) $type = 'line'; @@ -1207,7 +1189,7 @@ class DolGraph foreach ($legends as $val) // Loop on each serie { if ($i > 0) $this->stringtoshow .= ', '; - $this->stringtoshow .= "'".$val."'"; + $this->stringtoshow .= "'".dol_escape_js(dol_trunc($val, 32))."'"; $i++; } diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index f921e8ad638..b7929e6a159 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -158,79 +158,71 @@ class dolReceiptPrinter extends Printer { $this->db = $db; $this->tags = array( - 'dol_line_feed', - 'dol_line_feed_reverse', - 'dol_align_left', - 'dol_align_center', - 'dol_align_right', - 'dol_use_font_a', - 'dol_use_font_b', - 'dol_use_font_c', - 'dol_bold', - 'dol_bold_disabled', - 'dol_double_height', - 'dol_double_width', - 'dol_default_height_width', - 'dol_underline', - 'dol_underline_disabled', - 'dol_cut_paper_full', - 'dol_cut_paper_partial', - 'dol_open_drawer', - 'dol_beep', - 'dol_print_text', - 'dol_print_barcode', - 'dol_value_date', - 'dol_value_date_time', - 'dol_value_year', - 'dol_value_month_letters', - 'dol_value_month', - 'dol_value_day', - 'dol_value_day_letters', - //'dol_print_payment', - 'dol_print_logo', - 'dol_print_logo_old', - 'dol_value_object_id', - 'dol_value_object_ref', - 'dol_print_object_lines', - 'dol_print_object_tax', - 'dol_print_object_local_tax', - 'dol_print_object_total', - 'dol_print_object_number', - 'dol_print_order_lines', - 'dol_value_customer_firstname', - 'dol_value_customer_lastname', - 'dol_value_customer_mail', - 'dol_value_customer_phone', - 'dol_value_customer_mobile', - 'dol_value_customer_skype', - 'dol_value_customer_tax_number', - 'dol_value_customer_account_balance', - 'dol_value_mysoc_name', - 'dol_value_mysoc_address', - 'dol_value_mysoc_zip', - 'dol_value_mysoc_town', - 'dol_value_mysoc_country', - 'dol_value_mysoc_idprof1', - 'dol_value_mysoc_idprof2', - 'dol_value_mysoc_idprof3', - 'dol_value_mysoc_idprof4', - 'dol_value_mysoc_idprof5', - 'dol_value_mysoc_idprof6', - 'dol_value_mysoc_tva_intra', - 'dol_value_mysoc_capital', - 'dol_value_vendor_lastname', - 'dol_value_vendor_firstname', - 'dol_value_vendor_mail', - 'dol_value_customer_points', - 'dol_value_object_points', - //'dol_print_if_customer', - //'dol_print_if_vendor', - //'dol_print_if_happy_hour', - //'dol_print_if_num_object_unique', - //'dol_print_if_customer_points', - //'dol_print_if_object_points', - //'dol_print_if_customer_tax_number', - //'dol_print_if_customer_account_balance_positive', + 'dol_line_feed' => 'DOL_LINE_FEED', + 'dol_line_feed_reverse' => 'DOL_LINE_FEED_REVERSE', + 'dol_align_left' => 'DOL_ALIGN_LEFT', + 'dol_align_center' => 'DOL_ALIGN_CENTER', + 'dol_align_right' => 'DOL_ALIGN_RIGHT', + 'dol_use_font_a' => 'DOL_USE_FONT_A', + 'dol_use_font_b' => 'DOL_USE_FONT_B', + 'dol_use_font_c' => 'DOL_USE_FONT_C', + 'dol_bold' => 'DOL_BOLD', + 'dol_bold_disabled' => 'DOL_BOLD_DISABLED', + 'dol_double_height' => 'DOL_DOUBLE_HEIGHT', + 'dol_double_width' => 'DOL_DOUBLE_WIDTH', + 'dol_default_height_width' => 'DOL_DEFAULT_HEIGHT_WIDTH', + 'dol_underline' => 'DOL_UNDERLINE', + 'dol_underline_disabled' => 'DOL_UNDERLINE_DISABLED', + 'dol_cut_paper_full' => 'DOL_CUT_PAPER_FULL', + 'dol_cut_paper_partial' => 'DOL_CUT_PAPER_PARTIAL', + 'dol_open_drawer' => 'DOL_OPEN_DRAWER', + 'dol_beep' => 'DOL_BEEP', + 'dol_print_text' => 'DOL_PRINT_TEXT', + 'dol_print_barcode' => 'DOL_PRINT_BARCODE', + 'dol_value_date' => 'DateInvoice', + 'dol_value_date_time' => 'DateInvoiceWithTime', + 'dol_value_year' => 'YearInvoice', + 'dol_value_month_letters' => 'DOL_VALUE_MONTH_LETTERS', + 'dol_value_month' => 'DOL_VALUE_MONTH', + 'dol_value_day' => 'DOL_VALUE_DAY', + 'dol_value_day_letters' => 'DOL_VALUE_DAY', + 'dol_print_payment' => 'DOL_PRINT_PAYMENT', + 'dol_print_logo' => 'DOL_PRINT_LOGO', + 'dol_print_logo_old' => 'DOL_PRINT_LOGO_OLD', + 'dol_value_object_id' => 'InvoiceID', + 'dol_value_object_ref' => 'InvoiceRef', + 'dol_print_object_lines' => 'DOL_PRINT_OBJECT_LINES', + 'dol_print_object_tax' => 'TotalVAT', + 'dol_print_object_local_tax1' => 'TotalLT1', + 'dol_print_object_local_tax2' => 'TotalLT2', + 'dol_print_object_total' => 'Total', + 'dol_print_object_number' => 'DOL_PRINT_OBJECT_NUMBER', + //'dol_value_object_points' => 'DOL_VALUE_OBJECT_POINTS', + 'dol_print_order_lines' => 'DOL_PRINT_ORDER_LINES', + 'dol_value_customer_firstname' => 'DOL_VALUE_CUSTOMER_FIRSTNAME', + 'dol_value_customer_lastname' => 'DOL_VALUE_CUSTOMER_LASTNAME', + 'dol_value_customer_mail' => 'DOL_VALUE_CUSTOMER_MAIL', + 'dol_value_customer_phone' => 'DOL_VALUE_CUSTOMER_PHONE', + 'dol_value_customer_skype' => 'DOL_VALUE_CUSTOMER_SKYPE', + 'dol_value_customer_tax_number' => 'DOL_VALUE_CUSTOMER_TAX_NUMBER', + //'dol_value_customer_account_balance' => 'DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE', + //'dol_value_customer_points' => 'DOL_VALUE_CUSTOMER_POINTS', + 'dol_value_mysoc_name' => 'DOL_VALUE_MYSOC_NAME', + 'dol_value_mysoc_address' => 'Address', + 'dol_value_mysoc_zip' => 'Zip', + 'dol_value_mysoc_town' => 'Town', + 'dol_value_mysoc_country' => 'Country', + 'dol_value_mysoc_idprof1' => 'ProfId1', + 'dol_value_mysoc_idprof2' => 'ProfId2', + 'dol_value_mysoc_idprof3' => 'ProfId3', + 'dol_value_mysoc_idprof4' => 'ProfId4', + 'dol_value_mysoc_idprof5' => 'ProfId5', + 'dol_value_mysoc_idprof6' => 'ProfId6', + 'dol_value_mysoc_tva_intra' => 'VATIntra', + 'dol_value_mysoc_capital' => 'Capital', + 'dol_value_vendor_lastname' => 'VendorLastname', + 'dol_value_vendor_firstname' => 'VendorFirstname', + 'dol_value_vendor_mail' => 'VendorEmail', ); } @@ -475,6 +467,26 @@ class dolReceiptPrinter extends Printer return $error; } + /** + * Function to delete a printer template in db + * + * @param int $templateid Template ID + * @return int 0 if OK; >0 if KO + */ + public function deleteTemplate($templateid) + { + global $conf; + $error = 0; + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'printer_receipt_template'; + $sql .= " WHERE rowid = ".((int) $this->db->escape($templateid)); + $sql .= " AND entity = ".$conf->entity; + $resql = $this->db->query($sql); + if (!$resql) { + $error++; + $this->errors[] = $this->db->lasterror; + } + return $error; + } /** * Function to Update a printer template in db @@ -545,30 +557,38 @@ class dolReceiptPrinter extends Printer /** * Function to Print Receipt Ticket * - * @param object $object order or invoice object - * @param int $templateid Template id - * @param int $printerid Printer id - * @return int 0 if OK; >0 if KO + * @param Facture|Commande $object Order or invoice object + * @param int $templateid Template id + * @param int $printerid Printer id + * @return int 0 if OK; >0 if KO */ public function sendToPrinter($object, $templateid, $printerid) { - global $conf, $mysoc, $langs; + global $conf, $mysoc, $langs, $user; $error = 0; $ret = $this->loadTemplate($templateid); // tags a remplacer par leur valeur avant de parser (dol_value_xxx) $this->template = str_replace('', $object->id, $this->template); $this->template = str_replace('', $object->ref, $this->template); - $this->template = str_replace('', $object->points, $this->template); - $this->template = str_replace('', $object->customer_firstname, $this->template); - $this->template = str_replace('', $object->customer_lastname, $this->template); - $this->template = str_replace('', $object->customer_mail, $this->template); - $this->template = str_replace('', $object->customer_phone, $this->template); - $this->template = str_replace('', $object->customer_mobile, $this->template); - $this->template = str_replace('', $object->customer_skype, $this->template); - $this->template = str_replace('', $object->customer_tax_number, $this->template); - $this->template = str_replace('', $object->customer_account_balance, $this->template); - $this->template = str_replace('', $object->customer_points, $this->template); + //$this->template = str_replace('', $object->points, $this->template); + $this->template = str_replace('', dol_print_date($object->date, 'day'), $this->template); + $this->template = str_replace('', dol_print_date($object->date, 'dayhour'), $this->template); + $this->template = str_replace('', dol_print_date($object->date, '%Y'), $this->template); + $this->template = str_replace('', $langs->trans("Month".dol_print_date($object->date, '%m')), $this->template); + $this->template = str_replace('', dol_print_date($object->date, '%m'), $this->template); + $this->template = str_replace('', dol_print_date($object->date, '%d'), $this->template); + $this->template = str_replace('', $langs->trans("Day".dol_print_date($object->date, '%m')[1]), $this->template); + + $this->template = str_replace('', $object->thirdparty->firstname, $this->template); + $this->template = str_replace('', $object->thirdparty->lastname, $this->template); + $this->template = str_replace('', $object->thirdparty->email, $this->template); + $this->template = str_replace('', $object->thirdparty->phone, $this->template); + //$this->template = str_replace('', $object->thirdparty->mobile, $this->template); + $this->template = str_replace('', $object->thirdparty->tva_intra, $this->template); + //$this->template = str_replace('', $object->customer_account_balance, $this->template); + //$this->template = str_replace('', $object->customer_points, $this->template); + $this->template = str_replace('', $mysoc->name, $this->template); $this->template = str_replace('', $mysoc->address, $this->template); $this->template = str_replace('', $mysoc->zip, $this->template); @@ -582,16 +602,10 @@ class dolReceiptPrinter extends Printer $this->template = str_replace('', $mysoc->idprof6, $this->template); $this->template = str_replace('', $mysoc->tva_intra, $this->template); $this->template = str_replace('', $mysoc->capital, $this->template); - $this->template = str_replace('', $object->vendor_firstname, $this->template); - $this->template = str_replace('', $object->vendor_lastname, $this->template); - $this->template = str_replace('', $object->vendor_mail, $this->template); - $this->template = str_replace('', dol_print_date($object->date, 'day'), $this->template); - $this->template = str_replace('', dol_print_date($object->date, 'dayhour'), $this->template); - $this->template = str_replace('', dol_print_date($object->date, '%Y'), $this->template); - $this->template = str_replace('', $langs->trans("Month".dol_print_date($object->date, '%m')), $this->template); - $this->template = str_replace('', dol_print_date($object->date, '%m'), $this->template); - $this->template = str_replace('', dol_print_date($object->date, '%d'), $this->template); - $this->template = str_replace('', $langs->trans("Day".dol_print_date($object->date, '%m')[1]), $this->template); + + $this->template = str_replace('', $user->firstname, $this->template); + $this->template = str_replace('', $user->lastname, $this->template); + $this->template = str_replace('', $user->email, $this->template); // parse template $p = xml_parser_create(); @@ -634,6 +648,26 @@ class dolReceiptPrinter extends Printer $this->printer->text($spaces.$vatkey.'% '.str_pad(price($vatvalue), 10, ' ', STR_PAD_LEFT)."\n"); } break; + case 'DOL_PRINT_OBJECT_TAX1': + //var_dump($object); + $total_localtax1 = 0; + foreach ($object->lines as $line) { + $total_localtax1 += $line->total_localtax1; + } + foreach ($vatarray as $vatkey => $vatvalue) { + $this->printer->text(str_pad(price($total_localtax1), 10, ' ', STR_PAD_LEFT)."\n"); + } + break; + case 'DOL_PRINT_OBJECT_TAX2': + //var_dump($object); + $total_localtax2 = 0; + foreach ($object->lines as $line) { + $total_localtax2 += $line->total_localtax2; + } + foreach ($vatarray as $vatkey => $vatvalue) { + $this->printer->text(str_pad(price($total_localtax2), 10, ' ', STR_PAD_LEFT)."\n"); + } + break; case 'DOL_PRINT_OBJECT_TOTAL': $title = $langs->trans('TotalHT'); $spacestoadd = $nbcharactbyline - strlen($title) - 10; @@ -741,6 +775,35 @@ class dolReceiptPrinter extends Printer } } break; + case 'DOL_PRINT_PAYMENT': + $sql = "SELECT p.pos_change as pos_change, p.datep as date, p.fk_paiement, p.num_paiement as num, pf.amount as amount, pf.multicurrency_amount,"; + $sql .= " cp.code"; + $sql .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."paiement as p"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as cp ON p.fk_paiement = cp.id"; + $sql .= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = ".$object->id; + $sql .= " ORDER BY p.datep"; + $resql = $this->db->query($sql); + if ($resql) + { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) { + $row = $this->db->fetch_object($resql); + $spacestoadd = $nbcharactbyline - strlen($langs->transnoentitiesnoconv("PaymentTypeShort".$row->code)) - 12; + $spaces = str_repeat(' ', $spacestoadd); + $amount_payment=($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount; + if ($row->code == "LIQ") $amount_payment = $amount_payment + $row->pos_change; // Show amount with excess received if is cash payment + $this->printer->text($spaces.$langs->transnoentitiesnoconv("PaymentTypeShort".$row->code).' '.str_pad(price($amount_payment), 10, ' ', STR_PAD_LEFT)."\n"); + if ($row->code == "LIQ" && $row->pos_change>0) // Print change only in cash payments + { + $spacestoadd = $nbcharactbyline - strlen($langs->trans("Change")) - 12; + $spaces = str_repeat(' ', $spacestoadd); + $this->printer->text($spaces.$langs->trans("Change").' '.str_pad(price($row->pos_change), 10, ' ', STR_PAD_LEFT)."\n"); + } + $i++; + } + } + break; default: $this->printer->text($vals[$tplline]['tag']); $this->printer->text($vals[$tplline]['value']); diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 3bac7c8c2cc..7cf18ae4801 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -95,13 +95,12 @@ class EmailSenderProfile extends CommonObject 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>-1, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>1), 'email' => array('type'=>'varchar(255)', 'label'=>'Email', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1), - //'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,), 'private' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'User', 'visible'=>-1, 'enabled'=>1, 'position'=>50, 'default'=>'0', 'notnull'=>1), 'signature' => array('type'=>'text', 'label'=>'Signature', 'visible'=>3, 'enabled'=>1, 'position'=>400, 'notnull'=>-1, 'index'=>1,), 'position' => array('type'=>'integer', 'label'=>'Position', 'visible'=>1, 'enabled'=>1, 'position'=>405, 'notnull'=>-1, 'index'=>1,), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,), - 'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'default'=>1, 'position'=>1000, 'notnull'=>-1, 'index'=>1, 'arrayofkeyval'=>array(0=>'Disabled', 1=>'Enabled')), + 'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'default'=>1, 'position'=>1000, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array(0=>'Disabled', 1=>'Enabled')), ); /** @@ -331,7 +330,7 @@ class EmailSenderProfile extends CommonObject */ public function getLibStatut($mode = 0) { - return $this->LibStatut($this->status, $mode); + return $this->LibStatut($this->active, $mode); } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -346,36 +345,16 @@ class EmailSenderProfile extends CommonObject { global $langs; - if ($mode == 0 || $mode == 1) - { - if ($status == 1) return $langs->trans('Enabled'); - elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 2) - { - if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 3) - { - if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5'); - } - elseif ($mode == 4) - { - if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 5) - { - if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); - } - elseif ($mode == 6) - { - if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); + if ($status == 1) { + $label = $labelshort = $langs->trans('Enabled'); + } else { + $label = $labelshort = $langs->trans('Disabled'); } + + $statusType = 'status'.$status; + if ($status == self::STATUS_ENABLED) $statusType = 'status4'; + + return dolGetStatus($label, $labelshort, '', $statusType, $mode); } /** @@ -424,9 +403,7 @@ class EmailSenderProfile extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/core/class/evalmath.class.php b/htdocs/core/class/evalmath.class.php index b0fcc963eba..7e02aa57032 100644 --- a/htdocs/core/class/evalmath.class.php +++ b/htdocs/core/class/evalmath.class.php @@ -194,7 +194,7 @@ class EvalMath * * @return string Output */ - private function vars() + public function vars() { $output = $this->v; unset($output['pi']); @@ -270,10 +270,11 @@ class EvalMath // =============== } elseif ($op == ')' and $expecting_op) { // ready to close a parenthesis? while (($o2 = $stack->pop()) != '(') { // pop off the stack back to the last ( - if (is_null($o2)) + if (is_null($o2)) { return $this->trigger(5, "unexpected ')'", ")"); - else + } else { $output[] = $o2; + } } if (preg_match("/^([a-z]\w*)\($/", $stack->last(2), $matches)) { // did we just close a function? $fnn = $matches[1]; // get the function name @@ -293,10 +294,11 @@ class EvalMath // =============== } elseif ($op == ',' and $expecting_op) { // did we just finish a function argument? while (($o2 = $stack->pop()) != '(') { - if (is_null($o2)) + if (is_null($o2)) { return $this->trigger(5, "unexpected ','", ","); // oops, never had a ( - else + } else { $output[] = $o2; // pop the argument expression stuff and push onto the output + } } // make sure there was a function if (!preg_match("/^([a-z]\w*)\($/", $stack->last(2), $matches)) diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index 9c2e5b145dd..bffd23f05d2 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -173,9 +173,7 @@ class Events // extends CommonObject { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."events"); return $this->id; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -260,9 +258,7 @@ class Events // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 6e0651568a1..ddf811cfc77 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -38,103 +38,103 @@ class ExtraFields { /** - * @var DoliDB Database handler. - */ - public $db; + * @var DoliDB Database handler. + */ + public $db; /** - * @var array Array with type of element (for what object is the extrafield) + * @var array Array with type of element (for what object is the extrafield) * @deprecated - */ - public $attribute_elementtype; + */ + public $attribute_elementtype; - /** - * @var array Array with type of the extra field + /** + * @var array Array with type of the extra field * @deprecated - */ - public $attribute_type; + */ + public $attribute_type; - /** - * @var array Array with label of extra field + /** + * @var array Array with label of extra field * @deprecated - */ - public $attribute_label; + */ + public $attribute_label; - /** - * @var array Array with size of extra field + /** + * @var array Array with size of extra field * @deprecated - */ + */ public $attribute_size; - /** - * @var array Array with list of possible values for some types of extra fields + /** + * @var array Array with list of possible values for some types of extra fields * @deprecated - */ + */ public $attribute_choice; - /** - * @var array Array to store compute formula for computed fields + /** + * @var array Array to store compute formula for computed fields * @deprecated - */ + */ public $attribute_computed; - /** - * @var array Array to store default value + /** + * @var array Array to store default value * @deprecated - */ + */ public $attribute_default; - /** - * @var array Array to store if attribute is unique or not + /** + * @var array Array to store if attribute is unique or not * @deprecated - */ + */ public $attribute_unique; - /** - * @var array Array to store if attribute is required or not + /** + * @var array Array to store if attribute is required or not * @deprecated - */ + */ public $attribute_required; - /** - * @var array Array to store parameters of attribute (used in select type) + /** + * @var array Array to store parameters of attribute (used in select type) * @deprecated - */ + */ public $attribute_param; - /** - * @var array Array to store position of attribute + /** + * @var array Array to store position of attribute * @deprecated - */ + */ public $attribute_pos; - /** - * @var array Array to store if attribute is editable regardless of the document status + /** + * @var array Array to store if attribute is editable regardless of the document status * @deprecated - */ + */ public $attribute_alwayseditable; - /** - * @var array Array to store permission to check + /** + * @var array Array to store permission to check * @deprecated - */ + */ public $attribute_perms; - /** - * @var array Array to store language file to translate label of values + /** + * @var array Array to store language file to translate label of values * @deprecated - */ + */ public $attribute_langfile; - /** - * @var array Array to store if field is visible by default on list + /** + * @var array Array to store if field is visible by default on list * @deprecated - */ + */ public $attribute_list; /** - * @var array New array to store extrafields definition - */ + * @var array New array to store extrafields definition + */ public $attributes; /** @@ -147,33 +147,33 @@ class ExtraFields */ public $errors = array(); - /** + /** * @var string DB Error number */ public $errno; public static $type2label = array( - 'varchar'=>'String', - 'text'=>'TextLong', - 'html'=>'HtmlText', - 'int'=>'Int', - 'double'=>'Float', - 'date'=>'Date', - 'datetime'=>'DateAndTime', - 'boolean'=>'Boolean', - 'price'=>'ExtrafieldPrice', - 'phone'=>'ExtrafieldPhone', - 'mail'=>'ExtrafieldMail', - 'url'=>'ExtrafieldUrl', - 'password' => 'ExtrafieldPassword', - 'select' => 'ExtrafieldSelect', - 'sellist' => 'ExtrafieldSelectList', - 'radio' => 'ExtrafieldRadio', - 'checkbox' => 'ExtrafieldCheckBox', - 'chkbxlst' => 'ExtrafieldCheckBoxFromList', - 'link' => 'ExtrafieldLink', - 'separate' => 'ExtrafieldSeparator', + 'varchar'=>'String1Line', + 'text'=>'TextLongNLines', + 'html'=>'HtmlText', + 'int'=>'Int', + 'double'=>'Float', + 'date'=>'Date', + 'datetime'=>'DateAndTime', + 'boolean'=>'Boolean', + 'price'=>'ExtrafieldPrice', + 'phone'=>'ExtrafieldPhone', + 'mail'=>'ExtrafieldMail', + 'url'=>'ExtrafieldUrl', + 'password' => 'ExtrafieldPassword', + 'select' => 'ExtrafieldSelect', + 'sellist' => 'ExtrafieldSelectList', + 'radio' => 'ExtrafieldRadio', + 'checkbox' => 'ExtrafieldCheckBox', + 'chkbxlst' => 'ExtrafieldCheckBoxFromList', + 'link' => 'ExtrafieldLink', + 'separate' => 'ExtrafieldSeparator', ); @@ -181,7 +181,7 @@ class ExtraFields * Constructor * * @param DoliDB $db Database handler - */ + */ public function __construct($db) { $this->db = $db; @@ -225,7 +225,7 @@ class ExtraFields * @param string $langfile Language file * @param string $enabled Condition to have the field enabled or not * @param int $totalizable Is a measure. Must show a total on lists - * @param int $printable Is extrafield displayed on PDF + * @param int $printable Is extrafield displayed on PDF * @return int <=0 if KO, >0 if OK */ public function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique = 0, $required = 0, $default_value = '', $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0) @@ -253,11 +253,8 @@ class ExtraFields $this->error = ''; $this->errno = 0; return 1; - } - else return -2; - } - else - { + } else return -2; + } else { return -1; } } @@ -338,21 +335,17 @@ class ExtraFields $resql = $this->db->query($sql, 1, 'dml'); } return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errno = $this->db->lasterrno(); return -1; } - } - else - { + } else { return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Add description of a new optional attribute * @@ -375,13 +368,13 @@ class ExtraFields * @param string $langfile Language file * @param string $enabled Condition to have the field enabled or not * @param int $totalizable Is a measure. Must show a total on lists - * @param int $printable Is extrafield displayed on PDF + * @param int $printable Is extrafield displayed on PDF * @return int <=0 if KO, >0 if OK - * @throws Exception + * @throws Exception */ private function create_label($attrname, $label = '', $type = '', $pos = 0, $size = 0, $elementtype = 'member', $unique = 0, $required = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0) { - // phpcs:enable + // phpcs:enable global $conf, $user; if ($elementtype == 'thirdparty') $elementtype = 'societe'; @@ -401,13 +394,10 @@ class ExtraFields if (is_array($param) && count($param) > 0) { $params = serialize($param); - } - elseif (strlen($param) > 0) + } elseif (strlen($param) > 0) { $params = trim($param); - } - else - { + } else { $params = ''; } @@ -465,9 +455,7 @@ class ExtraFields if ($this->db->query($sql)) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errno = $this->db->lasterrno(); return -1; @@ -497,44 +485,42 @@ class ExtraFields $result = $this->delete_label($attrname, $elementtype); if ($result < 0) { - $this->error = $this->db->lasterror(); + $this->error = $this->db->lasterror(); $this->errors[] = $this->db->lasterror(); - $error++; + $error++; } if (!$error) { - $sql = "SELECT COUNT(rowid) as nb"; - $sql .= " FROM ".MAIN_DB_PREFIX."extrafields"; - $sql .= " WHERE elementtype = '".$elementtype."'"; - $sql .= " AND name = '".$attrname."'"; - //$sql.= " AND entity IN (0,".$conf->entity.")"; Do not test on entity here. We want to see if there is still on field remaning in other entities before deleting field in table - $resql = $this->db->query($sql); - if ($resql) - { - $obj = $this->db->fetch_object($resql); - if ($obj->nb <= 0) - { - $result = $this->db->DDLDropField(MAIN_DB_PREFIX.$table, $attrname); // This also drop the unique key - if ($result < 0) - { - $this->error = $this->db->lasterror(); - $this->errors[] = $this->db->lasterror(); - $error++; - } - } - } + $sql = "SELECT COUNT(rowid) as nb"; + $sql .= " FROM ".MAIN_DB_PREFIX."extrafields"; + $sql .= " WHERE elementtype = '".$elementtype."'"; + $sql .= " AND name = '".$attrname."'"; + //$sql.= " AND entity IN (0,".$conf->entity.")"; Do not test on entity here. We want to see if there is still on field remaning in other entities before deleting field in table + $resql = $this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + if ($obj->nb <= 0) + { + $result = $this->db->DDLDropField(MAIN_DB_PREFIX.$table, $attrname); // This also drop the unique key + if ($result < 0) + { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); + $error++; + } + } + } } return $result; - } - else - { + } else { return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Delete description of an optional attribute * @@ -544,7 +530,7 @@ class ExtraFields */ private function delete_label($attrname, $elementtype = 'member') { - // phpcs:enable + // phpcs:enable global $conf; if ($elementtype == 'thirdparty') $elementtype = 'societe'; @@ -562,15 +548,11 @@ class ExtraFields if ($resql) { return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } - } - else - { + } else { return 0; } } @@ -596,17 +578,17 @@ class ExtraFields * @param string $entity Entity of extrafields * @param string $langfile Language file * @param string $enabled Condition to have the field enabled or not - * @param int $totalizable Is extrafield totalizable on list - * @param int $printable Is extrafield displayed on PDF + * @param int $totalizable Is extrafield totalizable on list + * @param int $printable Is extrafield displayed on PDF * @return int >0 if OK, <=0 if KO - * @throws Exception + * @throws Exception */ public function update($attrname, $label, $type, $length, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0) { if ($elementtype == 'thirdparty') $elementtype = 'societe'; if ($elementtype == 'contact') $elementtype = 'socpeople'; - $table = $elementtype.'_extrafields'; + $table = $elementtype.'_extrafields'; if ($elementtype == 'categorie') $table = 'categories_extrafields'; if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/", $attrname)) @@ -659,34 +641,26 @@ class ExtraFields if ($unique) { $sql = "ALTER TABLE ".MAIN_DB_PREFIX.$table." ADD UNIQUE INDEX uk_".$table."_".$attrname." (".$attrname.")"; - } - else - { + } else { $sql = "ALTER TABLE ".MAIN_DB_PREFIX.$table." DROP INDEX uk_".$table."_".$attrname; } dol_syslog(get_class($this).'::update', LOG_DEBUG); $resql = $this->db->query($sql, 1, 'dml'); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } - } - else - { + } else { return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Modify description of personalized attribute * @@ -708,14 +682,14 @@ class ExtraFields * @param string $entity Entity of extrafields * @param string $langfile Language file * @param string $enabled Condition to have the field enabled or not - * @param int $totalizable Is extrafield totalizable on list - * @param int $printable Is extrafield displayed on PDF - * @return int <=0 if KO, >0 if OK - * @throws Exception + * @param int $totalizable Is extrafield totalizable on list + * @param int $printable Is extrafield displayed on PDF + * @return int <=0 if KO, >0 if OK + * @throws Exception */ private function update_label($attrname, $label, $type, $size, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '0', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0) { - // phpcs:enable + // phpcs:enable global $conf, $user; dol_syslog(get_class($this)."::update_label ".$attrname.", ".$label.", ".$type.", ".$size.", ".$elementtype.", ".$unique.", ".$required.", ".$pos.", ".$alwayseditable.", ".$perms.", ".$list.", ".$default.", ".$computed.", ".$entity.", ".$langfile.", ".$enabled.", ".$totalizable.", ".$printable); @@ -725,9 +699,9 @@ class ExtraFields if (empty($pos)) $pos = 0; if (empty($list)) $list = '0'; - if (empty($totalizable)) { - $totalizable = 0; - } + if (empty($totalizable)) { + $totalizable = 0; + } if (empty($required)) $required = 0; if (empty($unique)) $unique = 0; if (empty($alwayseditable)) $alwayseditable = 0; @@ -739,13 +713,10 @@ class ExtraFields if (is_array($param) && count($param) > 0) { $params = serialize($param); - } - elseif (strlen($param) > 0) + } elseif (strlen($param) > 0) { $params = trim($param); - } - else - { + } else { $params = ''; } @@ -756,9 +727,7 @@ class ExtraFields $sql_del .= " WHERE name = '".$attrname."'"; $sql_del .= " AND entity IN (0, ".($entity === '' ? $conf->entity : $entity).")"; $sql_del .= " AND elementtype = '".$elementtype."'"; - } - else - { + } else { // We want on all entities ($entities = '0'), we delete on all only (we keep setup specific to each entity) $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."extrafields"; $sql_del .= " WHERE name = '".$attrname."'"; @@ -783,7 +752,7 @@ class ExtraFields $sql .= " param,"; $sql .= " list,"; $sql .= " printable,"; - $sql .= " totalizable,"; + $sql .= " totalizable,"; $sql .= " fielddefault,"; $sql .= " fieldcomputed,"; $sql .= " fk_user_author,"; @@ -807,7 +776,7 @@ class ExtraFields $sql .= " '".$this->db->escape($params)."',"; $sql .= " '".$this->db->escape($list)."', "; $sql .= " '".$this->db->escape($printable)."', "; - $sql .= " ".($totalizable ? 'TRUE' : 'FALSE').","; + $sql .= " ".($totalizable ? 'TRUE' : 'FALSE').","; $sql .= " ".(($default != '') ? "'".$this->db->escape($default)."'" : "null").","; $sql .= " ".($computed ? "'".$this->db->escape($computed)."'" : "null").","; $sql .= " ".$user->id.","; @@ -823,32 +792,28 @@ class ExtraFields { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); dol_print_error($this->db); return -1; } - } - else - { + } else { return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load array this->attributes, or old this->attribute_xxx like attribute_label, attribute_type, ... * - * @param string $elementtype Type of element ('' = all, 'adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...). + * @param string $elementtype Type of element ('' = all or $object->table_element like 'adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...). * @param boolean $forceload Force load of extra fields whatever is status of cache. * @return array Array of attributes keys+label for all extra fields. */ public function fetch_name_optionals_label($elementtype, $forceload = false) { - // phpcs:enable + // phpcs:enable global $conf; if (empty($elementtype)) return array(); @@ -856,6 +821,7 @@ class ExtraFields if ($elementtype == 'thirdparty') $elementtype = 'societe'; if ($elementtype == 'contact') $elementtype = 'socpeople'; if ($elementtype == 'order_supplier') $elementtype = 'commande_fournisseur'; + if ($elementtype == 'stock_mouvement') $elementtype = 'movement'; $array_name_label = array(); @@ -873,15 +839,15 @@ class ExtraFields { while ($tab = $this->db->fetch_object($resql)) { - if ($tab->entity != 0 && $tab->entity != $conf->entity) - { - // This field is not in current entity. We discard but before we save it into the array of mandatory fields if it is a mandatory field without default value - if ($tab->fieldrequired && is_null($tab->fielddefault)) - { - $this->attributes[$tab->elementtype]['mandatoryfieldsofotherentities'][$tab->name] = $tab->type; - } - continue; - } + if ($tab->entity != 0 && $tab->entity != $conf->entity) + { + // This field is not in current entity. We discard but before we save it into the array of mandatory fields if it is a mandatory field without default value + if ($tab->fieldrequired && is_null($tab->fielddefault)) + { + $this->attributes[$tab->elementtype]['mandatoryfieldsofotherentities'][$tab->name] = $tab->type; + } + continue; + } // We can add this attribute to object. TODO Remove this and return $this->attributes[$elementtype]['label'] if ($tab->type != 'separate') @@ -923,7 +889,7 @@ class ExtraFields $this->attributes[$tab->elementtype]['langfile'][$tab->name] = $tab->langs; $this->attributes[$tab->elementtype]['list'][$tab->name] = $tab->list; $this->attributes[$tab->elementtype]['printable'][$tab->name] = $tab->printable; - $this->attributes[$tab->elementtype]['totalizable'][$tab->name] = ($tab->totalizable ? 1 : 0); + $this->attributes[$tab->elementtype]['totalizable'][$tab->name] = ($tab->totalizable ? 1 : 0); $this->attributes[$tab->elementtype]['entityid'][$tab->name] = $tab->entity; $this->attributes[$tab->elementtype]['enabled'][$tab->name] = $tab->enabled; $this->attributes[$tab->elementtype]['help'][$tab->name] = $tab->help; @@ -932,9 +898,7 @@ class ExtraFields } } if ($elementtype) $this->attributes[$elementtype]['loaded'] = 1; // If nothing found, we also save tag 'loaded' - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this)."::fetch_name_optionals_label ".$this->error, LOG_ERR); } @@ -991,8 +955,7 @@ class ExtraFields $totalizable = $this->attributes[$extrafieldsobjectkey]['totalizable'][$key]; $help = $this->attributes[$extrafieldsobjectkey]['help'][$key]; $hidden = (empty($list) ? 1 : 0); // If empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller) - } - else // Old usage + } else // Old usage { $label = $this->attribute_label[$key]; $type = $this->attribute_type[$key]; @@ -1020,39 +983,29 @@ class ExtraFields if ($type == 'date') { $morecss = 'minwidth100imp'; - } - elseif ($type == 'datetime' || $type == 'link') + } elseif ($type == 'datetime' || $type == 'link') { $morecss = 'minwidth200imp'; - } - elseif (in_array($type, array('int', 'integer', 'double', 'price'))) + } elseif (in_array($type, array('int', 'integer', 'double', 'price'))) { $morecss = 'maxwidth75'; - } - elseif ($type == 'password') + } elseif ($type == 'password') { $morecss = 'maxwidth100'; - } - elseif ($type == 'url') + } elseif ($type == 'url') { $morecss = 'minwidth400'; - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { $morecss = ''; - } - else - { + } else { if (round($size) < 12) { $morecss = 'minwidth100'; - } - elseif (round($size) <= 48) + } elseif (round($size) <= 48) { $morecss = 'minwidth200'; - } - else - { + } else { $morecss = 'minwidth400'; } } @@ -1070,48 +1023,38 @@ class ExtraFields // TODO Must also support $moreparam $out = $form->selectDate($value, $keyprefix.$key.$keysuffix, $showtime, $showtime, $required, '', 1, (($keyprefix != 'search_' && $keyprefix != 'search_options_') ? 1 : 0), 0, 1); - } - elseif (in_array($type, array('int', 'integer'))) + } elseif (in_array($type, array('int', 'integer'))) { $tmp = explode(',', $size); $newsize = $tmp[0]; $out = ''; - } - elseif (preg_match('/varchar/', $type)) + } elseif (preg_match('/varchar/', $type)) { $out = ''; - } - elseif (in_array($type, array('mail', 'phone', 'url'))) + } elseif (in_array($type, array('mail', 'phone', 'url'))) { $out = ''; - } - elseif ($type == 'text') + } elseif ($type == 'text') { if (!preg_match('/search_/', $keyprefix)) // If keyprefix is search_ or search_options_, we must just use a simple text field { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, false, ROWS_5, '90%'); $out = $doleditor->Create(1); - } - else - { + } else { $out = ''; } - } - elseif ($type == 'html') + } elseif ($type == 'html') { if (!preg_match('/search_/', $keyprefix)) // If keyprefix is search_ or search_options_, we must just use a simple text field { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, !empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, '90%'); $out = $doleditor->Create(1); - } - else - { + } else { $out = ''; } - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { if (empty($mode)) { @@ -1122,27 +1065,22 @@ class ExtraFields $checked = ' value="1" '; } $out = ''; - } - else - { + } else { $out .= $form->selectyesno($keyprefix.$key.$keysuffix, $value, 1, false, 1); } - } - elseif ($type == 'price') + } elseif ($type == 'price') { if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format. $value = price($value); } $out = ' '.$langs->getCurrencySymbol($conf->currency); - } - elseif ($type == 'double') + } elseif ($type == 'double') { if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format. $value = price($value); } $out = ' '; - } - elseif ($type == 'select') + } elseif ($type == 'select') { $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) @@ -1166,8 +1104,7 @@ class ExtraFields $out .= ''; } $out .= ''; - } - elseif ($type == 'sellist') + } elseif ($type == 'sellist') { $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) @@ -1188,8 +1125,8 @@ class ExtraFields // 2 : key fields name (if differ of rowid) // 3 : key field parent (for dependent lists) // 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value - // 5 : id category type - // 6 : ids categories list separated by comma for category root + // 5 : id category type + // 6 : ids categories list separated by comma for category root $keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid'); @@ -1208,131 +1145,129 @@ class ExtraFields $keyList .= ', '.$parentField; } - $filter_categorie = false; - if (count($InfoFieldList) > 5) { - if ($InfoFieldList[0] == 'categorie') { - $filter_categorie = true; - } - } + $filter_categorie = false; + if (count($InfoFieldList) > 5) { + if ($InfoFieldList[0] == 'categorie') { + $filter_categorie = true; + } + } - if ($filter_categorie === false) { - $fields_label = explode('|', $InfoFieldList[1]); - if (is_array($fields_label)) { - $keyList .= ', '; - $keyList .= implode(', ', $fields_label); - } + if ($filter_categorie === false) { + $fields_label = explode('|', $InfoFieldList[1]); + if (is_array($fields_label)) { + $keyList .= ', '; + $keyList .= implode(', ', $fields_label); + } - $sqlwhere = ''; - $sql = 'SELECT '.$keyList; - $sql .= ' FROM '.MAIN_DB_PREFIX.$InfoFieldList[0]; - if (!empty($InfoFieldList[4])) { - // can use curent entity filter - if (strpos($InfoFieldList[4], '$ENTITY$') !== false) { - $InfoFieldList[4] = str_replace('$ENTITY$', $conf->entity, $InfoFieldList[4]); - } - // can use SELECT request - if (strpos($InfoFieldList[4], '$SEL$') !== false) { - $InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]); - } + $sqlwhere = ''; + $sql = 'SELECT '.$keyList; + $sql .= ' FROM '.MAIN_DB_PREFIX.$InfoFieldList[0]; + if (!empty($InfoFieldList[4])) { + // can use curent entity filter + if (strpos($InfoFieldList[4], '$ENTITY$') !== false) { + $InfoFieldList[4] = str_replace('$ENTITY$', $conf->entity, $InfoFieldList[4]); + } + // can use SELECT request + if (strpos($InfoFieldList[4], '$SEL$') !== false) { + $InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]); + } - // current object id can be use into filter - if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) { - $InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]); - } else { - $InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]); - } - //We have to join on extrafield table - if (strpos($InfoFieldList[4], 'extra') !== false) { - $sql .= ' as main, '.MAIN_DB_PREFIX.$InfoFieldList[0].'_extrafields as extra'; - $sqlwhere .= ' WHERE extra.fk_object=main.'.$InfoFieldList[2].' AND '.$InfoFieldList[4]; - } else { - $sqlwhere .= ' WHERE '.$InfoFieldList[4]; - } - } else { - $sqlwhere .= ' WHERE 1=1'; - } - // Some tables may have field, some other not. For the moment we disable it. - if (in_array($InfoFieldList[0], array('tablewithentity'))) { - $sqlwhere .= ' AND entity = '.$conf->entity; - } - $sql .= $sqlwhere; - //print $sql; + // current object id can be use into filter + if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) { + $InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]); + } else { + $InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]); + } + //We have to join on extrafield table + if (strpos($InfoFieldList[4], 'extra') !== false) { + $sql .= ' as main, '.MAIN_DB_PREFIX.$InfoFieldList[0].'_extrafields as extra'; + $sqlwhere .= ' WHERE extra.fk_object=main.'.$InfoFieldList[2].' AND '.$InfoFieldList[4]; + } else { + $sqlwhere .= ' WHERE '.$InfoFieldList[4]; + } + } else { + $sqlwhere .= ' WHERE 1=1'; + } + // Some tables may have field, some other not. For the moment we disable it. + if (in_array($InfoFieldList[0], array('tablewithentity'))) { + $sqlwhere .= ' AND entity = '.$conf->entity; + } + $sql .= $sqlwhere; + //print $sql; - $sql .= ' ORDER BY '.implode(', ', $fields_label); + $sql .= ' ORDER BY '.implode(', ', $fields_label); - dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) { - $out .= ''; - $num = $this->db->num_rows($resql); - $i = 0; - while ($i < $num) { - $labeltoshow = ''; - $obj = $this->db->fetch_object($resql); + dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) { + $out .= ''; + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) { + $labeltoshow = ''; + $obj = $this->db->fetch_object($resql); - // Several field into label (eq table:code|libelle:rowid) - $notrans = false; - $fields_label = explode('|', $InfoFieldList[1]); - if (is_array($fields_label) && count($fields_label) > 1) { - $notrans = true; - foreach ($fields_label as $field_toshow) { - $labeltoshow .= $obj->$field_toshow.' '; - } - } else { - $labeltoshow = $obj->{$InfoFieldList[1]}; - } - $labeltoshow = dol_trunc($labeltoshow, 45); + // Several field into label (eq table:code|libelle:rowid) + $notrans = false; + $fields_label = explode('|', $InfoFieldList[1]); + if (is_array($fields_label) && count($fields_label) > 1) { + $notrans = true; + foreach ($fields_label as $field_toshow) { + $labeltoshow .= $obj->$field_toshow.' '; + } + } else { + $labeltoshow = $obj->{$InfoFieldList[1]}; + } + $labeltoshow = $labeltoshow; - if ($value == $obj->rowid) { - if (!$notrans) { - foreach ($fields_label as $field_toshow) { - $translabel = $langs->trans($obj->$field_toshow); - $labeltoshow = dol_trunc($translabel, 18).' '; - } - } - $out .= ''; - } else { - if (!$notrans) { - $translabel = $langs->trans($obj->{$InfoFieldList[1]}); - $labeltoshow = dol_trunc($translabel, 18); - } - if (empty($labeltoshow)) $labeltoshow = '(not defined)'; + if ($value == $obj->rowid) { + if (!$notrans) { + foreach ($fields_label as $field_toshow) { + $translabel = $langs->trans($obj->$field_toshow); + $labeltoshow = $translabel.' '; + } + } + $out .= ''; + } else { + if (!$notrans) { + $translabel = $langs->trans($obj->{$InfoFieldList[1]}); + $labeltoshow = $translabel; + } + if (empty($labeltoshow)) $labeltoshow = '(not defined)'; - if (!empty($InfoFieldList[3]) && $parentField) { - $parent = $parentName.':'.$obj->{$parentField}; - } + if (!empty($InfoFieldList[3]) && $parentField) { + $parent = $parentName.':'.$obj->{$parentField}; + } - $out .= ''; - } + $out .= ''; + } - $i++; - } - $this->db->free($resql); - } else { - print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.
'; - } - } else { + $i++; + } + $this->db->free($resql); + } else { + print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.
'; + } + } else { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - $data = $form->select_all_categories(Categorie::$MAP_ID_TO_CODE[$InfoFieldList[5]], '', 'parent', 64, $InfoFieldList[6], 1, 1); - $out .= ''; - foreach ($data as $data_key => $data_value) { - $out .= ''; + foreach ($data as $data_key => $data_value) { + $out .= '
'.$langs->trans('Unit').''.$langs->trans('ReductionShort').''.$form->showCheckAddButtons('checkforselect', 1).'
'.$form->showCheckAddButtons('checkforselect', 1).'
attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $helptoshow); - else $out .= $labeltoshow; - if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' *'; - } else { - if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired'; - $out .= '">'; - if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $helptoshow); - else $out .= $labeltoshow; - } - $out .= ''; - switch ($mode) { case "view": - $out .= $extrafields->showOutputField($key, $value); + $value = $this->array_options["options_".$key.$keysuffix]; break; - case "create": - case "edit": - $out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element); + case "create": + case "edit": + $getposttemp = GETPOST($keyprefix.'options_'.$key.$keysuffix, 'none'); // GETPOST can get value from GET, POST or setup of default values. + // GETPOST("options_" . $key) can be 'abc' or array(0=>'abc') + if (is_array($getposttemp) || $getposttemp != '' || GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)) + { + if (is_array($getposttemp)) { + // $getposttemp is an array but following code expects a comma separated string + $value = implode(",", $getposttemp); + } else { + $value = $getposttemp; + } + } else { + $value = $this->array_options["options_".$key]; // No GET, no POST, no default value, so we take value of object. + } + //var_dump($keyprefix.' - '.$key.' - '.$keysuffix.' - '.$keyprefix.'options_'.$key.$keysuffix.' - '.$this->array_options["options_".$key.$keysuffix].' - '.$getposttemp.' - '.$value); break; } - $out .= '
attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $helptoshow); + else $out .= $labeltoshow; + if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' *'; + } else { + if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired'; + $out .= '">'; + if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $helptoshow); + else $out .= $labeltoshow; + } + $out .= ''; + + switch ($mode) { + case "view": + $out .= $extrafields->showOutputField($key, $value); + break; + case "create": + case "edit": + $out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element); + break; + } + + $out .= '
'; - } - elseif ($nbbyrow < 0) $return .= '
'; + } elseif ($nbbyrow < 0) $return .= '
'; $return .= "\n"; @@ -7503,26 +7218,20 @@ abstract class CommonObject { $return .= ''; $return .= ''; - } - else { + } else { $return .= ''; $return .= ''; } - } - else - { + } else { $return .= ''; $return .= ''; } - } - else - { + } else { if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) { $return .= ''; $return .= ''; - } - else { + } else { $return .= ''; $return .= ''; } @@ -7557,8 +7266,7 @@ abstract class CommonObject { $return .= '
'; if ($fieldrequired) $ret .= ''; if ($help) { @@ -190,9 +186,7 @@ class Form if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !preg_match('/^select;|datehourpicker/', $typeofdata)) // TODO add jquery timepicker and support select { $ret .= $this->editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $custommsg); - } - else - { + } else { if (GETPOST('action', 'aZ09') == 'edit'.$htmlname) { $ret .= "\n"; @@ -205,15 +199,13 @@ class Form if (preg_match('/^(string|safehtmlstring|email)/', $typeofdata)) { $tmp = explode(':', $typeofdata); - $ret .= ''; - } - elseif (preg_match('/^(numeric|amount)/', $typeofdata)) + $ret .= ''; + } elseif (preg_match('/^(numeric|amount)/', $typeofdata)) { $tmp = explode(':', $typeofdata); $valuetoshow = price2num($editvalue ? $editvalue : $value); - $ret .= ''; - } - elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) // if wysiwyg is enabled $typeofdata = 'ckeditor' + $ret .= ''; + } elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) // if wysiwyg is enabled $typeofdata = 'ckeditor' { $tmp = explode(':', $typeofdata); $cols = $tmp[2]; @@ -225,22 +217,19 @@ class Form } $valuetoshow = ($editvalue ? $editvalue : $value); - $ret .= ''; - } - elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') + } elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') { $ret .= $this->selectDate($value, $htmlname, 0, 0, 1, 'form'.$htmlname, 1, 0); - } - elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') + } elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') { $ret .= $this->selectDate($value, $htmlname, 1, 1, 1, 'form'.$htmlname, 1, 0); - } - elseif (preg_match('/^select;/', $typeofdata)) + } elseif (preg_match('/^select;/', $typeofdata)) { $arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata)); $arraylist = array(); @@ -251,8 +240,7 @@ class Form $arraylist[$tmpkey] = $tmp[1]; } $ret .= $this->selectarray($htmlname, $arraylist, $value); - } - elseif (preg_match('/^ckeditor/', $typeofdata)) + } elseif (preg_match('/^ckeditor/', $typeofdata)) { $tmp = explode(':', $typeofdata); // Example: ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols:uselocalbrowser require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -270,9 +258,7 @@ class Form if (empty($notabletag)) $ret .= '
'."\n"; $ret .= ''."\n"; - } - else - { + } else { if (preg_match('/^(email)/', $typeofdata)) $ret .= dol_print_email($value, 0, 0, 0, 0, 1); elseif (preg_match('/^(amount|numeric)/', $typeofdata)) $ret .= ($value != '' ? price($value, '', $langs, 0, -1, -1, $conf->currency) : ''); elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) $ret .= dol_htmlentitiesbr($value); @@ -289,8 +275,7 @@ class Form $arraylist[$tmp[0]] = $tmp[1]; } $ret .= $arraylist[$value]; - } - elseif (preg_match('/^ckeditor/', $typeofdata)) + } elseif (preg_match('/^ckeditor/', $typeofdata)) { $tmpcontent = dol_htmlentitiesbr($value); if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) @@ -302,8 +287,7 @@ class Form // We dont use dol_escape_htmltag to get the html formating active, but this need we must also // clean data from some dangerous html $ret .= dol_string_onlythesehtmltags(dol_htmlentitiesbr($tmpcontent)); - } - else { + } else { $ret .= dol_escape_htmltag($value); } @@ -441,8 +425,7 @@ class Form if (!empty($tmp[1])) $inputOption = $tmp[1]; if (!empty($tmp[2])) $savemethod = $tmp[2]; $out .= ''."\n"; - } - elseif ((preg_match('/^day$/', $inputType)) || (preg_match('/^datepicker/', $inputType)) || (preg_match('/^datehourpicker/', $inputType))) + } elseif ((preg_match('/^day$/', $inputType)) || (preg_match('/^datepicker/', $inputType)) || (preg_match('/^datehourpicker/', $inputType))) { $tmp = explode(':', $inputType); $inputType = $tmp[0]; @@ -450,22 +433,19 @@ class Form if (!empty($tmp[2])) $savemethod = $tmp[2]; $out .= ''."\n"; // Use for timestamp format - } - elseif (preg_match('/^(select|autocomplete)/', $inputType)) + } elseif (preg_match('/^(select|autocomplete)/', $inputType)) { $tmp = explode(':', $inputType); $inputType = $tmp[0]; $loadmethod = $tmp[1]; if (!empty($tmp[2])) $savemethod = $tmp[2]; if (!empty($tmp[3])) $button_only = true; - } - elseif (preg_match('/^textarea/', $inputType)) + } elseif (preg_match('/^textarea/', $inputType)) { $tmp = explode(':', $inputType); $inputType = $tmp[0]; $rows = (empty($tmp[1]) ? '8' : $tmp[1]); $cols = (empty($tmp[2]) ? '80' : $tmp[2]); - } - elseif (preg_match('/^ckeditor/', $inputType)) + } elseif (preg_match('/^ckeditor/', $inputType)) { $tmp = explode(':', $inputType); $inputType = $tmp[0]; $toolbar = $tmp[1]; @@ -476,9 +456,7 @@ class Form if (!empty($conf->fckeditor->enabled)) { $out .= ''."\n"; - } - else - { + } else { $inputType = 'textarea'; } } @@ -497,9 +475,7 @@ class Form $out .= ''."\n"; if (!empty($custommsg['error'])) $out .= ''."\n"; - } - else - $out .= ''."\n"; + } else $out .= ''."\n"; } if ($inputType == 'textarea') { $out .= ''."\n"; @@ -507,9 +483,7 @@ class Form } $out .= ''.$value.''."\n"; $out .= ''.(!empty($editvalue) ? $editvalue : $value).''."\n"; - } - else - { + } else { $out = $value; } @@ -557,9 +531,7 @@ class Form if ($tooltiptrigger == '') { $htmltext = str_replace('"', '"', $htmltext); - } - else - { + } else { $classfortooltip = 'classfortooltiponclick'; $textfordialog .= ''; } @@ -568,15 +540,13 @@ class Form $paramfortooltipimg = ' class="'.$classfortooltip.($notabs != 3 ? ' inline-block' : '').($extracss ? ' '.$extracss : '').'" style="padding: 0px;'.($extrastyle ? ' '.$extrastyle : '').'"'; if ($tooltiptrigger == '') $paramfortooltipimg .= ' title="'.($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)).'"'; // Attribut to put on img tag to store tooltip else $paramfortooltipimg .= ' dolid="'.$tooltiptrigger.'"'; - } - else $paramfortooltipimg = ($extracss ? ' class="'.$extracss.'"' : '').($extrastyle ? ' style="'.$extrastyle.'"' : ''); // Attribut to put on td text tag + } else $paramfortooltipimg = ($extracss ? ' class="'.$extracss.'"' : '').($extrastyle ? ' style="'.$extrastyle.'"' : ''); // Attribut to put on td text tag if ($tooltipon == 1 || $tooltipon == 3) { $paramfortooltiptd = ' class="'.($tooltipon == 3 ? 'cursorpointer ' : '').$classfortooltip.' inline-block'.($extracss ? ' '.$extracss : '').'" style="padding: 0px;'.($extrastyle ? ' '.$extrastyle : '').'" '; if ($tooltiptrigger == '') $paramfortooltiptd .= ' title="'.($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)).'"'; // Attribut to put on td tag to store tooltip else $paramfortooltiptd .= ' dolid="'.$tooltiptrigger.'"'; - } - else $paramfortooltiptd = ($extracss ? ' class="'.$extracss.'"' : '').($extrastyle ? ' style="'.$extrastyle.'"' : ''); // Attribut to put on td text tag + } else $paramfortooltiptd = ($extracss ? ' class="'.$extracss.'"' : '').($extrastyle ? ' style="'.$extrastyle.'"' : ''); // Attribut to put on td text tag if (empty($notabs)) $s .= ''; elseif ($notabs == 2) $s .= '
'; // Define value if value is before @@ -631,8 +601,7 @@ class Form if (empty($conf->use_javascript_ajax)) { if ($type == 'info' || $type == 'infoclickable' || $type == 'help' || $type == 'helpclickable') return $text; - else - { + else { $alt = $htmltext; $htmltext = ''; } @@ -667,8 +636,8 @@ class Form * @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default. * @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. * @param int $alwaysvisible 1=select button always visible - * @param string $name Name for massaction - * @param string $cssclass CSS class used to check for select + * @param string $name Name for massaction + * @param string $cssclass CSS class used to check for select * @return string|void Select list */ public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0, $name = 'massaction', $cssclass = 'checkforselect') @@ -678,7 +647,7 @@ class Form $disabled = 0; $ret = '
'; - $ret .= ''; // Complete list with data from external modules. THe module can use $_SERVER['PHP_SELF'] to know on which page we are, or use the $parameters['currentcontext'] completed by executeHooks. $parameters = array(); @@ -697,11 +666,11 @@ class Form $ret .= ''; - if (empty($conf->dol_optimize_smallscreen)) $ret .= ajax_combobox('.' . $name . 'select'); + if (empty($conf->dol_optimize_smallscreen)) $ret .= ajax_combobox('.'.$name.'select'); // Warning: if you set submit button to disabled, post using 'Enter' will no more work if there is no another input submit. So we add a hidden button $ret .= ''; // Hidden button BEFORE so it is the one used when we submit with ENTER. - $ret .= ''; + $ret .= ''; $ret .= '
'; if (!empty($conf->use_javascript_ajax)) @@ -732,11 +701,11 @@ class Form } jQuery(document).ready(function () { - initCheckForSelect(0, "' . $name . '", "' . $cssclass . '"); - jQuery(".' . $cssclass . '").click(function() { - initCheckForSelect(1, "'.$name.'", "' . $cssclass . '"); + initCheckForSelect(0, "' . $name.'", "'.$cssclass.'"); + jQuery(".' . $cssclass.'").click(function() { + initCheckForSelect(1, "'.$name.'", "'.$cssclass.'"); }); - jQuery(".' . $name . 'select").change(function() { + jQuery(".' . $name.'select").change(function() { var massaction = $( this ).val(); var urlform = $( this ).closest("form").attr("action").replace("#show_files",""); if (massaction == "builddoc") @@ -744,17 +713,18 @@ class Form urlform = urlform + "#show_files"; } $( this ).closest("form").attr("action", urlform); - console.log("we select a mass action "+massaction+" - "+urlform); + console.log("we select a mass action name='.$name.' massaction="+massaction+" - "+urlform); /* Warning: if you set submit button to disabled, post using Enter will no more work if there is no other button */ if ($(this).val() != \'0\') { - jQuery(".' . $name . 'confirmed").prop(\'disabled\', false); - jQuery(".' . $name . 'other").show(); + jQuery(".' . $name.'confirmed").prop(\'disabled\', false); + jQuery(".' . $name.'other").hide(); /* To disable if another div was open */ + jQuery(".' . $name.'"+massaction).show(); } else { - jQuery(".' . $name . 'confirmed").prop(\'disabled\', true); - jQuery(".' . $name . 'other").hide(); + jQuery(".' . $name.'confirmed").prop(\'disabled\', true); + jQuery(".' . $name.'other").hide(); /* To disable any div open */ } }); }); @@ -858,9 +828,7 @@ class Form { $foundselected = true; $out .= ''; - } - else - { + } else { $out .= ''; } - } - else - { + } else { array_push($outarray, array('key'=>$obj->rowid, 'value'=>$label, 'label'=>$label)); } @@ -1375,9 +1327,7 @@ class Form } } $out .= ''."\n"; - } - else - { + } else { dol_print_error($this->db); } @@ -1457,9 +1407,7 @@ class Form } print ''; return $qualifiedlines; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1589,9 +1537,7 @@ class Form if ($showfunction && $obj->poste) $out .= ' ('.$obj->poste.')'; if (($showsoc > 0) && $obj->company) $out .= ' - ('.$obj->company.')'; $out .= ''; - } - else - { + } else { $out .= ''; } - } - else - { + } else { if (in_array($obj->rowid, $selected)) { $out .= $contactstatic->getFullName($langs); @@ -1613,9 +1557,7 @@ class Form } $i++; } - } - else - { + } else { $out .= ''; @@ -1639,9 +1581,7 @@ class Form $this->num = $num; return $out; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1715,8 +1655,7 @@ class Form { // Build list includeUsers to have only hierarchy $includeUsers = implode(",", $user->getAllChildIds(0)); - } - elseif ($include == 'hierarchyme') + } elseif ($include == 'hierarchyme') { // Build list includeUsers to have only hierarchy and current user $includeUsers = implode(",", $user->getAllChildIds(1)); @@ -1737,17 +1676,13 @@ class Form $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."entity as e ON e.rowid=u.entity"; if ($force_entity) $sql .= " WHERE u.entity IN (0,".$force_entity.")"; else $sql .= " WHERE u.entity IS NOT NULL"; - } - else - { + } else { if (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " ON ug.fk_user = u.rowid"; $sql .= " WHERE ug.entity = ".$conf->entity; - } - else - { + } else { $sql .= " WHERE u.entity IN (0,".$conf->entity.")"; } } @@ -1764,9 +1699,7 @@ class Form if (empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) // MAIN_FIRSTNAME_NAME_POSITION is 0 means firstname+lastname { $sql .= " ORDER BY u.firstname ASC"; - } - else - { + } else { $sql .= " ORDER BY u.lastname ASC"; } @@ -1805,9 +1738,7 @@ class Form $out .= ''; - $outarray[$userstatic->id] = $userstatic->getFullName($langs, $fullNameMode, -1, $maxlength); + $outarray[$userstatic->id] = $userstatic->getFullName($langs, $fullNameMode, -1, $maxlength).$moreinfo; $i++; } - } - else - { + } else { $out .= ''; - } - else - { + } else { dol_print_error($this->db); } @@ -1918,9 +1839,7 @@ class Form if ($action == 'view') { $out .= ''; - } - else - { + } else { $out .= ''; $out .= ''; $out .= $this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter); @@ -2010,8 +1929,7 @@ class Form if (strval($filtertype) === '' && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) { if (!empty($conf->product->enabled) && empty($conf->service->enabled)) { $filtertype = '0'; - } - elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) { + } elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) { $filtertype = '1'; } } @@ -2033,8 +1951,7 @@ class Form { if (empty($conf->product->enabled)) { // when product module is disabled, show services only $filtertype = 1; - } - elseif (empty($conf->service->enabled)) { // when service module is disabled, show products only + } elseif (empty($conf->service->enabled)) { // when service module is disabled, show products only $filtertype = 0; } } @@ -2130,14 +2047,12 @@ class Form if ($hidelabel == 3) { print img_picto($langs->trans("Search"), 'search'); } - } - else - { + } else { print $this->select_produits_list($selected, $htmlname, $filtertype, $limit, $price_level, '', $status, $finished, 0, $socid, $showempty, $forcecombo, $morecss, $hidepriceinlabel, $warehouseStatus); } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of products for a customer * @@ -2161,18 +2076,18 @@ class Form * 'warehouseinternal' = count products from warehouses for internal correct/transfer only * @return array Array of keys for json */ - public function select_produits_list($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $filterkey = '', $status = 1, $finished = 2, $outputmode = 0, $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '') + public function select_produits_list($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $filterkey = '', $status = 1, $finished = 2, $outputmode = 0, $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '') { - // phpcs:enable + // phpcs:enable global $langs, $conf, $user, $db; $out = ''; $outarray = array(); - // Units - if ($conf->global->PRODUCT_USE_UNITS) { - $langs->load('other'); - } + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $langs->load('other'); + } $warehouseStatusArray = array(); if (!empty($warehouseStatus)) @@ -2195,11 +2110,9 @@ class Form $selectFields = " p.rowid, p.ref, p.label, p.description, p.barcode, p.fk_country, p.fk_product_type, p.price, p.price_ttc, p.price_base_type, p.tva_tx, p.duration, p.fk_price_expression"; if (count($warehouseStatusArray)) { - $selectFieldsGrouped = ", sum(".$db->ifsql("e.statut IS NULL", "0", "ps.reel").") as stock"; // e.statut is null if there is no record in stock - } - else - { - $selectFieldsGrouped = ", ".$db->ifsql("p.stock IS NULL", 0, "p.stock")." AS stock"; + $selectFieldsGrouped = ", sum(".$db->ifsql("e.statut IS NULL", "0", "ps.reel").") as stock"; // e.statut is null if there is no record in stock + } else { + $selectFieldsGrouped = ", ".$db->ifsql("p.stock IS NULL", 0, "p.stock")." AS stock"; } $sql = "SELECT "; @@ -2222,11 +2135,11 @@ class Form $sql .= ' pcp.price_base_type as custprice_base_type, pcp.tva_tx as custtva_tx'; $selectFields .= ", idprodcustprice, custprice, custprice_ttc, custprice_base_type, custtva_tx"; } - // Units - if (!empty($conf->global->PRODUCT_USE_UNITS)) { - $sql .= ", u.label as unit_long, u.short_label as unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units"; - $selectFields .= ', unit_long, unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units'; - } + // Units + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $sql .= ", u.label as unit_long, u.short_label as unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units"; + $selectFields .= ', unit_long, unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units'; + } // Multilang : we add translation if (!empty($conf->global->MAIN_MULTILANGS)) @@ -2258,17 +2171,17 @@ class Form // include search in supplier ref if (!empty($conf->global->MAIN_SEARCH_PRODUCT_BY_FOURN_REF)) { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product"; } //Price by customer if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES) && !empty($socid)) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_customer_price as pcp ON pcp.fk_soc=".$socid." AND pcp.fk_product=p.rowid"; } - // Units - if (!empty($conf->global->PRODUCT_USE_UNITS)) { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_units u ON u.rowid = p.fk_unit"; - } + // Units + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_units u ON u.rowid = p.fk_unit"; + } // Multilang : we add translation if (!empty($conf->global->MAIN_MULTILANGS)) { @@ -2288,13 +2201,11 @@ class Form if ($finished == 0) { $sql .= " AND p.finished = ".$finished; - } - elseif ($finished == 1) + } elseif ($finished == 1) { $sql .= " AND p.finished = ".$finished; if ($status >= 0) $sql .= " AND p.tosell = ".$status; - } - elseif ($status >= 0) + } elseif ($status >= 0) { $sql .= " AND p.tosell = ".$status; } @@ -2302,8 +2213,7 @@ class Form if (strval($filtertype) != '') $sql .= " AND p.fk_product_type = ".$filtertype; elseif (empty($conf->product->enabled)) { // when product module is disabled, show services only $sql .= " AND p.fk_product_type = 1"; - } - elseif (empty($conf->service->enabled)) { // when service module is disabled, show products only + } elseif (empty($conf->service->enabled)) { // when service module is disabled, show products only $sql .= " AND p.fk_product_type = 0"; } // Add criteria on ref/label @@ -2344,9 +2254,7 @@ class Form $sql .= " ORDER BY categorie_product_id "; //ASC OR DESC order ($conf->global->PRODUCT_SORT_BY_CATEGORY == 1) ? $sql .= "ASC" : $sql .= "DESC"; - } - else - { + } else { $sql .= $db->order("p.ref"); } @@ -2380,10 +2288,8 @@ class Form { if ($showempty && !is_numeric($showempty)) $textifempty = $langs->trans($showempty); else $textifempty .= $langs->trans("All"); - } - else - { - if ($showempty && !is_numeric($showempty)) $textifempty = $langs->trans($showempty); + } else { + if ($showempty && !is_numeric($showempty)) $textifempty = $langs->trans($showempty); } if ($showempty) $out .= ''; @@ -2433,9 +2339,7 @@ class Form array_push($outarray, $optJson); } } - } - else - { + } else { if (!empty($conf->dynamicprices->enabled) && !empty($objp->fk_price_expression)) { $price_product = new Product($this->db); $price_product->fetch($objp->rowid, '', '', 1); @@ -2467,9 +2371,7 @@ class Form if (empty($outputmode)) return $out; return $outarray; - } - else - { + } else { dol_print_error($db); } } @@ -2525,43 +2427,45 @@ class Form $outdurationvalue = $outtype == Product::TYPE_SERVICE ?substr($objp->duration, 0, dol_strlen($objp->duration) - 1) : ''; $outdurationunit = $outtype == Product::TYPE_SERVICE ?substr($objp->duration, -1) : ''; - // Units - $outvalUnits = ''; - if (!empty($conf->global->PRODUCT_USE_UNITS)) { - if (!empty($objp->unit_short)) { - $outvalUnits .= ' - '.$objp->unit_short; - } - } - if (!empty($conf->global->PRODUCT_SHOW_DIMENSIONS_IN_COMBO)) { - if (!empty($objp->weight) && $objp->weight_units !== null) { - $unitToShow = showDimensionInBestUnit($objp->weight, $objp->weight_units, 'weight', $langs); - $outvalUnits .= ' - '.$unitToShow; - } - if ((!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) && $objp->length_units !== null) { - $unitToShow = $objp->length.' x '.$objp->width.' x '.$objp->height.' '.measuringUnitString(0, 'size', $objp->length_units); - $outvalUnits .= ' - '.$unitToShow; - } - if (!empty($objp->surface) && $objp->surface_units !== null) { - $unitToShow = showDimensionInBestUnit($objp->surface, $objp->surface_units, 'surface', $langs); - $outvalUnits .= ' - '.$unitToShow; - } - if (!empty($objp->volume) && $objp->volume_units !== null) { - $unitToShow = showDimensionInBestUnit($objp->volume, $objp->volume_units, 'volume', $langs); - $outvalUnits .= ' - '.$unitToShow; - } - } - if ($outdurationvalue && $outdurationunit) { - $da = array( - 'h' => $langs->trans('Hour'), - 'd' => $langs->trans('Day'), - 'w' => $langs->trans('Week'), - 'm' => $langs->trans('Month'), - 'y' => $langs->trans('Year') - ); - if (isset($da[$outdurationunit])) { - $outvalUnits .= ' - '.$outdurationvalue.' '.$langs->transnoentities($da[$outdurationunit].($outdurationvalue > 1 ? 's' : '')); - } - } + if ($outorigin && !empty($conf->global->PRODUCT_SHOW_ORIGIN_IN_COMBO)) require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; + + // Units + $outvalUnits = ''; + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + if (!empty($objp->unit_short)) { + $outvalUnits .= ' - '.$objp->unit_short; + } + } + if (!empty($conf->global->PRODUCT_SHOW_DIMENSIONS_IN_COMBO)) { + if (!empty($objp->weight) && $objp->weight_units !== null) { + $unitToShow = showDimensionInBestUnit($objp->weight, $objp->weight_units, 'weight', $langs); + $outvalUnits .= ' - '.$unitToShow; + } + if ((!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) && $objp->length_units !== null) { + $unitToShow = $objp->length.' x '.$objp->width.' x '.$objp->height.' '.measuringUnitString(0, 'size', $objp->length_units); + $outvalUnits .= ' - '.$unitToShow; + } + if (!empty($objp->surface) && $objp->surface_units !== null) { + $unitToShow = showDimensionInBestUnit($objp->surface, $objp->surface_units, 'surface', $langs); + $outvalUnits .= ' - '.$unitToShow; + } + if (!empty($objp->volume) && $objp->volume_units !== null) { + $unitToShow = showDimensionInBestUnit($objp->volume, $objp->volume_units, 'volume', $langs); + $outvalUnits .= ' - '.$unitToShow; + } + } + if ($outdurationvalue && $outdurationunit) { + $da = array( + 'h' => $langs->trans('Hour'), + 'd' => $langs->trans('Day'), + 'w' => $langs->trans('Week'), + 'm' => $langs->trans('Month'), + 'y' => $langs->trans('Year') + ); + if (isset($da[$outdurationunit])) { + $outvalUnits .= ' - '.$outdurationvalue.' '.$langs->transnoentities($da[$outdurationunit].($outdurationvalue > 1 ? 's' : '')); + } + } $opt = '\n"; $optJson = array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'label2'=>$outlabel, 'desc'=>$outdesc, 'type'=>$outtype, 'price_ht'=>price2num($outprice_ht), 'price_ttc'=>price2num($outprice_ttc), 'pricebasetype'=>$outpricebasetype, 'tva_tx'=>$outtva_tx, 'qty'=>$outqty, 'discount'=>$outdiscount, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit, 'pbq'=>$outpbq); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list) * @@ -2774,9 +2668,9 @@ class Form * @param string $morecss More CSS * @return void */ - public function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '') + public function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '') { - // phpcs:enable + // phpcs:enable global $langs, $conf; global $price_level, $status, $finished; @@ -2796,14 +2690,12 @@ class Form $urloption = ($socid > 0 ? 'socid='.$socid.'&' : '').'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished.'&alsoproductwithnosupplierprice='.$alsoproductwithnosupplierprice; print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); print ($hidelabel ? '' : $langs->trans("RefOrLabel").' : ').''; - } - else - { + } else { print $this->select_produits_fournisseurs_list($socid, $selected, $htmlname, $filtertype, $filtre, '', -1, 0, 0, $alsoproductwithnosupplierprice, $morecss); } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of suppliers products * @@ -2820,9 +2712,9 @@ class Form * @param string $morecss Add more CSS * @return array Array of keys for json */ - public function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '') + public function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '') { - // phpcs:enable + // phpcs:enable global $langs, $conf, $db; $out = ''; @@ -2831,28 +2723,28 @@ class Form $maxlengtharticle = (empty($conf->global->PRODUCT_MAX_LENGTH_COMBO) ? 48 : $conf->global->PRODUCT_MAX_LENGTH_COMBO); $langs->load('stocks'); - // Units - if ($conf->global->PRODUCT_USE_UNITS) { - $langs->load('other'); - } + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $langs->load('other'); + } $sql = "SELECT p.rowid, p.ref, p.label, p.price, p.duration, p.fk_product_type,"; $sql .= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.quantity, pfp.remise_percent, pfp.remise, pfp.unitprice,"; $sql .= " pfp.fk_supplier_price_expression, pfp.fk_product, pfp.tva_tx, pfp.fk_soc, s.nom as name,"; $sql .= " pfp.supplier_reputation"; - // Units - if ($conf->global->PRODUCT_USE_UNITS) { - $sql .= ", u.label as unit_long, u.short_label as unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units"; - } - if (!empty($conf->barcode->enabled)) $sql .= ", pfp.barcode"; + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $sql .= ", u.label as unit_long, u.short_label as unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units"; + } + if (!empty($conf->barcode->enabled)) $sql .= ", pfp.barcode"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON ( p.rowid = pfp.fk_product AND pfp.entity IN (".getEntity('product').") )"; if ($socid) $sql .= " AND pfp.fk_soc = ".$socid; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid"; - // Units - if ($conf->global->PRODUCT_USE_UNITS) { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_units u ON u.rowid = p.fk_unit"; - } + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_units u ON u.rowid = p.fk_unit"; + } $sql .= " WHERE p.entity IN (".getEntity('product').")"; $sql .= " AND p.tobuy = 1"; if (strval($filtertype) != '') $sql .= " AND p.fk_product_type=".$this->db->escape($filtertype); @@ -2874,9 +2766,9 @@ class Form } if (count($scrit) > 1) $sql .= ")"; if (!empty($conf->barcode->enabled)) { - $sql .= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; - $sql .= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; - } + $sql .= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; + $sql .= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; + } $sql .= ')'; } $sql .= " ORDER BY pfp.ref_fourn DESC, pfp.quantity ASC"; @@ -2915,41 +2807,41 @@ class Form $outdurationvalue = $outtype == Product::TYPE_SERVICE ?substr($objp->duration, 0, dol_strlen($objp->duration) - 1) : ''; $outdurationunit = $outtype == Product::TYPE_SERVICE ?substr($objp->duration, -1) : ''; - // Units - $outvalUnits = ''; - if ($conf->global->PRODUCT_USE_UNITS) { - if (!empty($objp->unit_short)) { - $outvalUnits .= ' - '.$objp->unit_short; - } - if (!empty($objp->weight) && $objp->weight_units !== null) { - $unitToShow = showDimensionInBestUnit($objp->weight, $objp->weight_units, 'weight', $langs); - $outvalUnits .= ' - '.$unitToShow; - } - if ((!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) && $objp->length_units !== null) { - $unitToShow = $objp->length.' x '.$objp->width.' x '.$objp->height.' '.measuringUnitString(0, 'size', $objp->length_units); - $outvalUnits .= ' - '.$unitToShow; - } - if (!empty($objp->surface) && $objp->surface_units !== null) { - $unitToShow = showDimensionInBestUnit($objp->surface, $objp->surface_units, 'surface', $langs); - $outvalUnits .= ' - '.$unitToShow; - } - if (!empty($objp->volume) && $objp->volume_units !== null) { - $unitToShow = showDimensionInBestUnit($objp->volume, $objp->volume_units, 'volume', $langs); - $outvalUnits .= ' - '.$unitToShow; - } - if ($outdurationvalue && $outdurationunit) { - $da = array( - 'h' => $langs->trans('Hour'), - 'd' => $langs->trans('Day'), - 'w' => $langs->trans('Week'), - 'm' => $langs->trans('Month'), - 'y' => $langs->trans('Year') - ); - if (isset($da[$outdurationunit])) { - $outvalUnits .= ' - '.$outdurationvalue.' '.$langs->transnoentities($da[$outdurationunit].($outdurationvalue > 1 ? 's' : '')); - } - } - } + // Units + $outvalUnits = ''; + if ($conf->global->PRODUCT_USE_UNITS) { + if (!empty($objp->unit_short)) { + $outvalUnits .= ' - '.$objp->unit_short; + } + if (!empty($objp->weight) && $objp->weight_units !== null) { + $unitToShow = showDimensionInBestUnit($objp->weight, $objp->weight_units, 'weight', $langs); + $outvalUnits .= ' - '.$unitToShow; + } + if ((!empty($objp->length) || !empty($objp->width) || !empty($objp->height)) && $objp->length_units !== null) { + $unitToShow = $objp->length.' x '.$objp->width.' x '.$objp->height.' '.measuringUnitString(0, 'size', $objp->length_units); + $outvalUnits .= ' - '.$unitToShow; + } + if (!empty($objp->surface) && $objp->surface_units !== null) { + $unitToShow = showDimensionInBestUnit($objp->surface, $objp->surface_units, 'surface', $langs); + $outvalUnits .= ' - '.$unitToShow; + } + if (!empty($objp->volume) && $objp->volume_units !== null) { + $unitToShow = showDimensionInBestUnit($objp->volume, $objp->volume_units, 'volume', $langs); + $outvalUnits .= ' - '.$unitToShow; + } + if ($outdurationvalue && $outdurationunit) { + $da = array( + 'h' => $langs->trans('Hour'), + 'd' => $langs->trans('Day'), + 'w' => $langs->trans('Week'), + 'm' => $langs->trans('Month'), + 'y' => $langs->trans('Year') + ); + if (isset($da[$outdurationunit])) { + $outvalUnits .= ' - '.$outdurationvalue.' '.$langs->transnoentities($da[$outdurationunit].($outdurationvalue > 1 ? 's' : '')); + } + } + } $objRef = $objp->ref; if ($filterkey && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $objRef, 1); @@ -2976,7 +2868,7 @@ class Form } $outvallabel .= ' - '.dol_trunc($label, $maxlengtharticle); - // Units + // Units $optlabel .= $outvalUnits; $outvallabel .= $outvalUnits; @@ -3007,9 +2899,7 @@ class Form $outvallabel .= ' - '.price($objp->fprice * (!empty($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE) ? (1 - $objp->remise_percent / 100) : 1), 0, $langs, 0, 0, -1, $conf->currency)."/"; $optlabel .= $langs->trans("Unit"); // Do not use strtolower because it breaks utf8 encoding $outvallabel .= $langs->transnoentities("Unit"); - } - else - { + } else { $optlabel .= ' - '.price($objp->fprice * (!empty($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE) ? (1 - $objp->remise_percent / 100) : 1), 1, $langs, 0, 0, -1, $conf->currency)."/".$objp->quantity; $outvallabel .= ' - '.price($objp->fprice * (!empty($conf->global->DISPLAY_DISCOUNTED_SUPPLIER_PRICE) ? (1 - $objp->remise_percent / 100) : 1), 0, $langs, 0, 0, -1, $conf->currency)."/".$objp->quantity; $optlabel .= ' '.$langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding @@ -3044,15 +2934,12 @@ class Form $optlabel .= " - ".$reputations[$objp->supplier_reputation]; $outvallabel .= " - ".$reputations[$objp->supplier_reputation]; } - } - else - { + } else { if (empty($alsoproductwithnosupplierprice)) // No supplier price defined for couple product/supplier { $optlabel .= " - ".$langs->trans("NoPriceDefinedForThisSupplier").''; $outvallabel .= ' - '.$langs->transnoentities("NoPriceDefinedForThisSupplier"); - } - else // No supplier price defined for product, even on other suppliers + } else // No supplier price defined for product, even on other suppliers { $optlabel .= " - ".$langs->trans("NoPriceDefinedForThisSupplier").''; $outvallabel .= ' - '.$langs->transnoentities("NoPriceDefinedForThisSupplier"); @@ -3100,14 +2987,12 @@ class Form if (empty($outputmode)) return $out; return $outarray; - } - else - { + } else { dol_print_error($this->db); } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of suppliers prices for a product * @@ -3116,9 +3001,9 @@ class Form * @param int $selected_supplier Pre-selected supplier if more than 1 result * @return string */ - public function select_product_fourn_price($productid, $htmlname = 'productfournpriceid', $selected_supplier = '') + public function select_product_fourn_price($productid, $htmlname = 'productfournpriceid', $selected_supplier = '') { - // phpcs:enable + // phpcs:enable global $langs, $conf; $langs->load('stocks'); @@ -3147,9 +3032,7 @@ class Form if (!$num) { $form .= ''; - } - else - { + } else { require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $form .= ''; @@ -3192,9 +3075,7 @@ class Form if ($objp->quantity == 1) { $opt .= $langs->trans("Unit"); - } - else - { + } else { $opt .= $langs->trans("Units"); } if ($objp->quantity > 1) @@ -3213,14 +3094,12 @@ class Form $form .= ''; $this->db->free($result); return $form; - } - else - { + } else { dol_print_error($this->db); } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of delivery address * @@ -3230,9 +3109,9 @@ class Form * @param int $showempty Add an empty field * @return integer|null */ - public function select_address($selected, $socid, $htmlname = 'address_id', $showempty = 0) + public function select_address($selected, $socid, $htmlname = 'address_id', $showempty = 0) { - // phpcs:enable + // phpcs:enable // looking for users $sql = "SELECT a.rowid, a.label"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_address as a"; @@ -3256,9 +3135,7 @@ class Form if ($selected && $selected == $obj->rowid) { print ''; - } - else - { + } else { print ''; } $i++; @@ -3266,23 +3143,21 @@ class Form } print ''; return $num; - } - else - { + } else { dol_print_error($this->db); } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load into cache list of payment terms * * @return int Nb of lines loaded, <0 if KO */ - public function load_cache_conditions_paiements() + public function load_cache_conditions_paiements() { - // phpcs:enable + // phpcs:enable global $langs; $num = count($this->cache_conditions_paiements); @@ -3315,23 +3190,21 @@ class Form //$this->cache_conditions_paiements=dol_sort_array($this->cache_conditions_paiements, 'label', 'asc', 0, 0, 1); // We use the field sortorder of table return $num; - } - else - { + } else { dol_print_error($this->db); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Charge dans cache la liste des délais de livraison possibles * * @return int Nb of lines loaded, <0 if KO */ - public function load_cache_availability() + public function load_cache_availability() { - // phpcs:enable + // phpcs:enable global $langs; $num = count($this->cache_availability); @@ -3364,9 +3237,7 @@ class Form $this->cache_availability = dol_sort_array($this->cache_availability, 'label', 'asc', 0, 0, 1); return $num; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -3381,7 +3252,7 @@ class Form * @param int $addempty Add empty entry * @return void */ - public function selectAvailabilityDelay($selected = '', $htmlname = 'availid', $filtertype = '', $addempty = 0) + public function selectAvailabilityDelay($selected = '', $htmlname = 'availid', $filtertype = '', $addempty = 0) { global $langs, $user; @@ -3396,9 +3267,7 @@ class Form if ($selected == $id) { print ''; @@ -3709,7 +3568,7 @@ class Form * @param string $moreattrib To add more attribute on select * @return void */ - public function selectShippingMethod($selected = '', $htmlname = 'shipping_method_id', $filtre = '', $useempty = 0, $moreattrib = '') + public function selectShippingMethod($selected = '', $htmlname = 'shipping_method_id', $filtre = '', $useempty = 0, $moreattrib = '') { global $langs, $conf, $user; @@ -3762,7 +3621,7 @@ class Form * @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @return void */ - public function formSelectShippingMethod($page, $selected = '', $htmlname = 'shipping_method_id', $addempty = 0) + public function formSelectShippingMethod($page, $selected = '', $htmlname = 'shipping_method_id', $addempty = 0) { global $langs, $db; @@ -3793,7 +3652,7 @@ class Form * * @return string HTML select */ - public function selectSituationInvoices($selected = '', $socid = 0) + public function selectSituationInvoices($selected = '', $socid = 0) { global $langs; @@ -3803,36 +3662,34 @@ class Form $sql = 'SELECT rowid, ref, situation_cycle_ref, situation_counter, situation_final, fk_soc'; $sql .= ' FROM '.MAIN_DB_PREFIX.'facture'; $sql .= ' WHERE entity IN ('.getEntity('invoice').')'; - $sql .= ' AND situation_counter>=1'; + $sql .= ' AND situation_counter >= 1'; + $sql .= ' AND fk_soc = '.(int) $socid; + $sql .= ' AND type <> 2'; $sql .= ' ORDER by situation_cycle_ref, situation_counter desc'; $resql = $this->db->query($sql); + if ($resql && $this->db->num_rows($resql) > 0) { // Last seen cycle $ref = 0; while ($obj = $this->db->fetch_object($resql)) { - //Same company ? - if ($socid == $obj->fk_soc) { - //Same cycle ? - if ($obj->situation_cycle_ref != $ref) { - // Just seen this cycle - $ref = $obj->situation_cycle_ref; - //not final ? - if ($obj->situation_final != 1) { - //Not prov? - if (substr($obj->ref, 1, 4) != 'PROV') { - if ($selected == $obj->rowid) { - $opt .= ''; - } else { - $opt .= ''; - } + //Same cycle ? + if ($obj->situation_cycle_ref != $ref) { + // Just seen this cycle + $ref = $obj->situation_cycle_ref; + //not final ? + if ($obj->situation_final != 1) { + //Not prov? + if (substr($obj->ref, 1, 4) != 'PROV') { + if ($selected == $obj->rowid) { + $opt .= ''; + } else { + $opt .= ''; } } } } } - } - else - { + } else { dol_syslog("Error sql=".$sql.", error=".$this->error, LOG_ERR); } if ($opt == '') @@ -3850,7 +3707,7 @@ class Form * @param int $showempty Add a nempty line * @return string HTML select */ - public function selectUnits($selected = '', $htmlname = 'units', $showempty = 0) + public function selectUnits($selected = '', $htmlname = 'units', $showempty = 0) { global $langs; @@ -3868,19 +3725,17 @@ class Form while ($res = $this->db->fetch_object($resql)) { - $unitLabel = $res->label; - if (!empty($langs->tab_translate['unit'.$res->code])) // check if Translation is available before - { - $unitLabel = $langs->trans('unit'.$res->code) != $res->label ? $langs->trans('unit'.$res->code) : $res->label; - } + $unitLabel = $res->label; + if (!empty($langs->tab_translate['unit'.$res->code])) // check if Translation is available before + { + $unitLabel = $langs->trans('unit'.$res->code) != $res->label ? $langs->trans('unit'.$res->code) : $res->label; + } if ($selected == $res->rowid) { - $return .= ''; - } - else - { - $return .= ''; + $return .= ''; + } else { + $return .= ''; } } $return .= ''; @@ -3888,7 +3743,7 @@ class Form return $return; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return a HTML select list of bank accounts * @@ -3902,9 +3757,9 @@ class Form * @param string $morecss More CSS * @return int <0 if error, Num of bank account found if OK (0, 1, 2, ...) */ - public function select_comptes($selected = '', $htmlname = 'accountid', $status = 0, $filtre = '', $useempty = 0, $moreattrib = '', $showcurrency = 0, $morecss = '') + public function select_comptes($selected = '', $htmlname = 'accountid', $status = 0, $filtre = '', $useempty = 0, $moreattrib = '', $showcurrency = 0, $morecss = '') { - // phpcs:enable + // phpcs:enable global $langs, $conf; $langs->load("admin"); @@ -3937,9 +3792,7 @@ class Form if ($selected == $obj->rowid) { print '
'."\n"; - } - elseif ($input['type'] == 'password') + } elseif ($input['type'] == 'password') { $more .= '
'.$input['label'].'
'."\n"; - } - elseif ($input['type'] == 'select') + } elseif ($input['type'] == 'select') { $more .= '
'; - if (!empty($input['label'])) $more .= $input['label'].'
'; + if (!empty($input['label'])) $more .= $input['label'].'
'; $more .= $this->selectarray($input['name'], $input['values'], $input['default'], 1, 0, 0, $moreattr, 0, 0, 0, '', $morecss); $more .= '
'."\n"; - } - elseif ($input['type'] == 'checkbox') + } elseif ($input['type'] == 'checkbox') { $more .= '
'; $more .= '
'.$input['label'].'
'; @@ -4278,8 +4113,7 @@ class Form if (isset($input['disabled'])) $more .= ' disabled'; $more .= ' />
'; $more .= '
'."\n"; - } - elseif ($input['type'] == 'radio') + } elseif ($input['type'] == 'radio') { $i = 0; foreach ($input['values'] as $selkey => $selval) @@ -4294,8 +4128,7 @@ class Form $more .= ''."\n"; $i++; } - } - elseif ($input['type'] == 'date') + } elseif ($input['type'] == 'date') { $more .= '
'.$input['label'].'
'; $more .= '
'; @@ -4306,16 +4139,13 @@ class Form $formquestion[] = array('name'=>$input['name'].'year'); $formquestion[] = array('name'=>$input['name'].'hour'); $formquestion[] = array('name'=>$input['name'].'min'); - } - elseif ($input['type'] == 'other') + } elseif ($input['type'] == 'other') { $more .= '
'; if (!empty($input['label'])) $more .= $input['label'].'
'; $more .= $input['value']; $more .= '
'."\n"; - } - - elseif ($input['type'] == 'onecolumn') + } elseif ($input['type'] == 'onecolumn') { $moreonecolumn .= '
'; $moreonecolumn .= $input['value']; @@ -4357,9 +4187,9 @@ class Form if (isset($input['inputko']) && $input['inputko'] == 1) array_push($inputko, $input['name']); } } - // Show JQuery confirm box. Note that global var $useglobalvars is used inside this template + // Show JQuery confirm box. $formconfirm .= '
'."\n"; // Line text - if (!empty($formquestion['text'])) { + if (is_array($formquestion) && !empty($formquestion['text'])) { $formconfirm .= ''."\n"; } @@ -4489,7 +4317,7 @@ class Form } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show a form to select a project * @@ -4503,9 +4331,9 @@ class Form * @param int $nooutput No print is done. String is returned. * @return string Return html content */ - public function form_project($page, $socid, $selected = '', $htmlname = 'projectid', $discard_closed = 0, $maxlength = 20, $forcefocus = 0, $nooutput = 0) + public function form_project($page, $socid, $selected = '', $htmlname = 'projectid', $discard_closed = 0, $maxlength = 20, $forcefocus = 0, $nooutput = 0) { - // phpcs:enable + // phpcs:enable global $langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; @@ -4525,18 +4353,14 @@ class Form $out .= $formproject->select_projects($socid, $selected, $htmlname, $maxlength, 0, 1, $discard_closed, $forcefocus, 0, 0, '', 1); $out .= ''; $out .= ''; - } - else - { + } else { if ($selected) { $projet = new Project($this->db); $projet->fetch($selected); //print ''.$projet->title.''; $out .= $projet->getNomUrl(0, '', 1); - } - else - { + } else { $out .= " "; } } @@ -4549,7 +4373,7 @@ class Form return $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show a form to select payment conditions * @@ -4559,9 +4383,9 @@ class Form * @param int $addempty Add empty entry * @return void */ - public function form_conditions_reglement($page, $selected = '', $htmlname = 'cond_reglement_id', $addempty = 0) + public function form_conditions_reglement($page, $selected = '', $htmlname = 'cond_reglement_id', $addempty = 0) { - // phpcs:enable + // phpcs:enable global $langs; if ($htmlname != "none") { @@ -4571,9 +4395,7 @@ class Form $this->select_conditions_paiements($selected, $htmlname, -1, $addempty); print ''; print ''; - } - else - { + } else { if ($selected) { $this->load_cache_conditions_paiements(); @@ -4584,7 +4406,7 @@ class Form } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show a form to select a delivery delay * @@ -4594,9 +4416,9 @@ class Form * @param int $addempty Ajoute entree vide * @return void */ - public function form_availability($page, $selected = '', $htmlname = 'availability', $addempty = 0) + public function form_availability($page, $selected = '', $htmlname = 'availability', $addempty = 0) { - // phpcs:enable + // phpcs:enable global $langs; if ($htmlname != "none") { @@ -4606,9 +4428,7 @@ class Form $this->selectAvailabilityDelay($selected, $htmlname, -1, $addempty); print ''; print ''; - } - else - { + } else { if ($selected) { $this->load_cache_availability(); @@ -4628,9 +4448,9 @@ class Form * @param string $htmlname Name of select html field * @param int $addempty Add empty entry * @return void - */ - public function formInputReason($page, $selected = '', $htmlname = 'demandreason', $addempty = 0) - { + */ + public function formInputReason($page, $selected = '', $htmlname = 'demandreason', $addempty = 0) + { global $langs; if ($htmlname != "none") { @@ -4640,9 +4460,7 @@ class Form $this->selectInputReason($selected, $htmlname, -1, $addempty); print ''; print ''; - } - else - { + } else { if ($selected) { $this->loadCacheInputReason(); @@ -4660,7 +4478,7 @@ class Form } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show a form + html select a date * @@ -4673,9 +4491,9 @@ class Form * @return string * @see selectDate() */ - public function form_date($page, $selected, $htmlname, $displayhour = 0, $displaymin = 0, $nooutput = 0) + public function form_date($page, $selected, $htmlname, $displayhour = 0, $displaymin = 0, $nooutput = 0) { - // phpcs:enable + // phpcs:enable global $langs; $ret = ''; @@ -4691,9 +4509,7 @@ class Form $ret .= ''; $ret .= ''; $ret .= '
'.img_picto('', 'recent').' '.$title.'
'.$formquestion['text'].'
'; - } - else - { + } else { if ($displayhour) $ret .= dol_print_date($selected, 'dayhour'); else $ret .= dol_print_date($selected, 'day'); } @@ -4703,7 +4519,7 @@ class Form } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show a select form to choose a user * @@ -4714,9 +4530,9 @@ class Form * @param array $include List of users id to include * @return void */ - public function form_users($page, $selected = '', $htmlname = 'userid', $exclude = '', $include = '') + public function form_users($page, $selected = '', $htmlname = 'userid', $exclude = '', $include = '') { - // phpcs:enable + // phpcs:enable global $langs; if ($htmlname != "none") @@ -4727,9 +4543,7 @@ class Form print $this->select_dolusers($selected, $htmlname, 1, $exclude, 0, $include); print ''; print ''; - } - else - { + } else { if ($selected) { require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; @@ -4743,7 +4557,7 @@ class Form } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show form with payment mode * @@ -4755,9 +4569,9 @@ class Form * @param int $addempty 1=Add empty entry * @return void */ - public function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0) + public function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0) { - // phpcs:enable + // phpcs:enable global $langs; if ($htmlname != "none") { @@ -4767,9 +4581,7 @@ class Form $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active); print ''; print ''; - } - else - { + } else { if ($selected) { $this->load_cache_types_paiements(); @@ -4780,7 +4592,7 @@ class Form } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show form with multicurrency code * @@ -4789,9 +4601,9 @@ class Form * @param string $htmlname Name of select html field * @return void */ - public function form_multicurrency_code($page, $selected = '', $htmlname = 'multicurrency_code') + public function form_multicurrency_code($page, $selected = '', $htmlname = 'multicurrency_code') { - // phpcs:enable + // phpcs:enable global $langs; if ($htmlname != "none") { @@ -4801,15 +4613,13 @@ class Form print $this->selectMultiCurrency($selected, $htmlname, 0); print ''; print ''; - } - else - { + } else { dol_include_once('/core/lib/company.lib.php'); print !empty($selected) ? currency_name($selected, 1) : ' '; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show form with multicurrency rate * @@ -4819,9 +4629,9 @@ class Form * @param string $currency Currency code to explain the rate * @return void */ - public function form_multicurrency_rate($page, $rate = '', $htmlname = 'multicurrency_tx', $currency = '') + public function form_multicurrency_rate($page, $rate = '', $htmlname = 'multicurrency_tx', $currency = '') { - // phpcs:enable + // phpcs:enable global $langs, $mysoc, $conf; if ($htmlname != "none") @@ -4836,23 +4646,19 @@ class Form print ' '; print ''; print ''; - } - else - { + } else { if (!empty($rate)) { print price($rate, 1, $langs, 1, 0); if ($currency && $rate != 1) print '   ('.price($rate, 1, $langs, 1, 0).' '.$currency.' = 1 '.$conf->currency.')'; - } - else - { + } else { print 1; } } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show a select box with available absolute discounts * @@ -4868,9 +4674,9 @@ class Form * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return void */ - public function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter = '', $maxvalue = 0, $more = '', $hidelist = 0, $discount_type = 0) + public function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter = '', $maxvalue = 0, $more = '', $hidelist = 0, $discount_type = 0) { - // phpcs:enable + // phpcs:enable global $conf, $langs; if ($htmlname != "none") { @@ -4883,9 +4689,7 @@ class Form { if (!$filter || $filter == "fk_invoice_supplier_source IS NULL") $translationKey = 'HasAbsoluteDiscountFromSupplier'; // If we want deposit to be substracted to payments only and not to total of final invoice else $translationKey = 'HasCreditNoteFromSupplier'; - } - else - { + } else { if (!$filter || $filter == "fk_invoice_supplier_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS PAID)%')") $translationKey = 'HasAbsoluteDiscountFromSupplier'; else $translationKey = 'HasCreditNoteFromSupplier'; } @@ -4894,9 +4698,7 @@ class Form { if (!$filter || $filter == "fk_facture_source IS NULL") $translationKey = 'CompanyHasAbsoluteDiscount'; // If we want deposit to be substracted to payments only and not to total of final invoice else $translationKey = 'CompanyHasCreditNote'; - } - else - { + } else { if (!$filter || $filter == "fk_facture_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%')") $translationKey = 'CompanyHasAbsoluteDiscount'; else $translationKey = 'CompanyHasCreditNote'; } @@ -4934,34 +4736,30 @@ class Form print ''; } print ''; - } - else - { + } else { if ($selected) { print $selected; - } - else - { + } else { print "0"; } } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Show forms to select a contact - * - * @param string $page Page - * @param Societe $societe Filter on third party - * @param int $selected Id contact pre-selectionne - * @param string $htmlname Name of HTML select. If 'none', we just show contact link. - * @return void - */ - public function form_contacts($page, $societe, $selected = '', $htmlname = 'contactid') - { - // phpcs:enable + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Show forms to select a contact + * + * @param string $page Page + * @param Societe $societe Filter on third party + * @param int $selected Id contact pre-selectionne + * @param string $htmlname Name of HTML select. If 'none', we just show contact link. + * @return void + */ + public function form_contacts($page, $societe, $selected = '', $htmlname = 'contactid') + { + // phpcs:enable global $langs, $conf; if ($htmlname != "none") @@ -4980,9 +4778,7 @@ class Form print ''; print ''; print ''; - } - else - { + } else { if ($selected) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; @@ -4995,7 +4791,7 @@ class Form } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Output html select to select thirdparty * @@ -5010,9 +4806,9 @@ class Form * @param int $nooutput No print output. Return it only. * @return void|string */ - public function form_thirdparty($page, $selected = '', $htmlname = 'socid', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $events = array(), $nooutput = 0) + public function form_thirdparty($page, $selected = '', $htmlname = 'socid', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $events = array(), $nooutput = 0) { - // phpcs:enable + // phpcs:enable global $langs; $out = ''; @@ -5024,18 +4820,14 @@ class Form $out .= $this->select_company($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events); $out .= ''; $out .= ''; - } - else - { + } else { if ($selected) { require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $soc = new Societe($this->db); $soc->fetch($selected); $out .= $soc->getNomUrl($langs); - } - else - { + } else { $out .= " "; } } @@ -5044,18 +4836,18 @@ class Form else print $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Retourne la liste des devises, dans la langue de l'utilisateur * * @param string $selected preselected currency code * @param string $htmlname name of HTML select list - * @deprecated + * @deprecated * @return void */ - public function select_currency($selected = '', $htmlname = 'currency_id') + public function select_currency($selected = '', $htmlname = 'currency_id') { - // phpcs:enable + // phpcs:enable print $this->selectCurrency($selected, $htmlname); } @@ -5067,7 +4859,7 @@ class Form * @param string $mode 0 = Add currency symbol into label, 1 = Add 3 letter iso code * @return string */ - public function selectCurrency($selected = '', $htmlname = 'currency_id', $mode = 0) + public function selectCurrency($selected = '', $htmlname = 'currency_id', $mode = 0) { global $conf, $langs, $user; @@ -5083,19 +4875,15 @@ class Form if ($selected && $selected == $code_iso) { $out .= ''; } @@ -5117,7 +4905,7 @@ class Form * @param integer $useempty 1=Add empty line * @return string */ - public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0) + public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0) { global $db, $conf, $langs, $user; @@ -5165,16 +4953,16 @@ class Form return $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load into the cache vat rates of a country * * @param string $country_code Country code with quotes ("'CA'", or "'CA,IN,...'") * @return int Nb of loaded lines, 0 if already loaded, <0 if KO */ - public function load_cache_vatrates($country_code) + public function load_cache_vatrates($country_code) { - // phpcs:enable + // phpcs:enable global $langs; $num = count($this->cache_vatrates); @@ -5218,21 +5006,17 @@ class Form } return $num; - } - else - { + } else { $this->error = ''.$langs->trans("ErrorNoVATRateDefinedForSellerCountry", $country_code).''; return -1; } - } - else - { + } else { $this->error = ''.$this->db->error().''; return -2; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Output an HTML select vat rate. * The name of this function should be selectVat. We keep bad name for compatibility purpose. @@ -5254,9 +5038,9 @@ class Form * @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key * @return string */ - public function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = '', $societe_acheteuse = '', $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0) + public function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = '', $societe_acheteuse = '', $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0) { - // phpcs:enable + // phpcs:enable global $langs, $conf, $mysoc; $langs->load('errors'); @@ -5281,9 +5065,7 @@ class Form if ($societe_vendeuse->id == $mysoc->id) { $return .= ''.$langs->trans("ErrorYourCountryIsNotDefined").''; - } - else - { + } else { $return .= ''.$langs->trans("ErrorSupplierCountryIsNotDefined").''; } return $return; @@ -5298,9 +5080,7 @@ class Form if (is_object($societe_vendeuse)) { $code_country = "'".$societe_vendeuse->country_code."'"; - } - else - { + } else { $code_country = "'".$mysoc->country_code."'"; // Pour compatibilite ascendente } if (!empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) // If option to have vat for end customer for services is on @@ -5315,13 +5095,10 @@ class Form { $code_country .= ",'".$societe_acheteuse->country_code."'"; } - } - elseif (!$idprod) // We don't know type of product + } elseif (!$idprod) // We don't know type of product { $code_country .= ",'".$societe_acheteuse->country_code."'"; - } - else - { + } else { $prodstatic = new Product($this->db); $prodstatic->fetch($idprod); if ($prodstatic->type == Product::TYPE_SERVICE) // We know product is a service @@ -5343,10 +5120,10 @@ class Form $tmpthirdparty = new Societe($this->db); $defaulttx = get_default_tva($societe_vendeuse, (is_object($societe_acheteuse) ? $societe_acheteuse : $tmpthirdparty), $idprod); $defaultnpr = get_default_npr($societe_vendeuse, (is_object($societe_acheteuse) ? $societe_acheteuse : $tmpthirdparty), $idprod); - if (preg_match('/\((.*)\)/', $defaulttx, $reg)) { - $defaultcode = $reg[1]; - $defaulttx = preg_replace('/\s*\(.*\)/', '', $defaulttx); - } + if (preg_match('/\((.*)\)/', $defaulttx, $reg)) { + $defaultcode = $reg[1]; + $defaulttx = preg_replace('/\s*\(.*\)/', '', $defaulttx); + } if (empty($defaulttx)) $defaultnpr = 0; } @@ -5395,8 +5172,7 @@ class Form $return .= ' selected'; $selectedfound = true; } - } - elseif ($rate['txtva'] == $defaulttx && $rate['nprtva'] == $defaultnpr) + } elseif ($rate['txtva'] == $defaulttx && $rate['nprtva'] == $defaultnpr) { $return .= ' selected'; $selectedfound = true; @@ -5407,9 +5183,7 @@ class Form if ($mysoc->country_code == 'IN' || !empty($conf->global->MAIN_VAT_LABEL_IS_POSITIVE_RATES)) { $return .= $rate['labelpositiverates']; - } - else - { + } else { $return .= vatrate($rate['label']); } //$return.=($rate['code']?' '.$rate['code']:''); @@ -5419,9 +5193,7 @@ class Form } if (!$options_only) $return .= ''; - } - else - { + } else { $return .= $this->error; } @@ -5430,9 +5202,9 @@ class Form } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. * Fields are preselected with : * - set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM') * - local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location) @@ -5452,22 +5224,44 @@ class Form * @param string $addplusone Add a link "+1 hour". Value must be name of another select_date field. * @param datetime $adddateof Add a link "Date of invoice" using the following date. * @return string|void Nothing or string if nooutput is 1 - * @deprecated + * @deprecated * @see selectDate(), form_date(), select_month(), select_year(), select_dayofweek() */ - public function select_date($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $nooutput = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '') - { - // phpcs:enable - $retstring = $this->selectDate($set_time, $prefix, $h, $m, $empty, $form_name, $d, $addnowlink, $disabled, $fullday, $addplusone, $adddateof); - if (!empty($nooutput)) { - return $retstring; - } - print $retstring; - return; - } + public function select_date($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $nooutput = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '') + { + // phpcs:enable + $retstring = $this->selectDate($set_time, $prefix, $h, $m, $empty, $form_name, $d, $addnowlink, $disabled, $fullday, $addplusone, $adddateof); + if (!empty($nooutput)) { + return $retstring; + } + print $retstring; + return; + } - /** - * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. + /** + * Show 2 HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. + * Fields are preselected with : + * - set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM') + * - local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location) + * - Empty (fields empty), if set_time is -1 (in this case, parameter empty must also have value 1) + * + * @param integer $set_time Pre-selected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date with 00:00 hour (Parameter 'empty' must be 0 or 2). + * @param integer $set_time_end Pre-selected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date with 00:00 hour (Parameter 'empty' must be 0 or 2). + * @param string $prefix Prefix for fields name + * @param string $empty 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only + * @return string Html for selectDate + * @see form_date(), select_month(), select_year(), select_dayofweek() + */ + public function selectDateToDate($set_time = '', $set_time_end = '', $prefix = 're', $empty = 0) + { + $ret = $this->selectDate($set_time, $prefix.'_start', 0, 0, $empty); + $ret .= '
'; + $ret .= $this->selectDate($set_time_end, $prefix.'_end', 0, 0, $empty); + return $ret; + } + + /** + * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. * Fields are preselected with : * - set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM') * - local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location) @@ -5482,16 +5276,16 @@ class Form * @param int $d 1=Show days, month, years * @param int $addnowlink Add a link "Now", 1 with server time, 2 with local computer time * @param int $disabled Disable input fields - * @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59 + * @param int $fullday When a checkbox with id #fullday is checked, hours are set with 00:00 (if value if 'fulldaystart') or 23:59 (if value is 'fulldayend') * @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field. * @param datetime $adddateof Add a link "Date of ..." using the following date. See also $labeladddateof for the label used. - * @param string $openinghours Specify hour start and hour end for the select ex 8,20 - * @param int $stepminutes Specify step for minutes between 1 and 30 - * @param string $labeladddateof Label to use for the $adddateof parameter. + * @param string $openinghours Specify hour start and hour end for the select ex 8,20 + * @param int $stepminutes Specify step for minutes between 1 and 30 + * @param string $labeladddateof Label to use for the $adddateof parameter. * @return string Html for selectDate * @see form_date(), select_month(), select_year(), select_dayofweek() */ - public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '', $openinghours = '', $stepminutes = 1, $labeladddateof = '') + public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '', $openinghours = '', $stepminutes = 1, $labeladddateof = '') { global $conf, $langs; @@ -5502,7 +5296,7 @@ class Form if ($m == '') $m = 0; $emptydate = 0; $emptyhours = 0; - if ($stepminutes <= 0 || $stepminutes > 30) $stepminutes = 1; + if ($stepminutes <= 0 || $stepminutes > 30) $stepminutes = 1; if ($empty == 1) { $emptydate = 1; $emptyhours = 1; } if ($empty == 2) { $emptydate = 0; $emptyhours = 1; } $orig_set_time = $set_time; @@ -5522,8 +5316,7 @@ class Form $sday = (!empty($reg[3]) ? $reg[3] : ''); $shour = (!empty($reg[4]) ? $reg[4] : ''); $smin = (!empty($reg[5]) ? $reg[5] : ''); - } - elseif (strval($set_time) != '' && $set_time != -1) + } elseif (strval($set_time) != '' && $set_time != -1) { // set_time est un timestamps (0 possible) $syear = dol_print_date($set_time, "%Y"); @@ -5534,16 +5327,12 @@ class Form $shour = dol_print_date($set_time, "%H"); $smin = dol_print_date($set_time, "%M"); $ssec = dol_print_date($set_time, "%S"); - } - else - { + } else { $shour = ''; $smin = ''; $ssec = ''; } - } - else - { + } else { // Date est '' ou vaut -1 $syear = ''; $smonth = ''; @@ -5578,7 +5367,7 @@ class Form if ($usecalendar == "eldy") { // Zone de saisie manuelle de la date - $retstring .= 'trans("FormatDateShortJavaInput").'\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript $retstring .= '>'; @@ -5590,14 +5379,12 @@ class Form $base = DOL_URL_ROOT.'/core/'; $retstring .= ' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJavaInput").'\',\''.$langs->defaultlang.'\');"'; $retstring .= '>'.img_object($langs->trans("SelectDate"), 'calendarday', 'class="datecallink"').''; - } - else $retstring .= ''; + } else $retstring .= ''; $retstring .= ''."\n"; $retstring .= ''."\n"; $retstring .= ''."\n"; - } - elseif ($usecalendar == 'jquery') + } elseif ($usecalendar == 'jquery') { if (!$disabled) { @@ -5633,7 +5420,7 @@ class Form // Zone de saisie manuelle de la date $retstring .= '
'; - $retstring .= 'trans("FormatDateShortJavaInput").'\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript $retstring .= '>'; @@ -5650,9 +5437,7 @@ class Form $retstring.=' });'; $retstring.='});'; $retstring.="";*/ - } - else - { + } else { $retstring .= ''; } @@ -5660,15 +5445,12 @@ class Form $retstring .= ''."\n"; $retstring .= ''."\n"; $retstring .= ''."\n"; - } - else - { + } else { $retstring .= "Bad value of MAIN_POPUP_CALENDAR"; } } // Show date with combo selects - else - { + else { //$retstring.='
'; // Day $retstring .= ''; @@ -5704,9 +5486,7 @@ class Form if ($emptydate || $set_time == -1) { $retstring .= ''; - } - else - { + } else { $retstring .= ''; for ($year = $syear - 10; $year < $syear + 10; $year++) @@ -5763,32 +5543,38 @@ class Form { // Script which will be inserted in the onClick of the "Now" link $reset_scripts = ""; - if ($addnowlink == 2) // local computer time - { - // pad add leading 0 on numbers - $reset_scripts .= "Number.prototype.pad = function(size) { + if ($addnowlink == 2) // local computer time + { + // pad add leading 0 on numbers + $reset_scripts .= "Number.prototype.pad = function(size) { var s = String(this); while (s.length < (size || 2)) {s = '0' + s;} return s; }; var d = new Date();"; - } + } // Generate the date part, depending on the use or not of the javascript calendar - if ($addnowlink == 1) // server time expressed in user time setup - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');'; - } - elseif ($addnowlink == 2) - { + if ($addnowlink == 1) // server time expressed in user time setup + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');'; + } elseif ($addnowlink == 2) + { + /* Disabled because the output does not use the string format defined by FormatDateShort key to forge the value into #prefix. + * This break application for foreign languages. $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(d.toLocaleDateString(\''.str_replace('_', '-', $langs->defaultlang).'\'));'; $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(d.getDate().pad());'; $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(parseInt(d.getMonth().pad()) + 1);'; $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(d.getFullYear());'; - } + */ + $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');'; + } /*if ($usecalendar == "eldy") { $base=DOL_URL_ROOT.'/core/'; @@ -5805,14 +5591,15 @@ class Form { if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; //$reset_scripts .= 'this.form.elements[\''.$prefix.'hour\'].value=formatDate(new Date(), \'HH\'); '; - if ($addnowlink == 1) - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date(dol_now(), '%H', 'tzuser').'\');'; - } - elseif ($addnowlink == 2) - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(d.getHours().pad());'; - } + if ($addnowlink == 1) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date(dol_now(), '%H', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').change();'; + } elseif ($addnowlink == 2) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(d.getHours().pad());'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').change();'; + } if ($fullday) $reset_scripts .= ' } '; } @@ -5821,14 +5608,15 @@ class Form { if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; //$reset_scripts .= 'this.form.elements[\''.$prefix.'min\'].value=formatDate(new Date(), \'mm\'); '; - if ($addnowlink == 1) - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date(dol_now(), '%M', 'tzuser').'\');'; - } - elseif ($addnowlink == 2) - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(d.getMinutes().pad());'; - } + if ($addnowlink == 1) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date(dol_now(), '%M', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').change();'; + } elseif ($addnowlink == 2) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(d.getMinutes().pad());'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').change();'; + } if ($fullday) $reset_scripts .= ' } '; } // If reset_scripts is not empty, print the link with the reset_scripts in the onClick @@ -5885,9 +5673,35 @@ class Form return $retstring; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Function to show a form to select a duration on a page + /** + * selectTypeDuration + * + * @param string $prefix Prefix + * @param string $selected Selected type + * @return string HTML select string + */ + public function selectTypeDuration($prefix, $selected = 'i') + { + global $langs; + + $TDurationTypes = array('y'=>$langs->trans('Years'), 'm'=>$langs->trans('Month'), 'w'=>$langs->trans('Weeks'), 'd'=>$langs->trans('Days'), 'h'=>$langs->trans('Hours'), 'i'=>$langs->trans('Minutes')); + + $retstring = '"; + + return $retstring; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Function to show a form to select a duration on a page * * @param string $prefix Prefix for input fields * @param int $iSecond Default preselected duration (number of seconds or '') @@ -5899,9 +5713,9 @@ class Form * @param int $nooutput Do not output html string but return it * @return string|void */ - public function select_duration($prefix, $iSecond = '', $disabled = 0, $typehour = 'select', $minunderhours = 0, $nooutput = 0) + public function select_duration($prefix, $iSecond = '', $disabled = 0, $typehour = 'select', $minunderhours = 0, $nooutput = 0) { - // phpcs:enable + // phpcs:enable global $langs; $retstring = ''; @@ -5917,8 +5731,7 @@ class Form $minSelected = convertSecondToTime($iSecond, 'min'); } - if ($typehour == 'select') - { + if ($typehour == 'select') { $retstring .= '"; + } elseif ($typehour == 'text' || $typehour == 'textselect') { + $retstring .= ''; + } else { + return 'BadValueForParameterTypeHour'; } - elseif ($typehour == 'text' || $typehour == 'textselect') - { - $retstring .= ''; - } - else return 'BadValueForParameterTypeHour'; if ($typehour != 'text') $retstring .= ' '.$langs->trans('HourShort'); else $retstring .= ':'; @@ -5954,10 +5766,9 @@ class Form $retstring .= '>'.$min.''; } $retstring .= ""; - } - elseif ($typehour == 'text') + } elseif ($typehour == 'text') { - $retstring .= ''; + $retstring .= ''; } if ($typehour != 'text') $retstring .= ' '.$langs->trans('MinuteShort'); @@ -5987,7 +5798,7 @@ class Form * @param int $disabled 1=Html component is disabled * @param string $selected_input_value Value of preselected input text (for use with ajax) * @return string Return HTML string - * @see selectForFormsList() select_thirdparty + * @see selectForFormsList() select_thirdparty() */ public function selectForForms($objectdesc, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $disabled = 0, $selected_input_value = '') { @@ -6004,6 +5815,7 @@ class Form if (!empty($classpath)) { dol_include_once($classpath); + if ($classname && class_exists($classname)) { $objecttmp = new $classname($this->db); @@ -6031,28 +5843,26 @@ class Form $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->$confkeyforautocompletemode) && !$forcecombo) { - // No immediate load of all database - $placeholder = ''; - if ($preselectedvalue && empty($selected_input_value)) - { - $objecttmp->fetch($preselectedvalue); - $selected_input_value = ($prefixforautocompletemode == 'company' ? $objecttmp->name : $objecttmp->ref); - //unset($objecttmp); - } + // No immediate load of all database + $placeholder = ''; + if ($preselectedvalue && empty($selected_input_value)) + { + $objecttmp->fetch($preselectedvalue); + $selected_input_value = ($prefixforautocompletemode == 'company' ? $objecttmp->name : $objecttmp->ref); + //unset($objecttmp); + } - $objectdesc = $classname.':'.$classpath.':'.$addcreatebuttonornot.':'.$filter; + $objectdesc = $classname.':'.$classpath.':'.$addcreatebuttonornot.':'.$filter; $urlforajaxcall = DOL_URL_ROOT.'/core/ajax/selectobject.php'; // No immediate load of all database - $urloption = 'htmlname='.$htmlname.'&outjson=1&objectdesc='.$objectdesc.'&filter='.urlencode($objecttmp->filter).($moreparams ? $moreparams : ''); + $urloption = 'htmlname='.$htmlname.'&outjson=1&objectdesc='.$objectdesc.'&filter='.urlencode($objecttmp->filter); // Activate the auto complete using ajax call. $out .= ajax_autocompleter($preselectedvalue, $htmlname, $urlforajaxcall, $urloption, $conf->global->$confkeyforautocompletemode, 0, array()); $out .= ''; if ($placeholder) $placeholder = ' placeholder="'.$placeholder.'"'; $out .= ''; - } - else - { + } else { // Immediate load of table record. Note: filter is inside $objecttmp->filter $out .= $this->selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty, $searchkey, $placeholder, $morecss, $moreparams, $forcecombo, 0, $disabled); } @@ -6080,9 +5890,7 @@ class Form if (preg_match('/^\'(.*)\'$/', $tmpescaped, $regbis)) { $tmpescaped = "'".$db->escape($regbis[1])."'"; - } - else - { + } else { $tmpescaped = $db->escape($tmpescaped); } return $db->escape($tmp[0]).' '.strtoupper($db->escape($tmp[1]))." ".$tmpescaped; @@ -6106,7 +5914,7 @@ class Form * @return string|array Return HTML string * @see selectForForms() */ - public function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0, $disabled = 0) + public function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0, $disabled = 0) { global $conf, $langs, $user; @@ -6124,20 +5932,16 @@ class Form if ($val['showoncombobox']) $tmpfieldstoshow .= ($tmpfieldstoshow ? ',' : '').'t.'.$key; } if ($tmpfieldstoshow) $fieldstoshow = $tmpfieldstoshow; - } - else - { + } else { // For backward compatibility $objecttmp->fields['ref'] = array('type'=>'varchar(30)', 'label'=>'Ref', 'showoncombobox'=>1); - } + } if (empty($fieldstoshow)) { if (isset($objecttmp->fields['ref'])) { $fieldstoshow = 't.ref'; - } - else - { + } else { $langs->load("errors"); $this->error = $langs->trans("ErrorNoFieldWithAttributeShowoncombobox"); return $langs->trans('ErrorNoFieldWithAttributeShowoncombobox'); @@ -6225,14 +6029,10 @@ class Form if ($preselectedvalue > 0 && $preselectedvalue == $obj->rowid) { $out .= ''; - } - else - { + } else { $out .= ''; } - } - else - { + } else { array_push($outarray, array('key'=>$obj->rowid, 'value'=>$label, 'label'=>$label)); } @@ -6242,9 +6042,7 @@ class Form } $out .= ''."\n"; - } - else - { + } else { dol_print_error($this->db); } @@ -6321,8 +6119,8 @@ class Form { foreach ($array as $key => $value) { - if (!is_array($value)) $array[$key] = $langs->trans($value); - else $array[$key]['label'] = $langs->trans($value['label']); + if (!is_array($value)) $array[$key] = $langs->trans($value); + else $array[$key]['label'] = $langs->trans($value['label']); } } @@ -6332,14 +6130,14 @@ class Form foreach ($array as $key => $tmpvalue) { - if (is_array($tmpvalue)) $value = $tmpvalue['label']; - else $value = $tmpvalue; + if (is_array($tmpvalue)) $value = $tmpvalue['label']; + else $value = $tmpvalue; $disabled = ''; $style = ''; if (!empty($disablebademail)) { - if (($disablebademail == 1 && !preg_match('/<.+@.+>/', $value)) - || ($disablebademail == 2 && preg_match('/---/', $value))) + if (($disablebademail == 1 && !preg_match('/<.+@.+>/', $value)) + || ($disablebademail == 2 && preg_match('/---/', $value))) { $disabled = ' disabled'; $style = ' class="warning"'; @@ -6350,9 +6148,7 @@ class Form { if (empty($nohtmlescape)) $selectOptionValue = dol_escape_htmltag($key.' - '.($maxlen ?dol_trunc($value, $maxlen) : $value)); else $selectOptionValue = $key.' - '.($maxlen ?dol_trunc($value, $maxlen) : $value); - } - else - { + } else { if (empty($nohtmlescape)) $selectOptionValue = dol_escape_htmltag($maxlen ?dol_trunc($value, $maxlen) : $value); else $selectOptionValue = $maxlen ?dol_trunc($value, $maxlen) : $value; if ($value == '' || $value == '-') $selectOptionValue = ' '; @@ -6369,10 +6165,10 @@ class Form if ($nohtmlescape) $out .= ' data-html="'.dol_escape_htmltag($selectOptionValue).'"'; if (is_array($tmpvalue)) { - foreach ($tmpvalue as $keyforvalue => $valueforvalue) - { - if (preg_match('/^data-/', $keyforvalue)) $out .= ' '.$keyforvalue.'="'.$valueforvalue.'"'; - } + foreach ($tmpvalue as $keyforvalue => $valueforvalue) + { + if (preg_match('/^data-/', $keyforvalue)) $out .= ' '.$keyforvalue.'="'.$valueforvalue.'"'; + } } $out .= '>'; //var_dump($selectOptionValue); @@ -6480,19 +6276,17 @@ class Form if ($acceptdelayedhtml) { $delayedhtmlcontent .= $outdelayed; - } - else - { + } else { $out .= $outdelayed; } return $out; } - /** - * Return a HTML select string, built from an array of key+value, but content returned into select is defined into $array parameter. - * Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice. - * - * @param string $htmlname Name of html select area + /** + * Return a HTML select string, built from an array of key+value, but content returned into select is defined into $array parameter. + * Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice. + * + * @param string $htmlname Name of html select area * @param string $array Array (key=>array('text'=>'A text', 'url'=>'An url'), ...) * @param string $id Preselected key * @param string $moreparam Add more parameters onto the select tag @@ -6598,9 +6392,7 @@ class Form if ($acceptdelayedhtml) { $delayedhtmlcontent .= $outdelayed; - } - else - { + } else { $out .= $outdelayed; } return $out; @@ -6612,7 +6404,7 @@ class Form * @param string $htmlname Name of select * @param array $array Array with key+value * @param array $selected Array with key+value preselected - * @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value" + * @param int $key_in_label 1 to show key like in "[key] value" * @param int $value_as_key 1 to use value as key * @param string $morecss Add more css style * @param int $translate Translate and encode value @@ -6631,25 +6423,23 @@ class Form $out = ''; if ($addjscombo < 0) { - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $addjscombo = 1; - else $addjscombo = 0; + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $addjscombo = 1; + else $addjscombo = 0; } // Add code for jquery to use multiselect if (!empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) { + $out .= "\n".' + \n"; - } - if (!empty($conf->use_javascript_ajax) || $onlyselect) - { - //var_dump($selected); - if ($selected == 'done') $selected = '100'; - print ''; - if ($selected == 0 || $selected == 100) $canedit = 0; - - if (empty($onlyselect)) - { - print ' = 0) ? '' : ' disabled').'>'; - print '%'; - } - } - else + } + if (!empty($conf->use_javascript_ajax) || $onlyselect) { - print ' %'; - } - } - - - /** - * Show list of actions for element - * - * @param Object $object Object - * @param string $typeelement 'invoice','propal','order','invoice_supplier','order_supplier','fichinter' - * @param int $socid Socid of user - * @param int $forceshowtitle Show title even if there is no actions to show - * @param string $morecss More css on table - * @param int $max Max number of record - * @param string $moreparambacktopage More param for the backtopage - * @param string $morehtmlcenter More html text on center of title line - * @return int <0 if KO, >=0 if OK - */ - public function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0, $morecss = 'listactions', $max = 0, $moreparambacktopage = '', $morehtmlcenter = '') - { - global $langs, $conf, $user; - - require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; - - $sortfield = 'a.datep,a.id'; - $sortorder = 'DESC,DESC'; - - $listofactions = ActionComm::getActions($this->db, $socid, $object->id, $typeelement, '', $sortfield, $sortorder, ($max ? ($max + 1) : 0)); - if (!is_array($listofactions)) dol_print_error($this->db, 'FailedToGetActions'); - - $num = count($listofactions); - if ($num || $forceshowtitle) - { - if ($typeelement == 'invoice') $title = $langs->trans('ActionsOnBill'); - elseif ($typeelement == 'invoice_supplier' || $typeelement == 'supplier_invoice') $title = $langs->trans('ActionsOnBill'); - elseif ($typeelement == 'propal') $title = $langs->trans('ActionsOnPropal'); - elseif ($typeelement == 'supplier_proposal') $title = $langs->trans('ActionsOnSupplierProposal'); - elseif ($typeelement == 'order') $title = $langs->trans('ActionsOnOrder'); - elseif ($typeelement == 'order_supplier' || $typeelement == 'supplier_order') $title = $langs->trans('ActionsOnOrder'); - elseif ($typeelement == 'shipping') $title = $langs->trans('ActionsOnShipping'); - elseif ($typeelement == 'fichinter') $title = $langs->trans('ActionsOnFicheInter'); - elseif ($typeelement == 'project') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); - elseif ($typeelement == 'task') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); - elseif ($typeelement == 'member') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); - else $title = $langs->trans("LatestLinkedEvents", $max ? $max : ''); - - $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id.($moreparambacktopage ? '&'.$moreparambacktopage : ''); - - $projectid = $object->fk_project; - if ($typeelement == 'project') $projectid = $object->id; - - $newcardbutton = ''; - if (!empty($conf->agenda->enabled) && !empty($user->rights->agenda->myactions->create)) + //var_dump($selected); + if ($selected == 'done') $selected = '100'; + print ''; + if ($selected == 0 || $selected == 100) $canedit = 0; + + if (empty($onlyselect)) + { + print ' = 0) ? '' : ' disabled').'>'; + print '%'; + } + } else { + print ' %'; + } + } + + + /** + * Show list of actions for element + * + * @param Object $object Object + * @param string $typeelement 'invoice', 'propal', 'order', 'invoice_supplier', 'order_supplier', 'fichinter' + * @param int $socid Socid of user + * @param int $forceshowtitle Show title even if there is no actions to show + * @param string $morecss More css on table + * @param int $max Max number of record + * @param string $moreparambacktopage More param for the backtopage + * @param string $morehtmlcenter More html text on center of title line + * @return int <0 if KO, >=0 if OK + */ + public function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0, $morecss = 'listactions', $max = 0, $moreparambacktopage = '', $morehtmlcenter = '') + { + global $langs, $conf, $user; + + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; + + $sortfield = 'a.datep,a.id'; + $sortorder = 'DESC,DESC'; + + $listofactions = ActionComm::getActions($this->db, $socid, $object->id, $typeelement, '', $sortfield, $sortorder, ($max ? ($max + 1) : 0)); + if (!is_array($listofactions)) dol_print_error($this->db, 'FailedToGetActions'); + + $num = count($listofactions); + if ($num || $forceshowtitle) + { + if ($typeelement == 'invoice') $title = $langs->trans('ActionsOnBill'); + elseif ($typeelement == 'invoice_supplier' || $typeelement == 'supplier_invoice') $title = $langs->trans('ActionsOnBill'); + elseif ($typeelement == 'propal') $title = $langs->trans('ActionsOnPropal'); + elseif ($typeelement == 'supplier_proposal') $title = $langs->trans('ActionsOnSupplierProposal'); + elseif ($typeelement == 'order') $title = $langs->trans('ActionsOnOrder'); + elseif ($typeelement == 'order_supplier' || $typeelement == 'supplier_order') $title = $langs->trans('ActionsOnOrder'); + elseif ($typeelement == 'shipping') $title = $langs->trans('ActionsOnShipping'); + elseif ($typeelement == 'fichinter') $title = $langs->trans('ActionsOnFicheInter'); + elseif ($typeelement == 'project') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); + elseif ($typeelement == 'task') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); + elseif ($typeelement == 'member') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); + else $title = $langs->trans("LatestLinkedEvents", $max ? $max : ''); + + $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id.($moreparambacktopage ? '&'.$moreparambacktopage : ''); + + $projectid = $object->fk_project; + if ($typeelement == 'project') $projectid = $object->id; + + $newcardbutton = ''; + if (!empty($conf->agenda->enabled) && !empty($user->rights->agenda->myactions->create)) + { + $newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(), 'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid > 0 ? '&socid='.$object->socid : ($socid > 0 ? '&socid='.$socid : '')).($projectid > 0 ? '&projectid='.$projectid : '').'&backtopage='.urlencode($urlbacktopage)); } - print ''."\n"; - print load_fiche_titre($title, $newcardbutton, '', 0, 0, '', $morehtmlcenter); + print ''."\n"; + print load_fiche_titre($title, $newcardbutton, '', 0, 0, '', $morehtmlcenter); - $page = 0; $param = ''; + $page = 0; $param = ''; - print '
'; - print ''; - print ''; - print getTitleFieldOfList('Ref', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); - print getTitleFieldOfList('By', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); - print getTitleFieldOfList('Type', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); - print getTitleFieldOfList('Title', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); - print getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', $page, $param, '', $sortfield, $sortorder, 'center ', 1); - print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, 'right ', 1); - print ''; - print "\n"; + print '
'; + print '
'; + print ''; + print getTitleFieldOfList('Ref', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); + print getTitleFieldOfList('By', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); + print getTitleFieldOfList('Type', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); + print getTitleFieldOfList('Title', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); + print getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', $page, $param, '', $sortfield, $sortorder, 'center ', 1); + print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, 'right ', 1); + print ''; + print "\n"; - if (is_array($listofactions) && count($listofactions)) - { - $cacheusers = array(); + if (is_array($listofactions) && count($listofactions)) + { + $cacheusers = array(); - $cursorevent = 0; - foreach ($listofactions as $actioncomm) - { - if ($max && $cursorevent >= $max) break; + $cursorevent = 0; + foreach ($listofactions as $actioncomm) + { + if ($max && $cursorevent >= $max) break; - $ref = $actioncomm->getNomUrl(1, -1); - $label = $actioncomm->getNomUrl(0, 38); + $ref = $actioncomm->getNomUrl(1, -1); + $label = $actioncomm->getNomUrl(0, 38); - print ''; - // Ref + print ''; + // Ref print ''; // Onwer - print ''; + print ''; // Type - print ''; - // Label - print ''; - // Date - print ''; - print ''; - print ''; + print ''; + // Label + print ''; + // Date + print ''; + print ''; + print ''; - $cursorevent++; - } - } - else - { - print ''; - } + $cursorevent++; + } + } else { + print ''; + } - if ($max && $num > $max) - { - print ''; - } + if ($max && $num > $max) + { + print ''; + } - print '
'.$ref.''; - if (!empty($actioncomm->userownerid)) - { - if (is_object($cacheusers[$actioncomm->userownerid])) - { - $tmpuser = $cacheusers[$actioncomm->userownerid]; - } - else - { - $tmpuser = new User($this->db); - $tmpuser->fetch($actioncomm->userownerid); - $cacheusers[$actioncomm->userownerid] = $tmpuser; - } - if ($tmpuser->id > 0) - { - print $tmpuser->getNomUrl(-1, '', 0, 0, 16, 0, 'firstelselast', ''); - } - } - print ''; + if (!empty($actioncomm->userownerid)) + { + if (is_object($cacheusers[$actioncomm->userownerid])) + { + $tmpuser = $cacheusers[$actioncomm->userownerid]; + } else { + $tmpuser = new User($this->db); + $tmpuser->fetch($actioncomm->userownerid); + $cacheusers[$actioncomm->userownerid] = $tmpuser; + } + if ($tmpuser->id > 0) + { + print $tmpuser->getNomUrl(-1, '', 0, 0, 16, 0, 'firstelselast', ''); + } + } + print ''; - // TODO Code common with code into comm/action/list.php + print ''; + // TODO Code common with code into comm/action/list.php $imgpicto = ''; if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { if ($actioncomm->type_picto) { $imgpicto = img_picto('', $actioncomm->type_picto); - } - else { + } else { if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; @@ -286,105 +281,100 @@ class FormActions } else { print $actioncomm->type_short ? $actioncomm->type_short : $actioncomm->type; } - print ''.$label.''.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel'); - if ($actioncomm->datef) - { - $tmpa = dol_getdate($actioncomm->datep); - $tmpb = dol_getdate($actioncomm->datef); - if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) - { - if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel'); - } - else print '-'.dol_print_date($actioncomm->datef, 'dayhour', 'tzuserrel'); - } - print ''; - print $actioncomm->getLibStatut(3); - print '
'.$label.''.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel'); + if ($actioncomm->datef) + { + $tmpa = dol_getdate($actioncomm->datep); + $tmpb = dol_getdate($actioncomm->datef); + if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) + { + if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel'); + } else print '-'.dol_print_date($actioncomm->datef, 'dayhour', 'tzuserrel'); + } + print ''; + print $actioncomm->getLibStatut(3); + print '
'.$langs->trans("None").'
'.$langs->trans("None").'
'.$langs->trans("More").'...
'.$langs->trans("More").'...
'; - print '
'; - } + print ''; + print '
'; + } - return $num; - } + return $num; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Output html select list of type of event - * - * @param array|string $selected Type pre-selected (can be 'manual', 'auto' or 'AC_xxx'). Can be an array too. - * @param string $htmlname Name of select field - * @param string $excludetype A type to exclude ('systemauto', 'system', '') - * @param integer $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type, -1=Keep details and add a combined line "All manual" - * @param int $hideinfohelp 1=Do not show info help, 0=Show, -1=Show+Add info to tell how to set default value - * @param int $multiselect 1=Allow multiselect of action type - * @param int $nooutput 1=No output - * @param string $morecss More css to add to SELECT component. - * @return string - */ - public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = '') - { - // phpcs:enable - global $langs, $user, $form, $conf; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Output html select list of type of event + * + * @param array|string $selected Type pre-selected (can be 'manual', 'auto' or 'AC_xxx'). Can be an array too. + * @param string $htmlname Name of select field + * @param string $excludetype A type to exclude ('systemauto', 'system', '') + * @param integer $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type, -1=Keep details and add a combined line "All manual" + * @param int $hideinfohelp 1=Do not show info help, 0=Show, -1=Show+Add info to tell how to set default value + * @param int $multiselect 1=Allow multiselect of action type + * @param int $nooutput 1=No output + * @param string $morecss More css to add to SELECT component. + * @return string + */ + public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = '') + { + // phpcs:enable + global $langs, $user, $form, $conf; - if (!is_object($form)) $form = new Form($this->db); + if (!is_object($form)) $form = new Form($this->db); - require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; - $caction = new CActionComm($this->db); + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; + $caction = new CActionComm($this->db); - // Suggest a list with manual events or all auto events - $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot); - if (empty($multiselect)) { - // Add empty line at start only if no multiselect - array_unshift($arraylist, ' '); - } - //asort($arraylist); + // Suggest a list with manual events or all auto events + $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot); + if (empty($multiselect)) { + // Add empty line at start only if no multiselect + array_unshift($arraylist, ' '); + } + //asort($arraylist); - if ($selected == 'manual') $selected = 'AC_OTH'; - if ($selected == 'auto') $selected = 'AC_OTH_AUTO'; + if ($selected == 'manual') $selected = 'AC_OTH'; + if ($selected == 'auto') $selected = 'AC_OTH_AUTO'; - if (!empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO)) unset($arraylist['AC_OTH_AUTO']); + if (!empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO)) unset($arraylist['AC_OTH_AUTO']); - $out = ''; + $out = ''; if (!empty($multiselect)) { - if (!is_array($selected) && !empty($selected)) $selected = explode(',', $selected); + if (!is_array($selected) && !empty($selected)) $selected = explode(',', $selected); $out .= $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0); - } - else - { + } else { $out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth200'.($morecss ? ' '.$morecss : ''), 1); } - if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) - { - $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup").($hideinfohelp == -1 ? ". ".$langs->trans("YouCanSetDefaultValueInModuleSetup") : ''), 1); - } + if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) + { + $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup").($hideinfohelp == -1 ? ". ".$langs->trans("YouCanSetDefaultValueInModuleSetup") : ''), 1); + } - if ($nooutput) return $out; - else print $out; - return ''; - } + if ($nooutput) return $out; + else print $out; + return ''; + } } diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 16e9a70ab56..b53d73bc757 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -114,9 +114,7 @@ class FormAdmin if ($selected == $keytouse) { $out .= ''; - } - else - { + } else { $out .= ''; } } @@ -184,9 +182,7 @@ class FormAdmin if ($file == $selected) { $menuarray[$prefix.'_'.$file] = ''; - } - else - { + } else { $menuarray[$prefix.'_'.$file] = ''; } } @@ -385,9 +381,7 @@ class FormAdmin $i++; } - } - else - { + } else { dol_print_error($this->db); return ''; } @@ -405,9 +399,7 @@ class FormAdmin if ($selected == $key) { $out .= ''; - } - else - { + } else { $out .= ''; } } diff --git a/htdocs/core/class/html.formbank.class.php b/htdocs/core/class/html.formbank.class.php index a9708a9d76d..a359bd194f7 100644 --- a/htdocs/core/class/html.formbank.class.php +++ b/htdocs/core/class/html.formbank.class.php @@ -23,6 +23,8 @@ * \brief File of class with all html predefined components */ +include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + /** * Class to manage generation of HTML components for bank module diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index 8c27666dfc4..104daf6de0e 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -176,8 +176,7 @@ class FormBarCode } $out .= ""; $out .= ajax_combobox("select_".$htmlname); - } - else { + } else { dol_print_error($this->db); } return $out; diff --git a/htdocs/core/class/html.formcategory.class.php b/htdocs/core/class/html.formcategory.class.php index 41e39cc93a2..f2f856144ff 100644 --- a/htdocs/core/class/html.formcategory.class.php +++ b/htdocs/core/class/html.formcategory.class.php @@ -32,13 +32,12 @@ class FormCategory extends Form /** * Return a HTML filter box for a list filter view * - * @param string $type The categorie type (e.g Categorie::TYPE_WAREHOUSE) - * @param Array $preSelected A list with the elements that should pre-selected - * @return string A HTML filter box (Note: selected results can get with GETPOST("search_category_".$type."_list")) + * @param string $type The categorie type (e.g Categorie::TYPE_WAREHOUSE) + * @param Array $preSelected A list with the elements that should pre-selected + * @return string A HTML filter box (Note: selected results can get with GETPOST("search_category_".$type."_list")) */ - public function getFilterBox($type, $preSelected) + public function getFilterBox($type, array $preSelected) { - // phpcs:enable global $langs; if (empty($preSelected) || !is_array($preSelected)) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 6fb02454311..4ee5c9f1f6a 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2008-2012 Regis Houssin * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2017 Rui Strecht + * Copyright (C) 2020 Open-Dsi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; class FormCompany extends Form { - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of labels (translated) of third parties type * @@ -49,7 +50,7 @@ class FormCompany extends Form */ public function typent_array($mode = 0, $filter = '') { - // phpcs:enable + // phpcs:enable global $langs, $mysoc; $effs = array(); @@ -82,7 +83,7 @@ class FormCompany extends Form return $effs; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Renvoie la liste des types d'effectifs possibles (pas de traduction car nombre) * @@ -92,7 +93,7 @@ class FormCompany extends Form */ public function effectif_array($mode = 0, $filter = '') { - // phpcs:enable + // phpcs:enable $effs = array(); $sql = "SELECT id, code, libelle"; @@ -122,7 +123,7 @@ class FormCompany extends Form } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Affiche formulaire de selection des modes de reglement * @@ -134,7 +135,7 @@ class FormCompany extends Form */ public function form_prospect_level($page, $selected = '', $htmlname = 'prospect_level_id', $empty = 0) { - // phpcs:enable + // phpcs:enable global $user, $langs; print '
'; @@ -166,19 +167,70 @@ class FormCompany extends Form } print Form::selectarray($htmlname, $options, $selected); - } - else dol_print_error($this->db); + } else dol_print_error($this->db); if (!empty($htmlname) && $user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print ''; print '
'; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Affiche formulaire de selection des niveau de prospection pour les contacts + * + * @param int $page Page + * @param int $selected Id or code preselected + * @param string $htmlname Nom du formulaire select + * @param int $empty Add empty value in list + * @return void + */ + public function formProspectContactLevel($page, $selected = '', $htmlname = 'prospect_contact_level_id', $empty = 0) + { + global $user, $langs; + + print '
'; + print ''; + print ''; + + dol_syslog(__METHOD__, LOG_DEBUG); + $sql = "SELECT code, label"; + $sql .= " FROM " . MAIN_DB_PREFIX . "c_prospectcontactlevel"; + $sql .= " WHERE active > 0"; + $sql .= " ORDER BY sortorder"; + $resql = $this->db->query($sql); + if ($resql) + { + $options = array(); + + if ($empty) + { + $options[''] = ''; + } + + while ($obj = $this->db->fetch_object($resql)) + { + $level = $langs->trans($obj->code); + + if ($level == $obj->code) + { + $level = $langs->trans($obj->label); + } + + $options[$obj->code] = $level; + } + + print Form::selectarray($htmlname, $options, $selected); + } + else dol_print_error($this->db); + if (!empty($htmlname) && $user->admin) print ' ' . info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print ''; + print '
'; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns the drop-down list of departments/provinces/cantons for all countries or for a given country. - * In the case of an all-country list, the display breaks on the country. - * The key of the list is the code (there can be several entries for a given code but in this case, the country field differs). - * Thus the links with the departments are done on a department independently of its name. + * In the case of an all-country list, the display breaks on the country. + * The key of the list is the code (there can be several entries for a given code but in this case, the country field differs). + * Thus the links with the departments are done on a department independently of its name. * * @param string $selected Code state preselected * @param int $country_codeid 0=list for all countries, otherwise country code or country rowid to show @@ -187,16 +239,16 @@ class FormCompany extends Form */ public function select_departement($selected = '', $country_codeid = 0, $htmlname = 'state_id') { - // phpcs:enable + // phpcs:enable print $this->select_state($selected, $country_codeid, $htmlname); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns the drop-down list of departments/provinces/cantons for all countries or for a given country. - * In the case of an all-country list, the display breaks on the country. - * The key of the list is the code (there can be several entries for a given code but in this case, the country field differs). - * Thus the links with the departments are done on a department independently of its name. + * In the case of an all-country list, the display breaks on the country. + * The key of the list is the code (there can be several entries for a given code but in this case, the country field differs). + * Thus the links with the departments are done on a department independently of its name. * * @param int $selected Code state preselected (mus be state id) * @param integer $country_codeid Country code or id: 0=list for all countries, otherwise country code or country rowid to show @@ -206,7 +258,7 @@ class FormCompany extends Form */ public function select_state($selected = 0, $country_codeid = 0, $htmlname = 'state_id') { - // phpcs:enable + // phpcs:enable global $conf, $langs, $user; dol_syslog(get_class($this)."::select_departement selected=".$selected.", country_codeid=".$country_codeid, LOG_DEBUG); @@ -241,8 +293,7 @@ class FormCompany extends Form if ($obj->code == '0') // Le code peut etre une chaine { $out .= ''; - } - else { + } else { if (!$country || $country != $obj->country) { // Affiche la rupture si on est en mode liste multipays @@ -256,9 +307,7 @@ class FormCompany extends Form if (!empty($selected) && $selected == $obj->rowid) { $out .= ''; - } - else { + } else { if ($country == '' || $country != $obj->country) { // Show break @@ -356,9 +399,7 @@ class FormCompany extends Form if ($selected > 0 && $selected == $obj->code) { print ''; - } - else - { + } else { print ''; } } @@ -366,25 +407,24 @@ class FormCompany extends Form } } print ''; - } - else - { + } else { dol_print_error($this->db); } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return combo list with people title * * @param string $selected Civility/Title code preselected * @param string $htmlname Name of HTML select combo field * @param string $morecss Add more css on SELECT element + * @param int $addjscombo Add js combo * @return string String with HTML select */ - public function select_civility($selected = '', $htmlname = 'civility_id', $morecss = 'maxwidth100') + public function select_civility($selected = '', $htmlname = 'civility_id', $morecss = 'maxwidth150', $addjscombo = 0) { - // phpcs:enable + // phpcs:enable global $conf, $langs, $user; $langs->load("dict"); @@ -409,12 +449,10 @@ class FormCompany extends Form if ($selected == $obj->code) { $out .= ''; $i++; @@ -422,16 +460,20 @@ class FormCompany extends Form } $out .= ''; if ($user->admin) $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - } - else - { + + if ($addjscombo) { + // Enhance with select2 + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $out .= ajax_combobox($htmlname); + } + } else { dol_print_error($this->db); } return $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Retourne la liste deroulante des formes juridiques tous pays confondus ou pour un pays donne. * Dans le cas d'une liste tous pays confondu, on affiche une rupture sur le pays. @@ -445,25 +487,25 @@ class FormCompany extends Form */ public function select_forme_juridique($selected = '', $country_codeid = 0, $filter = '') { - // phpcs:enable + // phpcs:enable print $this->select_juridicalstatus($selected, $country_codeid, $filter); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Retourne la liste deroulante des formes juridiques tous pays confondus ou pour un pays donne. * Dans le cas d'une liste tous pays confondu, on affiche une rupture sur le pays * * @param string $selected Preselected code of juridical type * @param int $country_codeid 0=list for all countries, otherwise list only country requested - * @param string $filter Add a SQL filter on list - * @param string $htmlname HTML name of select - * @param string $morecss More CSS - * @return string String with HTML select + * @param string $filter Add a SQL filter on list + * @param string $htmlname HTML name of select + * @param string $morecss More CSS + * @return string String with HTML select */ public function select_juridicalstatus($selected = '', $country_codeid = 0, $filter = '', $htmlname = 'forme_juridique_code', $morecss = '') { - // phpcs:enable + // phpcs:enable global $conf, $langs, $user; $langs->load("dict"); @@ -525,9 +567,7 @@ class FormCompany extends Form if ($selected > 0 && $selected == $val['code']) { $out .= '
'; - } - else - { + } else { dol_print_error($this->db); } @@ -562,8 +600,8 @@ class FormCompany extends Form * @param string $htmlname Name of HTML form * @param array $limitto Disable answers that are not id in this array list * @param int $forceid This is to force another object id than object->id - * @param string $moreparam String with more param to add into url when noajax search is used. - * @param string $morecss More CSS on select component + * @param string $moreparam String with more param to add into url when noajax search is used. + * @param string $morecss More CSS on select component * @return int The selected third party ID */ public function selectCompaniesForNewContact($object, $var_id, $selected = '', $htmlname = 'newcompany', $limitto = '', $forceid = 0, $moreparam = '', $morecss = '') @@ -652,9 +690,7 @@ class FormCompany extends Form print ''; print ajax_autocompleter(($socid ? $socid : -1), $htmlname, DOL_URL_ROOT.'/societe/ajaxcompanies.php', '', $minLength, 0); return $socid; - } - else - { + } else { // Search to list thirdparties $sql = "SELECT s.rowid, s.nom as name FROM"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; @@ -692,9 +728,7 @@ class FormCompany extends Form if ($disabled) print ' disabled'; print ' selected>'.dol_trunc($obj->name, 24).''; $firstCompany = $obj->rowid; - } - else - { + } else { print ''; @@ -705,30 +739,28 @@ class FormCompany extends Form print "\n"; print ajax_combobox($htmlname); return $firstCompany; - } - else - { + } else { dol_print_error($this->db); return 0; } } } - /** - * Return a select list with types of contacts - * - * @param object $object Object to use to find type of contact - * @param string $selected Default selected value - * @param string $htmlname HTML select name - * @param string $source Source ('internal' or 'external') - * @param string $sortorder Sort criteria ('position', 'code', ...) - * @param int $showempty 1=Add en empty line - * @param string $morecss Add more css to select component - * @return void - */ - public function selectTypeContact($object, $selected, $htmlname = 'type', $source = 'internal', $sortorder = 'position', $showempty = 0, $morecss = '') + /** + * Return a select list with types of contacts + * + * @param object $object Object to use to find type of contact + * @param string $selected Default selected value + * @param string $htmlname HTML select name + * @param string $source Source ('internal' or 'external') + * @param string $sortorder Sort criteria ('position', 'code', ...) + * @param int $showempty 1=Add en empty line + * @param string $morecss Add more css to select component + * @return void + */ + public function selectTypeContact($object, $selected, $htmlname = 'type', $source = 'internal', $sortorder = 'position', $showempty = 0, $morecss = '') { - global $user, $langs; + global $user, $langs; if (is_object($object) && method_exists($object, 'liste_type_contact')) { @@ -790,7 +822,7 @@ class FormCompany extends Form return 'ErrorBadValueForParameterRenderMode'; // Should not happened } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return a select list with zip codes and their town * @@ -805,7 +837,7 @@ class FormCompany extends Form */ public function select_ziptown($selected = '', $htmlname = 'zipcode', $fields = '', $fieldsize = 0, $disableautocomplete = 0, $moreattrib = '', $morecss = '') { - // phpcs:enable + // phpcs:enable global $conf; $out = ''; @@ -823,158 +855,155 @@ class FormCompany extends Form return $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return HTML string to use as input of professional id into a HTML page (siren, siret, etc...) - * - * @param int $idprof 1,2,3,4 (Example: 1=siren,2=siret,3=naf,4=rcs/rm) - * @param string $htmlname Name of HTML select - * @param string $preselected Default value to show - * @param string $country_code FR, IT, ... - * @param string $morecss More css - * @return string HTML string with prof id - */ - public function get_input_id_prof($idprof, $htmlname, $preselected, $country_code, $morecss = 'maxwidth100onsmartphone quatrevingtpercent') - { - // phpcs:enable - global $conf, $langs, $hookmanager; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return HTML string to use as input of professional id into a HTML page (siren, siret, etc...) + * + * @param int $idprof 1,2,3,4 (Example: 1=siren,2=siret,3=naf,4=rcs/rm) + * @param string $htmlname Name of HTML select + * @param string $preselected Default value to show + * @param string $country_code FR, IT, ... + * @param string $morecss More css + * @return string HTML string with prof id + */ + public function get_input_id_prof($idprof, $htmlname, $preselected, $country_code, $morecss = 'maxwidth100onsmartphone quatrevingtpercent') + { + // phpcs:enable + global $conf, $langs, $hookmanager; - $formlength = 0; - if (empty($conf->global->MAIN_DISABLEPROFIDRULES)) { - if ($country_code == 'FR') - { - if (isset($idprof)) { - if ($idprof == 1) $formlength = 9; - elseif ($idprof == 2) $formlength = 14; - elseif ($idprof == 3) $formlength = 5; // 4 chiffres et 1 lettre depuis janvier - elseif ($idprof == 4) $formlength = 32; // No maximum as we need to include a town name in this id - } - } - elseif ($country_code == 'ES') - { - if ($idprof == 1) $formlength = 9; //CIF/NIF/NIE 9 digits - if ($idprof == 2) $formlength = 12; //NASS 12 digits without / - if ($idprof == 3) $formlength = 5; //CNAE 5 digits - if ($idprof == 4) $formlength = 32; //depend of college - } - } + $formlength = 0; + if (empty($conf->global->MAIN_DISABLEPROFIDRULES)) { + if ($country_code == 'FR') + { + if (isset($idprof)) { + if ($idprof == 1) $formlength = 9; + elseif ($idprof == 2) $formlength = 14; + elseif ($idprof == 3) $formlength = 5; // 4 chiffres et 1 lettre depuis janvier + elseif ($idprof == 4) $formlength = 32; // No maximum as we need to include a town name in this id + } + } elseif ($country_code == 'ES') + { + if ($idprof == 1) $formlength = 9; //CIF/NIF/NIE 9 digits + if ($idprof == 2) $formlength = 12; //NASS 12 digits without / + if ($idprof == 3) $formlength = 5; //CNAE 5 digits + if ($idprof == 4) $formlength = 32; //depend of college + } + } - $selected = $preselected; - if (!$selected && isset($idprof)) { - if ($idprof == 1 && !empty($this->idprof1)) $selected = $this->idprof1; - elseif ($idprof == 2 && !empty($this->idprof2)) $selected = $this->idprof2; - elseif ($idprof == 3 && !empty($this->idprof3)) $selected = $this->idprof3; - elseif ($idprof == 4 && !empty($this->idprof4)) $selected = $this->idprof4; - } + $selected = $preselected; + if (!$selected && isset($idprof)) { + if ($idprof == 1 && !empty($this->idprof1)) $selected = $this->idprof1; + elseif ($idprof == 2 && !empty($this->idprof2)) $selected = $this->idprof2; + elseif ($idprof == 3 && !empty($this->idprof3)) $selected = $this->idprof3; + elseif ($idprof == 4 && !empty($this->idprof4)) $selected = $this->idprof4; + } - $maxlength = $formlength; - if (empty($formlength)) { $formlength = 24; $maxlength = 128; } + $maxlength = $formlength; + if (empty($formlength)) { $formlength = 24; $maxlength = 128; } - $out = ''; + $out = ''; - // Execute hook getInputIdProf to complete or replace $out - $parameters = array('formlength'=>$formlength, 'selected'=>$preselected, 'idprof'=>$idprof, 'htmlname'=>$htmlname, 'country_code'=>$country_code); - $reshook = $hookmanager->executeHooks('getInputIdProf', $parameters); - if (empty($reshook)) - { - $out .= ''; - } - $out .= $hookmanager->resPrint; + // Execute hook getInputIdProf to complete or replace $out + $parameters = array('formlength'=>$formlength, 'selected'=>$preselected, 'idprof'=>$idprof, 'htmlname'=>$htmlname, 'country_code'=>$country_code); + $reshook = $hookmanager->executeHooks('getInputIdProf', $parameters); + if (empty($reshook)) + { + $out .= ''; + } + $out .= $hookmanager->resPrint; - return $out; - } + return $out; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return a HTML select with localtax values for thirdparties - * - * @param int $local LocalTax - * @param int $selected Preselected value - * @param string $htmlname HTML select name - * @return void - */ - public function select_localtax($local, $selected, $htmlname) - { - // phpcs:enable - $tax = get_localtax_by_third($local); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return a HTML select with localtax values for thirdparties + * + * @param int $local LocalTax + * @param int $selected Preselected value + * @param string $htmlname HTML select name + * @return void + */ + public function select_localtax($local, $selected, $htmlname) + { + // phpcs:enable + $tax = get_localtax_by_third($local); - $num = $this->db->num_rows($tax); - $i = 0; - if ($num) - { - $valors = explode(":", $tax); + $num = $this->db->num_rows($tax); + $i = 0; + if ($num) + { + $valors = explode(":", $tax); - if (count($valors) > 1) - { - //montar select - print ''; - } - } - } + if (count($valors) > 1) + { + //montar select + print ''; + } + } + } - /** - * Return a HTML select for thirdparty type - * - * @param int $selected selected value - * @param string $htmlname HTML select name - * @param string $htmlidname HTML select id - * @param string $typeinput HTML output - * @param string $morecss More css - * @return string HTML string - */ - public function selectProspectCustomerType($selected, $htmlname = 'client', $htmlidname = 'customerprospect', $typeinput = 'form', $morecss = '') - { + /** + * Return a HTML select for thirdparty type + * + * @param int $selected selected value + * @param string $htmlname HTML select name + * @param string $htmlidname HTML select id + * @param string $typeinput HTML output + * @param string $morecss More css + * @return string HTML string + */ + public function selectProspectCustomerType($selected, $htmlname = 'client', $htmlidname = 'customerprospect', $typeinput = 'form', $morecss = '') + { - global $conf, $langs; + global $conf, $langs; - $out = ''; + $out = ''; - return $out; - } + return $out; + } } diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index 2235ac6b335..d4ce1cbb0fe 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -58,9 +58,10 @@ class FormContract * @param string $htmlname Nom de la zone html * @param int $maxlength Maximum length of label * @param int $showempty Show empty line + * @param int $showRef Show customer and supplier reference on each contract (when found) * @return int Nbr of project if OK, <0 if KO */ - public function select_contract($socid = -1, $selected = '', $htmlname = 'contrattid', $maxlength = 16, $showempty = 1) + public function select_contract($socid = -1, $selected = '', $htmlname = 'contrattid', $maxlength = 16, $showempty = 1, $showRef = 0) { // phpcs:enable global $db, $user, $conf, $langs; @@ -69,7 +70,8 @@ class FormContract if (!empty($conf->global->CONTRACT_HIDE_UNSELECTABLES)) $hideunselectables = true; // Search all contacts - $sql = 'SELECT c.rowid, c.ref, c.fk_soc, c.statut'; + $sql = 'SELECT c.rowid, c.ref, c.fk_soc, c.statut,'; + $sql .= ' c.ref_customer, c.ref_supplier'; $sql .= ' FROM '.MAIN_DB_PREFIX.'contrat as c'; $sql .= " WHERE c.entity = ".$conf->entity; //if ($contratListId) $sql.= " AND c.rowid IN (".$contratListId.")"; @@ -103,18 +105,21 @@ class FormContract if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && !$user->rights->societe->lire) { // Do nothing - } - else - { + } else { $labeltoshow = dol_trunc($obj->ref, 18); + + if ($showRef) + { + if ($obj->ref_customer) $labeltoshow = $labeltoshow." - ".$obj->ref_customer; + if ($obj->ref_supplier) $labeltoshow = $labeltoshow." - ".$obj->ref_supplier; + } + //if ($obj->public) $labeltoshow.=' ('.$langs->trans("SharedProject").')'; //else $labeltoshow.=' ('.$langs->trans("Private").')'; if (!empty($selected) && $selected == $obj->rowid && $obj->statut > 0) { print ''; - } - else - { + } else { $disabled = 0; if ($obj->statut == 0) { @@ -130,9 +135,7 @@ class FormContract if ($hideunselectables && $disabled) { $resultat = ''; - } - else - { + } else { $resultat = '