From 1a407e4c229e7e26e4e46667d6362027e1651fa9 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 4 Oct 2020 22:09:40 +0200 Subject: [PATCH 01/65] NEW set entity when creating invoice on takepos usefull for marketplace, coworking, multibranding shop --- htdocs/takepos/invoice.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index d3ec86a7268..3b8cf455e5c 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -284,6 +284,7 @@ if (($action == "addline" || $action == "freezone") && $placeid == 0) $invoice->date = dol_now(); $invoice->module_source = 'takepos'; $invoice->pos_source = $_SESSION["takeposterminal"]; + $invoice->entity = !empty($_SESSION["takeposinvoiceentity"])?$_SESSION["takeposinvoiceentity"]:$conf->entity; if ($invoice->socid <= 0) { From 4e711d4e305f13968a4f1f9f0abf4a28bd8e3a6a Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 5 Oct 2020 15:15:15 +0200 Subject: [PATCH 02/65] fix bad test syntax --- htdocs/fourn/commande/dispatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 7a11d22aa53..ae29dd35ff2 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -1290,7 +1290,7 @@ if ($id > 0 || !empty($ref)) { print ''; } - if ($action != 'editline' ||  && $lineid != $objp->dispatchlineid) + if ($action != 'editline' && $lineid != $objp->dispatchlineid) { print ''; print 'dispatchlineid .'#line_'. $objp->dispatchlineid . '">'; From 666ae81b4c6f0fb85bf08a8f53895f9b034cb1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 7 Oct 2020 20:16:16 +0200 Subject: [PATCH 03/65] Deprecated: The key sudo has no effect anymore. https://config.travis-ci.com/ref/sudo --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c47e1b19598..16d3403f554 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,8 @@ os: linux dist: xenial #dist: bionic -sudo: required +# Deprecated: The key sudo has no effect anymore. +#sudo: required language: php From 40e16cc84057437128eb665af9446a54ff72a9c7 Mon Sep 17 00:00:00 2001 From: Ahmad Jamaly Rabib Date: Thu, 8 Oct 2020 00:34:53 +0600 Subject: [PATCH 04/65] NEW ADDED IMPORT TOOL FOR PO Added Purchase Order import functionality --- htdocs/core/modules/modFournisseur.class.php | 152 +++++++++++++++++++ 1 file changed, 152 insertions(+) diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 7f24cc035af..71b66925922 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -827,6 +827,158 @@ class modFournisseur extends DolibarrModules $this->import_convertvalue_array[$r] = [ 'fd.fk_facture_fourn' => ['rule' => 'fetchidfromref', 'file' => '/fourn/class/fournisseur.facture.class.php', 'class' => 'FactureFournisseur', 'method' => 'fetch'], ]; + + //Import Purchase Orders + $r++; + $this->import_code[$r] = 'commande_fournisseur_' . $r; + $this->import_label[$r] = 'Purchase Orders'; + $this->import_icon[$r] = $this->picto; + $this->import_entities_array[$r] = []; + $this->import_tables_array[$r] = ['c' => MAIN_DB_PREFIX . 'commande_fournisseur', 'extra' => MAIN_DB_PREFIX . 'commande_fournisseur_extrafields']; + $this->import_tables_creator_array[$r] = ['c' => 'fk_user_author']; // Fields to store import user id + $this->import_fields_array[$r] = [ + 'c.ref' => 'Document Ref*', + 'c.ref_supplier' => 'RefSupplier', + 'c.fk_soc' => 'ThirdPartyName*', + 'c.fk_projet' => 'ProjectId', + 'c.date_creation' => 'DateCreation', + 'c.date_valid' => 'DateValid', + 'c.date_approve' => 'DateApprove', + 'c.date_commande' => 'DateOrder', + 'c.fk_user_modif' => 'ModifiedById', + 'c.fk_user_valid' => 'ValidatedById', + 'c.fk_user_approve' => 'ApprovedById', + 'c.source' => 'Source', + 'c.fk_statut' => 'Status*', + 'c.billed' => 'Billed(0/1)', + 'c.remise_percent' => 'GlobalDiscount', + 'c.tva' => 'TotalTVA', + 'c.total_ht' => 'TotalHT', + 'c.total_ttc' => 'TotalTTC', + 'c.note_private' => 'NotePrivate', + 'c.note_public' => 'Note', + 'c.date_livraison' => 'DeliveryDate', + 'c.fk_cond_reglement' => 'Payment Condition', + 'c.fk_mode_reglement' => 'Payment Mode', + 'c.model_pdf' => 'Model' + ]; + + if (! empty($conf->multicurrency->enabled)) { + $this->import_fields_array[$r]['c.multicurrency_code'] = 'Currency'; + $this->import_fields_array[$r]['c.multicurrency_tx'] = 'CurrencyRate'; + $this->import_fields_array[$r]['c.multicurrency_total_ht'] = 'MulticurrencyAmountHT'; + $this->import_fields_array[$r]['c.multicurrency_total_tva'] = 'MulticurrencyAmountVAT'; + $this->import_fields_array[$r]['c.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC'; + } + + // Add extra fields + $import_extrafield_sample = []; + $sql = "SELECT name, label, fieldrequired FROM " . MAIN_DB_PREFIX . "extrafields WHERE elementtype = 'commande_fournisseur' AND entity IN (0, " . $conf->entity . ")"; + $resql = $this->db->query($sql); + + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { + $fieldname = 'extra.' . $obj->name; + $fieldlabel = ucfirst($obj->label); + $this->import_fields_array[$r][$fieldname] = $fieldlabel . ($obj->fieldrequired ? '*' : ''); + $import_extrafield_sample[$fieldname] = $fieldlabel; + } + } + // End add extra fields + + $this->import_fieldshidden_array[$r] = ['extra.fk_object' => 'lastrowid-' . MAIN_DB_PREFIX . 'commande_fournisseur']; + $this->import_regex_array[$r] = [ + 'c.ref' => '(PO\d{4}-\d{4}|PORDER.{1,32}$|PROV.{1,32}$)', + 'c.multicurrency_code' => 'code@' . MAIN_DB_PREFIX . 'multicurrency' + ]; + + $this->import_updatekeys_array[$r] = ['c.ref' => 'Ref']; + $this->import_convertvalue_array[$r] = [ + 'c.fk_soc' => [ + 'rule' => 'fetchidfromref', + 'file' => '/societe/class/societe.class.php', + 'class' => 'Societe', + 'method' => 'fetch', + 'element' => 'ThirdParty' + ], + 'c.fk_mode_reglement' => [ + 'rule' => 'fetchidfromcodeorlabel', + 'file' => '/compta/paiement/class/cpaiement.class.php', + 'class' => 'Cpaiement', + 'method' => 'fetch', + 'element' => 'cpayment' + ], + 'c.source' => ['rule' => 'zeroifnull'], + ]; + + //Import PO Lines + $r++; + $this->import_code[$r] = 'commande_fournisseurdet_'.$r; + $this->import_label[$r] = 'PO Lines'; + $this->import_icon[$r] = $this->picto; + $this->import_entities_array[$r] = []; + $this->import_tables_array[$r] = ['cd' => MAIN_DB_PREFIX . 'commande_fournisseurdet', 'extra' => MAIN_DB_PREFIX . 'commande_fournisseurdet_extrafields']; + $this->import_fields_array[$r] = [ + 'cd.fk_commande' => 'Document Ref*', + 'cd.fk_parent_line' => 'PrParentLine', + 'cd.fk_product' => 'IdProduct', + 'cd.label' => 'Label', + 'cd.description' => 'LineDescription', + 'cd.tva_tx' => 'LineVATRate', + 'cd.qty' => 'LineQty', + 'cd.remise_percent' => 'Reduc. Percent', + 'cd.remise' => 'Reduc.', + 'cd.subprice' => 'Sub Price', + 'cd.total_ht' => 'LineTotalHT', + 'cd.total_tva' => 'LineTotalVAT', + 'cd.total_ttc' => 'LineTotalTTC', + 'cd.product_type' => 'TypeOfLineServiceOrProduct', + 'cd.date_start' => 'Start Date', + 'cd.date_end' => 'End Date', + 'cd.info_bits' => 'InfoBits', + 'cd.special_code' => 'Special Code', + 'cd.rang' => 'LinePosition', + 'cd.fk_unit' => 'Unit' + ]; + + if (! empty($conf->multicurrency->enabled)) { + $this->import_fields_array[$r]['cd.multicurrency_code'] = 'Currency'; + $this->import_fields_array[$r]['cd.multicurrency_subprice'] = 'CurrencyRate'; + $this->import_fields_array[$r]['cd.multicurrency_total_ht'] = 'MulticurrencyAmountHT'; + $this->import_fields_array[$r]['cd.multicurrency_total_tva'] = 'MulticurrencyAmountVAT'; + $this->import_fields_array[$r]['cd.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC'; + } + + // Add extra fields + $sql="SELECT name, label, fieldrequired FROM " . MAIN_DB_PREFIX . "extrafields WHERE elementtype = 'commande_fournisseurdet' AND entity IN (0, " . $conf->entity . ")"; + $resql = $this->db->query($sql); + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { + $fieldname = 'extra.' . $obj->name; + $fieldlabel = ucfirst($obj->label); + $this->import_fields_array[$r][$fieldname] = $fieldlabel . ($obj->fieldrequired ? '*' : ''); + } + } + // End add extra fields + + $this->import_fieldshidden_array[$r] = ['extra.fk_object' => 'lastrowid-' . MAIN_DB_PREFIX . 'commande_fournisseurdet']; + $this->import_regex_array[$r] = [ + 'cd.product_type' => '[0|1]$', + 'cd.fk_product' => 'rowid@' . MAIN_DB_PREFIX . 'product', + 'cd.multicurrency_code' => 'code@' . MAIN_DB_PREFIX . 'multicurrency' + ]; + $this->import_updatekeys_array[$r] = ['cd.fk_commande' => 'Purchase Order Id']; + $this->import_convertvalue_array[$r] = [ + 'cd.fk_commande' => [ + 'rule' => 'fetchidfromref', + 'file' => '/fourn/class/fournisseur.commande.class.php', + 'class' => 'CommandeFournisseur', + 'method' => 'fetch', + 'element' => 'order_supplier' + ], + 'cd.info_bits' => ['rule' => 'zeroifnull'], + 'cd.special_code' => ['rule' => 'zeroifnull'], + ]; } From 1ef46d082c7baaea77dc217e40f8481ab9b72c09 Mon Sep 17 00:00:00 2001 From: SwikritiT Date: Tue, 18 Aug 2020 10:30:22 +0545 Subject: [PATCH 05/65] Feature files created to login, add users and logout Co-authored-by: Yamuna Adhikari --- .gitignore | 11 ++ nightwatch.conf.js | 29 ++++ package.json | 13 ++ test/acceptance/features/addUsers.feature | 86 ++++++++++++ test/acceptance/features/listUsers.feature | 29 ++++ test/acceptance/features/login.feature | 27 ++++ test/acceptance/features/logout.feature | 10 ++ test/acceptance/index.js | 14 ++ test/acceptance/pageObjects/addUsersPage.js | 128 ++++++++++++++++++ test/acceptance/pageObjects/homePage.js | 44 ++++++ test/acceptance/pageObjects/listUsersPage.js | 47 +++++++ test/acceptance/pageObjects/loginPage.js | 83 ++++++++++++ test/acceptance/pageObjects/logoutPage.js | 34 +++++ .../stepDefinitions/addUsersContext.js | 123 +++++++++++++++++ .../stepDefinitions/listUsersContext.js | 14 ++ .../stepDefinitions/loginContext.js | 22 +++ .../stepDefinitions/logoutContext.js | 14 ++ 17 files changed, 728 insertions(+) create mode 100644 nightwatch.conf.js create mode 100644 package.json create mode 100644 test/acceptance/features/addUsers.feature create mode 100644 test/acceptance/features/listUsers.feature create mode 100644 test/acceptance/features/login.feature create mode 100644 test/acceptance/features/logout.feature create mode 100644 test/acceptance/index.js create mode 100644 test/acceptance/pageObjects/addUsersPage.js create mode 100644 test/acceptance/pageObjects/homePage.js create mode 100644 test/acceptance/pageObjects/listUsersPage.js create mode 100644 test/acceptance/pageObjects/loginPage.js create mode 100644 test/acceptance/pageObjects/logoutPage.js create mode 100644 test/acceptance/stepDefinitions/addUsersContext.js create mode 100644 test/acceptance/stepDefinitions/listUsersContext.js create mode 100644 test/acceptance/stepDefinitions/loginContext.js create mode 100644 test/acceptance/stepDefinitions/logoutContext.js diff --git a/.gitignore b/.gitignore index 344822f0e9e..ac7a618c503 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,14 @@ htdocs/includes/sebastian/ htdocs/includes/squizlabs/ htdocs/includes/webmozart/ htdocs/.well-known/apple-developer-merchantid-domain-association + +# Node Modules +build/yarn-error.log +build/node_modules/ +node_modules/ + +#yarn +yarn.lock + +#package-lock +package-lock.json diff --git a/nightwatch.conf.js b/nightwatch.conf.js new file mode 100644 index 00000000000..1c4b089baa9 --- /dev/null +++ b/nightwatch.conf.js @@ -0,0 +1,29 @@ +const admin_username = process.env.ADMIN_USERNAME || 'dolibarr'; +const admin_password = process.env.ADMIN_PASSWORD || 'password'; +const launch_url = process.env.LAUNCH_URL || 'http://localhost/dolibarr/htdocs/'; +const dol_api_key = process.env.DOLAPIKEY || 'superadminuser'; +module.exports = { + page_objects_path : './test/acceptance/pageObjects/', // jshint ignore:line + src_folders : ['test'], + + test_settings : { + default : { + selenium_host : '127.0.0.1', + launchUrl : launch_url, + globals : { + backend_url : launch_url, + adminUsername : admin_username, + adminPassword : admin_password, + dolApiKey : dol_api_key + }, + desiredCapabilities : { + browserName : 'chrome', + javascriptEnabled : true, + chromeOptions : { + args : ['disable-gpu'], + w3c : false + } + } + } + } +}; diff --git a/package.json b/package.json new file mode 100644 index 00000000000..7ea03c08bca --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "devDependencies": { + "cucumber": "^6.0.5", + "nightwatch": "^1.4.1", + "nightwatch-api": "^3.0.1" + }, + "scripts": { + "test:e2e": "node_modules/cucumber/bin/cucumber-js --require test/acceptance/index.js --require test/acceptance/stepDefinitions" + }, + "dependencies": { + "node-fetch": "^2.6.1" + } +} diff --git a/test/acceptance/features/addUsers.feature b/test/acceptance/features/addUsers.feature new file mode 100644 index 00000000000..918bff771c2 --- /dev/null +++ b/test/acceptance/features/addUsers.feature @@ -0,0 +1,86 @@ +Feature: Add user + As an admin + I want to add users + So that the authorized access is possible + + Background: + Given the administrator has logged in using the webUI + And the administrator has browsed to the new users page + + Scenario: Admin adds user without permission + When the admin creates user with following details + | last name | Potter | + | login | harrypotter@gmail.com | + | password | password | + Then new user "Potter" should be created + And message "This user has no permissions defined" should be displayed in the webUI + + Scenario Outline: Admin adds user with permission + When the admin creates user with following details + | last name | Potter | + | login | harrypotter@gmail.com | + | password | password | + | administrator | | + | gender | | + Then message "This user has no permissions defined" be displayed in the webUI + And new user "Potter" should be created + Examples: + | administrator | gender | shouldOrShouldNot | + | No | | should | + | No | Man | should | + | No | Woman | should | + | Yes | | should not | + | Yes | Man | should not | + | Yes | Woman | should not | + + Scenario Outline: Admin adds user with last name as special characters + When the admin creates user with following details + | last name | | + | login | harry | + | password | password | + Then message "This user has no permissions defined" should be displayed in the webUI + And new user "" should be created + Examples: + | last name | + | swi@ | + | g!!@%ui | + | swikriti@h | + | !@#$%^&*()-_+=[]{}:;,.<>?~ | + | $w!kr!t! | + | España§àôœ€ | + | नेपाली | + | सिमप्ले $%#?&@name.txt | + + Scenario Outline: Admin adds user with incomplete essential credentials + When the admin creates user with following details + | last name | | + | login | | + | password | | + Then message "" should be displayed in the webUI + And new user "" should not be created + Examples: + | last name | login | password | message | + | | | | Name is not defined.\nLogin is not defined. | + | Joseph | | | Login is not defined. | + | | john@gmail.com | | Name is not defined. | + | Joseph | | hihi | Login is not defined. | + + Scenario: Admin adds user with incomplete essential credentials + When the admin creates user with following details + | last name | Doe | + | login | John | + | password | | + Then message "This user has no permissions defined" should be displayed in the webUI + And new user "Doe" should be created + + Scenario: Admin tries to add user with pre-existing login credential + Given a user has been created with following details + | login | last name | password | + | Tyler | Joseph | pass1234 | + And the administrator has browsed to the new users page + When the admin creates user with following details + | last name | Dun | + | login | Tyler | + | password | pass1234 | + Then message "Login already exists." should be displayed in the webUI + And new user "Dun" should not be created diff --git a/test/acceptance/features/listUsers.feature b/test/acceptance/features/listUsers.feature new file mode 100644 index 00000000000..e9c0443cdd4 --- /dev/null +++ b/test/acceptance/features/listUsers.feature @@ -0,0 +1,29 @@ +Feature: list users + As an admin user + I want to view the list of users + So that I can manage users + + Background: + Given the administrator has logged in using the webUI + + Scenario: Admin user should be able to see list of created users when no new users are created + When the administrator browses to the list of users page using the webUI + Then following users should be displayed in the users list + | login | last name | + | dolibarr | SuperAdmin | + And the number of created users should be 1 + + Scenario: Admin user should be able to see number of created users + Given the admin has created the following users + | login | last name | password | + | Harry | Potter | hello123 | + | Hermoine | Granger | hello123 | + | Ron | Weasley | hello123 | + When the administrator browses to the list of users page using the webUI + Then following users should be displayed in the users list + | login | last name | + | dolibarr | SuperAdmin | + | Harry | Potter | + | Hermoine | Granger | + | Ron | Weasley | + And the number of created users should be 4 diff --git a/test/acceptance/features/login.feature b/test/acceptance/features/login.feature new file mode 100644 index 00000000000..fd7058812cf --- /dev/null +++ b/test/acceptance/features/login.feature @@ -0,0 +1,27 @@ +Feature: user login + As a user/admin + I want to login to my account + So that I can have access to my functionality + + Background: + Given the user has browsed to the login page + + Scenario: Admin user should be able to login successfully + When user logs in with username "dolibarr" and password "password" + Then the user should be directed to the homepage + + Scenario: Admin user with empty credentials should not be able to login + When user logs in with username "" and password "" + Then the user should not be able to login + + Scenario Outline: user logs in with invalid credentials + When user logs in with username "" and password "" + Then the user should not be able to login + And error message "Bad value for login or password" should be displayed in the webUI + Examples: + | username | password | + | dolibar | pass | + | dolibarr | passw | + | dolibar | | + | dolibarr | | + | dolibar | password | diff --git a/test/acceptance/features/logout.feature b/test/acceptance/features/logout.feature new file mode 100644 index 00000000000..137c5260008 --- /dev/null +++ b/test/acceptance/features/logout.feature @@ -0,0 +1,10 @@ +Feature: user logs out + As a user + I want to log out of my account + So that I can protect my work, identity and be assured of my privacy + + Scenario: User can logout + Given the administrator has logged in using the webUI + When the user opens the user profile using the webUI + And the user logs out using the webUI + Then the user should be logged out successfully diff --git a/test/acceptance/index.js b/test/acceptance/index.js new file mode 100644 index 00000000000..a9fcda8105a --- /dev/null +++ b/test/acceptance/index.js @@ -0,0 +1,14 @@ +const { setDefaultTimeout, After, Before } = require('cucumber') +const { createSession, closeSession, startWebDriver, stopWebDriver } = require('nightwatch-api') + +setDefaultTimeout(60000) + +Before(async () => { + await startWebDriver(); + await createSession(); +}) + +After(async () => { + await closeSession(); + await stopWebDriver(); +}) diff --git a/test/acceptance/pageObjects/addUsersPage.js b/test/acceptance/pageObjects/addUsersPage.js new file mode 100644 index 00000000000..7f31523b842 --- /dev/null +++ b/test/acceptance/pageObjects/addUsersPage.js @@ -0,0 +1,128 @@ +const util = require('util'); +module.exports = { + url: function () { + return this.api.launchUrl + 'user/card.php?leftmenu=users&action=create'; + }, + + commands: [ + { + adminCreatesUser: async function (dataTable) { + const userDetails = dataTable.rowsHash(); + let administrator = userDetails['administrator']; + let gender = userDetails['gender']; + await this.waitForElementVisible('@newUserAddOption') + .useXpath() + .waitForElementVisible('@lastnameField') + .clearValue('@lastnameField') + .setValue('@lastnameField', userDetails['last name']) + .waitForElementVisible('@loginField') + .clearValue('@loginField') + .setValue('@loginField', userDetails['login']) + .waitForElementVisible('@newUserPasswordField') + .clearValue('@newUserPasswordField') + .setValue('@newUserPasswordField', userDetails['password']); + + if (userDetails['administrator']) { + const admin = util.format(this.elements.administratorSelectOption.selector, administrator); + await this.waitForElementVisible('@administratorField') + .click('@administratorField') + .waitForElementVisible(admin) + .click(admin); + } + + if (userDetails['gender']) { + const genderValue = util.format(this.elements.genderSelectOption.selector, gender) + await this.waitForElementVisible('@genderField') + .click('@genderField') + .waitForElementVisible(genderValue) + .click(genderValue); + } + return this.waitForElementVisible('@submitButton') + .click('@submitButton') + .useCss(); + }, + + noPermissionMessage: async function (message) { + await this.useXpath() + .waitForElementVisible('@noPermissionDefinedMessage') + .expect.element('@noPermissionDefinedMessage') + .text.to.equal(message); + return this.useCss(); + }, + + newUserShouldBeCreated: async function (lastname) { + await this.useXpath() + .waitForElementVisible('@newUserCreated') + .expect.element('@newUserCreated') + .text.to.equal(lastname); + return this.useCss(); + }, + + noPermissionDefinedMessageNotShown: function (message) { + return this.useXpath() + .waitForElementNotPresent('@noPermissionDefinedMessage') + .useCss(); + }, + + userNotCreated: function (lastname) { + return this.waitForElementVisible('@newUserAddOption'); + } + } + ], + + elements: { + newUserAddOption: { + selector: '.fiche' + }, + + lastnameField: { + selector: '//table[@class="border centpercent"]/tbody/tr/td//input[@id="lastname"]', + locateStrategy: 'xpath' + }, + + loginField: { + selector: '//table[@class="border centpercent"]/tbody/tr/td//input[@name="login"]', + locateStrategy: 'xpath' + }, + + newUserPasswordField: { + selector: '//table[@class="border centpercent"]/tbody/tr/td//input[@name="password"]', + locateStrategy: 'xpath' + }, + + submitButton: { + selector: '//div[@class="center"]/input[@class="button"]', + locateStrategy: 'xpath' + }, + + administratorField: { + selector: '//table[@class="border centpercent"]/tbody/tr/td//select[@id="admin"]', + locateStrategy: 'xpath' + }, + + administratorSelectOption: { + selector: '//select[@id="admin"]/option[.="%s"]', + locateStrategy: 'xpath' + + }, + + genderField: { + selector: '//table[@class="border centpercent"]/tbody/tr/td//select[@id="gender"]', + locateStrategy: 'xpath' + }, + genderSelectOption: { + selector: '//select[@id="gender"]/option[.="%s"]', + locateStrategy: 'xpath' + }, + + noPermissionDefinedMessage: { + selector: '//div[@class="jnotify-message"]', + locateStrategy: 'xpath' + }, + + newUserCreated: { + selector: '//div[contains(@class,"valignmiddle")]//div[contains(@class,"inline-block floatleft valignmiddle")]', + locateStrategy: 'xpath' + } + } +}; diff --git a/test/acceptance/pageObjects/homePage.js b/test/acceptance/pageObjects/homePage.js new file mode 100644 index 00000000000..7c225e90f5a --- /dev/null +++ b/test/acceptance/pageObjects/homePage.js @@ -0,0 +1,44 @@ +module.exports = { + url: function () { + return this.api.launchUrl + 'admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete'; + }, + + commands: [ + { + browsedToNewUserPage: function () { + return this.useXpath() + .waitForElementVisible('@usersAndGroups') + .click('@usersAndGroups') + .waitForElementVisible('@newUser') + .click('@newUser') + .useCss(); + }, + + browsedToListOfUsers: function () { + return this.useXpath() + .waitForElementVisible('@usersAndGroups') + .click('@usersAndGroups') + .waitForElementVisible('@listOfUsers') + .click('@listOfUsers') + .useCss(); + } + } + ], + + elements: { + usersAndGroups: { + selector: '//div[@class="menu_titre"]/a[@title="Users & Groups"]', + locateStrategy: 'xpath' + }, + + newUser: { + selector: '//div[@class="menu_contenu menu_contenu_user_card"]/a[@title="New user"]', + locateStrategy: 'xpath' + }, + + listOfUsers: { + selector: '//a[@class="vsmenu"][@title="List of users"]', + locateStrategy: 'xpath' + } + } +}; diff --git a/test/acceptance/pageObjects/listUsersPage.js b/test/acceptance/pageObjects/listUsersPage.js new file mode 100644 index 00000000000..6f9df509d5f --- /dev/null +++ b/test/acceptance/pageObjects/listUsersPage.js @@ -0,0 +1,47 @@ +const util = require('util'); +module.exports = { + url: function () { + return this.api.launchUrl + 'user/list.php?leftmenu=users'; + }, + + commands: [ + { + listOfUsersDisplayed: async function (dataTable) { + const usersList = dataTable.hashes(); + this.useXpath(); + for (const row of usersList) { + let login = row['login']; + let lastName = row['last name']; + const userDetail = util.format(this.elements.userList.selector, login, lastName); + await this.waitForElementVisible('@userRow') + .waitForElementVisible(userDetail); + } + return this.useCss(); + }, + + numberOfUsersDisplayed: async function (number) { + const userCount = util.format(this.elements.numberOfUsers.selector, number); + await this.useXpath() + .waitForElementVisible(userCount); + return this.useCss(); + } + } + ], + + elements: { + userRow: { + selector: '//table[contains(@class,"tagtable liste")]/tbody/tr[position()>2]', + locateStrategy: 'xpath' + }, + + numberOfUsers: { + selector: '//div[contains(@class, "titre inline-block") and contains(., "List of users")]/span[.="(%d)"]', + locateStrategy: 'xpath' + }, + + userList: { + selector: '//table[contains(@class,"tagtable liste")]/tbody/tr[position()>2]/td/a//span[normalize-space(@class="nopadding usertext")][.="%s"]/../../following-sibling::td[.="%s"]', + locateStrategy: 'xpath' + } + } +}; diff --git a/test/acceptance/pageObjects/loginPage.js b/test/acceptance/pageObjects/loginPage.js new file mode 100644 index 00000000000..75195cc3746 --- /dev/null +++ b/test/acceptance/pageObjects/loginPage.js @@ -0,0 +1,83 @@ +module.exports = { + url: function () { + return this.api.launchUrl; + }, + + commands: [ + { + waitForLoginPage: function () { + return this.waitForElementVisible('@loginTable'); + }, + + userLogsInWithUsernameAndPassword: function (username, password) { + return this.waitForElementVisible('@userNameField') + .setValue('@userNameField', username) + .waitForElementVisible('@passwordField') + .setValue('@passwordField', password) + .useXpath() + .waitForElementVisible('@loginButton') + .click('@loginButton') + .useCss(); + }, + + successfulLogin: function () { + return this.waitForElementNotPresent('@loginTable') + .waitForElementVisible('@userProfileDropdown'); + }, + + userIsLoggedIn: async function (login) { + await this.useXpath() + .waitForElementVisible('@userLogin') + .expect.element('@userLogin') + .text.to.equal(login); + return this.useCss(); + }, + + unsuccessfulLogin: function () { + return this.waitForElementVisible('@loginTable') + .waitForElementNotPresent('@userProfileDropdown'); + }, + + loginErrorDisplayed: async function (errorMessage) { + await this.useXpath() + .waitForElementVisible('@loginError') + .expect.element('@loginError') + .text.to.equal(errorMessage); + return this.useCss(); + } + } + ], + + elements: { + loginButton: { + selector: '//div[@id="login-submit-wrapper"]/input[@type="submit"]', + locateStrategy: 'xpath' + }, + + userNameField: { + selector: '#username' + }, + + passwordField: { + selector: '#password' + }, + + loginTable: { + selector: '.login_table' + }, + + userProfileDropdown: { + selector: '#topmenu-login-dropdown' + }, + + userLogin: { + selector: '//div[@id="topmenu-login-dropdown"]/a//span[contains(@class,"atoploginusername")]', + locateStrategy: 'xpath' + }, + + loginError: { + selector: '//div[@class="center login_main_message"]/div[@class="error"]', + locateStrategy: 'xpath' + } + } +}; diff --git a/test/acceptance/pageObjects/logoutPage.js b/test/acceptance/pageObjects/logoutPage.js new file mode 100644 index 00000000000..a63b8415238 --- /dev/null +++ b/test/acceptance/pageObjects/logoutPage.js @@ -0,0 +1,34 @@ +module.exports = { + url: function () { + return this.api.launchUrl + 'admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete'; + }, + + commands: + [ + { + userOpensProfile: async function () { + await this.useXpath() + .waitForElementVisible('@userProfileDropdown') + .click('@userProfileDropdown') + return this.useCss(); + }, + + userLogsOut: function () { + return this.waitForElementVisible('@logoutButton') + .click('@logoutButton'); + } + } + ], + + elements: { + + logoutButton: { + selector: '.pull-right' + }, + + userProfileDropdown: { + selector: '//div[@id="topmenu-login-dropdown"]', + locateStrategy: 'xpath' + } + } +}; diff --git a/test/acceptance/stepDefinitions/addUsersContext.js b/test/acceptance/stepDefinitions/addUsersContext.js new file mode 100644 index 00000000000..6f1745bff94 --- /dev/null +++ b/test/acceptance/stepDefinitions/addUsersContext.js @@ -0,0 +1,123 @@ +const { Before, Given, When, Then, After } = require('cucumber'); +const { client } = require('nightwatch-api'); +const fetch = require('node-fetch'); +let initialUsers = {}; + +Given('the administrator has logged in using the webUI', async function () { + await client.page.loginPage().navigate().waitForLoginPage(); + await client.page.loginPage().userLogsInWithUsernameAndPassword(client.globals.adminUsername, client.globals.adminPassword); + return client.page.loginPage().userIsLoggedIn(client.globals.adminUsername); +}); + +Given('the administrator has browsed to the new users page', function () { + return client.page.homePage().browsedToNewUserPage(); +}); + +When('the admin creates user with following details', function (datatable) { + return client.page.addUsersPage().adminCreatesUser(datatable); +}); + +Then('new user {string} should be created', function (lastname) { + return client.page.addUsersPage().newUserShouldBeCreated(lastname); +}); + +Then('message {string} should be displayed in the webUI', function (message) { + return client.page.addUsersPage().noPermissionMessage(message); +}); + +Then('message {string} should not be displayed in the webUI', function (message) { + return client.page.addUsersPage().noPermissionDefinedMessageNotShown(message); +}); + +Then('new user {string} should not be created', function (lastname) { + return client.page.addUsersPage().userNotCreated(lastname); +}); + +Given('a user has been created with following details', function (dataTable) { + return adminHasCreatedUser(dataTable); +}); + +Given('the admin has created the following users', function (dataTable) { + return adminHasCreatedUser(dataTable); +}); + +const getUsers = async function () { + const header = {}; + const url = client.globals.backend_url + 'api/index.php/users'; + const users = {}; + header['Accept'] = 'application/json'; + header['DOLAPIKEY'] = client.globals.dolApiKey; + await fetch(url, { + method: 'GET', + headers: header + }) + .then(async (response) => { + const json_response = await response.json(); + for (const user of json_response) { + users[user.id] = user.id; + } + }); + return users; +}; + +const adminHasCreatedUser = async function (dataTable) { + const header = {}; + const url = client.globals.backend_url + 'api/index.php/users'; + header['Accept'] = 'application/json'; + header['DOLAPIKEY'] = client.globals.dolApiKey; + header['Content-Type'] = 'application/json'; + const userDetails = dataTable.hashes(); + for (const user of userDetails) { + await fetch(url, { + method: 'POST', + headers: header, + body: JSON.stringify( + { + login: user['login'], + lastname: user['last name'], + pass: user['password'] + } + ) + }) + .then((response) => { + if (response.status < 200 || response.status >= 400) { + throw new Error('Failed to create user: ' + user['login'] + + ' ' + response.statusText); + } + return response.text(); + }); + } +}; + +Before(async () => { + initialUsers = await getUsers(); +}); + +After(async () => { + const finalUsers = await getUsers(); + const header = {}; + const url = client.globals.backend_url + 'api/index.php/users/'; + header['Accept'] = 'application/json'; + header['DOLAPIKEY'] = client.globals.dolApiKey; + let found; + for (const finaluser in finalUsers) { + for (const initialuser in initialUsers) { + found = false; + if (initialuser === finaluser) { + found = true; + break; + } + } + if (!found) { + await fetch(url + finaluser, { + method: 'DELETE', + headers: header + }) + .then(res => { + if (res.status < 200 || res.status >= 400) { + throw new Error("Failed to delete user: " + res.statusText); + } + }); + } + } +}); diff --git a/test/acceptance/stepDefinitions/listUsersContext.js b/test/acceptance/stepDefinitions/listUsersContext.js new file mode 100644 index 00000000000..78912abd3a0 --- /dev/null +++ b/test/acceptance/stepDefinitions/listUsersContext.js @@ -0,0 +1,14 @@ +const { When, Then } = require('cucumber'); +const { client } = require('nightwatch-api'); + +When('the administrator browses to the list of users page using the webUI', function () { + return client.page.homePage().browsedToListOfUsers(); +}); + +Then('following users should be displayed in the users list', function (dataTable) { + return client.page.listUsersPage().listOfUsersDisplayed(dataTable); +}); + +Then('the number of created users should be {int}', function (number) { + return client.page.listUsersPage().numberOfUsersDisplayed(number); +}); diff --git a/test/acceptance/stepDefinitions/loginContext.js b/test/acceptance/stepDefinitions/loginContext.js new file mode 100644 index 00000000000..428fd7b5dc7 --- /dev/null +++ b/test/acceptance/stepDefinitions/loginContext.js @@ -0,0 +1,22 @@ +const { Given, When, Then } = require('cucumber') +const { client } = require('nightwatch-api') + +Given('the user has browsed to the login page', function () { + return client.page.loginPage().navigate(); +}); + +When('user logs in with username {string} and password {string}', function (username, password) { + return client.page.loginPage().userLogsInWithUsernameAndPassword(username, password); +}); + +Then('the user should be directed to the homepage', function () { + return client.page.loginPage().successfulLogin(); +}); + +Then('the user should not be able to login', function () { + return client.page.loginPage().unsuccessfulLogin(); +}); + +Then('error message {string} should be displayed in the webUI', function (errormessage) { + return client.page.loginPage().loginErrorDisplayed(errormessage); +}); diff --git a/test/acceptance/stepDefinitions/logoutContext.js b/test/acceptance/stepDefinitions/logoutContext.js new file mode 100644 index 00000000000..018bf566cfb --- /dev/null +++ b/test/acceptance/stepDefinitions/logoutContext.js @@ -0,0 +1,14 @@ +const { When, Then } = require('cucumber'); +const { client } = require('nightwatch-api'); + +When('the user opens the user profile using the webUI', function () { + return client.page.logoutPage().userOpensProfile(); +}); + +When('the user logs out using the webUI', function () { + return client.page.logoutPage().userLogsOut(); +}); + +Then('the user should be logged out successfully', function () { + return client.page.loginPage().waitForLoginPage(); +}); From f343fbb55ebb31bca209f7babef2869e63197fd4 Mon Sep 17 00:00:00 2001 From: SwikritiT Date: Tue, 6 Oct 2020 13:08:47 +0545 Subject: [PATCH 06/65] travis setup Co-authored-by: Yamuna Adhikari --- .travis.yml | 559 +++++++++--------- nightwatch.conf.js | 4 +- package.json | 3 +- .../stepDefinitions/addUsersContext.js | 25 +- 4 files changed, 312 insertions(+), 279 deletions(-) diff --git a/.travis.yml b/.travis.yml index c47e1b19598..36e3f42a9cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,48 +8,63 @@ dist: xenial #dist: bionic sudo: required -language: php +matrix: + include: + - language: php + php: + - '5.6' + - '7.0' + - '7.1' + - '7.2' + - '7.3' + - '7.4' + - nightly + + - language: node_js + node_js: + - '12.14.0' + before_install: + - docker run -d -p 4444:4444 -p 5900:5900 -v /dev/shm:/dev/shm --name selenium selenium/standalone-chrome-debug + install: + - npm install + script: yarn test:e2e test/acceptance/features + env: + global: + - LAUNCH_URL=http://127.0.0.1/$TRAVIS_BUILD_DIR/htdocs # Start on every boot services: -- memcached -- mysql -- postgresql + - memcached + - mysql + - postgresql + - docker addons: # Force postgresql to 9.4 (the oldest availablable on xenial) postgresql: '9.4' apt: sources: - # To use the last version of pgloader, we add repo of postgresql with a name available in http://apt.postgresql.org/pub/repos/apt/ - - pgdg-xenial + # To use the last version of pgloader, we add repo of postgresql with a name available in http://apt.postgresql.org/pub/repos/apt/ + - pgdg-xenial packages: - # We need a webserver to test the webservices - # Let's install Apache with. - - apache2 - # mod_php is not supported by Travis. Add fcgi. We install FPM later on. - - libapache2-mod-fastcgi - # We need pgloader for import mysql database into pgsql - - pgloader + # We need a webserver to test the webservices + # Let's install Apache with. + - apache2 + # mod_php is not supported by Travis. Add fcgi. We install FPM later on. + - libapache2-mod-fastcgi + # We need pgloader for import mysql database into pgsql + - pgloader -php: -- '5.6' -- '7.0' -- '7.1' -- '7.2' -- '7.3' -- '7.4' -- nightly env: global: - # Set to true for very verbose output - - DEBUG=false + # Set to true for very verbose output + - DEBUG=false jobs: - # MariaDB overrides MySQL installation so it's not possible to test both yet - #- DB=mariadb - - DB=mysql - - DB=postgresql + # MariaDB overrides MySQL installation so it's not possible to test both yet + #- DB=mariadb + - DB=mysql + - DB=postgresql # See https://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP #- WS=apache # See https://github.com/DracoBlue/travis-ci-nginx-php-fpm-test @@ -58,27 +73,27 @@ env: jobs: fast_finish: true allow_failures: - - php: nightly + - php: nightly # We exclude some combinations not usefull to save Travis CPU exclude: - - php: '7.0' - env: DB=mysql - - php: '7.1' - env: DB=mysql - - php: '7.2' - env: DB=mysql - - php: '7.3' - env: DB=mysql - - php: '7.0' - env: DB=postgresql - - php: '7.1' - env: DB=postgresql - - php: '7.2' - env: DB=postgresql - - php: '7.3' - env: DB=postgresql - - php: nightly - env: DB=postgresql + - php: '7.0' + env: DB=mysql + - php: '7.1' + env: DB=mysql + - php: '7.2' + env: DB=mysql + - php: '7.3' + env: DB=mysql + - php: '7.0' + env: DB=postgresql + - php: '7.1' + env: DB=postgresql + - php: '7.2' + env: DB=postgresql + - php: '7.3' + env: DB=postgresql + - php: nightly + env: DB=postgresql notifications: email: @@ -86,59 +101,59 @@ notifications: on_failure: never # [always|never|change] default: always irc: channels: - - "chat.freenode.net#dolibarr" + - "chat.freenode.net#dolibarr" on_success: change on_failure: always use_notice: true before_install: -- | - echo "Disabling Xdebug for composer" - export PHP_VERSION_NAME=$(phpenv version-name) - cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini - phpenv config-rm xdebug.ini - echo - -- | - if [ "$DB" = 'postgresql' ]; then - echo "Check pgloader version" - pgloader --version + - | + echo "Disabling Xdebug for composer" + export PHP_VERSION_NAME=$(phpenv version-name) + cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini + phpenv config-rm xdebug.ini echo - fi + + - | + if [ "$DB" = 'postgresql' ]; then + echo "Check pgloader version" + pgloader --version + echo + fi install: -- | - echo "Updating Composer" - rm $TRAVIS_BUILD_DIR/composer.json - rm $TRAVIS_BUILD_DIR/composer.lock - composer self-update - # To have composer making parallel downloads - composer global require hirak/prestissimo - composer -n init - composer -n config vendor-dir htdocs/includes - echo + - | + echo "Updating Composer" + rm $TRAVIS_BUILD_DIR/composer.json + rm $TRAVIS_BUILD_DIR/composer.lock + composer self-update + # To have composer making parallel downloads + composer global require hirak/prestissimo + composer -n init + composer -n config vendor-dir htdocs/includes + echo -- | - 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 \ - 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 \ - php-parallel-lint/php-parallel-lint ^1 \ - php-parallel-lint/php-console-highlighter ^0 \ - squizlabs/php_codesniffer ^3 + - | + 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 \ + php-parallel-lint/php-parallel-lint ^0 \ + php-parallel-lint/php-console-highlighter ^0 \ + squizlabs/php_codesniffer ^3 fi - echo + if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then + composer -n require --ignore-platform-reqs phpunit/phpunit ^5 \ + php-parallel-lint/php-parallel-lint ^1 \ + php-parallel-lint/php-console-highlighter ^0 \ + squizlabs/php_codesniffer ^3 + fi + echo -- | - echo "Adding path of binaries tools installed by composer to the PATH" - export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH" - echo + - | + echo "Adding path of binaries tools installed by composer to the PATH" + export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH" + echo @@ -261,201 +276,201 @@ before_script: script: -- | - echo "Checking webserver availability by a wget -O - http://127.0.0.1" - # Ensure we stop on error with set -e - set +e - # The wget should return a page with line ' - wget -O - http://127.0.0.1 > test.html - head test.html - sudo cat /var/log/apache2/travis_error_log - set +e - echo + - | + echo "Checking webserver availability by a wget -O - http://127.0.0.1" + # Ensure we stop on error with set -e + set +e + # The wget should return a page with line ' + wget -O - http://127.0.0.1 > test.html + head test.html + sudo cat /var/log/apache2/travis_error_log + set +e + echo -- | - echo "Checking PHP syntax errors" - # Ensure we catch errors - set -e - #parallel-lint --exclude htdocs/includes --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 + - | + echo "Checking PHP syntax errors" + # Ensure we catch errors + set -e + #parallel-lint --exclude htdocs/includes --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 -- | - echo "Checking coding style (excluding Pull Requests builds)" - # Ensure we catch errors - set -e - # Exclusions are defined in the ruleset.xml file - #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 + - | + echo "Checking coding style (excluding Pull Requests builds)" + # Ensure we catch errors + set -e + # Exclusions are defined in the ruleset.xml file + #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 -- | - export INSTALL_FORCED_FILE=htdocs/install/install.forced.php - echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation" - # Ensure we catch errors - set +e - echo ' $INSTALL_FORCED_FILE - echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE - if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then - echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE - fi - if [ "$DB" = 'postgresql' ]; then - echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE - fi - echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE - echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE - echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE - echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE - #cat $INSTALL_FORCED_FILE + - | + export INSTALL_FORCED_FILE=htdocs/install/install.forced.php + echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation" + # Ensure we catch errors + set +e + echo ' $INSTALL_FORCED_FILE + echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE + if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then + echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE + fi + if [ "$DB" = 'postgresql' ]; then + echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE + fi + echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE + echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE + echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE + echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE + #cat $INSTALL_FORCED_FILE -#- | -# echo "Installing Dolibarr" -# cd htdocs/install -# php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log -# php step2.php set >> $TRAVIS_BUILD_DIR/install.log -# if [ "$?" -ne "0" ]; then -# echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS" -# cat $TRAVIS_BUILD_DIR/install.log -# exit 1 -# fi -# cd ../.. -# rm $INSTALL_FORCED_FILE -# #cat $TRAVIS_BUILD_DIR/install.log -# set +e -# echo + #- | + # echo "Installing Dolibarr" + # cd htdocs/install + # php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log + # php step2.php set >> $TRAVIS_BUILD_DIR/install.log + # if [ "$?" -ne "0" ]; then + # echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS" + # cat $TRAVIS_BUILD_DIR/install.log + # exit 1 + # fi + # cd ../.. + # rm $INSTALL_FORCED_FILE + # #cat $TRAVIS_BUILD_DIR/install.log + # set +e + # echo -- | - echo "Setting up database to test migrations" - if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then - echo "MySQL" - mysql -e 'DROP DATABASE IF EXISTS travis;' - mysql -e 'CREATE DATABASE IF NOT EXISTS travis;' - mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;' - mysql -e 'FLUSH PRIVILEGES;' - mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql - fi - if [ "$DB" = 'postgresql' ]; then - #pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql - #pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr - echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis - pgloader mysql://root@127.0.0.1/travis postgresql:///travis - echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis - echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis - #echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis - #echo 'select * from information_schema.table_constraints;' | psql travis - #echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis - fi - echo + - | + echo "Setting up database to test migrations" + if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then + echo "MySQL" + mysql -e 'DROP DATABASE IF EXISTS travis;' + mysql -e 'CREATE DATABASE IF NOT EXISTS travis;' + mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;' + mysql -e 'FLUSH PRIVILEGES;' + mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql + fi + if [ "$DB" = 'postgresql' ]; then + #pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql + #pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr + echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis + pgloader mysql://root@127.0.0.1/travis postgresql:///travis + echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis + echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis + #echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis + #echo 'select * from information_schema.table_constraints;' | psql travis + #echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis + fi + echo -- | - echo "Upgrading Dolibarr" - # Ensure we catch errors. Set this to +e if you want to go to the end to see log files. - set +e - cd htdocs/install - php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log - php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log - php step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log - php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log - php upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log - php step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log - php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log - php upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log - php step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log - php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log - php upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log - php step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log - php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log - php upgrade2.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-2.log - php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log - php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log - php upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log - php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log - php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log - php upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log - php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log - php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log - php upgrade2.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-2.log - php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log - php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log - php upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log - php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log - php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log - php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log - php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log - php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log - php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log - php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log - php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log - php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log - php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log - php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log - php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log - php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log - php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log - php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log - php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log + - | + echo "Upgrading Dolibarr" + # Ensure we catch errors. Set this to +e if you want to go to the end to see log files. + set +e + cd htdocs/install + php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log + php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log + php step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log + php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log + php upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log + php step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log + php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log + php upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log + php step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log + php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log + php upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log + php step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log + php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log + php upgrade2.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-2.log + php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log + php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log + php upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log + php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log + php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log + php upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log + php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log + php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log + php upgrade2.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-2.log + php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log + php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log + php upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log + php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log + php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log + php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log + php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log + php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log + php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log + php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log + php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log + php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log + php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log + php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log + php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log + php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log + php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log + php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log + php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log - # Enable modules not enabled into original dump - php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log - echo $? - cd - - set +e - echo - #cat /tmp/dolibarr_install.log - cat $TRAVIS_BUILD_DIR/enablemodule.log + # Enable modules not enabled into original dump + php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log + echo $? + cd - + set +e + echo + #cat /tmp/dolibarr_install.log + cat $TRAVIS_BUILD_DIR/enablemodule.log -- | - echo "Unit testing" - # Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file. - set -e - phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php - phpunitresult=$? - echo "Phpunit return code = $phpunitresult" - set +e + - | + echo "Unit testing" + # Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file. + set -e + phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php + phpunitresult=$? + echo "Phpunit return code = $phpunitresult" + set +e after_script: -- | - echo "After script - Output lines of dolibarr.log" - ls $TRAVIS_BUILD_DIR/documents - #cat $TRAVIS_BUILD_DIR/documents/dolibarr.log - sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log + - | + echo "After script - Output lines of dolibarr.log" + ls $TRAVIS_BUILD_DIR/documents + #cat $TRAVIS_BUILD_DIR/documents/dolibarr.log + sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log after_success: -- | - echo Success + - | + echo Success after_failure: -- | - echo Failure detected, so we show samples of log to help diagnose - # This part of code is executed only if previous command that fails are enclosed with set +e - # Upgrade log files - for ficlog in `ls $TRAVIS_BUILD_DIR/*.log` - do - echo "Debugging informations for file $ficlog" - #cat $ficlog - done - # Apache log file - echo "Debugging informations for file apache error.log" - sudo cat /var/log/apache2/travis_error_log - if [ "$DEBUG" = true ]; then - # Dolibarr log file - echo "Debugging informations for file dolibarr.log (latest 50 lines)" - tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log - # Database log file - echo "Debugging informations for file mysql error.log" - sudo tail -n 50 /var/log/mysql/error.log - # TODO: PostgreSQL log file - echo - fi + - | + echo Failure detected, so we show samples of log to help diagnose + # This part of code is executed only if previous command that fails are enclosed with set +e + # Upgrade log files + for ficlog in `ls $TRAVIS_BUILD_DIR/*.log` + do + echo "Debugging informations for file $ficlog" + #cat $ficlog + done + # Apache log file + echo "Debugging informations for file apache error.log" + sudo cat /var/log/apache2/travis_error_log + if [ "$DEBUG" = true ]; then + # Dolibarr log file + echo "Debugging informations for file dolibarr.log (latest 50 lines)" + tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log + # Database log file + echo "Debugging informations for file mysql error.log" + sudo tail -n 50 /var/log/mysql/error.log + # TODO: PostgreSQL log file + echo + fi diff --git a/nightwatch.conf.js b/nightwatch.conf.js index 1c4b089baa9..8d92613d638 100644 --- a/nightwatch.conf.js +++ b/nightwatch.conf.js @@ -1,7 +1,6 @@ const admin_username = process.env.ADMIN_USERNAME || 'dolibarr'; const admin_password = process.env.ADMIN_PASSWORD || 'password'; const launch_url = process.env.LAUNCH_URL || 'http://localhost/dolibarr/htdocs/'; -const dol_api_key = process.env.DOLAPIKEY || 'superadminuser'; module.exports = { page_objects_path : './test/acceptance/pageObjects/', // jshint ignore:line src_folders : ['test'], @@ -13,8 +12,7 @@ module.exports = { globals : { backend_url : launch_url, adminUsername : admin_username, - adminPassword : admin_password, - dolApiKey : dol_api_key + adminPassword : admin_password }, desiredCapabilities : { browserName : 'chrome', diff --git a/package.json b/package.json index 7ea03c08bca..67f24dd541a 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,10 @@ "nightwatch-api": "^3.0.1" }, "scripts": { - "test:e2e": "node_modules/cucumber/bin/cucumber-js --require test/acceptance/index.js --require test/acceptance/stepDefinitions" + "test:e2e": "node_modules/cucumber/bin/cucumber-js --require test/acceptance/index.js --require test/acceptance/stepDefinitions -f node_modules/cucumber-pretty" }, "dependencies": { + "cucumber-pretty": "^6.0.0", "node-fetch": "^2.6.1" } } diff --git a/test/acceptance/stepDefinitions/addUsersContext.js b/test/acceptance/stepDefinitions/addUsersContext.js index 6f1745bff94..22dc218d04a 100644 --- a/test/acceptance/stepDefinitions/addUsersContext.js +++ b/test/acceptance/stepDefinitions/addUsersContext.js @@ -2,6 +2,7 @@ const { Before, Given, When, Then, After } = require('cucumber'); const { client } = require('nightwatch-api'); const fetch = require('node-fetch'); let initialUsers = {}; +let dolApiKey = ''; Given('the administrator has logged in using the webUI', async function () { await client.page.loginPage().navigate().waitForLoginPage(); @@ -46,7 +47,7 @@ const getUsers = async function () { const url = client.globals.backend_url + 'api/index.php/users'; const users = {}; header['Accept'] = 'application/json'; - header['DOLAPIKEY'] = client.globals.dolApiKey; + header['DOLAPIKEY'] = dolApiKey; await fetch(url, { method: 'GET', headers: header @@ -64,7 +65,7 @@ const adminHasCreatedUser = async function (dataTable) { const header = {}; const url = client.globals.backend_url + 'api/index.php/users'; header['Accept'] = 'application/json'; - header['DOLAPIKEY'] = client.globals.dolApiKey; + header['DOLAPIKEY'] = dolApiKey; header['Content-Type'] = 'application/json'; const userDetails = dataTable.hashes(); for (const user of userDetails) { @@ -89,6 +90,24 @@ const adminHasCreatedUser = async function (dataTable) { } }; +Before(async () => { + const header = {} + const adminUsername = client.globals.adminUsername; + const adminPassword = client.globals.adminPassword; + const params = new URLSearchParams() + params.set('login', adminUsername) + params.set('password', adminPassword) + const apiKey = `http://localhost/dolibarr/htdocs/api/index.php/login?${params.toString()}`; + header['Accept'] = 'application/json' + await fetch(apiKey, { + method: 'GET', + headers: header + }) + .then(async (response) => { + const jsonResponse = await response.json() + dolApiKey = jsonResponse['success']['token'] + }) +}) Before(async () => { initialUsers = await getUsers(); }); @@ -98,7 +117,7 @@ After(async () => { const header = {}; const url = client.globals.backend_url + 'api/index.php/users/'; header['Accept'] = 'application/json'; - header['DOLAPIKEY'] = client.globals.dolApiKey; + header['DOLAPIKEY'] = dolApiKey; let found; for (const finaluser in finalUsers) { for (const initialuser in initialUsers) { From 7b4123cb78f2085b5746efaa443ae51feb739ca8 Mon Sep 17 00:00:00 2001 From: SwikritiT Date: Tue, 6 Oct 2020 13:14:41 +0545 Subject: [PATCH 07/65] git ignore Co-authored-by: Yamuna Adhikari --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index ac7a618c503..b49fdf8dc86 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,5 @@ yarn.lock #package-lock package-lock.json + +doc/install.lock From 475893f4de07b3c3185fe561944fa1a0e455d3ba Mon Sep 17 00:00:00 2001 From: SwikritiT Date: Thu, 8 Oct 2020 12:50:22 +0545 Subject: [PATCH 08/65] READ ME added Co-authored-by: Yamuna Adhikari --- .travis.yml | 559 ++++++++++++++++++++++++------------------------- test/README.md | 56 +++++ 2 files changed, 328 insertions(+), 287 deletions(-) create mode 100644 test/README.md diff --git a/.travis.yml b/.travis.yml index 36e3f42a9cb..c47e1b19598 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,63 +8,48 @@ dist: xenial #dist: bionic sudo: required -matrix: - include: - - language: php - php: - - '5.6' - - '7.0' - - '7.1' - - '7.2' - - '7.3' - - '7.4' - - nightly - - - language: node_js - node_js: - - '12.14.0' - before_install: - - docker run -d -p 4444:4444 -p 5900:5900 -v /dev/shm:/dev/shm --name selenium selenium/standalone-chrome-debug - install: - - npm install - script: yarn test:e2e test/acceptance/features - env: - global: - - LAUNCH_URL=http://127.0.0.1/$TRAVIS_BUILD_DIR/htdocs +language: php # Start on every boot services: - - memcached - - mysql - - postgresql - - docker +- memcached +- mysql +- postgresql addons: # Force postgresql to 9.4 (the oldest availablable on xenial) postgresql: '9.4' apt: sources: - # To use the last version of pgloader, we add repo of postgresql with a name available in http://apt.postgresql.org/pub/repos/apt/ - - pgdg-xenial + # To use the last version of pgloader, we add repo of postgresql with a name available in http://apt.postgresql.org/pub/repos/apt/ + - pgdg-xenial packages: - # We need a webserver to test the webservices - # Let's install Apache with. - - apache2 - # mod_php is not supported by Travis. Add fcgi. We install FPM later on. - - libapache2-mod-fastcgi - # We need pgloader for import mysql database into pgsql - - pgloader + # We need a webserver to test the webservices + # Let's install Apache with. + - apache2 + # mod_php is not supported by Travis. Add fcgi. We install FPM later on. + - libapache2-mod-fastcgi + # We need pgloader for import mysql database into pgsql + - pgloader +php: +- '5.6' +- '7.0' +- '7.1' +- '7.2' +- '7.3' +- '7.4' +- nightly env: global: - # Set to true for very verbose output - - DEBUG=false + # Set to true for very verbose output + - DEBUG=false jobs: - # MariaDB overrides MySQL installation so it's not possible to test both yet - #- DB=mariadb - - DB=mysql - - DB=postgresql + # MariaDB overrides MySQL installation so it's not possible to test both yet + #- DB=mariadb + - DB=mysql + - DB=postgresql # See https://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP #- WS=apache # See https://github.com/DracoBlue/travis-ci-nginx-php-fpm-test @@ -73,27 +58,27 @@ env: jobs: fast_finish: true allow_failures: - - php: nightly + - php: nightly # We exclude some combinations not usefull to save Travis CPU exclude: - - php: '7.0' - env: DB=mysql - - php: '7.1' - env: DB=mysql - - php: '7.2' - env: DB=mysql - - php: '7.3' - env: DB=mysql - - php: '7.0' - env: DB=postgresql - - php: '7.1' - env: DB=postgresql - - php: '7.2' - env: DB=postgresql - - php: '7.3' - env: DB=postgresql - - php: nightly - env: DB=postgresql + - php: '7.0' + env: DB=mysql + - php: '7.1' + env: DB=mysql + - php: '7.2' + env: DB=mysql + - php: '7.3' + env: DB=mysql + - php: '7.0' + env: DB=postgresql + - php: '7.1' + env: DB=postgresql + - php: '7.2' + env: DB=postgresql + - php: '7.3' + env: DB=postgresql + - php: nightly + env: DB=postgresql notifications: email: @@ -101,59 +86,59 @@ notifications: on_failure: never # [always|never|change] default: always irc: channels: - - "chat.freenode.net#dolibarr" + - "chat.freenode.net#dolibarr" on_success: change on_failure: always use_notice: true before_install: - - | - echo "Disabling Xdebug for composer" - export PHP_VERSION_NAME=$(phpenv version-name) - cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini - phpenv config-rm xdebug.ini - echo +- | + echo "Disabling Xdebug for composer" + export PHP_VERSION_NAME=$(phpenv version-name) + cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini + phpenv config-rm xdebug.ini + echo - - | - if [ "$DB" = 'postgresql' ]; then - echo "Check pgloader version" - pgloader --version - echo - fi +- | + if [ "$DB" = 'postgresql' ]; then + echo "Check pgloader version" + pgloader --version + echo + fi install: - - | - echo "Updating Composer" - rm $TRAVIS_BUILD_DIR/composer.json - rm $TRAVIS_BUILD_DIR/composer.lock - composer self-update - # To have composer making parallel downloads - composer global require hirak/prestissimo - composer -n init - composer -n config vendor-dir htdocs/includes - echo +- | + echo "Updating Composer" + rm $TRAVIS_BUILD_DIR/composer.json + rm $TRAVIS_BUILD_DIR/composer.lock + composer self-update + # To have composer making parallel downloads + composer global require hirak/prestissimo + composer -n init + composer -n config vendor-dir htdocs/includes + echo - - | - 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 \ - php-parallel-lint/php-parallel-lint ^0 \ - php-parallel-lint/php-console-highlighter ^0 \ - squizlabs/php_codesniffer ^3 +- | + 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 \ + 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 \ + php-parallel-lint/php-parallel-lint ^1 \ + 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 \ - php-parallel-lint/php-parallel-lint ^1 \ - php-parallel-lint/php-console-highlighter ^0 \ - squizlabs/php_codesniffer ^3 - fi - echo + echo - - | - echo "Adding path of binaries tools installed by composer to the PATH" - export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH" - echo +- | + echo "Adding path of binaries tools installed by composer to the PATH" + export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH" + echo @@ -276,201 +261,201 @@ before_script: script: - - | - echo "Checking webserver availability by a wget -O - http://127.0.0.1" - # Ensure we stop on error with set -e - set +e - # The wget should return a page with line ' - wget -O - http://127.0.0.1 > test.html - head test.html - sudo cat /var/log/apache2/travis_error_log - set +e - echo +- | + echo "Checking webserver availability by a wget -O - http://127.0.0.1" + # Ensure we stop on error with set -e + set +e + # The wget should return a page with line ' + wget -O - http://127.0.0.1 > test.html + head test.html + sudo cat /var/log/apache2/travis_error_log + set +e + echo - - | - echo "Checking PHP syntax errors" - # Ensure we catch errors - set -e - #parallel-lint --exclude htdocs/includes --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 +- | + echo "Checking PHP syntax errors" + # Ensure we catch errors + set -e + #parallel-lint --exclude htdocs/includes --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 - - | - echo "Checking coding style (excluding Pull Requests builds)" - # Ensure we catch errors - set -e - # Exclusions are defined in the ruleset.xml file - #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 +- | + echo "Checking coding style (excluding Pull Requests builds)" + # Ensure we catch errors + set -e + # Exclusions are defined in the ruleset.xml file + #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 - - | - export INSTALL_FORCED_FILE=htdocs/install/install.forced.php - echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation" - # Ensure we catch errors - set +e - echo ' $INSTALL_FORCED_FILE - echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE - if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then - echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE - fi - if [ "$DB" = 'postgresql' ]; then - echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE - fi - echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE - echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE - echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE - echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE - echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE - #cat $INSTALL_FORCED_FILE +- | + export INSTALL_FORCED_FILE=htdocs/install/install.forced.php + echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation" + # Ensure we catch errors + set +e + echo ' $INSTALL_FORCED_FILE + echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE + if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then + echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE + fi + if [ "$DB" = 'postgresql' ]; then + echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE + fi + echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE + echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE + echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE + echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE + #cat $INSTALL_FORCED_FILE - #- | - # echo "Installing Dolibarr" - # cd htdocs/install - # php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log - # php step2.php set >> $TRAVIS_BUILD_DIR/install.log - # if [ "$?" -ne "0" ]; then - # echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS" - # cat $TRAVIS_BUILD_DIR/install.log - # exit 1 - # fi - # cd ../.. - # rm $INSTALL_FORCED_FILE - # #cat $TRAVIS_BUILD_DIR/install.log - # set +e - # echo +#- | +# echo "Installing Dolibarr" +# cd htdocs/install +# php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log +# php step2.php set >> $TRAVIS_BUILD_DIR/install.log +# if [ "$?" -ne "0" ]; then +# echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS" +# cat $TRAVIS_BUILD_DIR/install.log +# exit 1 +# fi +# cd ../.. +# rm $INSTALL_FORCED_FILE +# #cat $TRAVIS_BUILD_DIR/install.log +# set +e +# echo - - | - echo "Setting up database to test migrations" - if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then - echo "MySQL" - mysql -e 'DROP DATABASE IF EXISTS travis;' - mysql -e 'CREATE DATABASE IF NOT EXISTS travis;' - mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;' - mysql -e 'FLUSH PRIVILEGES;' - mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql - fi - if [ "$DB" = 'postgresql' ]; then - #pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql - #pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr - echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis - pgloader mysql://root@127.0.0.1/travis postgresql:///travis - echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis - echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis - #echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis - #echo 'select * from information_schema.table_constraints;' | psql travis - #echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis - fi - echo +- | + echo "Setting up database to test migrations" + if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then + echo "MySQL" + mysql -e 'DROP DATABASE IF EXISTS travis;' + mysql -e 'CREATE DATABASE IF NOT EXISTS travis;' + mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;' + mysql -e 'FLUSH PRIVILEGES;' + mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql + fi + if [ "$DB" = 'postgresql' ]; then + #pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql + #pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr + echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis + pgloader mysql://root@127.0.0.1/travis postgresql:///travis + echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis + echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis + #echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis + #echo 'select * from information_schema.table_constraints;' | psql travis + #echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis + fi + echo - - | - echo "Upgrading Dolibarr" - # Ensure we catch errors. Set this to +e if you want to go to the end to see log files. - set +e - cd htdocs/install - php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log - php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log - php step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log - php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log - php upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log - php step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log - php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log - php upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log - php step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log - php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log - php upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log - php step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log - php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log - php upgrade2.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-2.log - php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log - php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log - php upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log - php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log - php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log - php upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log - php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log - php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log - php upgrade2.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-2.log - php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log - php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log - php upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log - php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log - php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log - php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log - php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log - php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log - php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log - php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log - php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log - php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log - php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log - php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log - php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log - php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log - php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log - php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log - php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log +- | + echo "Upgrading Dolibarr" + # Ensure we catch errors. Set this to +e if you want to go to the end to see log files. + set +e + cd htdocs/install + php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log + php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log + php step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log + php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log + php upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log + php step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log + php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log + php upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log + php step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log + php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log + php upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log + php step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log + php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log + php upgrade2.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-2.log + php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log + php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log + php upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log + php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log + php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log + php upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log + php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log + php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log + php upgrade2.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-2.log + php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log + php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log + php upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log + php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log + php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log + php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log + php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log + php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log + php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log + php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log + php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log + php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log + php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log + php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log + php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log + php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log + php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log + php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log + php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log - # Enable modules not enabled into original dump - php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log - echo $? - cd - - set +e - echo - #cat /tmp/dolibarr_install.log - cat $TRAVIS_BUILD_DIR/enablemodule.log + # Enable modules not enabled into original dump + php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log + echo $? + cd - + set +e + echo + #cat /tmp/dolibarr_install.log + cat $TRAVIS_BUILD_DIR/enablemodule.log - - | - echo "Unit testing" - # Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file. - set -e - phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php - phpunitresult=$? - echo "Phpunit return code = $phpunitresult" - set +e +- | + echo "Unit testing" + # Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file. + set -e + phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php + phpunitresult=$? + echo "Phpunit return code = $phpunitresult" + set +e after_script: - - | - echo "After script - Output lines of dolibarr.log" - ls $TRAVIS_BUILD_DIR/documents - #cat $TRAVIS_BUILD_DIR/documents/dolibarr.log - sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log +- | + echo "After script - Output lines of dolibarr.log" + ls $TRAVIS_BUILD_DIR/documents + #cat $TRAVIS_BUILD_DIR/documents/dolibarr.log + sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log after_success: - - | - echo Success +- | + echo Success after_failure: - - | - echo Failure detected, so we show samples of log to help diagnose - # This part of code is executed only if previous command that fails are enclosed with set +e - # Upgrade log files - for ficlog in `ls $TRAVIS_BUILD_DIR/*.log` - do - echo "Debugging informations for file $ficlog" - #cat $ficlog - done - # Apache log file - echo "Debugging informations for file apache error.log" - sudo cat /var/log/apache2/travis_error_log - if [ "$DEBUG" = true ]; then - # Dolibarr log file - echo "Debugging informations for file dolibarr.log (latest 50 lines)" - tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log - # Database log file - echo "Debugging informations for file mysql error.log" - sudo tail -n 50 /var/log/mysql/error.log - # TODO: PostgreSQL log file - echo - fi +- | + echo Failure detected, so we show samples of log to help diagnose + # This part of code is executed only if previous command that fails are enclosed with set +e + # Upgrade log files + for ficlog in `ls $TRAVIS_BUILD_DIR/*.log` + do + echo "Debugging informations for file $ficlog" + #cat $ficlog + done + # Apache log file + echo "Debugging informations for file apache error.log" + sudo cat /var/log/apache2/travis_error_log + if [ "$DEBUG" = true ]; then + # Dolibarr log file + echo "Debugging informations for file dolibarr.log (latest 50 lines)" + tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log + # Database log file + echo "Debugging informations for file mysql error.log" + sudo tail -n 50 /var/log/mysql/error.log + # TODO: PostgreSQL log file + echo + fi diff --git a/test/README.md b/test/README.md new file mode 100644 index 00000000000..b3d550392c4 --- /dev/null +++ b/test/README.md @@ -0,0 +1,56 @@ +#Run End-to-End Tests + +###Run Selenium + +Selenium has been used for automating the browser. + +We can run selenium by two ways: + +* Usually, for running tests using selenium we download `selenium standalone server JAR file` and `chrome driver` and start selenium server with a command which usually looks like: + + `java -jar selenium-server-standalone-.jar -port ` + +* Run selenium in docker with + + `docker run -d -p 4444:4444 -p 5900:5900 -v /dev/shm:/dev/shm selenium/standalone-chrome-debug` + + OR + + `docker run -d --network="host" -v /dev/shm:/dev/shm selenium/standalone-chrome-debug` + + OR + + `docker run -d --network host -v /dev/shm:/dev/shm selenium/standalone-chrome-debug` + +###Run the acceptance tests + + * In `nightwatch.conf.js` file inside the root directory of the project and inside the configuration file following environment variable has been specified. We can change the default values according to our local configuration. + + ``` + const admin_username = process.env.ADMIN_USERNAME || 'dolibarr'; + + const admin_password = process.env.ADMIN_PASSWORD || 'password'; + + const launch_url = process.env.LAUNCH_URL || 'http://localhost/dolibarr/htdocs/'; + ``` + * You can run test using following commands + + `yarn run test:e2e test/acceptance/features/` + + For example: `yarn run test:e2e test/acceptance/features/addUsers.feature` + + OR + + `LAUNCH_URL='' ADMIN_USERNAME='' ADMIN_PASSWORD='' yarn run test:e2e test/acceptance/features/` + + The full script to run the acceptance tests is specified in `scripts` object of `package.json` file inside the project's root directory as : + + `"test:e2e": "node_modules/cucumber/bin/cucumber-js --require test/acceptance/index.js --require test/acceptance/stepDefinitions -f node_modules/cucumber-pretty"` + + After you run the above command you can see the test running. For that : + + * open `Remmina` (Remmina is a Remote Desktop Client and comes installed with Ubuntu) + + * choose `VNC` and enter `localhost` on the address bar + + * enter `secret` as the password From 70fa262293ce04df98b751534fabd656ce5cef98 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 09:30:15 +0200 Subject: [PATCH 09/65] CSS --- htdocs/commande/class/commande.class.php | 11 +++++++---- htdocs/commande/list.php | 16 ++++++++-------- htdocs/core/lib/functions.lib.php | 6 +++--- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 5c314226214..f2aab587169 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3531,6 +3531,8 @@ class Commande extends CommonOrder $billedtext = ''; if (empty($donotshowbilled)) $billedtext .= ($billed ? ' - '.$langs->trans("Billed") : ''); + $labelTooltip = ''; + if ($status == self::STATUS_CANCELED) { $labelStatus = $langs->trans('StatusOrderCanceled'); $labelStatusShort = $langs->trans('StatusOrderCanceledShort'); @@ -3544,8 +3546,9 @@ class Commande extends CommonOrder $labelStatusShort = $langs->trans('StatusOrderValidatedShort').$billedtext; $statusType = 'status1'; } elseif ($status == self::STATUS_SHIPMENTONPROCESS) { - $labelStatus = $langs->trans('StatusOrderSentShort').$billedtext; + $labelStatus = $langs->trans('StatusOrderSent').$billedtext; $labelStatusShort = $langs->trans('StatusOrderSentShort').$billedtext; + $labelTooltip = $langs->trans("StatusOrderSent").' - '.$langs->trans("DateDeliveryPlanned").dol_print_date($this->date_livraison).$billedtext; $statusType = 'status4'; } elseif ($status == self::STATUS_CLOSED && (!$billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { $labelStatus = $langs->trans('StatusOrderToBill'); @@ -3553,11 +3556,11 @@ class Commande extends CommonOrder $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; + $labelStatusShort = $langs->trans('StatusOrderProcessedShort').$billedtext; $statusType = 'status6'; } elseif ($status == self::STATUS_CLOSED && (!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { $labelStatus = $langs->trans('StatusOrderDelivered'); - $labelStatusShort = $langs->trans('StatusOrderDelivered'); + $labelStatusShort = $langs->trans('StatusOrderDeliveredShort'); $statusType = 'status6'; } else { $labelStatus = $langs->trans('Unknown'); @@ -3566,7 +3569,7 @@ class Commande extends CommonOrder $mode = 0; } - return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode, '', array('tooltip' => $labelTooltip)); } diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index c30a60424a6..eaf944ff968 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -46,7 +46,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page -$langs->loadLangs(array("orders", 'sendings', 'deliveries', 'companies', 'compta', 'bills')); +$langs->loadLangs(array("orders", 'sendings', 'deliveries', 'companies', 'compta', 'bills', 'stocks')); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); @@ -680,9 +680,9 @@ if ($resql) print ''; } // Town - if (!empty($arrayfields['s.town']['checked'])) print ''; + if (!empty($arrayfields['s.town']['checked'])) print ''; // Zip - if (!empty($arrayfields['s.zip']['checked'])) print ''; + if (!empty($arrayfields['s.zip']['checked'])) print ''; // State if (!empty($arrayfields['state.nom']['checked'])) { @@ -905,6 +905,7 @@ if ($resql) $total = 0; $subtotal = 0; $productstat_cache = array(); + $productstat_cachevirtual = array(); $getNomUrl_cache = array(); $generic_commande = new Commande($db); @@ -962,7 +963,6 @@ if ($resql) // Show shippable Icon (create subloop, so may be slow) if ($conf->stock->enabled) { - $langs->load("stocks"); if (($obj->fk_statut > 0) && ($obj->fk_statut < 3)) { $numlines = count($generic_commande->lines); // Loop on each line of order @@ -986,16 +986,16 @@ if ($resql) if (empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) // Default code. Default is when this option is not set, setting it create strange result { - $text_info .= $generic_commande->lines[$lig]->qty.' X '.$generic_commande->lines[$lig]->ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 25); - $text_info .= ' - '.$langs->trans("Stock").': '.$generic_product->stock_reel; - $text_info .= ' - '.$langs->trans("VirtualStock").': '.$generic_product->stock_theorique; + $text_info .= $generic_commande->lines[$lig]->qty.' X '.$generic_commande->lines[$lig]->product_ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 25); + $text_info .= ' - '.$langs->trans("Stock").': '.$generic_product->stock_reel.''; + $text_info .= ' - '.$langs->trans("VirtualStock").': '.$generic_product->stock_theorique.''; $text_info .= '
'; if ($generic_commande->lines[$lig]->qty > $generic_product->stock_reel) { $notshippable++; } - } else { // Detailed code, looks bugged + } else { // Detailed virtual stock, looks bugged, uncomplete and need heavy load. // stock order and stock order_supplier $stock_order = 0; $stock_order_supplier = 0; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 38e9d972760..9af7584288b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8369,7 +8369,7 @@ function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = ' /** - * Function dolGetStatus + * Output the badge of a status. * * @param string $statusLabel Label of badge no html : use in alt attribute for accessibility * @param string $statusLabelShort Short label of badge no html @@ -8377,7 +8377,7 @@ function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = ' * @param string $statusType status0 status1 status2 status3 status4 status5 status6 status7 status8 status9 : image name or badge name * @param int $displayMode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @param string $url The url for link - * @param array $params Various params for future : recommended rather than adding more function arguments + * @param array $params Various params. Example: array('tooltip'=>'...', 'badgeParams'=>...) * @return string Html status string */ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $statusType = 'status0', $displayMode = 0, $url = '', $params = array()) @@ -8446,7 +8446,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st $statusLabelShort = (empty($statusLabelShort) ? $statusLabel : $statusLabelShort); $dolGetBadgeParams['attr']['class'] = 'badge-status'; - $dolGetBadgeParams['attr']['title'] = $statusLabel; + $dolGetBadgeParams['attr']['title'] = empty($params['tooltip']) ? $statusLabel : $params['tooltip']; if ($displayMode == 3) { $return = dolGetBadge((empty($conf->dol_optimize_smallscreen) ? $statusLabel : (empty($statusLabelShort) ? $statusLabel : $statusLabelShort)), '', $statusType, 'dot', $url, $dolGetBadgeParams); From 688d915cca878f0fd9d959c83c4e3e7a7551eecd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 10:04:36 +0200 Subject: [PATCH 10/65] CSS --- htdocs/theme/eldy/global.inc.php | 3 +++ htdocs/theme/md/style.css.php | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index eb9fff7382c..5fe36e8687a 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -5476,6 +5476,9 @@ a span.select2-chosen .select2-results { max-height: 400px; } +.select2-results__option { + word-break: break-word; +} .select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices { background-color: var(--colorbackvmenu1); background-image: none; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index dcfbc402927..cdc50311d40 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -5327,6 +5327,9 @@ a span.select2-chosen .select2-results { max-height: 400px; } +.select2-results__option { + word-break: break-word; +} .select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices { background-color: #FFFFFF; background-image: none; @@ -6451,11 +6454,11 @@ if (is_object($db)) $db->close(); ::-webkit-scrollbar { width: 12px; } -::-webkit-scrollbar-button { - background: #aaa; -} +/*::-webkit-scrollbar-button { + background: #bbb; +}*/ ::-webkit-scrollbar-track-piece { - background: #fff; + background: #f4f4f4; } ::-webkit-scrollbar-thumb { background: #ddd; From 4674eda45a22f0cc57795fcd013636c949730762 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 10:13:44 +0200 Subject: [PATCH 11/65] Standardize columns comment --- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 2 ++ htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql | 2 +- .../install/mysql/tables/llx_accounting_bookkeeping_tmp.sql | 2 +- htdocs/install/mysql/tables/llx_actioncomm.sql | 2 +- htdocs/install/mysql/tables/llx_adherent.sql | 2 +- htdocs/install/mysql/tables/llx_categorie.sql | 2 +- htdocs/install/mysql/tables/llx_events.sql | 2 +- htdocs/install/mysql/tables/llx_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_facture.sql | 2 +- htdocs/install/mysql/tables/llx_facture_fourn.sql | 2 +- htdocs/install/mysql/tables/llx_facture_rec.sql | 2 +- htdocs/install/mysql/tables/llx_projet_task.sql | 2 +- htdocs/install/mysql/tables/llx_projet_task_time.sql | 4 ++-- htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql | 2 +- htdocs/install/mysql/tables/llx_societe_address.sql | 2 +- htdocs/install/mysql/tables/llx_zapier_hook.sql | 4 ++-- 16 files changed, 19 insertions(+), 17 deletions(-) diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 7c32a370c45..735ef515dcd 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -357,3 +357,5 @@ ALTER TABLE llx_website_page ADD COLUMN object_type varchar(255); ALTER TABLE llx_website_page ADD COLUMN fk_object varchar(255); DELETE FROM llx_const WHERE name in ('MAIN_INCLUDE_ZERO_VAT_IN_REPORTS'); + +ALTER TABLE llx_projet_task_time MODIFY COLUMN datec datetime; diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index cf1c3334092..906efaae04d 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -45,7 +45,7 @@ CREATE TABLE llx_accounting_bookkeeping fk_user_author integer NOT NULL, -- | user creating fk_user_modif integer, -- | user making last change date_creation datetime, -- FEC:EcritureDate | creation date - tms timestamp, -- | date last modification + tms timestamp, -- | last modification date fk_user integer NULL, -- The id of user that validate the accounting source document code_journal varchar(32) NOT NULL, -- FEC:JournalCode journal_label varchar(255), -- FEC:JournalLib diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql index cbf387b9b70..3357a000406 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql @@ -44,7 +44,7 @@ CREATE TABLE llx_accounting_bookkeeping_tmp fk_user_author integer NOT NULL, -- | user creating fk_user_modif integer, -- | user making last change date_creation datetime, -- FEC:EcritureDate | creation date - tms timestamp, -- | date last modification + tms timestamp, -- | last modification date fk_user integer NULL, -- The id of user that validate the accounting source document code_journal varchar(32) NOT NULL, -- FEC:JournalCode journal_label varchar(255), -- FEC:JournalLib diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql index 857e6270b90..6307ba89770 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.sql @@ -33,7 +33,7 @@ create table llx_actioncomm code varchar(50) NULL, -- code of action for automatic action ('AC_OTH_AUTO' for automatic actions, 'AC_EMAILIN_AUTO' for email input, 'AC_xxx' for manual action...) datec datetime, -- date creation - tms timestamp, -- date modification + tms timestamp, -- last modification date fk_user_author integer, -- user id of user that has created record fk_user_mod integer, -- user id of user that has modified record diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index 1917e80c81a..6713e5abc9d 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -72,7 +72,7 @@ create table llx_adherent model_pdf varchar(255), datevalid datetime, -- date de validation datec datetime, -- date de creation - tms timestamp, -- date de modification + tms timestamp, -- last modification date fk_user_author integer, -- can be null because member can be create by a guest fk_user_mod integer, fk_user_valid integer, diff --git a/htdocs/install/mysql/tables/llx_categorie.sql b/htdocs/install/mysql/tables/llx_categorie.sql index cf1df953ba5..09a9ce847b4 100644 --- a/htdocs/install/mysql/tables/llx_categorie.sql +++ b/htdocs/install/mysql/tables/llx_categorie.sql @@ -32,7 +32,7 @@ create table llx_categorie fk_soc integer DEFAULT NULL, -- not used by default. Used when option CATEGORY_ASSIGNED_TO_A_CUSTOMER is set. visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not date_creation datetime, -- date creation - tms timestamp, -- date modification + tms timestamp, -- last modification date fk_user_creat integer, -- user making creation fk_user_modif integer, -- user making last change import_key varchar(14) -- Import key diff --git a/htdocs/install/mysql/tables/llx_events.sql b/htdocs/install/mysql/tables/llx_events.sql index c3ae55f47e2..e646d32643b 100644 --- a/htdocs/install/mysql/tables/llx_events.sql +++ b/htdocs/install/mysql/tables/llx_events.sql @@ -24,7 +24,7 @@ create table llx_events ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, -- date creation/modification + tms timestamp, -- last modification date type varchar(32) NOT NULL, -- action type entity integer DEFAULT 1 NOT NULL, -- multi company id prefix_session varchar(255) NULL, -- prefix of session, obtained with dol_getprefix diff --git a/htdocs/install/mysql/tables/llx_extrafields.sql b/htdocs/install/mysql/tables/llx_extrafields.sql index 3578414d98b..f10f2600930 100644 --- a/htdocs/install/mysql/tables/llx_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_extrafields.sql @@ -43,5 +43,5 @@ create table llx_extrafields fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change datec datetime, -- date de creation - tms timestamp -- date of last update + tms timestamp -- last modification date )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 429095e1111..2c8e1013634 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -39,7 +39,7 @@ create table llx_facture datef date, -- date invoice date_pointoftax date DEFAULT NULL, -- date point of tax (for GB) date_valid date, -- date validation - tms timestamp, -- date creation/modification + tms timestamp, -- last modification date date_closing datetime, -- date de cloture paye smallint DEFAULT 0 NOT NULL, --amount double(24,8) DEFAULT 0 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_facture_fourn.sql b/htdocs/install/mysql/tables/llx_facture_fourn.sql index 78b06370d8d..eabf8b1eb27 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn.sql @@ -35,7 +35,7 @@ create table llx_facture_fourn datef date, -- date de la facture date_pointoftax date DEFAULT NULL, -- date point of tax (for GB) date_valid date, -- date validation - tms timestamp, -- date creation/modification + tms timestamp, -- last modification date libelle varchar(255), paye smallint DEFAULT 0 NOT NULL, amount double(24,8) DEFAULT 0 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_facture_rec.sql b/htdocs/install/mysql/tables/llx_facture_rec.sql index 220c1fa608a..d6bda7c4196 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec.sql @@ -26,7 +26,7 @@ create table llx_facture_rec entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, datec datetime, -- date de creation - tms timestamp, -- date creation/modification + tms timestamp, -- last modification date suspended integer DEFAULT 0, -- 1=suspended diff --git a/htdocs/install/mysql/tables/llx_projet_task.sql b/htdocs/install/mysql/tables/llx_projet_task.sql index cc1088cf7a7..b5cc02e4929 100644 --- a/htdocs/install/mysql/tables/llx_projet_task.sql +++ b/htdocs/install/mysql/tables/llx_projet_task.sql @@ -25,7 +25,7 @@ create table llx_projet_task fk_projet integer NOT NULL, fk_task_parent integer DEFAULT 0 NOT NULL, datec datetime, -- date creation - tms timestamp, -- date creation/modification + tms timestamp, -- last modification date dateo datetime, -- date start task datee datetime, -- date end task datev datetime, -- date validation diff --git a/htdocs/install/mysql/tables/llx_projet_task_time.sql b/htdocs/install/mysql/tables/llx_projet_task_time.sql index e1c857af2c3..8f0f5e663b9 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_time.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_time.sql @@ -29,7 +29,7 @@ create table llx_projet_task_time invoice_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice id here invoice_line_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice line id here import_key varchar(14), -- Import key - datec date, -- Date creation time - tms timestamp, -- Date update time + datec datetime, -- date creation time + tms timestamp, -- last modification date note text -- A comment )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql b/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql index 0c636b2507c..ff0f44d0280 100644 --- a/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql +++ b/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql @@ -22,7 +22,7 @@ CREATE TABLE llx_propal_merge_pdf_product ( fk_user_author integer DEFAULT NULL, fk_user_mod integer NOT NULL, datec datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe_address.sql b/htdocs/install/mysql/tables/llx_societe_address.sql index 626b0155519..e18409fbf51 100644 --- a/htdocs/install/mysql/tables/llx_societe_address.sql +++ b/htdocs/install/mysql/tables/llx_societe_address.sql @@ -21,7 +21,7 @@ create table llx_societe_address ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, -- creation date - tms timestamp, -- modification date + tms timestamp, -- last modification date label varchar(30), -- fk_soc integer DEFAULT 0, -- name varchar(60), -- company name diff --git a/htdocs/install/mysql/tables/llx_zapier_hook.sql b/htdocs/install/mysql/tables/llx_zapier_hook.sql index 27d56352bff..b5bcc15123a 100644 --- a/htdocs/install/mysql/tables/llx_zapier_hook.sql +++ b/htdocs/install/mysql/tables/llx_zapier_hook.sql @@ -22,8 +22,8 @@ CREATE TABLE llx_zapier_hook( module varchar(128), action varchar(128), status integer, - date_creation DATETIME NOT NULL, + date_creation datetime NOT NULL, fk_user integer NOT NULL, - tms TIMESTAMP NOT NULL, + tms timestamp, import_key varchar(14) ) ENGINE=innodb; From bf97d2a50fcab0d3b29d0c6a683919aa552ebe65 Mon Sep 17 00:00:00 2001 From: quentin Date: Thu, 8 Oct 2020 10:26:30 +0200 Subject: [PATCH 12/65] NEW helper functions for export with phpspreadsheet --- .../export/export_excel2007new.modules.php | 182 ++++++++++++++++++ 1 file changed, 182 insertions(+) diff --git a/htdocs/core/modules/export/export_excel2007new.modules.php b/htdocs/core/modules/export/export_excel2007new.modules.php index 6d7cbb5d05f..0567e4b21f2 100644 --- a/htdocs/core/modules/export/export_excel2007new.modules.php +++ b/htdocs/core/modules/export/export_excel2007new.modules.php @@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; +use PhpOffice\PhpSpreadsheet\Cell\Coordinate; /** * Class to build export files with Excel format @@ -436,4 +437,185 @@ class ExportExcel2007new extends ModeleExports return $letter; } + + /** + * Set cell value and automatically merge if we give an endcell + * + * @param string $val cell value + * @param string $startCell + * @param string $endCell + * @return int 1 if success -1 if failed + */ + public function setCellValue($val, $startCell, $endCell = '') { + try { + $this->workbook->getActiveSheet()->setCellValue($startCell, $val); + + if(! empty($endCell)) { + $cellRange = $startCell.':'.$endCell; + $this->workbook->getActiveSheet()->mergeCells($startCell.':'.$endCell); + } + else $cellRange = $startCell; + if(! empty($this->styleArray)) $this->workbook->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styleArray); + } + catch(Exception $e) { + $this->error = $e->getMessage(); + return -1; + } + return 1; + } + + /** + * Set border style + * + * @param string $thickness style \PhpOffice\PhpSpreadsheet\Style\Border + * @param string $color color \PhpOffice\PhpSpreadsheet\Style\Color + */ + public function setBorderStyle($thickness, $color) { + $this->styleArray['borders'] = array( + 'outline' => array( + 'borderStyle' => $thickness, + 'color' => array('argb' => $color) + ) + ); + } + + /** + * Set font style + * + * @param bool $bold + * @param string $color color \PhpOffice\PhpSpreadsheet\Style\Color + */ + public function setFontStyle($bold, $color) { + $this->styleArray['font'] = array( + 'color' => array('argb' => $color), + 'bold' => $bold + ); + } + + /** + * Set alignment style (horizontal, left, right, ...) + * + * @param string $horizontal PhpOffice\PhpSpreadsheet\Style\Alignment + */ + public function setAlignmentStyle($horizontal) { + $this->styleArray['alignment'] = array('horizontal' => $horizontal); + } + + /** + * Reset Style + */ + public function resetStyle() { + $this->styleArray = array(); + } + + /** + * Make a NxN Block in sheet + * + * @param string $startCell + * @param array $TDatas array(ColumnName=>array(Row value 1, row value 2, etc ...)) + * @param bool $boldTitle + * @return int 1 if OK, -1 if KO + */ + public function setBlock($startCell, $TDatas = array(), $boldTitle = false) { + try { + if(! empty($TDatas)) { + $startCell = $this->workbook->getActiveSheet()->getCell($startCell); + $startColumn = Coordinate::columnIndexFromString($startCell->getColumn()); + $startRow = $startCell->getRow(); + foreach($TDatas as $column => $TRows) { + if($boldTitle) $this->setFontStyle(true, $this->styleArray['font']['color']['argb']); + $cell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $startRow); + $this->setCellValue($column, $cell->getCoordinate()); + $rowPos = $startRow; + if($boldTitle) $this->setFontStyle(false, $this->styleArray['font']['color']['argb']); + foreach($TRows as $row) { + $rowPos++; + $cell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $rowPos); + $this->setCellValue($row, $cell->getCoordinate()); + } + $startColumn++; + } + } + } + catch(Exception $e) { + $this->error = $e->getMessage(); + return -1; + } + return 1; + } + + /** + * Make a 2xN Tab in Sheet + * + * @param string $startCell A1 + * @param array $TDatas array(Title=>val) + * @param bool $boldTitle + * @return int 1 if OK, -1 if KO + */ + public function setBlock2Columns($startCell, $TDatas = array(), $boldTitle = false) { + try { + if(! empty($TDatas)) { + $startCell = $this->workbook->getActiveSheet()->getCell($startCell); + $startColumn = Coordinate::columnIndexFromString($startCell->getColumn()); + $startRow = $startCell->getRow(); + foreach($TDatas as $title => $val) { + $cell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $startRow); + if($boldTitle) $this->setFontStyle(true, $this->styleArray['font']['color']['argb']); + $this->setCellValue($title, $cell->getCoordinate()); + if($boldTitle) $this->setFontStyle(false, $this->styleArray['font']['color']['argb']); + $cell2 = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn + 1, $startRow); + $this->setCellValue($val, $cell2->getCoordinate()); + $startRow++; + } + } + } + catch(Exception $e) { + $this->error = $e->getMessage(); + return -1; + } + return 1; + } + + /** + * Enable auto sizing for column range + * + * @param string $firstColumn + * @param string $lastColumn + */ + public function enableAutosize($firstColumn, $lastColumn) { + foreach(range($firstColumn, $lastColumn) as $columnID) { + $this->workbook->getActiveSheet()->getColumnDimension($columnID)->setAutoSize(true); + } + } + + /** + * Set a value cell and merging it by giving a starting cell and a length + * + * @param string $val Cell value + * @param string $startCell Starting cell + * @param int $length Length + * @param int $offset Starting offset + * @return string Coordinate or -1 if KO + */ + public function setMergeCellValueByLength($val, $startCell, $length, $offset = 0) { + try { + $startCell = $this->workbook->getActiveSheet()->getCell($startCell); + $startColumn = Coordinate::columnIndexFromString($startCell->getColumn()); + if(! empty($offset)) $startColumn += $offset; + + $startRow = $startCell->getRow(); + $startCell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $startRow); + $startCoordinate = $startCell->getCoordinate(); + $this->setCellValue($val, $startCell->getCoordinate()); + + $endCell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn + ($length - 1), $startRow); + $endCoordinate = $endCell->getCoordinate(); + $this->workbook->getActiveSheet()->mergeCells($startCoordinate.':'.$endCoordinate); + } + catch(Exception $e) { + $this->error = $e->getMessage(); + return -1; + } + return $endCoordinate; + } } From 7e3a3a4cf3b7a4622f0a53a7b4348f9e0e32c880 Mon Sep 17 00:00:00 2001 From: "Sekan, Tobias" Date: Thu, 8 Oct 2020 10:30:09 +0200 Subject: [PATCH 13/65] Add more filter for leave log view --- htdocs/core/class/html.formother.class.php | 11 +- htdocs/holiday/view_log.php | 426 ++++++++++++++------- 2 files changed, 294 insertions(+), 143 deletions(-) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index e75653ae48b..ba2406f4b70 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -952,12 +952,21 @@ class FormOther * @param int $invert Invert * @param string $option Option * @param string $morecss More css + * @param bool $addjscombo Add js combo * @return string */ - public function selectyear($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp') + public function selectyear($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp', $addjscombo = false) { $out = ''; + // Add code for jquery to use multiselect + if ($addjscombo) + { + // Enhance with select2 + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $out .= ajax_combobox($htmlname); + } + $currentyear = date("Y") + $offset; $max_year = $currentyear + $max_year; $min_year = $currentyear - $min_year; diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index 4ff8238648c..d1602de6ea1 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -25,9 +25,16 @@ */ require '../main.inc.php'; + +// Security check (access forbidden for external user too) +if (empty($user->rights->holiday->define_holiday) || $user->socid > 0) { + accessforbidden(); +} + +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) @@ -39,15 +46,15 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') -$search_id = GETPOST('search_id', 'alpha'); -$search_prev_solde = GETPOST('search_prev_solde', 'alpha'); -$search_new_solde = GETPOST('search_new_solde', 'alpha'); -$year = GETPOST('year'); -if (empty($year)) -{ - $tmpdate = dol_getdate(dol_now()); - $year = $tmpdate['year']; -} +$search_id = GETPOST('search_id', 'alphanohtml'); +$search_month = GETPOST('search_month', 'int'); +$search_year = GETPOST('search_year', 'int'); +$search_employee = GETPOST('search_employee', 'int'); +$search_validator = GETPOST('search_validator', 'int'); +$search_description = GETPOST('search_description', 'alphanohtml'); +$search_type = GETPOST('search_type', 'int'); +$search_prev_solde = GETPOST('search_prev_solde', 'alphanohtml'); +$search_new_solde = GETPOST('search_new_solde', 'alphanohtml'); // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -61,10 +68,6 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield="cpl.rowid"; if (! $sortorder) $sortorder="DESC"; - -// Protection if external user -if ($user->socid > 0) accessforbidden(); - // Si l'utilisateur n'a pas le droit de lire cette page if (!$user->rights->holiday->read_all) accessforbidden(); @@ -92,81 +95,126 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) -{ - // Selection of new fields - include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; +if (empty($reshook)) { + // Selection of new fields + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; - // Purge search criteria - if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers - { - $search_id = ''; - $toselect = ''; - $search_array_options = array(); - } + // Purge search criteria + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers + $search_id = ''; + $search_month = ''; + $search_year = ''; + $search_employee = ''; + $search_validator = ''; + $search_description = ''; + $search_type = ''; + $search_prev_solde = ''; + $search_new_solde = ''; + $toselect = ''; + $search_array_options = array(); + } - if (GETPOST('button_removefilter_x', 'alpha') - || GETPOST('button_removefilter.x', 'alpha') - || GETPOST('button_removefilter', 'alpha') - || GETPOST('button_search_x', 'alpha') - || GETPOST('button_search.x', 'alpha') - || GETPOST('button_search', 'alpha')) - { - $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation - } + if (GETPOST('button_removefilter_x', 'alpha') + || GETPOST('button_removefilter.x', 'alpha') + || GETPOST('button_removefilter', 'alpha') + || GETPOST('button_search_x', 'alpha') + || GETPOST('button_search.x', 'alpha') + || GETPOST('button_search', 'alpha')) + { + $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation + } - // Mass actions - /*$objectclass='MyObject'; - $objectlabel='MyObject'; - $permissiontoread = $user->rights->mymodule->read; - $permissiontodelete = $user->rights->mymodule->delete; - $uploaddir = $conf->mymodule->dir_output; - include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - */ + // Mass actions + /*$objectclass='MyObject'; + $objectlabel='MyObject'; + $permissiontoread = $user->rights->mymodule->read; + $permissiontodelete = $user->rights->mymodule->delete; + $uploaddir = $conf->mymodule->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + */ } // Definition of fields for lists $arrayfields = array( - 'cpl.rowid'=>array('label'=>$langs->trans("ID"), 'checked'=>1), - 'cpl.date_action'=>array('label'=>$langs->trans("Date"), 'checked'=>1), - 'cpl.fk_user_action'=>array('label'=>$langs->trans("ActionByCP"), 'checked'=>1), - 'cpl.fk_user_update'=>array('label'=>$langs->trans("UserUpdateCP"), 'checked'=>1), - 'cpl.type_action'=>array('label'=>$langs->trans("Description"), 'checked'=>1), - 'cpl.fk_type'=>array('label'=>$langs->trans("Type"), 'checked'=>1), - 'cpl.prev_solde'=>array('label'=>$langs->trans("PrevSoldeCP"), 'checked'=>1), - 'variation'=>array('label'=>$langs->trans("Variation"), 'checked'=>1), - 'cpl.new_solde'=>array('label'=>$langs->trans("NewSoldeCP"), 'checked'=>1), + 'cpl.rowid'=>array('label'=>$langs->trans("ID"), 'checked'=>1), + 'cpl.date_action'=>array('label'=>$langs->trans("Date"), 'checked'=>1), + 'cpl.fk_user_action'=>array('label'=>$langs->trans("ActionByCP"), 'checked'=>1), + 'cpl.fk_user_update'=>array('label'=>$langs->trans("UserUpdateCP"), 'checked'=>1), + 'cpl.type_action'=>array('label'=>$langs->trans("Description"), 'checked'=>1), + 'cpl.fk_type'=>array('label'=>$langs->trans("Type"), 'checked'=>1), + 'cpl.prev_solde'=>array('label'=>$langs->trans("PrevSoldeCP"), 'checked'=>1), + 'variation'=>array('label'=>$langs->trans("Variation"), 'checked'=>1), + 'cpl.new_solde'=>array('label'=>$langs->trans("NewSoldeCP"), 'checked'=>1), ); + /* * View */ $form = new Form($db); - +$formother = new FormOther($db); +$holidaylogstatic = new stdClass(); $alltypeleaves = $object->getTypes(1, -1); // To have labels -llxHeader('', $langs->trans('CPTitreMenu').' ('.$langs->trans("Year").' '.$year.')'); +llxHeader('', $langs->trans('CPTitreMenu')); -$sqlwhere = " AND date_action BETWEEN ". -$sqlwhere.= "'".$db->idate(dol_get_first_day($year, 1, 1))."'"; -$sqlwhere.= " AND "; -$sqlwhere.= "'".$db->idate(dol_get_last_day($year, 12, 1))."'"; +$sqlwhere = ''; -if ($search_id != '') $sqlwhere.= natural_search('rowid', $search_id, 1); -if ($search_prev_solde != '') $sqlwhere.= natural_search('prev_solde', $search_prev_solde, 1); -if ($search_new_solde != '') $sqlwhere.= natural_search('new_solde', $search_new_solde, 1); +if (!empty($search_year) && $search_year > 0) { + if (!empty($search_month) && $search_month > 0) { + $from_date = $db->idate(dol_get_first_day($search_year, $search_month, 1)); + $to_date = $db->idate(dol_get_last_day($search_year, $search_month, 1)); + } else { + $from_date = $db->idate(dol_get_first_day($search_year, 1, 1)); + $to_date = $db->idate(dol_get_last_day($search_year, 12, 1)); + } + + $sqlwhere .= "AND date_action BETWEEN '".$from_date."' AND '".$to_date."'"; +} + +if (!empty($search_id) && $search_id > 0) $sqlwhere.= natural_search('rowid', $search_id, 1); +if (!empty($search_validator) && $search_validator > 0) $sqlwhere.= natural_search('fk_user_action', $search_validator, 1); +if (!empty($search_employee) && $search_employee > 0) $sqlwhere.= natural_search('fk_user_update', $search_employee, 1); +if (!empty($search_description)) $sqlwhere.= natural_search('type_action', $search_description); +if (!empty($search_type) && $search_type > 0) $sqlwhere.= natural_search('fk_type', $search_type, 1); +if (!empty($search_prev_solde)) $sqlwhere.= natural_search('prev_solde', $search_prev_solde, 1); +if (!empty($search_new_solde)) $sqlwhere.= natural_search('new_solde', $search_new_solde, 1); $sqlorder = $db->order($sortfield, $sortorder); // Recent changes are more important than old changes $log_holiday = $object->fetchLog($sqlorder, $sqlwhere); // Load $object->logs +// Count total nb of records +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { + //TODO: $result = $db->query($sql); + //TODO: $nbtotalofrecords = $db->num_rows($result); + $nbtotalofrecords = is_array($object->logs) ? count($object->logs) : 0; + + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 + $page = 0; + $offset = 0; + } +} + +// TODO: $num = $db->num_rows($resql); +$num = is_array($object->logs) ? count($object->logs) : 0; + $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); -if ($search_id) $param = '&search_id='.urlencode($search_id); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); +if (!empty($search_id)) $param .= '&search_statut='.urlencode($search_statut); +if (!empty($search_month) && $search_month > 0) $param .= '&search_month='.urlencode($search_month); +if (!empty($search_year) && $search_year > 0) $param .= '&search_year='.urlencode($search_year); +if (!empty($search_validator) && $search_validator > 0) $param .= '&search_validator='.urlencode($search_validator); +if (!empty($search_employee) && $search_employee > 0) $param .= '&search_employee='.urlencode($search_employee); +if (!empty($search_description)) $param .= '&search_description='.urlencode($search_description); +if (!empty($search_type) && $search_type > 0) $param .= '&search_type='.urlencode($search_type); +if (!empty($search_prev_solde)) $param .= '&search_prev_solde='.urlencode($search_prev_solde); +if (!empty($search_new_solde)) $param .= '&search_new_solde='.urlencode($search_new_solde); print '
'; if ($optioncss != '') print ''; @@ -178,44 +226,23 @@ print ''; print ''; print ''; -$pagination = ''; - -print load_fiche_titre($langs->trans('LogCP'), $pagination, 'title_hrm.png'); - -print '
'.$langs->trans('LastUpdateCP').': '."\n"; +print '
'.$langs->trans('LastUpdateCP').': '; $lastUpdate = $object->getConfCP('lastUpdate'); -if ($lastUpdate) -{ - $monthLastUpdate = $lastUpdate[4].$lastUpdate[5]; - $yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3]; - print ''.dol_print_date($db->jdate($object->getConfCP('lastUpdate')), 'dayhour', 'tzuser').''; - print '
'.$langs->trans("MonthOfLastMonthlyUpdate").': '.$yearLastUpdate.'-'.$monthLastUpdate.''."\n"; +if ($lastUpdate) { + $monthLastUpdate = $lastUpdate[4].$lastUpdate[5]; + $yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3]; + print ''.dol_print_date($db->jdate($object->getConfCP('lastUpdate')), 'dayhour', 'tzuser').''; + print '
'; + print $langs->trans("MonthOfLastMonthlyUpdate").': '.$yearLastUpdate.'-'.$monthLastUpdate.''; +} else { + print $langs->trans('None'); } -else { - print $langs->trans('None'); -} -print "

\n"; +print '
'; +print '
'; $moreforfilter = ''; @@ -225,20 +252,84 @@ $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfiel $selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print '
'; -print ''."\n"; +print '
'; -print ''; +print ''; + +// Filter Id +if (!empty($arrayfields['cpl.rowid']['checked'])) { + print ''; +} + +// Filter: Date +if (!empty($arrayfields['cpl.date_action']['checked'])) { + print ''; +} + +// Filter: Validator +if (!empty($arrayfields['cpl.fk_user_action']['checked'])) { + $validator = new UserGroup($db); + $excludefilter = $user->admin ? '' : 'u.rowid <> '.$user->id; + $valideurobjects = $validator->listUsersForGroup($excludefilter); + $valideurarray = array(); + + foreach ($valideurobjects as $val) { + $valideurarray[$val->id] = $val->id; + } + + print ''; +} + +// Filter: User +if (!empty($arrayfields['cpl.fk_user_update']['checked'])) { + print ''; +} + +// Filter: Description +if (!empty($arrayfields['cpl.type_action']['checked'])) { + print ''; +} + +// Filter: Type +if (!empty($arrayfields['cpl.fk_type']['checked'])) { + foreach ($alltypeleaves as $key => $val) { + $labeltoshow = ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']); + $arraytypeleaves[$val['rowid']] = $labeltoshow; + } + + print ''; +} + +// Filter: Previous balance +if (!empty($arrayfields['cpl.prev_solde']['checked'])) { + print ''; +} + +// Filter: Variation (only placeholder) +if (!empty($arrayfields['variation']['checked'])) { + print ''; +} + +// Filter: New Balance +if (!empty($arrayfields['cpl.new_solde']['checked'])) { + print ''; +} -print ''; -if (!empty($arrayfields['cpl.rowid']['checked'])) print ''; -if (!empty($arrayfields['cpl.date_action']['checked'])) print ''; -if (!empty($arrayfields['cpl.fk_user_action']['checked'])) print ''; -if (!empty($arrayfields['cpl.fk_user_update']['checked'])) print ''; -if (!empty($arrayfields['cpl.type_action']['checked'])) print ''; -if (!empty($arrayfields['cpl.fk_type']['checked'])) print ''; -if (!empty($arrayfields['cpl.prev_solde']['checked'])) print ''; -if (!empty($arrayfields['variation']['checked'])) print ''; -if (!empty($arrayfields['cpl.new_solde']['checked'])) print ''; // Action column print ''; +// TODO: $i = 0; +$i = 1; -foreach ($object->logs as $logs_CP) +while ($i < min($num, $limit)) { - $user_action = new User($db); - $user_action->fetch($logs_CP['fk_user_action']); + //TODO: $obj = $db->fetch_object($resql); + $obj = next($object->logs); - $user_update = new User($db); - $user_update->fetch($logs_CP['fk_user_update']); + $holidaylogstatic->id = $obj['rowid']; + $holidaylogstatic->date = $obj['date_action']; + $holidaylogstatic->validator = $obj['fk_user_action']; + $holidaylogstatic->employee = $obj['fk_user_update']; + $holidaylogstatic->description = $obj['type_action']; + $holidaylogstatic->type = $obj['fk_type']; + $holidaylogstatic->balance_previous = $obj['prev_solde']; + $holidaylogstatic->balance_new = $obj['new_solde']; - $delta = price2num($logs_CP['new_solde'] - $logs_CP['prev_solde'], 5); - $detasign = ($delta > 0 ? '+' : ''); + print ''; - print ''; - if (!empty($arrayfields['cpl.rowid']['checked'])) print ''; - if (!empty($arrayfields['cpl.date_action']['checked'])) print ''; - if (!empty($arrayfields['cpl.fk_user_action']['checked'])) print ''; - if (!empty($arrayfields['cpl.fk_user_update']['checked'])) print ''; - if (!empty($arrayfields['cpl.type_action']['checked'])) print ''; - if (!empty($arrayfields['cpl.fk_type']['checked'])) - { - print ''; - } + // Id + if (!empty($arrayfields['cpl.rowid']['checked'])) { + print ''; + } - if (!empty($arrayfields['cpl.prev_solde']['checked'])) print ''; - if (!empty($arrayfields['variation']['checked'])) print ''; - if (!empty($arrayfields['cpl.new_solde']['checked'])) print ''; - print ''; - print ''."\n"; + // Date + if (!empty($arrayfields['cpl.date_action']['checked'])) { + print ''; + } + + // Validator + if (!empty($arrayfields['cpl.fk_user_action']['checked'])) { + $user_action = new User($db); + $user_action->fetch($holidaylogstatic->validator); + print ''; + } + + // Emloyee + if (!empty($arrayfields['cpl.fk_user_update']['checked'])) { + $user_update = new User($db); + $user_update->fetch($holidaylogstatic->employee); + print ''; + } + + // Description + if (!empty($arrayfields['cpl.type_action']['checked'])) { + print ''; + } + + // Type + if (!empty($arrayfields['cpl.fk_type']['checked'])) { + if($alltypeleaves[$holidaylogstatic->type]['code'] && $langs->trans($alltypeleaves[$holidaylogstatic->type]['code']) != $alltypeleaves[$holidaylogstatic->type]['code']) { + $label = $langs->trans($alltypeleaves[$holidaylogstatic->type]['code']); + } else { + $label = $alltypeleaves[$holidaylogstatic->type]['label']; + } + + print ''; + } + + // Previous balance + if (!empty($arrayfields['cpl.prev_solde']['checked'])) { + print ''; + } + + // Variation + if (!empty($arrayfields['variation']['checked'])) { + $delta = price2num($holidaylogstatic->balance_new - $holidaylogstatic->balance_previous, 5); + $detasign = ($delta > 0 ? '+' : ''); + print ''; + } + + // New Balance + if (!empty($arrayfields['cpl.new_solde']['checked'])) { + print ''; + } + + // Buttons + print ''; + + print ''; + + $i++; } -if ($log_holiday == '2') -{ - print ''; - print ''; - print ''; +if ($log_holiday == '2') { + print ''; + print ''; + print ''; } -print ''."\n"; -print '
'; + print ''; + print $formother->selectyear($search_year, 'search_year', 1, 10, 5, 0, 0, '', 'maxwidth200', true); + print ''; + print $form->select_dolusers($search_validator, "search_validator", 1, "", 0, $valideurarray, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200'); + print ''; + print $form->select_dolusers($search_employee, "search_employee", 1, "", $disabled, $include, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200'); + print ''; + print ''; + print ''; + print $form->selectarray('search_type', $arraytypeleaves, $search_type, 1, 0, 0, '', 0, 0, 0, '', '', 1); + print ''; + print ''; + print ''; + print ''; + print '
'; $searchpicto = $form->showFilterButtons(); @@ -256,51 +347,102 @@ if (!empty($arrayfields['cpl.fk_type']['checked'])) print_liste_field_titre($arr if (!empty($arrayfields['cpl.prev_solde']['checked'])) print_liste_field_titre($arrayfields['cpl.prev_solde']['label'], $_SERVER["PHP_SELF"], 'prev_solde', '', '', '', $sortfield, $sortorder, 'right '); if (!empty($arrayfields['variation']['checked'])) print_liste_field_titre($arrayfields['variation']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'right '); if (!empty($arrayfields['cpl.new_solde']['checked'])) print_liste_field_titre($arrayfields['cpl.new_solde']['label'], $_SERVER["PHP_SELF"], 'new_solde', '', '', '', $sortfield, $sortorder, 'right '); -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print '
'.$logs_CP['rowid'].''.$logs_CP['date_action'].''.$user_action->getNomUrl(-1).''.$user_update->getNomUrl(-1).''.$logs_CP['type_action'].''; - $label = (($alltypeleaves[$logs_CP['fk_type']]['code'] && $langs->trans($alltypeleaves[$logs_CP['fk_type']]['code']) != $alltypeleaves[$logs_CP['fk_type']]['code']) ? $langs->trans($alltypeleaves[$logs_CP['fk_type']]['code']) : $alltypeleaves[$logs_CP['fk_type']]['label']); - print $label ? $label : $logs_CP['fk_type']; - print ''.$holidaylogstatic->id.''.price2num($logs_CP['prev_solde'], 5).' '.$langs->trans('days').''.$detasign.$delta.''.price2num($logs_CP['new_solde'], 5).' '.$langs->trans('days').'
'.$holidaylogstatic->date.''.$user_action->getNomUrl(-1).''.$user_update->getNomUrl(-1).''.$holidaylogstatic->description.''; + print $label ? $label : $holidaylogstatic->type; + print ''.price2num($holidaylogstatic->balance_previous, 5).' '.$langs->trans('days').''.$detasign.$delta.''.price2num($holidaylogstatic->balance_new, 5).' '.$langs->trans('days').'
'.$langs->trans('NoRecordFound').'
'.$langs->trans('NoRecordFound').'
'."\n"; +print ''; print '
'; print '
'; From fe8d7f7f1b6a071e4628b328e73e5a2c81292421 Mon Sep 17 00:00:00 2001 From: quentin Date: Thu, 8 Oct 2020 10:32:16 +0200 Subject: [PATCH 14/65] missing public parameter --- htdocs/core/modules/export/export_excel2007new.modules.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/modules/export/export_excel2007new.modules.php b/htdocs/core/modules/export/export_excel2007new.modules.php index 0567e4b21f2..31b3fcfdd0b 100644 --- a/htdocs/core/modules/export/export_excel2007new.modules.php +++ b/htdocs/core/modules/export/export_excel2007new.modules.php @@ -60,6 +60,8 @@ class ExportExcel2007new extends ModeleExports public $worksheet; // Handle sheet + public $styleArray; + public $row; public $col; From f5b34370b6b2029eb1dc2b164e0726f0810679d5 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 8 Oct 2020 08:34:40 +0000 Subject: [PATCH 15/65] Fixing style errors. --- .../export/export_excel2007new.modules.php | 61 +++++++++++-------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/htdocs/core/modules/export/export_excel2007new.modules.php b/htdocs/core/modules/export/export_excel2007new.modules.php index 31b3fcfdd0b..6ba508192ab 100644 --- a/htdocs/core/modules/export/export_excel2007new.modules.php +++ b/htdocs/core/modules/export/export_excel2007new.modules.php @@ -448,18 +448,19 @@ class ExportExcel2007new extends ModeleExports * @param string $endCell * @return int 1 if success -1 if failed */ - public function setCellValue($val, $startCell, $endCell = '') { + public function setCellValue($val, $startCell, $endCell = '') + { try { $this->workbook->getActiveSheet()->setCellValue($startCell, $val); - if(! empty($endCell)) { + if (! empty($endCell)) { $cellRange = $startCell.':'.$endCell; $this->workbook->getActiveSheet()->mergeCells($startCell.':'.$endCell); } else $cellRange = $startCell; - if(! empty($this->styleArray)) $this->workbook->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styleArray); + if (! empty($this->styleArray)) $this->workbook->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styleArray); } - catch(Exception $e) { + catch (Exception $e) { $this->error = $e->getMessage(); return -1; } @@ -472,7 +473,8 @@ class ExportExcel2007new extends ModeleExports * @param string $thickness style \PhpOffice\PhpSpreadsheet\Style\Border * @param string $color color \PhpOffice\PhpSpreadsheet\Style\Color */ - public function setBorderStyle($thickness, $color) { + public function setBorderStyle($thickness, $color) + { $this->styleArray['borders'] = array( 'outline' => array( 'borderStyle' => $thickness, @@ -487,7 +489,8 @@ class ExportExcel2007new extends ModeleExports * @param bool $bold * @param string $color color \PhpOffice\PhpSpreadsheet\Style\Color */ - public function setFontStyle($bold, $color) { + public function setFontStyle($bold, $color) + { $this->styleArray['font'] = array( 'color' => array('argb' => $color), 'bold' => $bold @@ -499,14 +502,16 @@ class ExportExcel2007new extends ModeleExports * * @param string $horizontal PhpOffice\PhpSpreadsheet\Style\Alignment */ - public function setAlignmentStyle($horizontal) { + public function setAlignmentStyle($horizontal) + { $this->styleArray['alignment'] = array('horizontal' => $horizontal); } /** * Reset Style */ - public function resetStyle() { + public function resetStyle() + { $this->styleArray = array(); } @@ -518,19 +523,20 @@ class ExportExcel2007new extends ModeleExports * @param bool $boldTitle * @return int 1 if OK, -1 if KO */ - public function setBlock($startCell, $TDatas = array(), $boldTitle = false) { + public function setBlock($startCell, $TDatas = array(), $boldTitle = false) + { try { - if(! empty($TDatas)) { + if (! empty($TDatas)) { $startCell = $this->workbook->getActiveSheet()->getCell($startCell); $startColumn = Coordinate::columnIndexFromString($startCell->getColumn()); $startRow = $startCell->getRow(); - foreach($TDatas as $column => $TRows) { - if($boldTitle) $this->setFontStyle(true, $this->styleArray['font']['color']['argb']); + foreach ($TDatas as $column => $TRows) { + if ($boldTitle) $this->setFontStyle(true, $this->styleArray['font']['color']['argb']); $cell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $startRow); $this->setCellValue($column, $cell->getCoordinate()); $rowPos = $startRow; - if($boldTitle) $this->setFontStyle(false, $this->styleArray['font']['color']['argb']); - foreach($TRows as $row) { + if ($boldTitle) $this->setFontStyle(false, $this->styleArray['font']['color']['argb']); + foreach ($TRows as $row) { $rowPos++; $cell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $rowPos); $this->setCellValue($row, $cell->getCoordinate()); @@ -539,7 +545,7 @@ class ExportExcel2007new extends ModeleExports } } } - catch(Exception $e) { + catch (Exception $e) { $this->error = $e->getMessage(); return -1; } @@ -554,24 +560,25 @@ class ExportExcel2007new extends ModeleExports * @param bool $boldTitle * @return int 1 if OK, -1 if KO */ - public function setBlock2Columns($startCell, $TDatas = array(), $boldTitle = false) { + public function setBlock2Columns($startCell, $TDatas = array(), $boldTitle = false) + { try { - if(! empty($TDatas)) { + if (! empty($TDatas)) { $startCell = $this->workbook->getActiveSheet()->getCell($startCell); $startColumn = Coordinate::columnIndexFromString($startCell->getColumn()); $startRow = $startCell->getRow(); - foreach($TDatas as $title => $val) { + foreach ($TDatas as $title => $val) { $cell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $startRow); - if($boldTitle) $this->setFontStyle(true, $this->styleArray['font']['color']['argb']); + if ($boldTitle) $this->setFontStyle(true, $this->styleArray['font']['color']['argb']); $this->setCellValue($title, $cell->getCoordinate()); - if($boldTitle) $this->setFontStyle(false, $this->styleArray['font']['color']['argb']); + if ($boldTitle) $this->setFontStyle(false, $this->styleArray['font']['color']['argb']); $cell2 = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn + 1, $startRow); $this->setCellValue($val, $cell2->getCoordinate()); $startRow++; } } } - catch(Exception $e) { + catch (Exception $e) { $this->error = $e->getMessage(); return -1; } @@ -584,8 +591,9 @@ class ExportExcel2007new extends ModeleExports * @param string $firstColumn * @param string $lastColumn */ - public function enableAutosize($firstColumn, $lastColumn) { - foreach(range($firstColumn, $lastColumn) as $columnID) { + public function enableAutosize($firstColumn, $lastColumn) + { + foreach (range($firstColumn, $lastColumn) as $columnID) { $this->workbook->getActiveSheet()->getColumnDimension($columnID)->setAutoSize(true); } } @@ -599,11 +607,12 @@ class ExportExcel2007new extends ModeleExports * @param int $offset Starting offset * @return string Coordinate or -1 if KO */ - public function setMergeCellValueByLength($val, $startCell, $length, $offset = 0) { + public function setMergeCellValueByLength($val, $startCell, $length, $offset = 0) + { try { $startCell = $this->workbook->getActiveSheet()->getCell($startCell); $startColumn = Coordinate::columnIndexFromString($startCell->getColumn()); - if(! empty($offset)) $startColumn += $offset; + if (! empty($offset)) $startColumn += $offset; $startRow = $startCell->getRow(); $startCell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $startRow); @@ -614,7 +623,7 @@ class ExportExcel2007new extends ModeleExports $endCoordinate = $endCell->getCoordinate(); $this->workbook->getActiveSheet()->mergeCells($startCoordinate.':'.$endCoordinate); } - catch(Exception $e) { + catch (Exception $e) { $this->error = $e->getMessage(); return -1; } From f4c3d9d7bbc4e8f1161145583502d8e6c7bebf7b Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 8 Oct 2020 08:38:28 +0000 Subject: [PATCH 16/65] Fixing style errors. --- htdocs/holiday/view_log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index d1602de6ea1..862f8c33b70 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -400,7 +400,7 @@ while ($i < min($num, $limit)) // Type if (!empty($arrayfields['cpl.fk_type']['checked'])) { - if($alltypeleaves[$holidaylogstatic->type]['code'] && $langs->trans($alltypeleaves[$holidaylogstatic->type]['code']) != $alltypeleaves[$holidaylogstatic->type]['code']) { + if ($alltypeleaves[$holidaylogstatic->type]['code'] && $langs->trans($alltypeleaves[$holidaylogstatic->type]['code']) != $alltypeleaves[$holidaylogstatic->type]['code']) { $label = $langs->trans($alltypeleaves[$holidaylogstatic->type]['code']); } else { $label = $alltypeleaves[$holidaylogstatic->type]['label']; From 7591ec6cf69838924685602323a2d66eb89c3dad Mon Sep 17 00:00:00 2001 From: quentin Date: Thu, 8 Oct 2020 10:49:29 +0200 Subject: [PATCH 17/65] FIX style --- .../export/export_excel2007new.modules.php | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/export/export_excel2007new.modules.php b/htdocs/core/modules/export/export_excel2007new.modules.php index 31b3fcfdd0b..92b576ed57e 100644 --- a/htdocs/core/modules/export/export_excel2007new.modules.php +++ b/htdocs/core/modules/export/export_excel2007new.modules.php @@ -444,8 +444,8 @@ class ExportExcel2007new extends ModeleExports * Set cell value and automatically merge if we give an endcell * * @param string $val cell value - * @param string $startCell - * @param string $endCell + * @param string $startCell starting cell + * @param string $endCell ending cell * @return int 1 if success -1 if failed */ public function setCellValue($val, $startCell, $endCell = '') { @@ -471,6 +471,7 @@ class ExportExcel2007new extends ModeleExports * * @param string $thickness style \PhpOffice\PhpSpreadsheet\Style\Border * @param string $color color \PhpOffice\PhpSpreadsheet\Style\Color + * @return int 1 if ok */ public function setBorderStyle($thickness, $color) { $this->styleArray['borders'] = array( @@ -479,43 +480,50 @@ class ExportExcel2007new extends ModeleExports 'color' => array('argb' => $color) ) ); + return 1; } /** * Set font style * - * @param bool $bold + * @param bool $bold true if bold * @param string $color color \PhpOffice\PhpSpreadsheet\Style\Color + * @return int 1 */ public function setFontStyle($bold, $color) { $this->styleArray['font'] = array( 'color' => array('argb' => $color), 'bold' => $bold ); + return 1; } /** * Set alignment style (horizontal, left, right, ...) * * @param string $horizontal PhpOffice\PhpSpreadsheet\Style\Alignment + * @return int 1 */ public function setAlignmentStyle($horizontal) { $this->styleArray['alignment'] = array('horizontal' => $horizontal); + return 1; } /** * Reset Style + * @return int 1 */ public function resetStyle() { $this->styleArray = array(); + return 1; } /** * Make a NxN Block in sheet * - * @param string $startCell + * @param string $startCell starting cell * @param array $TDatas array(ColumnName=>array(Row value 1, row value 2, etc ...)) - * @param bool $boldTitle + * @param bool $boldTitle true if bold headers * @return int 1 if OK, -1 if KO */ public function setBlock($startCell, $TDatas = array(), $boldTitle = false) { @@ -551,7 +559,7 @@ class ExportExcel2007new extends ModeleExports * * @param string $startCell A1 * @param array $TDatas array(Title=>val) - * @param bool $boldTitle + * @param bool $boldTitle true if bold titles * @return int 1 if OK, -1 if KO */ public function setBlock2Columns($startCell, $TDatas = array(), $boldTitle = false) { @@ -581,13 +589,15 @@ class ExportExcel2007new extends ModeleExports /** * Enable auto sizing for column range * - * @param string $firstColumn - * @param string $lastColumn + * @param string $firstColumn first column to autosize + * @param string $lastColumn to last column to autosize + * @return int 1 */ public function enableAutosize($firstColumn, $lastColumn) { foreach(range($firstColumn, $lastColumn) as $columnID) { $this->workbook->getActiveSheet()->getColumnDimension($columnID)->setAutoSize(true); } + return 1; } /** From 3cd953bc41f5b4e923872219ed0b278cb794a8d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 11:40:05 +0200 Subject: [PATCH 18/65] Fix colspan --- htdocs/compta/index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 3b40addde9d..0591d75d5a3 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -1040,8 +1040,10 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) } if ($othernb) { + $colspan = 6; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; - print ''; + print ''; print ''.$langs->trans("More").'... ('.$othernb.')'; print ''; print "\n"; @@ -1174,8 +1176,10 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU } if ($othernb) { + $colspan = 6; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; - print ''; + print ''; print ''.$langs->trans("More").'... ('.$othernb.')'; print ''; print "\n"; From aa84b76b6a09e78f859ee1fd8b59ab0107d4f3b2 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 8 Oct 2020 11:43:12 +0200 Subject: [PATCH 19/65] FIX Multicompany compatibility (missing entity value) --- htdocs/admin/agenda_xcal.php | 6 +++--- htdocs/public/agenda/agendaexport.php | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index 7df74ba6a9d..bc9eedb9177 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -160,13 +160,13 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai // Show message $message = ''; -$urlvcal = ''.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; +$urlvcal = ''.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.($conf->entity > 1 ? "&entity=".$conf->entity : "").'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; $message .= img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'vcal', $urlvcal); $message .= '
'; -$urlical = ''.$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; +$urlical = ''.$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.($conf->entity > 1 ? "&entity=".$conf->entity : "").'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; $message .= img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'ical/ics', $urlical); $message .= '
'; -$urlrss = ''.$urlwithroot.'/public/agenda/agendaexport.php?format=rss&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; +$urlrss = ''.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.($conf->entity > 1 ? "&entity=".$conf->entity : "").'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; $message .= img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'rss', $urlrss); $message .= '
'; $message .= '
'; diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index a7eef6c2ede..8b671e8930e 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -58,6 +58,11 @@ function llxFooterVierge() print ''; } +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_numeric($entity)) define("DOLENTITY", $entity); + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; From 24d35ff9b50e673f1a7909add48d9262d3b1a0a9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 11:52:58 +0200 Subject: [PATCH 20/65] CSS --- htdocs/core/lib/functions.lib.php | 9 +++++---- htdocs/exports/export.php | 2 +- htdocs/imports/import.php | 2 +- htdocs/theme/eldy/main_menu_fa_icons.inc.php | 3 +++ htdocs/theme/md/main_menu_fa_icons.inc.php | 4 +++- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 9af7584288b..512d88ad9fa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3133,7 +3133,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', 'holiday', 'intervention', 'label', 'language', 'list', 'listlight', 'lot', - 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', + 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'next', 'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom', 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', @@ -3147,7 +3147,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website', 'off', 'on', 'order', - 'paiment', 'play', 'playdisabled', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip', + 'paiment', 'play', 'playdisabled', 'previous', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip', 'setup', 'share-alt', 'sign-out', 'split', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', 'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies', @@ -3181,7 +3181,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'email'=>'at', 'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle', 'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group', - 'member'=>'users', 'mrp'=>'cubes', 'trip'=>'wallet', 'group'=>'users', + 'member'=>'users', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right', + 'trip'=>'wallet', 'group'=>'users', 'sign-out'=>'sign-out-alt', 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star', 'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter', @@ -3192,7 +3193,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'playdisabled'=>'play', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature', 'recruitmentjobposition'=>'id-card-alt', 'recruitmentcandidature'=>'id-badge', 'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature', - 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', + 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'previous'=>'arrow-alt-circle-left', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', 'refresh'=>'redo', 'resource'=>'laptop-house', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 70e04d46cbb..d7075d86e1b 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -459,7 +459,7 @@ if ($step == 1 || !$datatoexport) print ''; if ($objexport->array_export_perms[$key]) { - print ''.img_picto($langs->trans("NewExport"), 'filenew').''; + print ''.img_picto($langs->trans("NewExport"), 'next', 'class="fa-15x"').''; } else { print $langs->trans("NotEnoughPermissions"); } diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 71fad9dee9b..e27b3543f8b 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -361,7 +361,7 @@ if ($step == 1 || !$datatoimport) print ''; if ($objimport->array_import_perms[$key]) { - print ''.img_picto($langs->trans("NewImport"), 'filenew').''; + print ''.img_picto($langs->trans("NewImport"), 'next', 'class="fa-15x"').''; } else { print $langs->trans("NotEnoughPermissions"); } diff --git a/htdocs/theme/eldy/main_menu_fa_icons.inc.php b/htdocs/theme/eldy/main_menu_fa_icons.inc.php index e89fdeec39f..fbccc810fe7 100644 --- a/htdocs/theme/eldy/main_menu_fa_icons.inc.php +++ b/htdocs/theme/eldy/main_menu_fa_icons.inc.php @@ -16,6 +16,9 @@ color: #; } +.fa-15x { + font-size: 1.5em; +} div.mainmenu.menu { background-image: none; diff --git a/htdocs/theme/md/main_menu_fa_icons.inc.php b/htdocs/theme/md/main_menu_fa_icons.inc.php index 2bca6430d0b..3aa45726975 100644 --- a/htdocs/theme/md/main_menu_fa_icons.inc.php +++ b/htdocs/theme/md/main_menu_fa_icons.inc.php @@ -16,7 +16,9 @@ color: #; } - +.fa-15x { + font-size: 1.5em; +} div.mainmenu.ticket::before { content: "\f3ff"; From b8681c0b4167a503a56dedf63070837b99fb2dfd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 11:59:33 +0200 Subject: [PATCH 21/65] css --- htdocs/imports/import.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index e27b3543f8b..6c93d96619f 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -424,7 +424,7 @@ if ($step == 2 && $datatoimport) print ''; print ''; - print ''.$langs->trans("ChooseFormatOfFileToImport", img_picto('', 'filenew')).'

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

'; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; @@ -445,7 +445,7 @@ if ($step == 2 && $datatoimport) print ''; // Action button print ''; print ''; } @@ -549,7 +549,7 @@ if ($step == 3 && $datatoimport) print ''; print ''; - print ''.$langs->trans("ChooseFileToImport", img_picto('', 'filenew')).'

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

'; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print '
'.$langs->trans("DownloadEmptyExample").''; - print ''.img_picto($langs->trans("SelectFormat"), 'filenew').''; + print ''.img_picto($langs->trans("SelectFormat"), 'next', 'class="fa-15x"').''; print '
'; @@ -643,7 +643,7 @@ if ($step == 3 && $datatoimport) print '">'.img_delete().''; // Action button print ''; print ''; } From 111f73bd863c7120a9c13a8fc9ae227a02079cb0 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 8 Oct 2020 12:29:01 +0200 Subject: [PATCH 22/65] FIX add default value of timestamp for avoid error --- dev/tools/dolibarr-postgres2mysql.php | 4 +-- .../install/mysql/migration/10.0.0-11.0.0.sql | 22 ++++++------- .../install/mysql/migration/11.0.0-12.0.0.sql | 8 ++--- .../install/mysql/migration/12.0.0-13.0.0.sql | 18 +++++------ .../install/mysql/migration/3.0.0-3.1.0.sql | 8 ++--- .../install/mysql/migration/3.1.0-3.2.0.sql | 4 +-- .../install/mysql/migration/3.2.0-3.3.0.sql | 10 +++--- .../install/mysql/migration/3.3.0-3.4.0.sql | 28 ++++++++-------- .../install/mysql/migration/3.4.0-3.5.0.sql | 12 +++---- .../install/mysql/migration/3.5.0-3.6.0.sql | 14 ++++---- .../install/mysql/migration/3.6.0-3.7.0.sql | 10 +++--- .../install/mysql/migration/3.7.0-3.8.0.sql | 32 +++++++++---------- .../install/mysql/migration/3.8.0-3.9.0.sql | 22 ++++++------- .../install/mysql/migration/3.9.0-4.0.0.sql | 8 ++--- .../install/mysql/migration/4.0.0-5.0.0.sql | 12 +++---- .../install/mysql/migration/5.0.0-6.0.0.sql | 30 ++++++++--------- .../install/mysql/migration/6.0.0-7.0.0.sql | 20 ++++++------ .../install/mysql/migration/7.0.0-8.0.0.sql | 18 +++++------ .../install/mysql/migration/8.0.0-9.0.0.sql | 8 ++--- .../install/mysql/migration/9.0.0-10.0.0.sql | 12 +++---- .../mysql/tables/llx_accounting_account.sql | 2 +- .../tables/llx_accounting_bookkeeping.sql | 2 +- .../tables/llx_accounting_bookkeeping_tmp.sql | 2 +- .../tables/llx_accounting_fiscalyear.sql | 2 +- .../install/mysql/tables/llx_actioncomm.sql | 2 +- .../tables/llx_actioncomm_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_adherent.sql | 2 +- .../mysql/tables/llx_adherent_extrafields.sql | 2 +- .../mysql/tables/llx_adherent_type.sql | 2 +- .../tables/llx_adherent_type_extrafields.sql | 2 +- .../mysql/tables/llx_advtargetemailing.sql | 2 +- htdocs/install/mysql/tables/llx_asset.sql | 2 +- .../mysql/tables/llx_asset_extrafields.sql | 2 +- .../install/mysql/tables/llx_asset_type.sql | 2 +- .../tables/llx_asset_type_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_bank.sql | 2 +- .../install/mysql/tables/llx_bank_account.sql | 2 +- .../tables/llx_bank_account_extrafields.sql | 2 +- .../install/mysql/tables/llx_blockedlog.sql | 2 +- .../mysql/tables/llx_blockedlog_authority.sql | 2 +- htdocs/install/mysql/tables/llx_bom_bom.sql | 2 +- .../mysql/tables/llx_bom_bom_extrafields.sql | 2 +- .../tables/llx_bom_bomline_extrafields.sql | 2 +- .../mysql/tables/llx_bordereau_cheque.sql | 2 +- htdocs/install/mysql/tables/llx_boxes_def.sql | 2 +- htdocs/install/mysql/tables/llx_budget.sql | 2 +- .../install/mysql/tables/llx_budget_lines.sql | 2 +- .../tables/llx_c_email_senderprofile.sql | 2 +- .../mysql/tables/llx_c_email_templates.sql | 2 +- .../install/mysql/tables/llx_c_field_list.sql | 2 +- .../mysql/tables/llx_c_shipment_mode.sql | 2 +- htdocs/install/mysql/tables/llx_categorie.sql | 2 +- .../tables/llx_categories_extrafields.sql | 2 +- .../mysql/tables/llx_chargesociales.sql | 2 +- htdocs/install/mysql/tables/llx_commande.sql | 2 +- .../mysql/tables/llx_commande_extrafields.sql | 2 +- .../mysql/tables/llx_commande_fournisseur.sql | 2 +- .../llx_commande_fournisseur_dispatch.sql | 2 +- ...mande_fournisseur_dispatch_extrafields.sql | 2 +- .../llx_commande_fournisseur_extrafields.sql | 2 +- .../tables/llx_commande_fournisseur_log.sql | 2 +- ...lx_commande_fournisseurdet_extrafields.sql | 2 +- .../tables/llx_commandedet_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_comment.sql | 2 +- htdocs/install/mysql/tables/llx_const.sql | 2 +- htdocs/install/mysql/tables/llx_contrat.sql | 2 +- .../mysql/tables/llx_contrat_extrafields.sql | 2 +- .../install/mysql/tables/llx_contratdet.sql | 2 +- .../tables/llx_contratdet_extrafields.sql | 2 +- .../mysql/tables/llx_contratdet_log.sql | 2 +- htdocs/install/mysql/tables/llx_cronjob.sql | 2 +- .../install/mysql/tables/llx_deplacement.sql | 2 +- htdocs/install/mysql/tables/llx_don.sql | 2 +- .../mysql/tables/llx_don_extrafields.sql | 2 +- .../mysql/tables/llx_ecm_directories.sql | 2 +- .../llx_ecm_directories_extrafileds.sql | 2 +- htdocs/install/mysql/tables/llx_ecm_files.sql | 2 +- .../tables/llx_ecm_files_extrafields.sql | 2 +- .../mysql/tables/llx_element_resources.sql | 2 +- .../llx_emailcollector_emailcollector.sql | 2 +- ...lx_emailcollector_emailcollectoraction.sql | 2 +- ...lx_emailcollector_emailcollectorfilter.sql | 2 +- htdocs/install/mysql/tables/llx_entrepot.sql | 2 +- .../mysql/tables/llx_entrepot_extrafields.sql | 2 +- .../mysql/tables/llx_establishment.sql | 2 +- htdocs/install/mysql/tables/llx_events.sql | 2 +- .../install/mysql/tables/llx_expedition.sql | 2 +- .../tables/llx_expedition_extrafields.sql | 2 +- .../tables/llx_expeditiondet_extrafields.sql | 2 +- .../mysql/tables/llx_expensereport.sql | 2 +- .../tables/llx_expensereport_extrafields.sql | 2 +- .../mysql/tables/llx_expensereport_ik.sql | 2 +- .../mysql/tables/llx_expensereport_rules.sql | 2 +- .../install/mysql/tables/llx_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_facture.sql | 2 +- .../mysql/tables/llx_facture_extrafields.sql | 2 +- .../mysql/tables/llx_facture_fourn.sql | 2 +- .../llx_facture_fourn_det_extrafields.sql | 2 +- .../tables/llx_facture_fourn_extrafields.sql | 2 +- .../install/mysql/tables/llx_facture_rec.sql | 2 +- .../tables/llx_facture_rec_extrafields.sql | 2 +- .../tables/llx_facturedet_extrafields.sql | 2 +- .../tables/llx_facturedet_rec_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_fichinter.sql | 2 +- .../tables/llx_fichinter_extrafields.sql | 2 +- .../tables/llx_fichinterdet_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_holiday.sql | 2 +- .../mysql/tables/llx_holiday_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_inventory.sql | 2 +- .../install/mysql/tables/llx_inventorydet.sql | 2 +- htdocs/install/mysql/tables/llx_livraison.sql | 2 +- .../tables/llx_livraison_extrafields.sql | 2 +- .../tables/llx_livraisondet_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_loan.sql | 2 +- .../mysql/tables/llx_loan_schedule.sql | 2 +- htdocs/install/mysql/tables/llx_localtax.sql | 2 +- htdocs/install/mysql/tables/llx_mailing.sql | 2 +- .../mysql/tables/llx_mailing_cibles.sql | 2 +- .../mysql/tables/llx_mailing_unsubscribe.sql | 2 +- htdocs/install/mysql/tables/llx_menu.sql | 2 +- htdocs/install/mysql/tables/llx_mrp_mo.sql | 2 +- .../mysql/tables/llx_mrp_mo_extrafields.sql | 2 +- .../mysql/tables/llx_mrp_production.sql | 2 +- htdocs/install/mysql/tables/llx_notify.sql | 2 +- .../install/mysql/tables/llx_notify_def.sql | 2 +- .../mysql/tables/llx_online_signatures.sql | 2 +- .../mysql/tables/llx_opensurvey_comments.sql | 2 +- .../tables/llx_opensurvey_user_studs.sql | 2 +- htdocs/install/mysql/tables/llx_paiement.sql | 2 +- .../mysql/tables/llx_paiementcharge.sql | 2 +- .../mysql/tables/llx_paiementfourn.sql | 2 +- .../mysql/tables/llx_payment_donation.sql | 2 +- .../tables/llx_payment_expensereport.sql | 2 +- .../install/mysql/tables/llx_payment_loan.sql | 2 +- .../mysql/tables/llx_payment_salary.sql | 2 +- .../tables/llx_payment_salary_extrafields.sql | 2 +- .../mysql/tables/llx_payment_various.sql | 2 +- htdocs/install/mysql/tables/llx_printing.sql | 2 +- htdocs/install/mysql/tables/llx_product.sql | 2 +- .../mysql/tables/llx_product_batch.sql | 2 +- .../tables/llx_product_customer_price.sql | 2 +- .../mysql/tables/llx_product_extrafields.sql | 2 +- .../tables/llx_product_fournisseur_price.sql | 2 +- ..._product_fournisseur_price_extrafields.sql | 2 +- .../install/mysql/tables/llx_product_lot.sql | 2 +- .../tables/llx_product_lot_extrafields.sql | 2 +- .../mysql/tables/llx_product_price.sql | 2 +- .../mysql/tables/llx_product_price_by_qty.sql | 2 +- .../mysql/tables/llx_product_stock.sql | 2 +- .../tables/llx_product_stock_entrepot.sql | 2 +- htdocs/install/mysql/tables/llx_projet.sql | 2 +- .../mysql/tables/llx_projet_extrafields.sql | 2 +- .../install/mysql/tables/llx_projet_task.sql | 2 +- .../tables/llx_projet_task_extrafields.sql | 2 +- .../mysql/tables/llx_projet_task_time.sql | 2 +- htdocs/install/mysql/tables/llx_propal.sql | 2 +- .../mysql/tables/llx_propal_extrafields.sql | 2 +- .../tables/llx_propal_merge_pdf_product.sql | 2 +- .../tables/llx_propaldet_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_reception.sql | 2 +- .../tables/llx_reception_extrafields.sql | 2 +- ...llx_recruitment_recruitmentcandidature.sql | 2 +- ...ent_recruitmentcandidature_extrafields.sql | 2 +- ...llx_recruitment_recruitmentjobposition.sql | 2 +- ...ent_recruitmentjobposition_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_resource.sql | 2 +- .../mysql/tables/llx_resource_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_societe.sql | 2 +- .../mysql/tables/llx_societe_account.sql | 2 +- .../mysql/tables/llx_societe_address.sql | 2 +- .../mysql/tables/llx_societe_extrafields.sql | 2 +- .../mysql/tables/llx_societe_prices.sql | 2 +- .../mysql/tables/llx_societe_remise.sql | 2 +- .../tables/llx_societe_remise_supplier.sql | 2 +- .../install/mysql/tables/llx_societe_rib.sql | 2 +- htdocs/install/mysql/tables/llx_socpeople.sql | 2 +- .../tables/llx_socpeople_extrafields.sql | 2 +- .../mysql/tables/llx_stock_mouvement.sql | 2 +- .../install/mysql/tables/llx_subscription.sql | 2 +- .../mysql/tables/llx_supplier_proposal.sql | 2 +- .../llx_supplier_proposal_extrafields.sql | 2 +- .../llx_supplier_proposaldet_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_ticket.sql | 2 +- .../mysql/tables/llx_ticket_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_tva.sql | 2 +- htdocs/install/mysql/tables/llx_user.sql | 2 +- .../mysql/tables/llx_user_employment.sql | 2 +- .../mysql/tables/llx_user_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_user_rib.sql | 2 +- htdocs/install/mysql/tables/llx_usergroup.sql | 2 +- .../tables/llx_usergroup_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_website.sql | 2 +- .../mysql/tables/llx_website_extrafields.sql | 2 +- .../install/mysql/tables/llx_website_page.sql | 2 +- .../install/mysql/tables/llx_zapier_hook.sql | 2 +- .../tables/llx_zapier_hook_extrafields.sql | 2 +- 196 files changed, 326 insertions(+), 326 deletions(-) diff --git a/dev/tools/dolibarr-postgres2mysql.php b/dev/tools/dolibarr-postgres2mysql.php index c17a73dfe12..fd30540c019 100644 --- a/dev/tools/dolibarr-postgres2mysql.php +++ b/dev/tools/dolibarr-postgres2mysql.php @@ -357,8 +357,8 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) $line = str_replace(" time with time zone", " time", $line); $line = str_replace(" time without time zone", " time", $line); - $line = str_replace(" timestamp DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP", $line); - $line = str_replace(" timestamp without time zone DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP", $line); + $line = str_replace(" timestamp DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", $line); + $line = str_replace(" timestamp without time zone DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", $line); if (strstr($line, "auto_increment") || preg_match('/ rowid int/', $line) || preg_match('/ id int/', $line)) { $field = getfieldname($line); diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index b66d205ef40..9bb097d10b2 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -119,7 +119,7 @@ ALTER TABLE llx_categorie_warehouse ADD CONSTRAINT fk_categorie_warehouse_fk_war create table llx_holiday_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -135,7 +135,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value create table llx_entrepot_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -165,7 +165,7 @@ ALTER TABLE llx_events ADD COLUMN prefix_session varchar(255) NULL; create table llx_payment_salary_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- salary payment id import_key varchar(14) -- import key )ENGINE=innodb; @@ -183,8 +183,8 @@ ALTER TABLE llx_oauth_token ADD COLUMN fk_soc integer DEFAULT NULL after token; ALTER TABLE llx_adherent_type ADD COLUMN duration varchar(6) DEFAULT NULL after morphy; -ALTER TABLE llx_mailing ADD COLUMN tms timestamp; -ALTER TABLE llx_mailing_cibles ADD COLUMN tms timestamp; +ALTER TABLE llx_mailing ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; +ALTER TABLE llx_mailing_cibles ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_projet ADD COLUMN usage_opportunity integer DEFAULT 0; ALTER TABLE llx_projet ADD COLUMN usage_task integer DEFAULT 1; @@ -458,7 +458,7 @@ create table llx_c_shipment_package_type CREATE TABLE llx_product_fournisseur_price_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -478,7 +478,7 @@ CREATE TABLE llx_mrp_mo( note_private text, date_creation datetime NOT NULL, date_valid datetime NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, fk_user_valid integer, @@ -514,7 +514,7 @@ ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_project (fk_project); create table llx_mrp_mo_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -551,7 +551,7 @@ CREATE TABLE llx_mrp_production( fk_mrp_production integer, -- if role = 'consumed', id of line with role 'toconsume', if role = 'produced' id of line with role 'toproduce' fk_stock_movement integer, -- id of stock movement when movements are validated date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14) @@ -576,7 +576,7 @@ ALTER TABLE llx_facture_rec MODIFY COLUMN fk_cond_reglement integer NOT NULL DEF create table llx_commande_fournisseur_dispatch_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -587,7 +587,7 @@ ALTER TABLE llx_commande_fournisseur_dispatch_extrafields ADD INDEX idx_commande create table llx_facturedet_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 994e5d89495..488548ae8b1 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -36,7 +36,7 @@ UPDATE llx_c_units set scale = 86400 where code = 'D' and unit_type = 'time'; create table llx_commande_fournisseur_dispatch_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -57,7 +57,7 @@ create table llx_c_shipment_package_type create table llx_facturedet_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -69,7 +69,7 @@ ALTER TABLE llx_facture_rec MODIFY COLUMN titre varchar(200) NOT NULL; create table llx_mrp_mo_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -303,7 +303,7 @@ ALTER TABLE llx_categorie_website_page ADD CONSTRAINT fk_categorie_website_page_ ALTER TABLE llx_categorie_website_page ADD CONSTRAINT fk_categorie_website_page_website_page_rowid FOREIGN KEY (fk_website_page) REFERENCES llx_website_page (rowid); ALTER TABLE llx_categorie ADD COLUMN date_creation datetime; -ALTER TABLE llx_categorie ADD COLUMN tms timestamp; +ALTER TABLE llx_categorie ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_categorie ADD COLUMN fk_user_creat integer; ALTER TABLE llx_categorie ADD COLUMN fk_user_modif integer; diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 735ef515dcd..6a34b69d1a2 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -47,7 +47,7 @@ ALTER TABLE llx_bom_bom_extrafields ADD INDEX idx_bom_bom_extrafields_fk_object create table llx_mrp_mo_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -124,7 +124,7 @@ CREATE TABLE llx_recruitment_recruitmentjobposition( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, last_main_doc varchar(255), @@ -150,7 +150,7 @@ ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN remuneration_sugge create table llx_recruitment_recruitmentjobposition_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -169,7 +169,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -200,7 +200,7 @@ ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_rec create table llx_recruitment_recruitmentcandidature_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -290,8 +290,8 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact adress card','contact',51); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52); -ALTER TABLE llx_ecm_directories CHANGE COLUMN date_m tms timestamp; -ALTER TABLE llx_ecm_files CHANGE COLUMN date_m tms timestamp; +ALTER TABLE llx_ecm_directories CHANGE COLUMN date_m tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; +ALTER TABLE llx_ecm_files CHANGE COLUMN date_m tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,

\n\n__(YourCandidatureAnswer)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); @@ -337,7 +337,7 @@ ALTER TABLE llx_menu MODIFY COLUMN enabled text; CREATE TABLE llx_ecm_files_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -347,7 +347,7 @@ ALTER TABLE llx_ecm_files_extrafields ADD INDEX idx_ecm_files_extrafields (fk_ob CREATE TABLE llx_ecm_directories_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql index a4ab666299d..4104d74da51 100644 --- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql +++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql @@ -419,19 +419,19 @@ update llx_actioncomm set elementtype='order' where elementtype='commande'; update llx_actioncomm set elementtype='contract' where elementtype='contrat'; -alter table llx_propal add column tms timestamp after fk_projet; +alter table llx_propal add column tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP after fk_projet; create table llx_product_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL ) ENGINE=innodb; create table llx_societe_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL ) ENGINE=innodb; @@ -487,7 +487,7 @@ ALTER TABLE llx_don ADD phone varchar(24) after email; ALTER TABLE llx_element_element MODIFY sourcetype varchar(32) NOT NULL; ALTER TABLE llx_element_element MODIFY targettype varchar(32) NOT NULL; -ALTER TABLE llx_societe_prices MODIFY tms timestamp NULL; +ALTER TABLE llx_societe_prices MODIFY tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -- ALTER TABLE llx_societe_prices ALTER COLUMN tms DROP NOT NULL; -- Fix: It seems this is missing for some users diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index 044b1652029..c7356cc18ff 100644 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -62,7 +62,7 @@ ALTER TABLE llx_societe MODIFY code_compta varchar(24); ALTER TABLE llx_societe MODIFY code_compta_fournisseur varchar(24); -ALTER TABLE llx_chargesociales ADD COLUMN tms timestamp; +ALTER TABLE llx_chargesociales ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_chargesociales ADD COLUMN date_creation datetime; ALTER TABLE llx_chargesociales ADD COLUMN date_valid datetime; @@ -118,7 +118,7 @@ CREATE TABLE llx_localtax ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer NOT NULL DEFAULT '1', - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep date DEFAULT NULL, datev date DEFAULT NULL, amount double NOT NULL DEFAULT '0', diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index c0efe6d68b3..07b390f32c4 100644 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -39,7 +39,7 @@ ALTER TABLE llx_societe DROP COLUMN description; ALTER TABLE llx_societe DROP COLUMN services; ALTER TABLE llx_societe MODIFY COLUMN ref_ext varchar(128); -ALTER TABLE llx_bank ADD COLUMN tms timestamp after datec; +ALTER TABLE llx_bank ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP after datec; -- Monaco VAT Rates insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 271, 27,'19.6','0','VAT standard rate (France hors DOM-TOM)',1); @@ -267,7 +267,7 @@ ALTER TABLE llx_extrafields ADD COLUMN fieldrequired INTEGER DEFAULT 0; create table llx_socpeople_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -276,7 +276,7 @@ ALTER TABLE llx_socpeople_extrafields ADD INDEX idx_socpeople_extrafields (fk_ob create table llx_actioncomm_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -835,7 +835,7 @@ CREATE TABLE llx_product_price_by_qty ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_product_price integer NOT NULL, - date_price timestamp, + date_price timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, price double (24,8) DEFAULT 0, price_ttc double (24,8) DEFAULT 0, qty_min real DEFAULT 0 @@ -910,7 +910,7 @@ ALTER TABLE llx_bank_account MODIFY COLUMN code_banque varchar(8); create table llx_user_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- member id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 88d9ae1b685..edc2c931ee1 100644 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -23,7 +23,7 @@ ALTER TABLE llx_menu MODIFY COLUMN leftmenu varchar(100); create table llx_adherent_type_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -115,7 +115,7 @@ ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(255) NOT NULL DEFAUL -- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; -- VPGSQL8.2 DROP table llx_c_shipment_mode; --- VPGSQL8.2 CREATE TABLE llx_c_shipment_mode (rowid SERIAL PRIMARY KEY, tms timestamp, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, tracking varchar(255) NOT NULL, active integer DEFAULT 0, module varchar(32) NULL); +-- VPGSQL8.2 CREATE TABLE llx_c_shipment_mode (rowid SERIAL PRIMARY KEY, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, tracking varchar(255) NOT NULL, active integer DEFAULT 0, module varchar(32) NULL); -- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (1,'CATCH','Catch','Catch by client','',1); -- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (2,'TRANS','Transporter','Generic transporter','',1); -- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','',0); @@ -136,7 +136,7 @@ ALTER TABLE llx_stock_mouvement MODIFY COLUMN value real; create table llx_propal_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -145,7 +145,7 @@ ALTER TABLE llx_propal_extrafields ADD INDEX idx_propal_extrafields (fk_object); create table llx_facture_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -205,7 +205,7 @@ ALTER TABLE llx_facturedet DROP COLUMN fk_export_compta; CREATE TABLE llx_cronjob ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, jobtype varchar(10) NOT NULL, label text NOT NULL, @@ -249,7 +249,7 @@ DROP TABLE llx_printer_ipp; CREATE TABLE llx_printer_ipp ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, printer_name text NOT NULL, printer_location text NOT NULL, @@ -265,7 +265,7 @@ ALTER TABLE llx_adherent MODIFY COLUMN ref_ext varchar(128); create table llx_commande_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -299,7 +299,7 @@ ALTER TABLE llx_socpeople CHANGE COLUMN note note_private text; create table llx_projet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -308,7 +308,7 @@ ALTER TABLE llx_projet_extrafields ADD INDEX idx_projet_extrafields (fk_object); create table llx_projet_task_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -319,7 +319,7 @@ CREATE TABLE llx_opensurvey_comments ( id_comment INTEGER unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, id_sondage CHAR(16) NOT NULL, comment text NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, usercomment text ) ENGINE=InnoDB; @@ -336,7 +336,7 @@ CREATE TABLE llx_opensurvey_sondage ( survey_link_visible integer DEFAULT 1, canedit integer DEFAULT 0, origin varchar(64), - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, sujet TEXT ) ENGINE=InnoDB; CREATE TABLE llx_opensurvey_user_studs ( @@ -344,7 +344,7 @@ CREATE TABLE llx_opensurvey_user_studs ( nom VARCHAR(64) NOT NULL, id_sondage VARCHAR(16) NOT NULL, reponses VARCHAR(100) NOT NULL, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB; ALTER TABLE llx_opensurvey_sondage ADD COLUMN id_sondage_admin CHAR(24); @@ -367,7 +367,7 @@ UPDATE llx_extrafields SET elementtype='societe' WHERE elementtype='company'; create table llx_commande_fournisseur_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -376,7 +376,7 @@ ALTER TABLE llx_commande_fournisseur_extrafields ADD INDEX idx_commande_fourniss create table llx_facture_fourn_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index c6dc0ff9bd7..af3ea13fa5c 100644 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -43,7 +43,7 @@ ALTER TABLE llx_socpeople ADD COLUMN statut tinyint DEFAULT 1 NOT NULL AFTER imp create table llx_fichinter_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -55,7 +55,7 @@ ALTER TABLE llx_product ADD COLUMN desiredstock integer DEFAULT 0; create table llx_commandedet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) )ENGINE=innodb; @@ -69,7 +69,7 @@ ALTER TABLE llx_facturedet_rec ADD COLUMN info_bits integer DEFAULT 0 after tota create table llx_facturedet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -79,7 +79,7 @@ ALTER TABLE llx_facturedet_extrafields ADD INDEX idx_facturedet_extrafields (fk_ create table llx_propaldet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -314,7 +314,7 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc -- Add ref_ext on bordereau_cheque ALTER TABLE llx_bordereau_cheque ADD ref_ext VARCHAR(255); -ALTER TABLE llx_bordereau_cheque ADD tms timestamp; +ALTER TABLE llx_bordereau_cheque ADD tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -- Task 1011 @@ -337,7 +337,7 @@ ALTER TABLE llx_contratdet ADD column product_type integer DEFAULT 1 after total create table llx_contrat_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 5727b946bcb..32ed4c32538 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -74,7 +74,7 @@ ALTER TABLE llx_bookmark MODIFY COLUMN url varchar(255) NOT NULL; -- VMYSQL4.3 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN date_fin DATETIME NULL DEFAULT NULL; -- VPGSQL8.2 ALTER TABLE llx_opensurvey_sondage ALTER COLUMN date_fin DROP NOT NULL; --- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP; +-- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_opensurvey_sondage ADD COLUMN entity integer DEFAULT 1 NOT NULL; @@ -108,7 +108,7 @@ create table llx_product_customer_price rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, fk_soc integer NOT NULL, price double(24,8) DEFAULT 0, @@ -164,7 +164,7 @@ ALTER TABLE llx_product ADD COLUMN tobatch tinyint DEFAULT 0 NOT NULL; CREATE TABLE llx_product_batch ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product_stock integer NOT NULL, eatby datetime DEFAULT NULL, sellby datetime DEFAULT NULL, @@ -187,7 +187,7 @@ CREATE TABLE llx_expeditiondet_batch ( --DROP TABLE llx_payment_salary CREATE TABLE llx_payment_salary ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user integer NOT NULL, datep date, datev date, @@ -229,7 +229,7 @@ ALTER TABLE llx_projet_task_time ADD thm double(24,8) AFTER fk_user; create table llx_categories_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -283,7 +283,7 @@ CREATE TABLE llx_resource fk_code_type_resource varchar(32), note_public text, note_private text, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; ALTER TABLE llx_resource ADD INDEX fk_code_type_resource_idx (fk_code_type_resource); @@ -298,7 +298,7 @@ CREATE TABLE llx_element_resources busy integer, mandatory integer, fk_user_create integer, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; ALTER TABLE llx_element_resources ADD UNIQUE INDEX idx_element_resources_idx1 (resource_id, resource_type, element_id, element_type); diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 6dc2521ca5d..640f22e4bee 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -137,7 +137,7 @@ DROP TABLE llx_compta_compte_generaux; -- Align size for accounting account ALTER TABLE llx_accountingaccount MODIFY COLUMN account_number varchar(32); ALTER TABLE llx_accountingaccount MODIFY COLUMN account_parent varchar(32); -ALTER TABLE llx_accountingaccount add column tms timestamp AFTER datec; +ALTER TABLE llx_accountingaccount add column tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER datec; ALTER TABLE llx_accountingdebcred MODIFY COLUMN account_number varchar(32); ALTER TABLE llx_bank_account MODIFY COLUMN account_number varchar(32); ALTER TABLE llx_c_chargesociales MODIFY COLUMN accountancy_code varchar(32); @@ -233,7 +233,7 @@ create table llx_accounting_fiscalyear statut tinyint DEFAULT 0 NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_author integer NULL, fk_user_modif integer NULL )ENGINE=innodb; @@ -1050,7 +1050,7 @@ create table llx_c_email_templates private smallint DEFAULT 0 NOT NULL, -- Template public or private fk_user integer, -- Id utilisateur si modele prive, sinon null datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(255), -- Label of predefined email position smallint, -- Position active tinyint DEFAULT 1 NOT NULL, @@ -1112,7 +1112,7 @@ ALTER TABLE llx_projet_task MODIFY COLUMN planned_workload real DEFAULT 0 NULL; CREATE TABLE llx_fichinterdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -1121,7 +1121,7 @@ ALTER TABLE llx_fichinterdet_extrafields ADD INDEX idx_ficheinterdet_extrafields CREATE TABLE llx_usergroup_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index ca677fc5224..00bf30f6672 100644 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -49,7 +49,7 @@ create table llx_loan rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(80) NOT NULL, fk_bank integer, capital real DEFAULT 0 NOT NULL, @@ -75,7 +75,7 @@ create table llx_payment_loan rowid integer AUTO_INCREMENT PRIMARY KEY, fk_loan integer, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, amount_capital real DEFAULT 0, amount_insurance real DEFAULT 0, @@ -145,7 +145,7 @@ ALTER TABLE llx_product ADD COLUMN lifo double(24,8) AFTER fifo; CREATE TABLE llx_printing ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, printer_name text NOT NULL, printer_location text NOT NULL, @@ -177,7 +177,7 @@ DELETE from llx_const where name = 'MAIN_USE_JQUERY_MULTISELECT' and value = '1' create table llx_bank_account_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -198,7 +198,7 @@ ALTER TABLE llx_bank_account_extrafields ADD INDEX idx_bank_account_extrafields create table llx_contratdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -210,7 +210,7 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN delivery_time_days integer; ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN comment varchar(255); ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN status integer; -ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN tms timestamp; +ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN batch varchar(30) DEFAULT NULL; ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN eatby date DEFAULT NULL; ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN sellby date DEFAULT NULL; @@ -240,7 +240,7 @@ CREATE TABLE llx_expensereport ( date_approve datetime, date_refuse datetime, date_cancel datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_author integer NOT NULL, fk_user_modif integer DEFAULT NULL, fk_user_valid integer DEFAULT NULL, @@ -297,7 +297,7 @@ create table llx_payment_expensereport rowid integer AUTO_INCREMENT PRIMARY KEY, fk_expensereport integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount real DEFAULT 0, fk_typepayment integer NOT NULL, @@ -316,7 +316,7 @@ ALTER TABLE llx_societe ADD COLUMN name_alias varchar(128) NULL; create table llx_commande_fournisseurdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -327,7 +327,7 @@ ALTER TABLE llx_commande_fournisseurdet_extrafields ADD INDEX idx_commande_fourn create table llx_facture_fourn_det_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -357,7 +357,7 @@ CREATE TABLE llx_askpricesupplier ( ref_int varchar(255) DEFAULT NULL, fk_soc integer DEFAULT NULL, fk_projet integer DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime DEFAULT NULL, date_valid datetime DEFAULT NULL, date_cloture datetime DEFAULT NULL, @@ -422,14 +422,14 @@ CREATE TABLE llx_askpricesupplierdet ( CREATE TABLE llx_askpricesupplier_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; CREATE TABLE llx_askpricesupplierdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; @@ -491,7 +491,7 @@ ALTER TABLE llx_don CHANGE COLUMN fk_project fk_projet integer NULL; create table llx_don_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -503,7 +503,7 @@ create table llx_payment_donation rowid integer AUTO_INCREMENT PRIMARY KEY, fk_donation integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount real DEFAULT 0, fk_typepayment integer NOT NULL, @@ -585,7 +585,7 @@ CREATE TABLE IF NOT EXISTS llx_propal_merge_pdf_product ( fk_user_author integer DEFAULT NULL, fk_user_mod integer NOT NULL, datec datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) DEFAULT NULL ) ENGINE=InnoDB; diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index f749e57b432..363288708d4 100644 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -146,7 +146,7 @@ CREATE TABLE llx_ecm_files cover text, -- is this file a file to use for a cover extraparams varchar(255), -- for stock other parameters with json format date_c datetime, - date_m timestamp, + date_m timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_c integer, fk_user_m integer, acl text -- for future permission 'per file' @@ -227,7 +227,7 @@ CREATE TABLE IF NOT EXISTS llx_establishment ( fk_user_author integer NOT NULL, fk_user_mod integer NOT NULL, datec datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, status smallint DEFAULT 1 ) ENGINE=InnoDB; @@ -236,7 +236,7 @@ CREATE TABLE IF NOT EXISTS llx_user_rib ( fk_user integer NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(30), bank varchar(255), -- bank name code_banque varchar(128), -- bank code @@ -263,7 +263,7 @@ create table llx_stock_lotserial eatby date DEFAULT NULL, -- Eatby date sellby date DEFAULT NULL, -- Sellby date datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer @@ -282,7 +282,7 @@ create table llx_budget date_start date, date_end date, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer @@ -296,7 +296,7 @@ create table llx_budget_lines fk_project_ids varchar(255) NOT NULL, -- List of project ids related to this budget. If budget is dedicated to projects not yet started, we recommand to create a project 'Projects to come'. amount double(24,8) NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer @@ -369,7 +369,7 @@ create table llx_categorie_project create table llx_expedition_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -379,7 +379,7 @@ ALTER TABLE llx_expedition_extrafields ADD INDEX idx_expedition_extrafields (fk_ create table llx_expeditiondet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -392,7 +392,7 @@ ALTER TABLE llx_expeditiondet_extrafields ADD INDEX idx_expeditiondet_extrafield create table llx_livraison_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -402,7 +402,7 @@ ALTER TABLE llx_livraison_extrafields ADD INDEX idx_livraison_extrafields (fk_ob create table llx_livraisondet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -595,7 +595,7 @@ insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN doc_ref varchar(300) NOT NULL; -ALTER TABLE llx_holiday ADD COLUMN tms timestamp; +ALTER TABLE llx_holiday ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_holiday ADD COLUMN entity integer DEFAULT 1 NOT NULL; ALTER TABLE llx_holiday ADD INDEX idx_holiday_entity (entity); diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 6ec4fc35f92..6bf230df12a 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -54,7 +54,7 @@ CREATE TABLE llx_product_lot ( eatby date DEFAULT NULL, -- Eatby date sellby date DEFAULT NULL, -- Sellby date datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer @@ -140,7 +140,7 @@ CREATE TABLE llx_website fk_default_home integer, date_creation datetime, date_modification datetime, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; ALTER TABLE llx_website ADD COLUMN fk_default_home integer; ALTER TABLE llx_website CHANGE COLUMN shortname ref varchar(24) NOT NULL; @@ -158,7 +158,7 @@ CREATE TABLE llx_website_page status integer, date_creation datetime, date_modification datetime, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; ALTER TABLE llx_website_page ADD UNIQUE INDEX uk_website_page_url (fk_website,pageurl); @@ -475,7 +475,7 @@ CREATE TABLE llx_advtargetemailing fk_user_author integer NOT NULL, datec datetime NOT NULL, fk_user_mod integer NOT NULL, - tms timestamp NOT NULL + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=InnoDB; ALTER TABLE llx_advtargetemailing ADD UNIQUE INDEX uk_advtargetemailing_name (name); diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql index 175e03ec179..7578c633be4 100644 --- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql +++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql @@ -114,7 +114,7 @@ ALTER TABLE llx_societe_remise ADD COLUMN entity integer DEFAULT 1 NOT NULL afte create table llx_expensereport_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -133,7 +133,7 @@ UPDATE llx_adherent_type SET subscription = '1' WHERE subscription = 'yes'; CREATE TABLE llx_product_lot_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -145,7 +145,7 @@ ALTER TABLE llx_website_page MODIFY COLUMN content MEDIUMTEXT; CREATE TABLE llx_product_warehouse_properties ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, fk_entrepot integer NOT NULL, seuil_stock_alerte integer DEFAULT 0, @@ -156,7 +156,7 @@ CREATE TABLE llx_product_warehouse_properties ALTER TABLE llx_accounting_bookkeeping ADD COLUMN entity integer DEFAULT 1 NOT NULL; ALTER TABLE llx_accounting_bookkeeping ADD COLUMN fk_user_modif integer; ALTER TABLE llx_accounting_bookkeeping ADD COLUMN date_creation datetime; -ALTER TABLE llx_accounting_bookkeeping ADD COLUMN tms timestamp; +ALTER TABLE llx_accounting_bookkeeping ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -- VMYSQL4.3 ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN numero_compte varchar(32) NOT NULL; -- VMYSQL4.3 ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN code_journal varchar(32) NOT NULL; -- VPGSQL8.2 ALTER TABLE llx_accounting_bookkeeping ALTER COLUMN numero_compte SET NOT NULL; @@ -186,7 +186,7 @@ ALTER TABLE llx_entrepot ADD COLUMN fk_parent integer DEFAULT 0; create table llx_resource_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -222,7 +222,7 @@ create table llx_user_employment ref_ext varchar(50), -- reference into an external system (not used by dolibarr) fk_user integer, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, job varchar(128), -- job position. may be a dictionary diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index b53b25f93b1..87eda0668b1 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -61,7 +61,7 @@ ALTER TABLE llx_supplier_proposaldet CHANGE COLUMN fk_askpricesupplier fk_suppli -- VMYSQL4.3 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN date_fin DATETIME NULL DEFAULT NULL; -- VPGSQL8.2 ALTER TABLE llx_opensurvey_sondage ALTER COLUMN date_fin DROP NOT NULL; --- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP; +-- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_opensurvey_sondage ADD COLUMN fk_user_creat integer NOT NULL DEFAULT 0; ALTER TABLE llx_opensurvey_sondage ADD COLUMN status integer DEFAULT 1 after date_fin; @@ -160,7 +160,7 @@ ALTER TABLE llx_projet ADD COLUMN fk_user_modif integer; ALTER TABLE llx_projet_task ADD COLUMN fk_user_modif integer; ALTER TABLE llx_projet_task_time ADD COLUMN datec date; -ALTER TABLE llx_projet_task_time ADD COLUMN tms timestamp; +ALTER TABLE llx_projet_task_time ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_product_price ADD COLUMN fk_multicurrency integer; ALTER TABLE llx_product_price ADD COLUMN multicurrency_code varchar(255); @@ -171,12 +171,12 @@ ALTER TABLE llx_product_price ADD COLUMN multicurrency_price_ttc double(24,8) DE ALTER TABLE llx_product_price_by_qty ADD COLUMN fk_user_creat integer; ALTER TABLE llx_product_price_by_qty ADD COLUMN fk_user_modif integer; ALTER TABLE llx_product_price_by_qty DROP COLUMN date_price; -ALTER TABLE llx_product_price_by_qty ADD COLUMN tms timestamp; +ALTER TABLE llx_product_price_by_qty ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_product_price_by_qty ADD COLUMN import_key varchar(14); ALTER TABLE llx_user ADD COLUMN import_key varchar(14); -ALTER TABLE llx_facture_rec ADD COLUMN tms timestamp; +ALTER TABLE llx_facture_rec ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; UPDATE llx_facture_rec SET tms = datec where tms < '2000-01-01'; CREATE TABLE llx_product_attribute @@ -295,7 +295,7 @@ CREATE TABLE llx_accounting_bookkeeping_tmp fk_user_author integer NOT NULL, -- | user creating fk_user_modif integer, -- | user making last change date_creation datetime, -- FEC:EcritureDate | creation date - tms timestamp, -- | date last modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- | date last modification import_key varchar(14), code_journal varchar(32) NOT NULL, -- FEC:JournalCode journal_label varchar(255), -- FEC:JournalLib @@ -391,7 +391,7 @@ ALTER TABLE llx_contratdet ADD COLUMN vat_src_code varchar(10) DEFAULT ''; CREATE TABLE llx_payment_various ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, datep date, datev date, @@ -438,7 +438,7 @@ rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 0, ref varchar(48), datec datetime DEFAULT NULL, -tms timestamp, +tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_author integer, fk_user_modif integer, fk_user_valid integer, @@ -453,7 +453,7 @@ CREATE TABLE llx_inventorydet ( rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, -tms timestamp, +tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_inventory integer DEFAULT 0, fk_warehouse integer DEFAULT 0, fk_product integer DEFAULT 0, @@ -467,7 +467,7 @@ new_pmp double DEFAULT 0 )ENGINE=InnoDB; ALTER TABLE llx_inventory ADD COLUMN datec datetime DEFAULT NULL; -ALTER TABLE llx_inventory ADD COLUMN tms timestamp; +ALTER TABLE llx_inventory ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_inventory ADD INDEX idx_inventory_tms (tms); ALTER TABLE llx_inventory ADD INDEX idx_inventory_datec (datec); @@ -502,7 +502,7 @@ CREATE TABLE llx_loan_schedule rowid integer AUTO_INCREMENT PRIMARY KEY, fk_loan integer, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, amount_capital real DEFAULT 0, amount_insurance real DEFAULT 0, @@ -547,7 +547,7 @@ CREATE TABLE llx_website_page fk_user_create integer, fk_user_modif integer, date_creation datetime, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; ALTER TABLE llx_website_page ADD UNIQUE INDEX uk_website_page_url (fk_website,pageurl); @@ -566,7 +566,7 @@ UPDATE llx_extrafields set elementtype='categorie' where elementtype='categories CREATE TABLE llx_blockedlog ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, action varchar(50), amounts real NOT NULL, signature varchar(100) NOT NULL, @@ -593,7 +593,7 @@ CREATE TABLE llx_blockedlog_authority rowid integer AUTO_INCREMENT PRIMARY KEY, blockchain longtext NOT NULL, signature varchar(100) NOT NULL, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; ALTER TABLE llx_blockedlog_authority ADD INDEX signature (signature); @@ -613,7 +613,7 @@ ALTER TABLE llx_mailing_cibles MODIFY COLUMN source_url varchar(255); CREATE TABLE llx_facture_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -623,7 +623,7 @@ ALTER TABLE llx_facture_rec_extrafields ADD INDEX idx_facture_rec_extrafields (f CREATE TABLE llx_facturedet_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index ff6a1fe03fb..93a7a447c18 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -265,7 +265,7 @@ ALTER TABLE llx_menu MODIFY fk_leftmenu varchar(100); CREATE TABLE llx_website_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -285,7 +285,7 @@ CREATE TABLE llx_website_account( date_last_login datetime, date_previous_login datetime, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -307,7 +307,7 @@ ALTER TABLE llx_website_account ADD CONSTRAINT llx_website_account_fk_website FO CREATE TABLE llx_website_account_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -326,7 +326,7 @@ alter table llx_user add column pass_encoding varchar(24) NULL; CREATE TABLE IF NOT EXISTS llx_expensereport_ik ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_c_exp_tax_cat integer DEFAULT 0 NOT NULL, fk_range integer DEFAULT 0 NOT NULL, coef double DEFAULT 0 NOT NULL, @@ -441,7 +441,7 @@ INSERT INTO llx_c_exp_tax_range (rowid,fk_c_exp_tax_cat,range_ik, entity, active CREATE TABLE llx_expensereport_rules ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, dates datetime NOT NULL, datee datetime NOT NULL, amount numeric(24,8) NOT NULL, @@ -464,7 +464,7 @@ ALTER TABLE llx_extrafields ADD COLUMN fk_user_author integer; ALTER TABLE llx_extrafields ADD COLUMN fk_user_modif integer; ALTER TABLE llx_extrafields ADD COLUMN datec datetime; ALTER TABLE llx_extrafields ADD COLUMN enabled varchar(255) DEFAULT '1'; -ALTER TABLE llx_extrafields ADD COLUMN tms timestamp; +ALTER TABLE llx_extrafields ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -- We fix value of 'list' from 0 to 1 for all extrafields created before this migration --VMYSQL4.1 UPDATE llx_extrafields SET list = 1 WHERE list = 0 AND fk_user_author IS NULL and fk_user_modif IS NULL and datec IS NULL; @@ -528,7 +528,7 @@ DROP TABLE llx_projet_task_comment; CREATE TABLE llx_comment ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, description text NOT NULL, fk_user_author integer DEFAULT NULL, fk_element integer DEFAULT NULL, @@ -572,7 +572,7 @@ create table llx_c_email_senderprofile entity integer DEFAULT 1 NOT NULL, -- multi company id private smallint DEFAULT 0 NOT NULL, -- Template public or private date_creation datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(255), -- Label of predefined email email varchar(255), -- Email signature text, -- Predefined signature @@ -655,7 +655,7 @@ create table llx_onlinesignature object_type varchar(32) NOT NULL, object_id integer NOT NULL, datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, name varchar(255) NOT NULL, ip varchar(128), pathoffile varchar(255) @@ -709,7 +709,7 @@ ALTER TABLE llx_resource ADD CONSTRAINT fk_resource_fk_country FOREIGN KEY (fk_c create table llx_facture_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql index 380c64c28fc..888f4fefdd0 100644 --- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql +++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql @@ -149,7 +149,7 @@ CREATE TABLE llx_societe_remise_supplier rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- creation date fk_user_author integer, -- creation user remise_supplier double(6,3) DEFAULT 0 NOT NULL, -- discount @@ -246,7 +246,7 @@ CREATE TABLE llx_ticket date_read datetime, date_close datetime, notify_tiers_at_create tinyint, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; ALTER TABLE llx_ticket ADD COLUMN notify_tiers_at_create integer; @@ -271,7 +271,7 @@ ALTER TABLE llx_ticket_msg ADD CONSTRAINT fk_ticket_msg_fk_track_id FOREIGN KEY CREATE TABLE llx_ticket_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) )ENGINE=innodb; @@ -279,7 +279,7 @@ CREATE TABLE llx_ticket_extrafields create table llx_facture_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -371,7 +371,7 @@ CREATE TABLE llx_societe_account( date_last_login datetime, date_previous_login datetime, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -433,7 +433,7 @@ CREATE TABLE llx_asset( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -449,7 +449,7 @@ ALTER TABLE llx_asset ADD INDEX idx_asset_fk_asset_type (fk_asset_type); create table llx_asset_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -458,7 +458,7 @@ create table llx_asset_type ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(50) NOT NULL, accountancy_code_asset varchar(32), accountancy_code_depreciation_asset varchar(32), @@ -473,7 +473,7 @@ ALTER TABLE llx_asset ADD CONSTRAINT fk_asset_asset_type FOREIGN KEY (fk_asset_t create table llx_asset_type_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql index b7fe131c3f9..36a15d5b85d 100644 --- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql +++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql @@ -43,7 +43,7 @@ ALTER TABLE llx_facture ADD COLUMN pos_source varchar(32); create table llx_facture_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -182,7 +182,7 @@ CREATE TABLE llx_emailcollector_emailcollector( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -202,7 +202,7 @@ CREATE TABLE llx_emailcollector_emailcollectorfilter( type varchar(128) NOT NULL, rulevalue varchar(128) NULL, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -217,7 +217,7 @@ CREATE TABLE llx_emailcollector_emailcollectoraction( type varchar(128) NOT NULL, actionparam varchar(255) NULL, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, position integer DEFAULT 0, diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index a56cb45e4fe..b9a406515ec 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -87,7 +87,7 @@ create table llx_mailing_unsubscribe unsubscribegroup varchar(128) DEFAULT '', ip varchar(128), date_creat datetime, -- creation date - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; ALTER TABLE llx_mailing_unsubscribe ADD UNIQUE uk_mailing_unsubscribe(email, entity, unsubscribegroup); @@ -223,7 +223,7 @@ CREATE TABLE llx_bom_bom( qty double(24,8), efficiency double(8,4), date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_valid datetime, fk_user_creat integer NOT NULL, fk_user_modif integer, @@ -240,7 +240,7 @@ ALTER TABLE llx_bom_bom ADD COLUMN date_valid datetime; create table llx_bom_bom_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -266,7 +266,7 @@ ALTER TABLE llx_bom_bomline ADD COLUMN position integer NOT NULL; create table llx_bom_bomline_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -335,7 +335,7 @@ UPDATE llx_c_shipment_mode SET label = 'https://www.laposte.fr/outils/suivre-vos create table llx_reception ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ref varchar(30) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, @@ -383,7 +383,7 @@ ALTER TABLE llx_reception ADD INDEX idx_reception_fk_shipping_method (fk_shippin create table llx_reception_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_accounting_account.sql b/htdocs/install/mysql/tables/llx_accounting_account.sql index 7af83585c7f..893cb19d9ab 100644 --- a/htdocs/install/mysql/tables/llx_accounting_account.sql +++ b/htdocs/install/mysql/tables/llx_accounting_account.sql @@ -24,7 +24,7 @@ create table llx_accounting_account rowid bigint AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_pcg_version varchar(32) NOT NULL, -- Chart system pcg_type varchar(20) NOT NULL, -- First part of Key for predefined groups account_number varchar(32) NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index 906efaae04d..23e7d489e09 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -45,7 +45,7 @@ CREATE TABLE llx_accounting_bookkeeping fk_user_author integer NOT NULL, -- | user creating fk_user_modif integer, -- | user making last change date_creation datetime, -- FEC:EcritureDate | creation date - tms timestamp, -- | last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- | last modification date fk_user integer NULL, -- The id of user that validate the accounting source document code_journal varchar(32) NOT NULL, -- FEC:JournalCode journal_label varchar(255), -- FEC:JournalLib diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql index 3357a000406..2b8277c70bd 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql @@ -44,7 +44,7 @@ CREATE TABLE llx_accounting_bookkeeping_tmp fk_user_author integer NOT NULL, -- | user creating fk_user_modif integer, -- | user making last change date_creation datetime, -- FEC:EcritureDate | creation date - tms timestamp, -- | last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- | last modification date fk_user integer NULL, -- The id of user that validate the accounting source document code_journal varchar(32) NOT NULL, -- FEC:JournalCode journal_label varchar(255), -- FEC:JournalLib diff --git a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql index 90590fb427d..17e9d9dccfb 100644 --- a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql +++ b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql @@ -25,7 +25,7 @@ create table llx_accounting_fiscalyear statut tinyint DEFAULT 0 NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_author integer DEFAULT NULL, fk_user_modif integer DEFAULT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql index 6307ba89770..82d97d3ec98 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.sql @@ -33,7 +33,7 @@ create table llx_actioncomm code varchar(50) NULL, -- code of action for automatic action ('AC_OTH_AUTO' for automatic actions, 'AC_EMAILIN_AUTO' for email input, 'AC_xxx' for manual action...) datec datetime, -- date creation - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date fk_user_author integer, -- user id of user that has created record fk_user_mod integer, -- user id of user that has modified record diff --git a/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql b/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql index c820feac430..95a415116ab 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql @@ -19,7 +19,7 @@ create table llx_actioncomm_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index 6713e5abc9d..6b5490b282d 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -72,7 +72,7 @@ create table llx_adherent model_pdf varchar(255), datevalid datetime, -- date de validation datec datetime, -- date de creation - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date fk_user_author integer, -- can be null because member can be create by a guest fk_user_mod integer, fk_user_valid integer, diff --git a/htdocs/install/mysql/tables/llx_adherent_extrafields.sql b/htdocs/install/mysql/tables/llx_adherent_extrafields.sql index 50f47c7954b..6b67944a321 100644 --- a/htdocs/install/mysql/tables/llx_adherent_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_adherent_extrafields.sql @@ -21,7 +21,7 @@ create table llx_adherent_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- member id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_adherent_type.sql b/htdocs/install/mysql/tables/llx_adherent_type.sql index 7e9270b89dc..bdce18ef0bc 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type.sql @@ -26,7 +26,7 @@ create table llx_adherent_type ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, statut smallint NOT NULL DEFAULT 0, libelle varchar(50) NOT NULL, morphy varchar(3) NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql b/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql index 2950147730b..d13056a2894 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql @@ -19,7 +19,7 @@ create table llx_adherent_type_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_advtargetemailing.sql b/htdocs/install/mysql/tables/llx_advtargetemailing.sql index 22d49768887..34bd7eb53bf 100644 --- a/htdocs/install/mysql/tables/llx_advtargetemailing.sql +++ b/htdocs/install/mysql/tables/llx_advtargetemailing.sql @@ -28,5 +28,5 @@ CREATE TABLE llx_advtargetemailing fk_user_author integer NOT NULL, datec datetime NOT NULL, fk_user_mod integer NOT NULL, - tms timestamp NOT NULL + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_asset.sql b/htdocs/install/mysql/tables/llx_asset.sql index b5bb1d1bfe2..52eeda3ba58 100644 --- a/htdocs/install/mysql/tables/llx_asset.sql +++ b/htdocs/install/mysql/tables/llx_asset.sql @@ -26,7 +26,7 @@ CREATE TABLE llx_asset( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_asset_extrafields.sql b/htdocs/install/mysql/tables/llx_asset_extrafields.sql index 364f0e3d08f..c93fac7b20a 100644 --- a/htdocs/install/mysql/tables/llx_asset_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_asset_extrafields.sql @@ -16,7 +16,7 @@ create table llx_asset_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_asset_type.sql b/htdocs/install/mysql/tables/llx_asset_type.sql index bd1c300d087..1205acb959b 100644 --- a/htdocs/install/mysql/tables/llx_asset_type.sql +++ b/htdocs/install/mysql/tables/llx_asset_type.sql @@ -17,7 +17,7 @@ create table llx_asset_type ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(50) NOT NULL, accountancy_code_asset varchar(32), accountancy_code_depreciation_asset varchar(32), diff --git a/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql b/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql index 59ebe94c7d8..7ff09176216 100644 --- a/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql @@ -16,7 +16,7 @@ create table llx_asset_type_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bank.sql b/htdocs/install/mysql/tables/llx_bank.sql index 8dfdba27baa..0e1dbc403da 100644 --- a/htdocs/install/mysql/tables/llx_bank.sql +++ b/htdocs/install/mysql/tables/llx_bank.sql @@ -21,7 +21,7 @@ create table llx_bank ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datev date, -- date de valeur dateo date, -- date operation amount double(24,8) NOT NULL default 0, diff --git a/htdocs/install/mysql/tables/llx_bank_account.sql b/htdocs/install/mysql/tables/llx_bank_account.sql index 28a1a0baf34..4ac90dd961d 100644 --- a/htdocs/install/mysql/tables/llx_bank_account.sql +++ b/htdocs/install/mysql/tables/llx_bank_account.sql @@ -26,7 +26,7 @@ create table llx_bank_account ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ref varchar(12) NOT NULL, label varchar(30) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id diff --git a/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql b/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql index 5d9d8847154..a30e81ab96c 100644 --- a/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql @@ -19,7 +19,7 @@ create table llx_bank_account_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_blockedlog.sql b/htdocs/install/mysql/tables/llx_blockedlog.sql index 889b28d7a73..f8145718ea6 100644 --- a/htdocs/install/mysql/tables/llx_blockedlog.sql +++ b/htdocs/install/mysql/tables/llx_blockedlog.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_blockedlog rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, date_creation datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, action varchar(50), amounts double(24,8) NOT NULL, element varchar(50), diff --git a/htdocs/install/mysql/tables/llx_blockedlog_authority.sql b/htdocs/install/mysql/tables/llx_blockedlog_authority.sql index 9e7dae8f23c..eb491f93af4 100644 --- a/htdocs/install/mysql/tables/llx_blockedlog_authority.sql +++ b/htdocs/install/mysql/tables/llx_blockedlog_authority.sql @@ -3,5 +3,5 @@ CREATE TABLE llx_blockedlog_authority rowid integer AUTO_INCREMENT PRIMARY KEY, blockchain longtext NOT NULL, signature varchar(100) NOT NULL, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bom_bom.sql b/htdocs/install/mysql/tables/llx_bom_bom.sql index 45c5fce3485..01ec2e63a3e 100644 --- a/htdocs/install/mysql/tables/llx_bom_bom.sql +++ b/htdocs/install/mysql/tables/llx_bom_bom.sql @@ -31,7 +31,7 @@ CREATE TABLE llx_bom_bom( duration double(24,8) DEFAULT NULL, date_creation datetime NOT NULL, date_valid datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, fk_user_valid integer, diff --git a/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql b/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql index 10c44459a8b..15210546fda 100644 --- a/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql @@ -16,7 +16,7 @@ create table llx_bom_bom_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql b/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql index 1b468da3a22..8ed3e96bd11 100644 --- a/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql @@ -16,7 +16,7 @@ create table llx_bom_bomline_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bordereau_cheque.sql b/htdocs/install/mysql/tables/llx_bordereau_cheque.sql index 3050b831eec..9b1d6e24ad4 100644 --- a/htdocs/install/mysql/tables/llx_bordereau_cheque.sql +++ b/htdocs/install/mysql/tables/llx_bordereau_cheque.sql @@ -33,7 +33,7 @@ create table llx_bordereau_cheque fk_bank_account integer, fk_user_author integer, statut smallint NOT NULL DEFAULT 0, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, note text, entity integer DEFAULT 1 NOT NULL -- multi company id )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_boxes_def.sql b/htdocs/install/mysql/tables/llx_boxes_def.sql index 285bbc22603..fbdf0e3ed36 100644 --- a/htdocs/install/mysql/tables/llx_boxes_def.sql +++ b/htdocs/install/mysql/tables/llx_boxes_def.sql @@ -23,6 +23,6 @@ create table llx_boxes_def rowid integer AUTO_INCREMENT PRIMARY KEY, file varchar(200) NOT NULL, -- Do not increase this as file+note must be small to allow index entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, note varchar(130) -- Do not increase this as file+note must be small to allow index )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_budget.sql b/htdocs/install/mysql/tables/llx_budget.sql index d67e65e8f2b..ab9ed79a64a 100644 --- a/htdocs/install/mysql/tables/llx_budget.sql +++ b/htdocs/install/mysql/tables/llx_budget.sql @@ -26,7 +26,7 @@ create table llx_budget date_start date, date_end date, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer diff --git a/htdocs/install/mysql/tables/llx_budget_lines.sql b/htdocs/install/mysql/tables/llx_budget_lines.sql index 1397b604316..ffdf33aa38f 100644 --- a/htdocs/install/mysql/tables/llx_budget_lines.sql +++ b/htdocs/install/mysql/tables/llx_budget_lines.sql @@ -23,7 +23,7 @@ create table llx_budget_lines fk_project_ids varchar(180) NOT NULL, -- 'IDS:x,y' = List of project ids related to this budget. If budget is dedicated to projects not yet started, we recommand to create a project 'Projects to come'. 'FILTER:ref=*ABC' or 'FILTER:categid=123' = Can also be a dynamic rule to select projects. amount double(24,8) NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer diff --git a/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql b/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql index cd81eb4c42a..8b99059acdd 100644 --- a/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql +++ b/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql @@ -23,7 +23,7 @@ create table llx_c_email_senderprofile entity integer DEFAULT 1 NOT NULL, -- multi company id private smallint DEFAULT 0 NOT NULL, -- Template public (0) or private (id of user) date_creation datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(255), -- Label of predefined email email varchar(255) NOT NULL, -- Email signature text, -- Predefined signature diff --git a/htdocs/install/mysql/tables/llx_c_email_templates.sql b/htdocs/install/mysql/tables/llx_c_email_templates.sql index 3fd97fb2804..04130a208fe 100644 --- a/htdocs/install/mysql/tables/llx_c_email_templates.sql +++ b/htdocs/install/mysql/tables/llx_c_email_templates.sql @@ -27,7 +27,7 @@ create table llx_c_email_templates private smallint DEFAULT 0 NOT NULL, -- Template public or private fk_user integer, -- Id user owner if template is private, or null datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(180), -- Label of predefined email position smallint, -- Position enabled varchar(255) DEFAULT '1', -- Condition to have this module visible diff --git a/htdocs/install/mysql/tables/llx_c_field_list.sql b/htdocs/install/mysql/tables/llx_c_field_list.sql index c99bfe91690..9177228b363 100644 --- a/htdocs/install/mysql/tables/llx_c_field_list.sql +++ b/htdocs/install/mysql/tables/llx_c_field_list.sql @@ -24,7 +24,7 @@ create table llx_c_field_list ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, element varchar(64) NOT NULL, -- name of element list entity integer DEFAULT 1 NOT NULL, -- entity id name varchar(32) NOT NULL, -- name of field with table alias (ex: p.ref) diff --git a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql index 9adc6b3cb0c..6f49f682f24 100644 --- a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql @@ -20,7 +20,7 @@ create table llx_c_shipment_mode ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, diff --git a/htdocs/install/mysql/tables/llx_categorie.sql b/htdocs/install/mysql/tables/llx_categorie.sql index 09a9ce847b4..29cb5a260e6 100644 --- a/htdocs/install/mysql/tables/llx_categorie.sql +++ b/htdocs/install/mysql/tables/llx_categorie.sql @@ -32,7 +32,7 @@ create table llx_categorie fk_soc integer DEFAULT NULL, -- not used by default. Used when option CATEGORY_ASSIGNED_TO_A_CUSTOMER is set. visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not date_creation datetime, -- date creation - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date fk_user_creat integer, -- user making creation fk_user_modif integer, -- user making last change import_key varchar(14) -- Import key diff --git a/htdocs/install/mysql/tables/llx_categories_extrafields.sql b/htdocs/install/mysql/tables/llx_categories_extrafields.sql index 8a2a82f7382..82c52f1b7ee 100644 --- a/htdocs/install/mysql/tables/llx_categories_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_categories_extrafields.sql @@ -19,7 +19,7 @@ create table llx_categories_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_chargesociales.sql b/htdocs/install/mysql/tables/llx_chargesociales.sql index 57434c93d98..db9e82ac779 100644 --- a/htdocs/install/mysql/tables/llx_chargesociales.sql +++ b/htdocs/install/mysql/tables/llx_chargesociales.sql @@ -25,7 +25,7 @@ create table llx_chargesociales date_ech datetime NOT NULL, -- date echeance libelle varchar(80) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_creation datetime, -- date de creation date_valid datetime, -- date de validation fk_user_author integer, -- user making creation diff --git a/htdocs/install/mysql/tables/llx_commande.sql b/htdocs/install/mysql/tables/llx_commande.sql index aa237383452..add836ce5d5 100644 --- a/htdocs/install/mysql/tables/llx_commande.sql +++ b/htdocs/install/mysql/tables/llx_commande.sql @@ -32,7 +32,7 @@ create table llx_commande fk_soc integer NOT NULL, fk_projet integer DEFAULT NULL, -- projet auquel est rattache la commande - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_creation datetime, -- date de creation date_valid datetime, -- date de validation date_cloture datetime, -- date de cloture diff --git a/htdocs/install/mysql/tables/llx_commande_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_extrafields.sql index e6f3f768489..922bcd820a1 100644 --- a/htdocs/install/mysql/tables/llx_commande_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_extrafields.sql @@ -19,7 +19,7 @@ create table llx_commande_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql index bc5cadea228..a9f155a2abb 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql @@ -32,7 +32,7 @@ create table llx_commande_fournisseur fk_soc integer NOT NULL, fk_projet integer DEFAULT 0, -- project id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_creation datetime, -- date de creation date_valid datetime, -- date de validation date_approve datetime, -- date de approve diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql index 22a0e241dd6..b5f85fea250 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql @@ -36,5 +36,5 @@ create table llx_commande_fournisseur_dispatch sellby date DEFAULT NULL, status integer, datec datetime, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql index c30cc1c75dd..2c85521ea84 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql @@ -19,7 +19,7 @@ create table llx_commande_fournisseur_dispatch_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql index 6f72a447f10..40c5785dbad 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql @@ -23,7 +23,7 @@ create table llx_commande_fournisseur_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql index 4c576f16f51..c75e9718526 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql @@ -20,7 +20,7 @@ create table llx_commande_fournisseur_log ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datelog datetime NOT NULL, fk_commande integer NOT NULL, fk_statut smallint NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql index 189b4d7d593..cc22da09720 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql @@ -24,7 +24,7 @@ create table llx_commande_fournisseurdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql b/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql index 37b7dd6a349..331a3fbe54a 100644 --- a/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_commandedet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_comment.sql b/htdocs/install/mysql/tables/llx_comment.sql index 22b2c40b9f1..3e839d83b4c 100644 --- a/htdocs/install/mysql/tables/llx_comment.sql +++ b/htdocs/install/mysql/tables/llx_comment.sql @@ -19,7 +19,7 @@ CREATE TABLE llx_comment ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, description text NOT NULL, fk_user_author integer DEFAULT NULL, fk_user_modif integer DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_const.sql b/htdocs/install/mysql/tables/llx_const.sql index fcca5f57023..96594bb60b4 100644 --- a/htdocs/install/mysql/tables/llx_const.sql +++ b/htdocs/install/mysql/tables/llx_const.sql @@ -32,7 +32,7 @@ create table llx_const type varchar(64) DEFAULT 'string', -- null or 'encrypted' if param has been encrypted visible tinyint DEFAULT 1 NOT NULL, note text, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; -- diff --git a/htdocs/install/mysql/tables/llx_contrat.sql b/htdocs/install/mysql/tables/llx_contrat.sql index fbb36a5674b..dcdc1288d37 100644 --- a/htdocs/install/mysql/tables/llx_contrat.sql +++ b/htdocs/install/mysql/tables/llx_contrat.sql @@ -26,7 +26,7 @@ create table llx_contrat ref_supplier varchar(255), -- supplier contract ref ref_ext varchar(255), -- external contract ref entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- creation date date_contrat datetime, statut smallint DEFAULT 0, -- not used. deprecated diff --git a/htdocs/install/mysql/tables/llx_contrat_extrafields.sql b/htdocs/install/mysql/tables/llx_contrat_extrafields.sql index 7ab3dfbbdc9..f93ab94d4ca 100644 --- a/htdocs/install/mysql/tables/llx_contrat_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_contrat_extrafields.sql @@ -19,7 +19,7 @@ create table llx_contrat_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_contratdet.sql b/htdocs/install/mysql/tables/llx_contratdet.sql index 4705bbab218..933fc50ec54 100644 --- a/htdocs/install/mysql/tables/llx_contratdet.sql +++ b/htdocs/install/mysql/tables/llx_contratdet.sql @@ -20,7 +20,7 @@ create table llx_contratdet ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_contrat integer NOT NULL, fk_product integer NULL, -- doit pouvoir etre nul pour ligne detail sans produits diff --git a/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql b/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql index 8933fa66e16..ccd0846e81e 100644 --- a/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_contratdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_contratdet_log.sql b/htdocs/install/mysql/tables/llx_contratdet_log.sql index b13791f4832..f52ced561c7 100644 --- a/htdocs/install/mysql/tables/llx_contratdet_log.sql +++ b/htdocs/install/mysql/tables/llx_contratdet_log.sql @@ -19,7 +19,7 @@ create table llx_contratdet_log ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_contratdet integer NOT NULL, date datetime NOT NULL, statut smallint NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql index 97057e6f41e..a9aa8960991 100644 --- a/htdocs/install/mysql/tables/llx_cronjob.sql +++ b/htdocs/install/mysql/tables/llx_cronjob.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_cronjob ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, jobtype varchar(10) NOT NULL, label text NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_deplacement.sql b/htdocs/install/mysql/tables/llx_deplacement.sql index 8b9fa2a04ae..50bfe8d7cfd 100644 --- a/htdocs/install/mysql/tables/llx_deplacement.sql +++ b/htdocs/install/mysql/tables/llx_deplacement.sql @@ -24,7 +24,7 @@ create table llx_deplacement ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL) entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, dated datetime, fk_user integer NOT NULL, fk_user_author integer, diff --git a/htdocs/install/mysql/tables/llx_don.sql b/htdocs/install/mysql/tables/llx_don.sql index f03e82d6143..95181a3b30e 100644 --- a/htdocs/install/mysql/tables/llx_don.sql +++ b/htdocs/install/mysql/tables/llx_don.sql @@ -25,7 +25,7 @@ create table llx_don rowid integer AUTO_INCREMENT PRIMARY KEY, ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL) entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_statut smallint NOT NULL DEFAULT 0, -- Status of donation promise or validate datedon datetime, -- Date of the donation/promise amount double(24,8) DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_don_extrafields.sql b/htdocs/install/mysql/tables/llx_don_extrafields.sql index bf2b780fcee..a4a560d0f8a 100644 --- a/htdocs/install/mysql/tables/llx_don_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_don_extrafields.sql @@ -19,7 +19,7 @@ create table llx_don_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_ecm_directories.sql b/htdocs/install/mysql/tables/llx_ecm_directories.sql index 1fa1467e296..a02a72118b2 100644 --- a/htdocs/install/mysql/tables/llx_ecm_directories.sql +++ b/htdocs/install/mysql/tables/llx_ecm_directories.sql @@ -30,7 +30,7 @@ CREATE TABLE llx_ecm_directories fullpath varchar(750), extraparams varchar(255), -- for stock other parameters with json format date_c datetime, - date_m timestamp, + date_m timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_c integer, fk_user_m integer, acl text diff --git a/htdocs/install/mysql/tables/llx_ecm_directories_extrafileds.sql b/htdocs/install/mysql/tables/llx_ecm_directories_extrafileds.sql index e2e496267ba..8bb7d98c592 100644 --- a/htdocs/install/mysql/tables/llx_ecm_directories_extrafileds.sql +++ b/htdocs/install/mysql/tables/llx_ecm_directories_extrafileds.sql @@ -19,7 +19,7 @@ CREATE TABLE llx_ecm_directories_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_ecm_files.sql b/htdocs/install/mysql/tables/llx_ecm_files.sql index c459e2ca219..52521e2af3e 100644 --- a/htdocs/install/mysql/tables/llx_ecm_files.sql +++ b/htdocs/install/mysql/tables/llx_ecm_files.sql @@ -35,7 +35,7 @@ CREATE TABLE llx_ecm_files gen_or_uploaded varchar(12), -- 'generated' or 'uploaded' extraparams varchar(255), -- for stocking other parameters with json format date_c datetime, - date_m timestamp, + date_m timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_c integer, fk_user_m integer, acl text -- for future permission 'per file' diff --git a/htdocs/install/mysql/tables/llx_ecm_files_extrafields.sql b/htdocs/install/mysql/tables/llx_ecm_files_extrafields.sql index 0cf0de6d375..485db3a0f72 100644 --- a/htdocs/install/mysql/tables/llx_ecm_files_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_ecm_files_extrafields.sql @@ -19,7 +19,7 @@ CREATE TABLE llx_ecm_files_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_element_resources.sql b/htdocs/install/mysql/tables/llx_element_resources.sql index 95ee9b5a751..693a2f990f0 100644 --- a/htdocs/install/mysql/tables/llx_element_resources.sql +++ b/htdocs/install/mysql/tables/llx_element_resources.sql @@ -28,5 +28,5 @@ CREATE TABLE llx_element_resources mandatory integer, duree real, -- total duration of using ressource fk_user_create integer, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql index 87581f418e8..389093241ce 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql @@ -35,7 +35,7 @@ CREATE TABLE llx_emailcollector_emailcollector( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql index 226f74ce884..c45a3dcd1c4 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_emailcollector_emailcollectoraction( type varchar(128) NOT NULL, actionparam varchar(255) NULL, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, position integer DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql index 5f49227f655..4e708116e21 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_emailcollector_emailcollectorfilter( type varchar(128) NOT NULL, rulevalue varchar(128) NULL, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_entrepot.sql b/htdocs/install/mysql/tables/llx_entrepot.sql index 2cabb457016..2a390f008e2 100644 --- a/htdocs/install/mysql/tables/llx_entrepot.sql +++ b/htdocs/install/mysql/tables/llx_entrepot.sql @@ -23,7 +23,7 @@ create table llx_entrepot rowid integer AUTO_INCREMENT PRIMARY KEY, ref varchar(255) NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, entity integer DEFAULT 1 NOT NULL, -- multi company id description text, lieu varchar(64), -- resume lieu situation diff --git a/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql b/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql index 9fa75455f19..95a78b4ce6c 100644 --- a/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql @@ -19,7 +19,7 @@ create table llx_entrepot_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_establishment.sql b/htdocs/install/mysql/tables/llx_establishment.sql index 0d487e94e5f..7159a53059c 100644 --- a/htdocs/install/mysql/tables/llx_establishment.sql +++ b/htdocs/install/mysql/tables/llx_establishment.sql @@ -36,7 +36,7 @@ CREATE TABLE llx_establishment ( fk_user_author integer NOT NULL, fk_user_mod integer, datec datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL, status tinyint DEFAULT 1 ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_events.sql b/htdocs/install/mysql/tables/llx_events.sql index e646d32643b..ffa4f1029e7 100644 --- a/htdocs/install/mysql/tables/llx_events.sql +++ b/htdocs/install/mysql/tables/llx_events.sql @@ -24,7 +24,7 @@ create table llx_events ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date type varchar(32) NOT NULL, -- action type entity integer DEFAULT 1 NOT NULL, -- multi company id prefix_session varchar(255) NULL, -- prefix of session, obtained with dol_getprefix diff --git a/htdocs/install/mysql/tables/llx_expedition.sql b/htdocs/install/mysql/tables/llx_expedition.sql index e4c216f3da4..4214fef7f44 100644 --- a/htdocs/install/mysql/tables/llx_expedition.sql +++ b/htdocs/install/mysql/tables/llx_expedition.sql @@ -22,7 +22,7 @@ create table llx_expedition ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ref varchar(30) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_expedition_extrafields.sql b/htdocs/install/mysql/tables/llx_expedition_extrafields.sql index af4228efb41..6b9721a2826 100644 --- a/htdocs/install/mysql/tables/llx_expedition_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_expedition_extrafields.sql @@ -19,7 +19,7 @@ create table llx_expedition_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql b/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql index 112e41e9578..a71b45946a1 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_expeditiondet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_expensereport.sql b/htdocs/install/mysql/tables/llx_expensereport.sql index a212bc55273..1f13a5a90b5 100644 --- a/htdocs/install/mysql/tables/llx_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_expensereport.sql @@ -34,7 +34,7 @@ CREATE TABLE llx_expensereport ( date_approve datetime, date_refuse datetime, date_cancel datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_author integer NOT NULL, -- not the user author but the user the expense report is for fk_user_modif integer DEFAULT NULL, fk_user_valid integer DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql b/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql index 8b6ad4e998f..1e78afb8513 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql @@ -19,7 +19,7 @@ create table llx_expensereport_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_expensereport_ik.sql b/htdocs/install/mysql/tables/llx_expensereport_ik.sql index ddc7fa4d3c7..839fbac8e9a 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_ik.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_ik.sql @@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS llx_expensereport_ik ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_c_exp_tax_cat integer DEFAULT 0 NOT NULL, fk_range integer DEFAULT 0 NOT NULL, coef double DEFAULT 0 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_expensereport_rules.sql b/htdocs/install/mysql/tables/llx_expensereport_rules.sql index 2a10cc24a7d..ae8f9b09496 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_rules.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_rules.sql @@ -20,7 +20,7 @@ CREATE TABLE llx_expensereport_rules ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, dates datetime NOT NULL, datee datetime NOT NULL, amount double(24,8) NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_extrafields.sql b/htdocs/install/mysql/tables/llx_extrafields.sql index f10f2600930..1ade8502bf5 100644 --- a/htdocs/install/mysql/tables/llx_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_extrafields.sql @@ -43,5 +43,5 @@ create table llx_extrafields fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change datec datetime, -- date de creation - tms timestamp -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -- last modification date )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 2c8e1013634..82319a4beef 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -39,7 +39,7 @@ create table llx_facture datef date, -- date invoice date_pointoftax date DEFAULT NULL, -- date point of tax (for GB) date_valid date, -- date validation - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date date_closing datetime, -- date de cloture paye smallint DEFAULT 0 NOT NULL, --amount double(24,8) DEFAULT 0 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_facture_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_extrafields.sql index 4f7b902c97f..bc826d72ce4 100644 --- a/htdocs/install/mysql/tables/llx_facture_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facture_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facture_fourn.sql b/htdocs/install/mysql/tables/llx_facture_fourn.sql index eabf8b1eb27..1d5fdcf13bf 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn.sql @@ -35,7 +35,7 @@ create table llx_facture_fourn datef date, -- date de la facture date_pointoftax date DEFAULT NULL, -- date point of tax (for GB) date_valid date, -- date validation - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date libelle varchar(255), paye smallint DEFAULT 0 NOT NULL, amount double(24,8) DEFAULT 0 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql index 7be8ff1c552..7fca2588bdf 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facture_fourn_det_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql index 8fb018cbfcc..48556ec6d33 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facture_fourn_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facture_rec.sql b/htdocs/install/mysql/tables/llx_facture_rec.sql index d6bda7c4196..0db78d62252 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec.sql @@ -26,7 +26,7 @@ create table llx_facture_rec entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, datec datetime, -- date de creation - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date suspended integer DEFAULT 0, -- 1=suspended diff --git a/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql index 6895a7e2291..8a51efb2914 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facture_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql b/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql index 693abf00001..99f0b87a943 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facturedet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql b/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql index da2314ecffb..c220a7e0f0f 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facturedet_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_fichinter.sql b/htdocs/install/mysql/tables/llx_fichinter.sql index e2508c372ca..7c1ef4cf184 100644 --- a/htdocs/install/mysql/tables/llx_fichinter.sql +++ b/htdocs/install/mysql/tables/llx_fichinter.sql @@ -26,7 +26,7 @@ create table llx_fichinter ref varchar(30) NOT NULL, -- number ref_ext varchar(255), entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- date de creation date_valid datetime, -- date de validation datei date, -- date de livraison du bon d'intervention diff --git a/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql b/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql index 13c7dd15dab..c866669d667 100644 --- a/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql @@ -19,7 +19,7 @@ create table llx_fichinter_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql b/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql index 65584c02201..f2ced33ec0d 100644 --- a/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql @@ -19,7 +19,7 @@ CREATE TABLE llx_fichinterdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_holiday.sql b/htdocs/install/mysql/tables/llx_holiday.sql index e8116c477a8..3cd5727d867 100644 --- a/htdocs/install/mysql/tables/llx_holiday.sql +++ b/htdocs/install/mysql/tables/llx_holiday.sql @@ -42,7 +42,7 @@ fk_user_cancel integer DEFAULT NULL, detail_refuse varchar( 250 ) DEFAULT NULL, note_private text, note_public text, -tms timestamp, +tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14), extraparams varchar(255) -- for other parameters with json format ) diff --git a/htdocs/install/mysql/tables/llx_holiday_extrafields.sql b/htdocs/install/mysql/tables/llx_holiday_extrafields.sql index 29881bbb0cb..8b6e3ef8dc9 100644 --- a/htdocs/install/mysql/tables/llx_holiday_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_holiday_extrafields.sql @@ -19,7 +19,7 @@ create table llx_holiday_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_inventory.sql b/htdocs/install/mysql/tables/llx_inventory.sql index 4ccb234e26e..aa35ebb0c42 100644 --- a/htdocs/install/mysql/tables/llx_inventory.sql +++ b/htdocs/install/mysql/tables/llx_inventory.sql @@ -23,7 +23,7 @@ CREATE TABLE llx_inventory entity integer DEFAULT 0, ref varchar(48), date_creation datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, -- user making creation fk_user_modif integer, -- user making last change fk_user_valid integer, -- valideur de la fiche diff --git a/htdocs/install/mysql/tables/llx_inventorydet.sql b/htdocs/install/mysql/tables/llx_inventorydet.sql index 8c770895194..ce23fe0f749 100644 --- a/htdocs/install/mysql/tables/llx_inventorydet.sql +++ b/htdocs/install/mysql/tables/llx_inventorydet.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_inventorydet ( rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_inventory integer DEFAULT 0, fk_warehouse integer DEFAULT 0, fk_product integer DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_livraison.sql b/htdocs/install/mysql/tables/llx_livraison.sql index 31af38edfb6..e58e8c3c0bd 100644 --- a/htdocs/install/mysql/tables/llx_livraison.sql +++ b/htdocs/install/mysql/tables/llx_livraison.sql @@ -20,7 +20,7 @@ create table llx_livraison ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ref varchar(30) NOT NULL, -- delivery number entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_livraison_extrafields.sql b/htdocs/install/mysql/tables/llx_livraison_extrafields.sql index 70248d0ceca..d1fc611bfdd 100644 --- a/htdocs/install/mysql/tables/llx_livraison_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_livraison_extrafields.sql @@ -19,7 +19,7 @@ create table llx_livraison_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql b/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql index cb6300a8ca1..667f66ae0a8 100644 --- a/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_livraisondet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_loan.sql b/htdocs/install/mysql/tables/llx_loan.sql index a1a187b5ba4..f82597c71c5 100644 --- a/htdocs/install/mysql/tables/llx_loan.sql +++ b/htdocs/install/mysql/tables/llx_loan.sql @@ -22,7 +22,7 @@ create table llx_loan rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(80) NOT NULL, fk_bank integer, diff --git a/htdocs/install/mysql/tables/llx_loan_schedule.sql b/htdocs/install/mysql/tables/llx_loan_schedule.sql index e23bc678e71..dd68a426e61 100644 --- a/htdocs/install/mysql/tables/llx_loan_schedule.sql +++ b/htdocs/install/mysql/tables/llx_loan_schedule.sql @@ -22,7 +22,7 @@ create table llx_loan_schedule rowid integer AUTO_INCREMENT PRIMARY KEY, fk_loan integer, datec datetime, -- creation date - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount_capital double(24,8) DEFAULT 0, amount_insurance double(24,8) DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_localtax.sql b/htdocs/install/mysql/tables/llx_localtax.sql index b7aa682567f..b883c710f7b 100644 --- a/htdocs/install/mysql/tables/llx_localtax.sql +++ b/htdocs/install/mysql/tables/llx_localtax.sql @@ -22,7 +22,7 @@ create table llx_localtax rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, localtaxtype tinyint, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep date, -- date of payment datev date, -- date of value amount double, diff --git a/htdocs/install/mysql/tables/llx_mailing.sql b/htdocs/install/mysql/tables/llx_mailing.sql index 8706159ad46..d9fc0832045 100644 --- a/htdocs/install/mysql/tables/llx_mailing.sql +++ b/htdocs/install/mysql/tables/llx_mailing.sql @@ -43,7 +43,7 @@ create table llx_mailing date_valid datetime, -- date_appro datetime, -- date_envoi datetime, -- date d'envoi - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, -- user creator fk_user_valid integer, -- user validator fk_user_appro integer, -- not used diff --git a/htdocs/install/mysql/tables/llx_mailing_cibles.sql b/htdocs/install/mysql/tables/llx_mailing_cibles.sql index b523c1d11eb..096142b10ad 100644 --- a/htdocs/install/mysql/tables/llx_mailing_cibles.sql +++ b/htdocs/install/mysql/tables/llx_mailing_cibles.sql @@ -34,6 +34,6 @@ create table llx_mailing_cibles source_id integer, source_type varchar(16), date_envoi datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, error_text varchar(255) -- text with error if statut is -1 )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql b/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql index 00424256957..543015f5829 100644 --- a/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql +++ b/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql @@ -26,5 +26,5 @@ create table llx_mailing_unsubscribe unsubscribegroup varchar(128) DEFAULT '', ip varchar(128), date_creat datetime, -- creation date - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_menu.sql b/htdocs/install/mysql/tables/llx_menu.sql index 6f908cd5bcf..9cff110981a 100644 --- a/htdocs/install/mysql/tables/llx_menu.sql +++ b/htdocs/install/mysql/tables/llx_menu.sql @@ -41,6 +41,6 @@ CREATE TABLE llx_menu perms text, -- Condition to show enabled or disabled enabled text NULL, -- Condition to show or hide usertype integer NOT NULL DEFAULT 0, -- 0 if menu for all users, 1 for external only, 2 for internal only - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_mrp_mo.sql b/htdocs/install/mysql/tables/llx_mrp_mo.sql index d3aa294104b..de1933ccfed 100644 --- a/htdocs/install/mysql/tables/llx_mrp_mo.sql +++ b/htdocs/install/mysql/tables/llx_mrp_mo.sql @@ -27,7 +27,7 @@ CREATE TABLE llx_mrp_mo( note_private text, date_creation datetime NOT NULL, date_valid datetime NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, fk_user_valid integer, diff --git a/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql b/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql index 97eab584cc7..517c269cf0f 100644 --- a/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql @@ -16,7 +16,7 @@ create table llx_mrp_mo_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_mrp_production.sql b/htdocs/install/mysql/tables/llx_mrp_production.sql index 509d78a5c0e..bd0cd722f1a 100644 --- a/htdocs/install/mysql/tables/llx_mrp_production.sql +++ b/htdocs/install/mysql/tables/llx_mrp_production.sql @@ -28,7 +28,7 @@ CREATE TABLE llx_mrp_production( fk_mrp_production integer, -- if role = 'consumed', id of line with role 'toconsume', if role = 'produced' id of line with role 'toproduce' fk_stock_movement integer, -- id of stock movement when movements are validated date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14) diff --git a/htdocs/install/mysql/tables/llx_notify.sql b/htdocs/install/mysql/tables/llx_notify.sql index 3ec7d05268e..d2e3bf93076 100644 --- a/htdocs/install/mysql/tables/llx_notify.sql +++ b/htdocs/install/mysql/tables/llx_notify.sql @@ -22,7 +22,7 @@ create table llx_notify ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, daten datetime, -- date de la notification fk_action integer NOT NULL, fk_soc integer NULL, diff --git a/htdocs/install/mysql/tables/llx_notify_def.sql b/htdocs/install/mysql/tables/llx_notify_def.sql index bb516444b04..aed10027347 100644 --- a/htdocs/install/mysql/tables/llx_notify_def.sql +++ b/htdocs/install/mysql/tables/llx_notify_def.sql @@ -21,7 +21,7 @@ create table llx_notify_def ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec date, -- date de creation fk_action integer NOT NULL, fk_soc integer, diff --git a/htdocs/install/mysql/tables/llx_online_signatures.sql b/htdocs/install/mysql/tables/llx_online_signatures.sql index 312cde50671..fbba814dd4d 100644 --- a/htdocs/install/mysql/tables/llx_online_signatures.sql +++ b/htdocs/install/mysql/tables/llx_online_signatures.sql @@ -22,7 +22,7 @@ create table llx_onlinesignature object_type varchar(32) NOT NULL, object_id integer NOT NULL, datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, name varchar(255) NOT NULL, ip varchar(128), pathoffile varchar(255) diff --git a/htdocs/install/mysql/tables/llx_opensurvey_comments.sql b/htdocs/install/mysql/tables/llx_opensurvey_comments.sql index 3fcc5a0abf9..52d938b7c47 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_comments.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_comments.sql @@ -19,7 +19,7 @@ CREATE TABLE llx_opensurvey_comments ( id_comment INTEGER unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, id_sondage CHAR(16) NOT NULL, comment text NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, usercomment text ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql b/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql index a2ddafa1b54..03ad9b35ec5 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql @@ -20,5 +20,5 @@ CREATE TABLE llx_opensurvey_user_studs ( nom VARCHAR(64) NOT NULL, id_sondage VARCHAR(16) NOT NULL, reponses VARCHAR(100) NOT NULL, -- Not used for 'F' surveys - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_paiement.sql b/htdocs/install/mysql/tables/llx_paiement.sql index dabe261798b..bbf7d52e6c7 100644 --- a/htdocs/install/mysql/tables/llx_paiement.sql +++ b/htdocs/install/mysql/tables/llx_paiement.sql @@ -25,7 +25,7 @@ create table llx_paiement ref_ext varchar(255) NULL, -- payment external reference entity integer DEFAULT 1 NOT NULL, -- Multi company id datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount double(24,8) DEFAULT 0, -- amount paid in Dolibarr currency multicurrency_amount double(24,8) DEFAULT 0, -- amount paid in invoice currency diff --git a/htdocs/install/mysql/tables/llx_paiementcharge.sql b/htdocs/install/mysql/tables/llx_paiementcharge.sql index b489588777a..640f5f0af54 100644 --- a/htdocs/install/mysql/tables/llx_paiementcharge.sql +++ b/htdocs/install/mysql/tables/llx_paiementcharge.sql @@ -21,7 +21,7 @@ create table llx_paiementcharge rowid integer AUTO_INCREMENT PRIMARY KEY, fk_charge integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount double(24,8) DEFAULT 0, fk_typepaiement integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_paiementfourn.sql b/htdocs/install/mysql/tables/llx_paiementfourn.sql index 519526f764a..04066435f20 100644 --- a/htdocs/install/mysql/tables/llx_paiementfourn.sql +++ b/htdocs/install/mysql/tables/llx_paiementfourn.sql @@ -22,7 +22,7 @@ create table llx_paiementfourn rowid integer AUTO_INCREMENT PRIMARY KEY, ref varchar(30), entity integer DEFAULT 1, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- date de creation de l'enregistrement datep datetime, -- date de paiement amount double(24,8) DEFAULT 0, -- montant diff --git a/htdocs/install/mysql/tables/llx_payment_donation.sql b/htdocs/install/mysql/tables/llx_payment_donation.sql index 6573bcb7119..088138bf96f 100644 --- a/htdocs/install/mysql/tables/llx_payment_donation.sql +++ b/htdocs/install/mysql/tables/llx_payment_donation.sql @@ -21,7 +21,7 @@ create table llx_payment_donation rowid integer AUTO_INCREMENT PRIMARY KEY, fk_donation integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount double(24,8) DEFAULT 0, fk_typepayment integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_payment_expensereport.sql b/htdocs/install/mysql/tables/llx_payment_expensereport.sql index 8a75bfcdbfd..a83c0c926a4 100644 --- a/htdocs/install/mysql/tables/llx_payment_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_payment_expensereport.sql @@ -21,7 +21,7 @@ create table llx_payment_expensereport rowid integer AUTO_INCREMENT PRIMARY KEY, fk_expensereport integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount double(24,8) DEFAULT 0, fk_typepayment integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_payment_loan.sql b/htdocs/install/mysql/tables/llx_payment_loan.sql index a646ba1917b..0e080a1bdb7 100644 --- a/htdocs/install/mysql/tables/llx_payment_loan.sql +++ b/htdocs/install/mysql/tables/llx_payment_loan.sql @@ -22,7 +22,7 @@ create table llx_payment_loan rowid integer AUTO_INCREMENT PRIMARY KEY, fk_loan integer, datec datetime, -- creation date - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount_capital double(24,8) DEFAULT 0, amount_insurance double(24,8) DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_payment_salary.sql b/htdocs/install/mysql/tables/llx_payment_salary.sql index cc4aaf94ccb..d6ad2ffcfed 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary.sql @@ -20,7 +20,7 @@ create table llx_payment_salary ( rowid integer AUTO_INCREMENT PRIMARY KEY, ref varchar(30) NULL, -- payment reference number (currently NULL because there is no numbering manager yet) - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- Create date fk_user integer NOT NULL, datep date, -- payment date diff --git a/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql b/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql index 3bfed602cff..5f15918ef18 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql @@ -19,7 +19,7 @@ create table llx_payment_salary_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- salary payment id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_payment_various.sql b/htdocs/install/mysql/tables/llx_payment_various.sql index 4b48c649578..17bbf7c7a16 100644 --- a/htdocs/install/mysql/tables/llx_payment_various.sql +++ b/htdocs/install/mysql/tables/llx_payment_various.sql @@ -22,7 +22,7 @@ create table llx_payment_various ref varchar(30) NULL, -- payment reference number (currently NULL because there is no numbering manager yet) num_payment varchar(50), -- num cheque or other label varchar(255), - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- Create date datep date, -- date de paiement datev date, -- date de valeur (this field should not be here, only into bank tables) diff --git a/htdocs/install/mysql/tables/llx_printing.sql b/htdocs/install/mysql/tables/llx_printing.sql index 0f0c7c71d1b..ecfe050240b 100644 --- a/htdocs/install/mysql/tables/llx_printing.sql +++ b/htdocs/install/mysql/tables/llx_printing.sql @@ -20,7 +20,7 @@ CREATE TABLE llx_printing ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, printer_name text NOT NULL, printer_location text NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 714a342a652..bc583a76ce2 100644 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -30,7 +30,7 @@ create table llx_product ref_ext varchar(128), -- reference into an external system (not used by dolibarr) datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_parent integer DEFAULT 0, -- Not used. Used by external modules. Virtual product id label varchar(255) NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_product_batch.sql b/htdocs/install/mysql/tables/llx_product_batch.sql index 9b736278e3a..7300c49874f 100644 --- a/htdocs/install/mysql/tables/llx_product_batch.sql +++ b/htdocs/install/mysql/tables/llx_product_batch.sql @@ -20,7 +20,7 @@ CREATE TABLE llx_product_batch ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product_stock integer NOT NULL, eatby datetime DEFAULT NULL, -- deprecated. should not be used here but should be stored into a table llx_product_lot sellby datetime DEFAULT NULL, -- deprecated. should not be used here but should be stored into a table llx_product_lot diff --git a/htdocs/install/mysql/tables/llx_product_customer_price.sql b/htdocs/install/mysql/tables/llx_product_customer_price.sql index c7b6f1eb1a2..7cd481c3c75 100644 --- a/htdocs/install/mysql/tables/llx_product_customer_price.sql +++ b/htdocs/install/mysql/tables/llx_product_customer_price.sql @@ -25,7 +25,7 @@ create table llx_product_customer_price rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, fk_soc integer NOT NULL, price double(24,8) DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_product_extrafields.sql b/htdocs/install/mysql/tables/llx_product_extrafields.sql index b265340d11c..24e53d9bda6 100644 --- a/htdocs/install/mysql/tables/llx_product_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_product_extrafields.sql @@ -19,7 +19,7 @@ create table llx_product_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql index 7e61a2df6b1..20d4db7492b 100644 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql @@ -24,7 +24,7 @@ create table llx_product_fournisseur_price rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer, fk_soc integer, ref_fourn varchar(30), diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql index 51d5499e825..728915521a7 100644 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql @@ -18,7 +18,7 @@ Create Table llx_product_fournisseur_price_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_product_lot.sql b/htdocs/install/mysql/tables/llx_product_lot.sql index 4d59a46c153..86cca7d0f04 100644 --- a/htdocs/install/mysql/tables/llx_product_lot.sql +++ b/htdocs/install/mysql/tables/llx_product_lot.sql @@ -25,7 +25,7 @@ CREATE TABLE llx_product_lot ( eatby date DEFAULT NULL, -- Eatby date sellby date DEFAULT NULL, -- Sellby date datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer diff --git a/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql b/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql index b3843ed9ba6..8fbbbde1bc5 100644 --- a/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql @@ -19,7 +19,7 @@ create table llx_product_lot_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_price.sql b/htdocs/install/mysql/tables/llx_product_price.sql index 75a5355afe7..ff862e427e0 100644 --- a/htdocs/install/mysql/tables/llx_product_price.sql +++ b/htdocs/install/mysql/tables/llx_product_price.sql @@ -25,7 +25,7 @@ create table llx_product_price ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- Multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, date_price datetime NOT NULL, price_level smallint NULL DEFAULT 1, diff --git a/htdocs/install/mysql/tables/llx_product_price_by_qty.sql b/htdocs/install/mysql/tables/llx_product_price_by_qty.sql index 7cb8b327b4d..dc3a21bfedb 100644 --- a/htdocs/install/mysql/tables/llx_product_price_by_qty.sql +++ b/htdocs/install/mysql/tables/llx_product_price_by_qty.sql @@ -40,6 +40,6 @@ create table llx_product_price_by_qty multicurrency_price double(24,8) DEFAULT NULL, multicurrency_price_ttc double(24,8) DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_stock.sql b/htdocs/install/mysql/tables/llx_product_stock.sql index 586c5b410c7..c5a2f4ad005 100644 --- a/htdocs/install/mysql/tables/llx_product_stock.sql +++ b/htdocs/install/mysql/tables/llx_product_stock.sql @@ -21,7 +21,7 @@ create table llx_product_stock ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, fk_entrepot integer NOT NULL, reel real, -- physical stock diff --git a/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql b/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql index 903bd59b524..d6d5e57e549 100644 --- a/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql +++ b/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql @@ -21,7 +21,7 @@ create table llx_product_warehouse_properties ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, fk_entrepot integer NOT NULL, seuil_stock_alerte float DEFAULT '0', diff --git a/htdocs/install/mysql/tables/llx_projet.sql b/htdocs/install/mysql/tables/llx_projet.sql index f783597653f..a36adb3a672 100644 --- a/htdocs/install/mysql/tables/llx_projet.sql +++ b/htdocs/install/mysql/tables/llx_projet.sql @@ -22,7 +22,7 @@ create table llx_projet rowid integer AUTO_INCREMENT PRIMARY KEY, fk_soc integer, datec datetime, -- date creation project - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, dateo date, -- date start project datee date, -- date end project ref varchar(50), diff --git a/htdocs/install/mysql/tables/llx_projet_extrafields.sql b/htdocs/install/mysql/tables/llx_projet_extrafields.sql index 8a96a715b05..0001d4e8876 100644 --- a/htdocs/install/mysql/tables/llx_projet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_projet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_projet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_projet_task.sql b/htdocs/install/mysql/tables/llx_projet_task.sql index b5cc02e4929..01edb857738 100644 --- a/htdocs/install/mysql/tables/llx_projet_task.sql +++ b/htdocs/install/mysql/tables/llx_projet_task.sql @@ -25,7 +25,7 @@ create table llx_projet_task fk_projet integer NOT NULL, fk_task_parent integer DEFAULT 0 NOT NULL, datec datetime, -- date creation - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date dateo datetime, -- date start task datee datetime, -- date end task datev datetime, -- date validation diff --git a/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql b/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql index 256c9025dc0..bf3d25e6922 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql @@ -19,7 +19,7 @@ create table llx_projet_task_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_projet_task_time.sql b/htdocs/install/mysql/tables/llx_projet_task_time.sql index 8f0f5e663b9..786d8907588 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_time.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_time.sql @@ -30,6 +30,6 @@ create table llx_projet_task_time invoice_line_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice line id here import_key varchar(14), -- Import key datec datetime, -- date creation time - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date note text -- A comment )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_propal.sql b/htdocs/install/mysql/tables/llx_propal.sql index d21d9ef2d7e..662db791094 100644 --- a/htdocs/install/mysql/tables/llx_propal.sql +++ b/htdocs/install/mysql/tables/llx_propal.sql @@ -32,7 +32,7 @@ create table llx_propal fk_soc integer, fk_projet integer DEFAULT NULL, -- projet auquel est rattache la propale - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- date de creation datep date, -- date de la propal fin_validite datetime, -- date de fin de validite diff --git a/htdocs/install/mysql/tables/llx_propal_extrafields.sql b/htdocs/install/mysql/tables/llx_propal_extrafields.sql index f6ccb68b39b..31201e37b55 100644 --- a/htdocs/install/mysql/tables/llx_propal_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_propal_extrafields.sql @@ -19,7 +19,7 @@ create table llx_propal_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql b/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql index ff0f44d0280..b599702d560 100644 --- a/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql +++ b/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql @@ -22,7 +22,7 @@ CREATE TABLE llx_propal_merge_pdf_product ( fk_user_author integer DEFAULT NULL, fk_user_mod integer NOT NULL, datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql b/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql index 74986b1c641..7235d65eccd 100644 --- a/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_propaldet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_reception.sql b/htdocs/install/mysql/tables/llx_reception.sql index 05ed6ca4604..71cc000ffc1 100644 --- a/htdocs/install/mysql/tables/llx_reception.sql +++ b/htdocs/install/mysql/tables/llx_reception.sql @@ -22,7 +22,7 @@ create table llx_reception ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ref varchar(30) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_reception_extrafields.sql b/htdocs/install/mysql/tables/llx_reception_extrafields.sql index e2f83794a0b..13d3be5fe77 100644 --- a/htdocs/install/mysql/tables/llx_reception_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_reception_extrafields.sql @@ -19,7 +19,7 @@ create table llx_reception_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql index f135c1af72f..ded61d49e8b 100644 --- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql @@ -24,7 +24,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature_extrafields.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature_extrafields.sql index d0fb92fead9..77cf71b9b00 100644 --- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature_extrafields.sql @@ -16,7 +16,7 @@ create table llx_recruitment_recruitmentcandidature_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition.sql index b342156ccd1..4ad1198d808 100644 --- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition.sql +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition.sql @@ -33,7 +33,7 @@ CREATE TABLE llx_recruitment_recruitmentjobposition( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, last_main_doc varchar(255), diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition_extrafields.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition_extrafields.sql index 07ae2ef5153..21b1ec081bf 100644 --- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition_extrafields.sql @@ -16,7 +16,7 @@ create table llx_recruitment_recruitmentjobposition_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_resource.sql b/htdocs/install/mysql/tables/llx_resource.sql index 7dc709ad83a..30bd2bcbbf3 100644 --- a/htdocs/install/mysql/tables/llx_resource.sql +++ b/htdocs/install/mysql/tables/llx_resource.sql @@ -34,5 +34,5 @@ CREATE TABLE llx_resource import_key varchar(14), extraparams varchar(255), -- for stock other parameters with json format fk_country integer DEFAULT NULL, -- Optional id of original country - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_resource_extrafields.sql b/htdocs/install/mysql/tables/llx_resource_extrafields.sql index 6e828258339..88bcc7606c8 100644 --- a/htdocs/install/mysql/tables/llx_resource_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_resource_extrafields.sql @@ -19,7 +19,7 @@ create table llx_resource_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index a98be7912f7..88a0fcbda46 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -114,7 +114,7 @@ create table llx_societe webservices_url varchar(255), -- supplier webservice url webservices_key varchar(128), -- supplier webservice key - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date datec datetime, -- creation date fk_user_creat integer NULL, -- utilisateur qui a cree l'info fk_user_modif integer, -- utilisateur qui a modifie l'info diff --git a/htdocs/install/mysql/tables/llx_societe_account.sql b/htdocs/install/mysql/tables/llx_societe_account.sql index 6a78a9a7839..b200d4f3854 100644 --- a/htdocs/install/mysql/tables/llx_societe_account.sql +++ b/htdocs/install/mysql/tables/llx_societe_account.sql @@ -33,7 +33,7 @@ CREATE TABLE llx_societe_account( date_last_login datetime, date_previous_login datetime, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_societe_address.sql b/htdocs/install/mysql/tables/llx_societe_address.sql index e18409fbf51..2b5f2d57146 100644 --- a/htdocs/install/mysql/tables/llx_societe_address.sql +++ b/htdocs/install/mysql/tables/llx_societe_address.sql @@ -21,7 +21,7 @@ create table llx_societe_address ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, -- creation date - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date label varchar(30), -- fk_soc integer DEFAULT 0, -- name varchar(60), -- company name diff --git a/htdocs/install/mysql/tables/llx_societe_extrafields.sql b/htdocs/install/mysql/tables/llx_societe_extrafields.sql index e277db15821..a4b5b269358 100644 --- a/htdocs/install/mysql/tables/llx_societe_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_societe_extrafields.sql @@ -19,7 +19,7 @@ create table llx_societe_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe_prices.sql b/htdocs/install/mysql/tables/llx_societe_prices.sql index 2b88340e611..2e9178774f5 100644 --- a/htdocs/install/mysql/tables/llx_societe_prices.sql +++ b/htdocs/install/mysql/tables/llx_societe_prices.sql @@ -20,7 +20,7 @@ create table llx_societe_prices ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_soc integer DEFAULT 0, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, fk_user_author integer, price_level tinyint DEFAULT 1 diff --git a/htdocs/install/mysql/tables/llx_societe_remise.sql b/htdocs/install/mysql/tables/llx_societe_remise.sql index a3a265cce5f..2d4e3a9c258 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise.sql @@ -24,7 +24,7 @@ create table llx_societe_remise rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- creation date fk_user_author integer, -- creation user remise_client double(6,3) DEFAULT 0 NOT NULL, -- discount diff --git a/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql b/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql index 3786b16b76a..d6dfdc20d9d 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql @@ -24,7 +24,7 @@ create table llx_societe_remise_supplier rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- creation date fk_user_author integer, -- creation user remise_supplier double(6,3) DEFAULT 0 NOT NULL, -- discount diff --git a/htdocs/install/mysql/tables/llx_societe_rib.sql b/htdocs/install/mysql/tables/llx_societe_rib.sql index 7d00d9fb1dd..ece4b2edffe 100644 --- a/htdocs/install/mysql/tables/llx_societe_rib.sql +++ b/htdocs/install/mysql/tables/llx_societe_rib.sql @@ -27,7 +27,7 @@ create table llx_societe_rib label varchar(200), fk_soc integer NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- For BAN bank varchar(255), -- bank name diff --git a/htdocs/install/mysql/tables/llx_socpeople.sql b/htdocs/install/mysql/tables/llx_socpeople.sql index 2a1b551beb9..decc229e3e7 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.sql @@ -23,7 +23,7 @@ create table llx_socpeople ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_soc integer, -- lien vers la societe entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(255), -- reference into an external system (not used by dolibarr) diff --git a/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql b/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql index 66220ce7e98..f2f594e12f3 100644 --- a/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql @@ -19,7 +19,7 @@ create table llx_socpeople_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_stock_mouvement.sql b/htdocs/install/mysql/tables/llx_stock_mouvement.sql index 94501a516dd..2cd094c1b05 100644 --- a/htdocs/install/mysql/tables/llx_stock_mouvement.sql +++ b/htdocs/install/mysql/tables/llx_stock_mouvement.sql @@ -20,7 +20,7 @@ create table llx_stock_mouvement ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datem datetime, -- Date and hour of movement fk_product integer NOT NULL, -- Id of product batch varchar(128) DEFAULT NULL, -- Lot or serial number diff --git a/htdocs/install/mysql/tables/llx_subscription.sql b/htdocs/install/mysql/tables/llx_subscription.sql index 03d24c68f6e..8e86e216d3f 100644 --- a/htdocs/install/mysql/tables/llx_subscription.sql +++ b/htdocs/install/mysql/tables/llx_subscription.sql @@ -19,7 +19,7 @@ create table llx_subscription ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, fk_adherent integer, fk_type integer, diff --git a/htdocs/install/mysql/tables/llx_supplier_proposal.sql b/htdocs/install/mysql/tables/llx_supplier_proposal.sql index 5e7393112d8..e63c4ff64c7 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposal.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposal.sql @@ -23,7 +23,7 @@ CREATE TABLE llx_supplier_proposal ( ref_int varchar(255) DEFAULT NULL, fk_soc integer DEFAULT NULL, fk_projet integer DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime DEFAULT NULL, date_valid datetime DEFAULT NULL, date_cloture datetime DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql b/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql index a13c74d0d04..8dfed18bbbc 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql @@ -17,7 +17,7 @@ CREATE TABLE llx_supplier_proposal_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql b/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql index 0501aecc68b..df6b5216c21 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql @@ -17,7 +17,7 @@ CREATE TABLE llx_supplier_proposaldet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_ticket.sql b/htdocs/install/mysql/tables/llx_ticket.sql index 4440bce5cec..c053e787dfa 100644 --- a/htdocs/install/mysql/tables/llx_ticket.sql +++ b/htdocs/install/mysql/tables/llx_ticket.sql @@ -39,6 +39,6 @@ CREATE TABLE llx_ticket date_close datetime, notify_tiers_at_create tinyint, email_msgid varchar(255), -- if ticket is created by email collector, we store here MSG ID - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_ticket_extrafields.sql b/htdocs/install/mysql/tables/llx_ticket_extrafields.sql index 538da09692e..31f82064461 100644 --- a/htdocs/install/mysql/tables/llx_ticket_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_ticket_extrafields.sql @@ -18,7 +18,7 @@ create table llx_ticket_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- ticket id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_tva.sql b/htdocs/install/mysql/tables/llx_tva.sql index 2804d410e7d..6cf97e6b4c6 100644 --- a/htdocs/install/mysql/tables/llx_tva.sql +++ b/htdocs/install/mysql/tables/llx_tva.sql @@ -20,7 +20,7 @@ create table llx_tva ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- Create date datep date, -- date de paiement datev date, -- date de valeur diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index b49feba85d6..c734192ad64 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -29,7 +29,7 @@ create table llx_user fk_establishment integer DEFAULT 0, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, login varchar(50) NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_user_employment.sql b/htdocs/install/mysql/tables/llx_user_employment.sql index ff2a87028d4..c06df0189d2 100644 --- a/htdocs/install/mysql/tables/llx_user_employment.sql +++ b/htdocs/install/mysql/tables/llx_user_employment.sql @@ -25,7 +25,7 @@ create table llx_user_employment ref_ext varchar(50), -- reference into an external system (not used by dolibarr) fk_user integer, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, job varchar(128), -- job position. may be a dictionary diff --git a/htdocs/install/mysql/tables/llx_user_extrafields.sql b/htdocs/install/mysql/tables/llx_user_extrafields.sql index b7ba9116630..c38e9435a63 100644 --- a/htdocs/install/mysql/tables/llx_user_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_user_extrafields.sql @@ -21,7 +21,7 @@ create table llx_user_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- member id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_user_rib.sql b/htdocs/install/mysql/tables/llx_user_rib.sql index 1349e77a77b..4463a1f6f2b 100644 --- a/htdocs/install/mysql/tables/llx_user_rib.sql +++ b/htdocs/install/mysql/tables/llx_user_rib.sql @@ -22,7 +22,7 @@ create table llx_user_rib fk_user integer NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(30), bank varchar(255), -- bank name code_banque varchar(128), -- bank code diff --git a/htdocs/install/mysql/tables/llx_usergroup.sql b/htdocs/install/mysql/tables/llx_usergroup.sql index 43bbba9dbb1..959dfbca3d9 100644 --- a/htdocs/install/mysql/tables/llx_usergroup.sql +++ b/htdocs/install/mysql/tables/llx_usergroup.sql @@ -24,7 +24,7 @@ create table llx_usergroup nom varchar(180) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, note text, model_pdf varchar(255) DEFAULT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql b/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql index e2e96f142d9..ea358509eff 100644 --- a/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql @@ -18,7 +18,7 @@ CREATE TABLE llx_usergroup_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_website.sql b/htdocs/install/mysql/tables/llx_website.sql index 717052f795c..b2103177972 100644 --- a/htdocs/install/mysql/tables/llx_website.sql +++ b/htdocs/install/mysql/tables/llx_website.sql @@ -36,6 +36,6 @@ CREATE TABLE llx_website fk_user_modif integer, date_creation datetime, position integer DEFAULT 0, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_website_extrafields.sql b/htdocs/install/mysql/tables/llx_website_extrafields.sql index ff39e2c51c4..b3fd6786a09 100644 --- a/htdocs/install/mysql/tables/llx_website_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_website_extrafields.sql @@ -16,7 +16,7 @@ CREATE TABLE llx_website_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_website_page.sql b/htdocs/install/mysql/tables/llx_website_page.sql index e2bec4a8a24..4b1b3045d6b 100644 --- a/htdocs/install/mysql/tables/llx_website_page.sql +++ b/htdocs/install/mysql/tables/llx_website_page.sql @@ -38,7 +38,7 @@ CREATE TABLE llx_website_page fk_user_modif integer, author_alias varchar(64), date_creation datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14), -- import key object_type varchar(255), fk_object varchar(255) diff --git a/htdocs/install/mysql/tables/llx_zapier_hook.sql b/htdocs/install/mysql/tables/llx_zapier_hook.sql index b5bcc15123a..b54fbc0d348 100644 --- a/htdocs/install/mysql/tables/llx_zapier_hook.sql +++ b/htdocs/install/mysql/tables/llx_zapier_hook.sql @@ -24,6 +24,6 @@ CREATE TABLE llx_zapier_hook( status integer, date_creation datetime NOT NULL, fk_user integer NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql b/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql index 09fef4cc399..0b4f6e97238 100644 --- a/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql @@ -16,7 +16,7 @@ create table llx_zapier_hook_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; From ed3a4de438a5cb8c0ffc35c70eead481ace4cc4e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 14:30:59 +0200 Subject: [PATCH 23/65] Fix security hole --- htdocs/societe/class/societe.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 686e83f104f..ba16f61f3b2 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2423,14 +2423,14 @@ class Societe extends CommonObject if (!empty($this->name)) { - $label .= '
'.$langs->trans('Name').': '.$this->name; - if (!empty($this->name_alias)) $label .= ' ('.$this->name_alias.')'; + $label .= '
'.$langs->trans('Name').': '.dol_escape_htmltag($this->name); + if (!empty($this->name_alias)) $label .= ' ('.dol_escape_htmltag($this->name_alias).')'; } $label .= '
'.$langs->trans('Email').': '.$this->email; if (!empty($this->country_code)) $label .= '
'.$langs->trans('Country').': '.$this->country_code; if (!empty($this->tva_intra) || (!empty($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP) && strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'vatnumber') !== false)) - $label .= '
'.$langs->trans('VATIntra').': '.$this->tva_intra; + $label .= '
'.$langs->trans('VATIntra').': '.dol_escape_htmltag($this->tva_intra); if (!empty($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP)) { if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid1') !== false) $label .= '
'.$langs->trans('ProfId1'.$this->country_code).': '.$this->idprof1; @@ -2491,7 +2491,7 @@ class Societe extends CommonObject $result .= $linkstart; if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= ($maxlen ?dol_trunc($name, $maxlen) : $name); + if ($withpicto != 2) $result .= dol_escape_htmltag($maxlen ? dol_trunc($name, $maxlen) : $name); $result .= $linkend; global $action; From 09e74209366abfbb6c8cc90c10c2cedb79d552fc Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 8 Oct 2020 15:51:46 +0200 Subject: [PATCH 24/65] FIX missing entity in href --- htdocs/admin/agenda_xcal.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index bc9eedb9177..8ba650f19a8 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -156,17 +156,20 @@ print "
"; $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 - +$getentity = ($conf->entity > 1 ? "&entity=".$conf->entity : ""); // Show message $message = ''; -$urlvcal = ''.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.($conf->entity > 1 ? "&entity=".$conf->entity : "").'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; +$urlvcal = ''; +$urlvcal .= $urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; $message .= img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'vcal', $urlvcal); $message .= '
'; -$urlical = ''.$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.($conf->entity > 1 ? "&entity=".$conf->entity : "").'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; +$urlical = ''; +$urlical .=$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; $message .= img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'ical/ics', $urlical); $message .= '
'; -$urlrss = ''.$urlwithroot.'/public/agenda/agendaexport.php?format=rss'.($conf->entity > 1 ? "&entity=".$conf->entity : "").'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; +$urlrss = ''; +$urlrss .= $urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; $message .= img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'rss', $urlrss); $message .= '
'; $message .= '
'; From 0dc24c87b82e8420939a6ec90fb0567bce435792 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 8 Oct 2020 16:16:49 +0200 Subject: [PATCH 25/65] FIX nuke DEFAULT CURRENT_TIMESTAMP in pgsql --- htdocs/core/db/pgsql.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 3c49bcf6f4b..d24b4e98189 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -234,8 +234,11 @@ class DoliDBPgsql extends DoliDB // on update defaulted by now $line = preg_replace('/(\s*)tms(\s*)timestamp/i', '\\1tms timestamp without time zone DEFAULT now() NOT NULL', $line); + // nuke DEFAULT CURRENT_TIMESTAMP + $line = preg_replace('/(\s*)DEFAULT(\s*)CURRENT_TIMESTAMP/i', '\\1', $line); + // nuke ON UPDATE CURRENT_TIMESTAMP - $line = preg_replace('/(\s*)on(\s*)update(\s*)CURRENT_TIMESTAMP/i', '\\1', $line); + $line = preg_replace('/(\s*)ON(\s*)UPDATE(\s*)CURRENT_TIMESTAMP/i', '\\1', $line); // unique index(field1,field2) if (preg_match('/unique index\s*\((\w+\s*,\s*\w+)\)/i', $line)) From 925f240340ef367aaf56a4f955ea6b471ba43a07 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 17:13:51 +0200 Subject: [PATCH 26/65] Fix user --- htdocs/user/card.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 95a60804cfb..35917eba093 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1446,8 +1446,10 @@ if ($action == 'create' || $action == 'adduserldap') } if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { - if ($object->pass) $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').preg_replace('/./i', '*', $object->pass); - else { + if ($object->pass) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); + $valuetoshow .= ''.$langs->trans("Hidden").''; + } else { if ($user->admin && $user->id == $object->id) { $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); //$valuetoshow .= ''.$langs->trans("Crypted").' - '; From 047d6f78e784095f450daa64e1f6e7724a44bbdd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 17:49:26 +0200 Subject: [PATCH 27/65] Fix status disabled of task intocombo list --- htdocs/core/class/html.formprojet.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 058706edce7..9586adeaed4 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -368,6 +368,7 @@ class FormProjets } else $out .= ' '; $out .= ''; } + $num = $this->db->num_rows($resql); $i = 0; if ($num) @@ -388,6 +389,18 @@ class FormProjets $labeltoshow = ''; + $disabled = 0; + if ($obj->fk_statut == Project::STATUS_DRAFT) + { + $disabled = 1; + } elseif ($obj->fk_statut == Project::STATUS_CLOSED) + { + if ($discard_closed == 2) $disabled = 1; + } elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) + { + $disabled = 1; + } + if ($showproject == 'all') { $labeltoshow .= dol_trunc($obj->ref, 18); // Project ref From e7c456f6f268c45d37c735ec3a6b13a342d86116 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 19:22:21 +0200 Subject: [PATCH 28/65] NEW Add column payment term into list of supplier invoices. --- htdocs/core/class/html.form.class.php | 2 ++ htdocs/fourn/facture/list.php | 30 ++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f01bac8e7fb..d5d6e59dcb3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3441,6 +3441,7 @@ class Form } print ''; if ($user->admin && empty($noinfoadmin)) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print ajax_combobox($htmlname); } @@ -3510,6 +3511,7 @@ class Form } print ''; if ($user->admin && !$noadmininfo) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print ajax_combobox('select'.$htmlname); } diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 337f2a9a000..2a63e040434 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -67,7 +67,7 @@ if ($user->socid > 0) $socid = $user->socid; } -$mode = GETPOST("mode"); +$mode = GETPOST("mode", 'aZ09'); $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_label = GETPOST("search_label", "alpha"); @@ -92,6 +92,7 @@ $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); $search_status = GETPOST('search_status', 'int'); $search_paymentmode = GETPOST('search_paymentmode', 'int'); +$search_paymentcond = GETPOST('search_paymentcond', 'int'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); $search_state = GETPOST("search_state"); @@ -165,7 +166,8 @@ $arrayfields = array( 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0), 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers), - 'f.fk_mode_reglement'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1), + 'f.fk_cond_reglement'=>array('label'=>$langs->trans("PaymentTerm"), 'checked'=>1, 'position'=>50), + 'f.fk_mode_reglement'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1, 'position'=>52), 'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1, 'position'=>105), 'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0, 'position'=>110), 'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax1_assuj == "1", 'position'=>95), @@ -240,6 +242,7 @@ if (empty($reshook)) $search_multicurrency_montant_ttc = ''; $search_status = ''; $search_paymentmode = ''; + $search_paymentcond = ''; $search_town = ''; $search_zip = ""; $search_state = ""; @@ -367,7 +370,8 @@ if ($search_multicurrency_montant_vat != '') $sql .= natural_search('f.multicurr if ($search_multicurrency_montant_ttc != '') $sql .= natural_search('f.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); if ($search_login) $sql .= natural_search('u.login', $search_login); if ($search_status != '' && $search_status >= 0) $sql .= " AND f.fk_statut = ".$db->escape($search_status); -if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode.""; +if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".((int) $search_paymentmode); +if ($search_paymentcond > 0) $sql .= " AND f.fk_cond_reglement = ".((int) $search_paymentcond); $sql .= dolSqlDateFilter("f.datef", $day, $month, $year); $sql .= dolSqlDateFilter("f.date_lim_reglement", $day_lim, $month_lim, $year_lim); if ($option == 'late') $sql .= " AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->fournisseur->warning_delay)."'"; @@ -385,7 +389,7 @@ if ($filter && $filter != -1) $sql .= ' AND '.$db->escape(trim($filt[0])).' = '.$db->escape(trim($filt[1])); } } -if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$db->escape($search_sale); +if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale); if ($search_user > 0) { $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='invoice_supplier' AND tc.source='internal' AND ec.element_id = f.rowid AND ec.fk_socpeople = ".$search_user; @@ -720,11 +724,18 @@ if ($resql) print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); print ''; } + // Condition of payment + if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) + { + print '
'; + } // Payment mode if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { print ''; } if (!empty($arrayfields['f.total_ht']['checked'])) @@ -873,6 +884,7 @@ if ($resql) if (!empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); if (!empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); if (!empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center '); + if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_cond_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_cond_reglement", "", $param, "", $sortfield, $sortorder); if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_mode_reglement", "", $param, "", $sortfield, $sortorder); if (!empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total_ht', '', $param, '', $sortfield, $sortorder, 'right '); if (!empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, '', $sortfield, $sortorder, 'right '); @@ -1096,6 +1108,14 @@ if ($resql) if (!$i) $totalarray['nbfield']++; } + // Payment condition + if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } // Payment mode if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { From 7766676f00e86feadaf9c5c3452286658ede2e95 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 19:45:53 +0200 Subject: [PATCH 29/65] Move readme position --- test/{ => acceptance}/README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{ => acceptance}/README.md (100%) diff --git a/test/README.md b/test/acceptance/README.md similarity index 100% rename from test/README.md rename to test/acceptance/README.md From fbd9229f9b28c400368731a16f342f83c242e718 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 20:03:16 +0200 Subject: [PATCH 30/65] Fix: no formatting when storing into memory. Formatting when forging sql --- htdocs/holiday/view_log.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index 862f8c33b70..7043f436e87 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -164,14 +164,14 @@ $sqlwhere = ''; if (!empty($search_year) && $search_year > 0) { if (!empty($search_month) && $search_month > 0) { - $from_date = $db->idate(dol_get_first_day($search_year, $search_month, 1)); - $to_date = $db->idate(dol_get_last_day($search_year, $search_month, 1)); + $from_date = dol_get_first_day($search_year, $search_month, 1); + $to_date = dol_get_last_day($search_year, $search_month, 1); } else { - $from_date = $db->idate(dol_get_first_day($search_year, 1, 1)); - $to_date = $db->idate(dol_get_last_day($search_year, 12, 1)); + $from_date = dol_get_first_day($search_year, 1, 1); + $to_date = dol_get_last_day($search_year, 12, 1); } - $sqlwhere .= "AND date_action BETWEEN '".$from_date."' AND '".$to_date."'"; + $sqlwhere .= "AND date_action BETWEEN '".$db->idate($from_date)."' AND '".$db->idate($to_date)."'"; } if (!empty($search_id) && $search_id > 0) $sqlwhere.= natural_search('rowid', $search_id, 1); From 35fbc602ee8c7f8e8b4872d6efe3c57778374081 Mon Sep 17 00:00:00 2001 From: "Sekan, Tobias" Date: Fri, 9 Oct 2020 09:22:26 +0200 Subject: [PATCH 31/65] Add global payment search --- htdocs/compta/paiement/list.php | 73 ++++++++++++++++++---------- htdocs/core/ajax/selectsearchbox.php | 22 +++++++++ htdocs/fourn/paiement/list.php | 27 ++++++++-- htdocs/langs/en_US/main.lang | 2 + 4 files changed, 94 insertions(+), 30 deletions(-) diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index e2f3ea9012b..1fa8f8763ef 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -46,24 +46,24 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; $langs->loadLangs(array('bills', 'banks', 'compta', 'companies')); $action = GETPOST('action', 'alpha'); -$massaction = GETPOST('massaction', 'alpha'); +$massaction = GETPOST('massaction', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'paymentlist'; $facid = GETPOST('facid', 'int'); $socid = GETPOST('socid', 'int'); -$userid = GETPOST('userid', 'int'); -$day = GETPOST('day', 'int'); +$userid = GETPOST('userid', 'int'); +$day = GETPOST('day', 'int'); $month = GETPOST('month', 'int'); -$year = GETPOST('year', 'int'); +$year = GETPOST('year', 'int'); $search_ref = GETPOST("search_ref", "alpha"); -$search_account = GETPOST("search_account", "int"); -$search_paymenttype = GETPOST("search_paymenttype"); -$search_amount = GETPOST("search_amount", 'alpha'); // alpha because we must be able to search on "< x" $search_company = GETPOST("search_company", 'alpha'); +$search_paymenttype = GETPOST("search_paymenttype"); +$search_account = GETPOST("search_account", "int"); $search_payment_num = GETPOST('search_payment_num', 'alpha'); +$search_amount = GETPOST("search_amount", 'alpha'); // alpha because we must be able to search on "< x" $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); @@ -76,27 +76,35 @@ $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) $sortorder = "DESC"; -if (!$sortfield) $sortfield = "p.rowid"; +if (!$sortfield) $sortfield = "p.ref"; -// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$object = new Paiement($db); -$hookmanager->initHooks(array('paymentlist')); -$extrafields = new ExtraFields($db); +$search_all = trim(GETPOSTISSET("search_all") ? GETPOSTISSET("search_all", 'alpha') : GETPOST('sall')); + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'p.ref'=>"RefPayment", + 's.nom'=>"ThirdParty", + 'p.num_paiement'=>"Numero", + 'p.amount'=>"Amount", +); $arrayfields = array( - 'p.rowid' => array('label'=>"RefPayment", 'checked'=>1, 'position'=>10), + 'p.ref' => array('label'=>"RefPayment", 'checked'=>1, 'position'=>10), 'p.datep' => array('label'=>"Date", 'checked'=>1, 'position'=>20), 's.nom' => array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30), 'c.libelle' => array('label'=>"Type", 'checked'=>1, 'position'=>40), 'transaction' => array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>50, 'enabled'=>(!empty($conf->banque->enabled))), 'ba.label' => array('label'=>"Account", 'checked'=>1, 'position'=>60, 'enabled'=>(!empty($conf->banque->enabled))), - 'p.num_payment' => array('label'=>"Numero", 'checked'=>1, 'position'=>70, 'tooltip'=>"ChequeOrTransferNumber"), + 'p.num_paiement' => array('label'=>"Numero", 'checked'=>1, 'position'=>70, 'tooltip'=>"ChequeOrTransferNumber"), 'p.amount' => array('label'=>"Amount", 'checked'=>1, 'position'=>80), 'p.statut' => array('label'=>"Status", 'checked'=>1, 'position'=>90, 'enabled'=>(!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))), ); - $arrayfields = dol_sort_array($arrayfields, 'position'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('paymentlist')); +$object = new Paiement($db); + /* * Actions */ @@ -140,7 +148,7 @@ llxHeader('', $langs->trans('ListPayment')); if (GETPOST("orphelins", "alpha")) { // Payments not linked to an invoice. Should not happend. For debug only. - $sql = "SELECT p.rowid, p.ref, p.datep, p.amount, p.statut, p.num_paiement as num_payment"; + $sql = "SELECT p.ref, p.datep, p.amount, p.statut, p.num_paiement"; $sql .= ", c.code as paiement_code"; // Add fields from hooks @@ -158,7 +166,7 @@ if (GETPOST("orphelins", "alpha")) { $sql .= $hookmanager->resPrint; } else { // DISTINCT is to avoid duplicate when there is a link to sales representatives - $sql = "SELECT DISTINCT p.rowid, p.ref, p.datep, p.fk_bank, p.amount, p.statut, p.num_paiement as num_payment"; + $sql = "SELECT DISTINCT p.ref, p.datep, p.fk_bank, p.amount, p.statut, p.num_paiement"; $sql .= ", c.code as paiement_code"; $sql .= ", ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal"; $sql .= ", s.rowid as socid, s.nom as name, s.email"; @@ -198,6 +206,8 @@ if (GETPOST("orphelins", "alpha")) { if ($search_amount) $sql .= natural_search('p.amount', $search_amount, 1); if ($search_company) $sql .= natural_search('s.nom', $search_company); + if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); + // Add where from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook @@ -251,6 +261,12 @@ print ''; print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit, 0, 0, 1); +if ($search_all) +{ + 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 if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); @@ -268,7 +284,7 @@ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { } // Filter: Ref -if (!empty($arrayfields['p.rowid']['checked'])) { +if (!empty($arrayfields['p.ref']['checked'])) { print '
'; @@ -305,7 +321,7 @@ if (!empty($arrayfields['transaction']['checked'])) { } // Filter: Cheque number (fund transfer) -if (!empty($arrayfields['p.num_payment']['checked'])) { +if (!empty($arrayfields['p.num_paiement']['checked'])) { print ''; } @@ -343,11 +359,11 @@ print ""; print ''; if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.rowid']['checked'])) print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", '', $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); if (!empty($arrayfields['p.datep']['checked'])) print_liste_field_titre($arrayfields['p.datep']['label'], $_SERVER["PHP_SELF"], "p.datep", '', $param, '', $sortfield, $sortorder, 'center '); if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder); if (!empty($arrayfields['c.libelle']['checked'])) print_liste_field_titre($arrayfields['c.libelle']['label'], $_SERVER["PHP_SELF"], "c.libelle", '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.num_payment']['checked'])) print_liste_field_titre($arrayfields['p.num_payment']['label'], $_SERVER["PHP_SELF"], "p.num_payment", '', $param, '', $sortfield, $sortorder, '', $arrayfields['p.num_payment']['tooltip']); +if (!empty($arrayfields['p.num_paiement']['checked'])) print_liste_field_titre($arrayfields['p.num_paiement']['label'], $_SERVER["PHP_SELF"], "p.num_paiement", '', $param, '', $sortfield, $sortorder, '', $arrayfields['p.num_paiement']['tooltip']); if (!empty($arrayfields['transaction']['checked'])) print_liste_field_titre($arrayfields['transaction']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); if (!empty($arrayfields['ba.label']['checked'])) print_liste_field_titre($arrayfields['ba.label']['label'], $_SERVER["PHP_SELF"], "ba.label", '', $param, '', $sortfield, $sortorder); if (!empty($arrayfields['p.amount']['checked'])) print_liste_field_titre($arrayfields['p.amount']['label'], $_SERVER["PHP_SELF"], "p.amount", '', $param, 'class="right"', $sortfield, $sortorder); @@ -361,6 +377,13 @@ print $hookmanager->resPrint; print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print ""; +$checkedCount = 0; +foreach($arrayfields as $column) { + if($column['checked']) { + $checkedCount++; + } +} + $i = 0; $totalarray = array(); while ($i < min($num, $limit)) { @@ -382,7 +405,7 @@ while ($i < min($num, $limit)) { } // Ref - if (!empty($arrayfields['p.rowid']['checked'])) { + if (!empty($arrayfields['p.ref']['checked'])) { print ''; if (!$i) $totalarray['nbfield']++; } @@ -412,8 +435,8 @@ while ($i < min($num, $limit)) { } // Filter: Cheque number (fund transfer) - if (!empty($arrayfields['p.num_payment']['checked'])) { - print ''; + if (!empty($arrayfields['p.num_paiement']['checked'])) { + print ''; if (!$i) $totalarray['nbfield']++; } @@ -448,7 +471,7 @@ while ($i < min($num, $limit)) { if (!empty($arrayfields['p.amount']['checked'])) { print ''; if (!$i) $totalarray['nbfield']++; - $totalarray['pos'][8] = 'amount'; + $totalarray['pos'][$checkedCount] = 'amount'; $totalarray['val']['amount'] += $objp->amount; } diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index 29aeb9cc7eb..87b3a903343 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -119,6 +119,28 @@ 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) : '')); } +// Customer payments +if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INVOICE_DISABLED) && $user->rights->facture->lire) +{ + $arrayresult['searchintocustomerpayments'] = array( + 'position'=>170, + 'img'=>'object_payment', + 'label'=>$langs->trans("SearchIntoCustomerPayments", $search_boxvalue), + 'text'=>img_picto('', 'object_payment').' '.$langs->trans("SearchIntoCustomerPayments", $search_boxvalue), + 'url'=>DOL_URL_ROOT.'/compta/paiement/list.php?leftmenu=customers_bills_payment'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); +} + +// Vendor payments +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) || ! empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) +{ + $arrayresult['searchintovendorpayments'] = array( + 'position'=>175, + 'img'=>'object_payment', + 'label'=>$langs->trans("SearchIntoVendorPayments", $search_boxvalue), + 'text'=>img_picto('', 'object_payment').' '.$langs->trans("SearchIntoVendorPayments", $search_boxvalue), + 'url'=>DOL_URL_ROOT.'/fourn/paiement/list.php?leftmenu=suppliers_bills_payment'.($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) { diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index 1a89e7f6906..0310a75fe57 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -57,20 +57,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->loadLangs(array('companies', 'bills', 'banks', 'compta')); $action = GETPOST('action', 'alpha'); -$massaction = GETPOST('massaction', 'alpha'); +$massaction = GETPOST('massaction', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'vendorpaymentlist'; $socid = GETPOST('socid', 'int'); -$search_ref = GETPOST('search_ref', 'alpha'); +$search_ref = GETPOST('search_ref', 'alpha'); $search_day = GETPOST('search_day', 'int'); $search_month = GETPOST('search_month', 'int'); -$search_year = GETPOST('search_year', 'int'); +$search_year = GETPOST('search_year', 'int'); $search_company = GETPOST('search_company', 'alpha'); $search_payment_type = GETPOST('search_payment_type'); $search_cheque_num = GETPOST('search_cheque_num', 'alpha'); -$search_bank_account = GETPOST('search_bank_account', 'int'); +$search_bank_account = GETPOST('search_bank_account', 'int'); $search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x' $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -86,7 +86,15 @@ $pagenext = $page + 1; if (!$sortorder) $sortorder = "DESC"; if (!$sortfield) $sortfield = "p.datep"; -// TODO: add global search for this list +$search_all = trim(GETPOSTISSET("search_all") ? GETPOSTISSET("search_all", 'alpha') : GETPOST('sall')); + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'p.ref'=>"RefPayment", + 's.nom'=>"ThirdParty", + 'p.num_paiement'=>"Numero", + 'p.amount'=>"Amount", +); $arrayfields = array( 'p.ref' =>array('label'=>"RefPayment", 'checked'=>1, 'position'=>10), @@ -99,6 +107,7 @@ $arrayfields = array( ); $arrayfields = dol_sort_array($arrayfields, 'position'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('paymentsupplierlist')); $object = new PaiementFourn($db); @@ -164,6 +173,8 @@ if ($search_cheque_num != '') $sql .= natural_search('p.num_paiement', $search_c if ($search_amount) $sql .= natural_search('p.amount', $search_amount, 1); if ($search_bank_account > 0) $sql .= ' AND b.fk_account='.$search_bank_account."'"; +if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); + // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -223,6 +234,12 @@ print ''; print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'supplier_invoice', 0, '', '', $limit, 0, 0, 1); +if ($search_all) +{ + foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'; +} + $moreforfilter = ''; $parameters = array(); diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 427a5a80d45..789d3836e37 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1014,6 +1014,8 @@ SearchIntoCustomerShipments=Customer shipments SearchIntoExpenseReports=Expense reports SearchIntoLeaves=Leave SearchIntoTickets=Tickets +SearchIntoCustomerPayments=Customer payments +SearchIntoVendorPayments=Vendor payments SearchIntoMiscPayments=Miscellaneous payments CommentLink=Comments NbComments=Number of comments From 6b3f20dc6573e62b0687077a8fd366ae90067465 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 9 Oct 2020 07:29:25 +0000 Subject: [PATCH 32/65] Fixing style errors. --- htdocs/compta/paiement/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 1fa8f8763ef..f3ea57ea084 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -378,8 +378,8 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'alig print ""; $checkedCount = 0; -foreach($arrayfields as $column) { - if($column['checked']) { +foreach ($arrayfields as $column) { + if ($column['checked']) { $checkedCount++; } } From 5ac7d4dbac280a778ee1095744e0ff1af264831e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 10:02:13 +0200 Subject: [PATCH 33/65] Show last 12 bank receipts instead of 15 --- htdocs/compta/bank/bankentries_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 5035e6a1366..0cc0490f540 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -633,7 +633,7 @@ if ($resql) print ''; // Show last bank statements - $nbmax = 15; // We accept to show last 15 receipts (so we can have more than one year) + $nbmax = 12; // We show last 12 receipts (so we can have more than one year) $liste = ""; $sql = "SELECT DISTINCT num_releve FROM ".MAIN_DB_PREFIX."bank"; $sql .= " WHERE fk_account=".$object->id." AND num_releve IS NOT NULL"; From ec28a4fcdc19e4e057dc9a836000f006e391007b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 10:21:07 +0200 Subject: [PATCH 34/65] More info on tooltip --- htdocs/fourn/paiement/card.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 25256c7e20b..cb416a32c8f 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -251,9 +251,10 @@ if ($result > 0) print '
'; /** - * Liste des factures + * List of vendor invoices */ - $sql = 'SELECT f.rowid, f.ref, f.ref_supplier, f.total_ttc, pf.amount, f.rowid as facid, f.paye, f.fk_statut, s.nom as name, s.rowid as socid'; + $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.total_ttc, f.date, f.fk_statut as status,'; + $sql .= ' pf.amount, s.nom as name, s.rowid as socid'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid'; $sql .= ' AND pf.fk_paiementfourn = '.$object->id; @@ -285,6 +286,9 @@ if ($result > 0) $facturestatic->id = $objp->facid; $facturestatic->ref = ($objp->ref ? $objp->ref : $objp->rowid); + $facturestatic->date = $db->jdate($obj->date); + $facturestatic->type = $obj->type; + $facturestatic->statut = $obj->status; print '
'; // Ref From fe2e41527ad8484b08b2b51fdba10457faae2c56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 10:28:26 +0200 Subject: [PATCH 35/65] Fix sql error --- htdocs/fourn/paiement/card.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index cb416a32c8f..82c6e1d18d3 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -253,7 +253,7 @@ if ($result > 0) /** * List of vendor invoices */ - $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.total_ttc, f.date, f.fk_statut as status,'; + $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.paye, f.total_ht, f.total_tva, f.total_ttc, f.datef as date, f.fk_statut as status,'; $sql .= ' pf.amount, s.nom as name, s.rowid as socid'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid'; @@ -286,9 +286,13 @@ if ($result > 0) $facturestatic->id = $objp->facid; $facturestatic->ref = ($objp->ref ? $objp->ref : $objp->rowid); - $facturestatic->date = $db->jdate($obj->date); - $facturestatic->type = $obj->type; - $facturestatic->statut = $obj->status; + $facturestatic->date = $db->jdate($objp->date); + $facturestatic->type = $objp->type; + $facturestatic->total_ht = $objp->total_ht; + $facturestatic->total_tva = $objp->total_tva; + $facturestatic->total_ttc = $objp->total_ttc; + $facturestatic->statut = $objp->status; + $facturestatic->alreadypaid = -1; // unknown print ''; // Ref @@ -304,7 +308,7 @@ if ($result > 0) // Payed print ''; // Status - print ''; + print ''; print "\n"; if ($objp->paye == 1) From 5510f1feef7417205f8bf2da2ab9dd053aefa1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Hahn?= Date: Fri, 9 Oct 2020 10:59:06 +0200 Subject: [PATCH 36/65] Fix for #14957 and probably a lot of other issues Convert special characters for a valid use in xml documents --- htdocs/includes/odtphp/odf.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 5ec9b8f8870..f6e15b2e8a2 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -156,6 +156,7 @@ class Odf */ public function convertVarToOdf($value, $encode = true, $charset = 'ISO-8859') { + $value = $encode ? htmlspecialchars($value) : $value; $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value; $convertedValue = $value; From b591e6510b787f2b5a16be6151fe28ff918d4703 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 9 Oct 2020 11:01:08 +0200 Subject: [PATCH 37/65] FIX avoid warning "Parameter must be an array" --- htdocs/core/class/dolgraph.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 0a1686c3585..5d6327c63b0 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -533,7 +533,7 @@ class DolGraph $vals = array(); $nblines = count($this->data); - $nbvalues = count($this->data[0]) - 1; + $nbvalues = (! empty($this->data[0]) ? count($this->data[0]) - 1 : 0); for ($j = 0; $j < $nblines; $j++) { @@ -562,7 +562,7 @@ class DolGraph $vals = array(); $nblines = count($this->data); - $nbvalues = count($this->data[0]) - 1; + $nbvalues = (! empty($this->data[0]) ? count($this->data[0]) - 1 : 0); for ($j = 0; $j < $nblines; $j++) { From b6fc33c45434652b7441555862df5e9f55e746e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 11:13:02 +0200 Subject: [PATCH 38/65] Fix avoid error when we sumbit form to change page on conciliation --- htdocs/compta/bank/bankentries_list.php | 14 ++++++++------ htdocs/core/lib/functions.lib.php | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 0cc0490f540..617b3af95c6 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -212,7 +212,8 @@ if (empty($reshook)) } // Conciliation -if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', 'alpha')) && $user->rights->banque->consolidate) +if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', 'alpha')) && $user->rights->banque->consolidate + && (GETPOST('pageplusone') == GETPOST('pageplusoneold'))) { $error = 0; @@ -277,11 +278,11 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier) { $error = 0; - if (price2num($_POST["addcredit"]) > 0) + if (price2num(GETPOST("addcredit")) > 0) { - $amount = price2num($_POST["addcredit"]); + $amount = price2num(GETPOST("addcredit")); } else { - $amount = - price2num($_POST["adddebit"]); + $amount = - price2num(GETPOST("adddebit")); } $operation = GETPOST("operation", 'alpha'); @@ -785,11 +786,12 @@ if ($resql) } } - $morehtml = '
'; + /*$morehtml = '
'; $morehtml .= ' "; // ' Page '; $morehtml .= ''; $morehtml .= '/'.$nbtotalofpages.' '; $morehtml .= '
'; + */ if ($action != 'addline' && $action != 'reconcile') { @@ -801,7 +803,7 @@ if ($resql) $picto = 'bank_account'; if ($id > 0 || !empty($ref)) $picto = ''; - print_barre_liste($langs->trans("BankTransactions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $morehtml, '', $limit); + print_barre_liste($langs->trans("BankTransactions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $morehtml, '', $limit, 0, 0, 1); // We can add page now to param if ($page != '') $param .= '&page='.urlencode($page); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 512d88ad9fa..552ed8c4f4f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4376,6 +4376,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', // Right print '
'; } - if ($action != 'editline' && $lineid != $objp->dispatchlineid) + if ($action != 'editline' || $lineid != $objp->dispatchlineid) { print ''; print ''; print ''; - print ''; + print ''; print ''; print "\n"; From 12391523681122caff3ec76176412eb531ba2957 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 13:54:47 +0200 Subject: [PATCH 44/65] Update dolgraph.class.php --- htdocs/core/class/dolgraph.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 5d6327c63b0..dee727cb596 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -533,7 +533,7 @@ class DolGraph $vals = array(); $nblines = count($this->data); - $nbvalues = (! empty($this->data[0]) ? count($this->data[0]) - 1 : 0); + $nbvalues = (empty($this->data[0]) ? 0 : count($this->data[0]) - 1); for ($j = 0; $j < $nblines; $j++) { @@ -562,7 +562,7 @@ class DolGraph $vals = array(); $nblines = count($this->data); - $nbvalues = (! empty($this->data[0]) ? count($this->data[0]) - 1 : 0); + $nbvalues = (empty($this->data[0]) ? 0 : count($this->data[0]) - 1); for ($j = 0; $j < $nblines; $j++) { From 4fb83a0dd6da2e8d2fe13c6a238d8db43eb55251 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Fri, 9 Oct 2020 15:35:09 +0200 Subject: [PATCH 45/65] Fix migration --- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 6a34b69d1a2..78c7c2d1e2c 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -358,4 +358,7 @@ ALTER TABLE llx_website_page ADD COLUMN fk_object varchar(255); DELETE FROM llx_const WHERE name in ('MAIN_INCLUDE_ZERO_VAT_IN_REPORTS'); +UPDATE llx_projet_task_time SET tms = null WHERE tms = 0; +ALTER TABLE llx_projet_task_time MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; + ALTER TABLE llx_projet_task_time MODIFY COLUMN datec datetime; From 78654376ca78444537205999b9ff538eccf7c0b3 Mon Sep 17 00:00:00 2001 From: davidNDU Date: Fri, 9 Oct 2020 16:54:13 +0300 Subject: [PATCH 46/65] Fix: Module Builder creation and listing of events --- htdocs/modulebuilder/template/myobject_agenda.php | 8 +++++--- htdocs/modulebuilder/template/myobject_card.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index e05b4e93491..8d69d59c05d 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -223,13 +223,15 @@ if ($object->id > 0) $objthirdparty = $object; $objcon = new stdClass(); - $out = '&origin='.$object->element.'&originid='.$object->id; + $out = '&origin='.$object->element.'%40'.$object->module.'&originid='.$object->id; + $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id; + $out .= '&backtopage='.urlencode($urlbacktopage); $permok = $user->rights->agenda->myactions->create; if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { //$out.='trans("AddAnAction"),'filenew'); //$out.=""; @@ -264,7 +266,7 @@ if ($object->id > 0) $filters['search_agenda_label'] = $search_agenda_label; // TODO Replace this with same code than into list.php - show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, 'mymmodule'); + show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module); } } diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index d97bc8f7f35..a56448c584c 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -569,7 +569,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, $object->element.'@mymodule', (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); + $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); print ''; } From 28e462e50719b32c572cbd35b32585a1fd0aa21e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 16:49:23 +0200 Subject: [PATCH 47/65] Debug a box with sql and performance errors --- htdocs/core/boxes/box_validated_projects.php | 71 +++++++++++--------- 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/htdocs/core/boxes/box_validated_projects.php b/htdocs/core/boxes/box_validated_projects.php index 378aea61df5..b4eddf5f18d 100644 --- a/htdocs/core/boxes/box_validated_projects.php +++ b/htdocs/core/boxes/box_validated_projects.php @@ -46,6 +46,9 @@ class box_validated_projects extends ModeleBoxes public $info_box_head = array(); public $info_box_contents = array(); + public $enabled = 1; + + /** * Constructor * @@ -54,15 +57,17 @@ class box_validated_projects extends ModeleBoxes */ public function __construct($db, $param = '') { - global $user, $langs; + global $conf, $user, $langs; // Load translation files required by the page $langs->loadLangs(array('boxes', 'projects')); $this->db = $db; - $this->boxlabel = "ValidatedProjects"; + $this->boxlabel = "ProjectsWithTask"; $this->hidden = ! ($user->rights->projet->lire); + + if ($conf->global->MAIN_FEATURES_LEVEL < 2) $this->enabled = 0; } /** @@ -81,7 +86,7 @@ class box_validated_projects extends ModeleBoxes $totalnb = 0; $totalnbTask=0; - $textHead = $langs->trans("ValidatedProjects"); + $textHead = $langs->trans("ProjectTasksWithoutTimeSpent"); $this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead)); // list the summary of the orders @@ -96,17 +101,19 @@ class box_validated_projects extends ModeleBoxes $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'"; + // I tried to solve sql error and performance problem, rewriting sql request but it is not clear what we want. + // Count of tasks without time spent for tasks we are assigned too or + // Count of tasks without time spent for all tasks of projects we are allowed to read (what it does) ? + $sql = "SELECT p.rowid, p.ref, p.fk_soc, p.dateo as startdate,"; + $sql.= " COUNT(DISTINCT t.rowid) 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.= " INNER JOIN ".MAIN_DB_PREFIX."projet_task AS t ON p.rowid = t.fk_projet"; + // TODO Replace -1, -2, -3 with ID used for type of contat project_task into llx_c_type_contact. Once done, we can switch widget as stable. + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."element_contact as ec ON ec.element_id = t.rowid AND fk_c_type_contact IN (-1, -2, -3)"; $sql.= " WHERE p.fk_statut = 1"; // Only open projects + if ($projectsListId) $sql .= ' AND p.rowid IN ('.$this->db->sanitize($projectsListId).')'; // Only project we ara allowed $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.= " GROUP BY p.rowid, p.ref, p.fk_soc, p.dateo"; $sql.= " ORDER BY p.dateo ASC"; $result = $this->db->query($sql); @@ -135,10 +142,7 @@ class box_validated_projects extends ModeleBoxes $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; + $projectstatic->ref = $objp->ref; $this->info_box_contents[$i][] = array( 'td' => 'class="nowraponall"', @@ -146,21 +150,26 @@ class box_validated_projects extends ModeleBoxes '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); - } + if ($objp->fk_soc > 0) { + $sql = 'SELECT rowid, nom as name FROM '.MAIN_DB_PREFIX.'societe WHERE rowid ='.$objp->fk_soc; + $resql = $this->db->query($sql); + //$socstatic = new Societe($this->db); + $obj2 = $this->db->fetch_object($resql); + $this->info_box_contents[$i][] = array( + 'td' => 'class="tdoverflowmax150 maxwidth200onsmartphone"', + 'text' => $obj2->name, + 'asis' => 1, + 'url' => DOL_URL_ROOT.'/societe/card.php?socid='.$obj2->rowid + ); + } + else { + $this->info_box_contents[$i][] = array( + 'td' => 'class="tdoverflowmax150 maxwidth200onsmartphone"', + 'text' => '', + 'asis' => 1, + 'url' => '' + ); + } $this->info_box_contents[$i][] = array( 'td' => 'class="center"', @@ -169,7 +178,7 @@ class box_validated_projects extends ModeleBoxes $this->info_box_contents[$i][] = array( 'td' => 'class="center"', - 'text' => $objp->taskNumber." ".$langs->trans("Tasks"), + 'text' => $objp->tasknumber." ".$langs->trans("Tasks"), 'asis' => 1, ); $i++; From 5e3df9442ff190ba9a633cd0d6f3eb5d550bfabb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 16:57:00 +0200 Subject: [PATCH 48/65] css --- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 5fe36e8687a..b9519eb50af 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -713,7 +713,7 @@ textarea.centpercent { .longmessagecut { max-height: 250px; max-width: 100%; - overflow-y: scroll; + overflow-y: auto; } body[class*="colorblind-"] .text-warning{ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index cdc50311d40..fb05def28da 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -795,7 +795,7 @@ textarea.centpercent { .longmessagecut { max-height: 250px; max-width: 100%; - overflow-y: scroll; + overflow-y: auto; } .text-warning{ From a3e3e0e45c012879360ab3059c1f17118fc11c72 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 17:55:26 +0200 Subject: [PATCH 49/65] Navigation in chart of account --- htdocs/accountancy/admin/account.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 0ac79bcc3aa..9de166472bc 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -294,13 +294,11 @@ if ($resql) print ''; print ''; print ''; - print ''; print ''; $newcardbutton .= dolGetButtonTitle($langs->trans("New"), $langs->trans("Addanaccount"), 'fa fa-plus-circle', './card.php?action=create'); - - print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1); // Box to select active chart of account print $langs->trans("Selectchartofaccounts")." : "; From 4188a21c6b62171f693cfef7dc8e646b113c45c5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 17:59:22 +0200 Subject: [PATCH 50/65] css --- htdocs/accountancy/admin/account.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 9de166472bc..c495a42d69f 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -341,15 +341,15 @@ if ($resql) // Line for search fields print ''; - if (!empty($arrayfields['aa.account_number']['checked'])) print ''; - if (!empty($arrayfields['aa.label']['checked'])) print ''; - if (!empty($arrayfields['aa.labelshort']['checked'])) print ''; + if (!empty($arrayfields['aa.account_number']['checked'])) print ''; + if (!empty($arrayfields['aa.label']['checked'])) print ''; + if (!empty($arrayfields['aa.labelshort']['checked'])) print ''; if (!empty($arrayfields['aa.account_parent']['checked'])) { print ''; } - if (!empty($arrayfields['aa.pcg_type']['checked'])) print ''; + if (!empty($arrayfields['aa.pcg_type']['checked'])) print ''; if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (!empty($arrayfields['aa.reconcilable']['checked'])) print ''; } if (!empty($arrayfields['aa.active']['checked'])) print ''; print '"; print "\n"; diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index a6f61283d75..c70f7730f89 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -335,17 +335,17 @@ if ($resql) // Customer if ($obj->type == 0) { - $s .= ''.$langs->trans("Customer").''; + $s .= ''.$langs->trans("Customer").''; } // Supplier elseif ($obj->type == 1) { - $s .= ''.$langs->trans("Supplier").''; + $s .= ''.$langs->trans("Supplier").''; } // User elseif ($obj->type == 2) { - $s .= ''.$langs->trans("Employee").''; + $s .= ''.$langs->trans("Employee").''; } print $s; print ''; From cc82a15688c9cfd5c6de8a53857d5793338a559c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 18:43:24 +0200 Subject: [PATCH 52/65] css --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 552ed8c4f4f..47a5d3d9330 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1605,7 +1605,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi if ($pdfexists && !$error) { - $heightforphotref = 70; + $heightforphotref = 80; if (!empty($conf->dol_optimize_smallscreen)) $heightforphotref = 60; // If the preview file is found if (file_exists($fileimage)) From 967e7997e6be6336d984e3b6a6c5ece479d87359 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 19:34:57 +0200 Subject: [PATCH 53/65] Trans and clean code --- htdocs/accountancy/admin/account.php | 16 +++++++++++----- htdocs/accountancy/admin/subaccount.php | 6 ++++-- htdocs/langs/en_US/accountancy.lang | 3 ++- htdocs/langs/en_US/admin.lang | 2 +- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index c495a42d69f..1798e8d3eb7 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -414,18 +414,24 @@ if ($resql) // Account parent if (!empty($arrayfields['aa.account_parent']['checked'])) { - if (!empty($obj->account_parent)) + // Note: obj->account_parent is a foreign key to a rowid. It is field in child table and obj->rowid2 is same, but in parent table. + // So for orphans, obj->account_parent is set but not obj->rowid2 + if (!empty($obj->account_parent) && !empty($obj->rowid2)) { + print "\n"; if (!$i) $totalarray['nbfield']++; } else { - print ''; + print ''; if (!$i) $totalarray['nbfield']++; } } diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index c70f7730f89..4b44bd35149 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -100,7 +100,9 @@ if (empty($reshook)) $form = new Form($db); -llxHeader('', $langs->trans("ReportThirdParty")); +$title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger'); + +llxHeader('', $title); // Customer $sql = "SELECT sa.rowid, sa.nom as label, sa.code_compta as subaccount, '0' as type, sa.entity"; @@ -268,7 +270,7 @@ if ($resql) print ''; print ''; - print_barre_liste($langs->trans('ReportThirdParty'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 0, 0, 1); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 0, 0, 1); print '
'.$langs->trans("WarningCreateSubAccounts").'
'; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 0b6c90f23e5..24255577b11 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -24,7 +24,8 @@ Journals=Journals JournalFinancial=Financial journals BackToChartofaccounts=Return chart of accounts Chartofaccounts=Chart of accounts -ChartOfSubaccounts=Chart of subaccounts +ChartOfSubaccounts=Chart of individual accounts +ChartOfIndividualAccountsOfSubsidiaryLedger=Chart of individual accounts of the subsidiary ledger CurrentDedicatedAccountingAccount=Current dedicated account AssignDedicatedAccountingAccount=New account to assign InvoiceLabel=Invoice label diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 8d64fe1a8d6..f8912b87eeb 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -658,7 +658,7 @@ Module50200Desc=Offer customers a PayPal online payment page (PayPal account or Module50300Name=Stripe Module50300Desc=Offer customers a Stripe online payment page (credit/debit cards). This can be used to allow your customers to make ad-hoc payments or payments related to a specific Dolibarr object (invoice, order etc...) Module50400Name=Accounting (double entry) -Module50400Desc=Accounting management (double entries, support general and auxiliary ledgers). Export the ledger in several other accounting software formats. +Module50400Desc=Accounting management (double entries, support General and Subsidiary Ledgers). Export the ledger in several other accounting software formats. Module54000Name=PrintIPP Module54000Desc=Direct print (without opening the documents) using Cups IPP interface (Printer must be visible from server, and CUPS must be installed on server). Module55000Name=Poll, Survey or Vote From b1a838f19f1c2f8a165ae256e6910f28703cec92 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 19:48:35 +0200 Subject: [PATCH 54/65] Update myobject_agenda.php --- htdocs/modulebuilder/template/myobject_agenda.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index 8d69d59c05d..b5f6ef7f722 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -223,15 +223,15 @@ if ($object->id > 0) $objthirdparty = $object; $objcon = new stdClass(); - $out = '&origin='.$object->element.'%40'.$object->module.'&originid='.$object->id; + $out = '&origin='.urlencode($object->element.'@'.$object->module).'&originid='.urlencode($object->id); $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id; - $out .= '&backtopage='.urlencode($urlbacktopage); + $out .= '&backtopage='.urlencode($urlbacktopage); $permok = $user->rights->agenda->myactions->create; if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { //$out.='trans("AddAnAction"),'filenew'); //$out.=""; From ae64e513a8f35b5fd392637a5ea9918c82bd048d Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 10 Oct 2020 07:19:13 +0200 Subject: [PATCH 55/65] FIX #14956 Add a possibility to modify date on credit note invoice --- htdocs/compta/facture/card.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 7b0d7fcf869..8a2b5b150e4 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4118,17 +4118,13 @@ if ($action == 'create') print '
'; - print ''.img_picto($langs->trans("NewImport"), 'filenew').''; + print ''.img_picto($langs->trans("NewImport"), 'next', 'class="fa-15x"').''; print '
'; + $form->select_conditions_paiements($search_paymentcond, 'search_paymentcond', -1, 1, 1, 'maxwidth100'); + print ''; - $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 10); + $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 20, 1, 'maxwidth100'); print ''; + $form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', '', -1); + print ''; print ''; print ''; print '
'.$object->getNomUrl(1).''.$objp->num_payment.''.$objp->num_paiement.''.price($objp->amount).'
'.price($objp->amount).''.$facturestatic->LibStatut($objp->paye, $objp->fk_statut, 6, 1).''.$facturestatic->LibStatut($objp->paye, $objp->status, 6, 1).'
'; + print ''; if ($sortfield) $options .= "&sortfield=".urlencode($sortfield); if ($sortorder) $options .= "&sortorder=".urlencode($sortorder); // Show navigation bar From d789aaad7fd6643709108c29d079ac3f8248fbff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Hahn?= Date: Fri, 9 Oct 2020 11:29:39 +0200 Subject: [PATCH 39/65] Fix for #14239 Message: Error: Method printObjectLine was called on an object and object->fetch_thirdparty was not done before --- htdocs/commande/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 5de377930d7..3ee5b89e01a 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1863,6 +1863,7 @@ if ($action == 'create' && $usercancreate) $author = new User($db); $author->fetch($object->user_author_id); + $object->fetch_thirdparty(); $res = $object->fetch_optionals(); $head = commande_prepare_head($object); From 4eaf2c0350b78cf022015095307f6e56d19d7f4f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 11:49:45 +0200 Subject: [PATCH 40/65] Fix regression --- htdocs/compta/bank/bankentries_list.php | 2 +- htdocs/compta/tva/card.php | 4 ++-- htdocs/langs/fr_FR/bills.lang | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 617b3af95c6..617094e1359 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -213,7 +213,7 @@ if (empty($reshook)) // Conciliation if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', 'alpha')) && $user->rights->banque->consolidate - && (GETPOST('pageplusone') == GETPOST('pageplusoneold'))) + && (!GETPOSTISSET('pageplusoneold') || (GETPOST('pageplusone') == GETPOST('pageplusoneold')))) { $error = 0; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 010fd112646..a39e14466eb 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -98,7 +98,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) } $object->amount = $amount; $object->label = GETPOST("label", 'alpha'); - $object->note = GETPOST("note", 'restricthtml'); + $object->note_private = GETPOST("note", 'restricthtml'); if (empty($object->datep)) { @@ -239,7 +239,7 @@ if ($action == 'create') print ''; print ''; print "
\n"; diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 5da6bda8133..37745a85490 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -58,7 +58,7 @@ SuppliersInvoices=Factures fournisseurs SupplierBill=Facture fournisseur SupplierBills=Factures fournisseurs Payment=Règlement -PaymentBack=Rembourser +PaymentBack=Remboursement CustomerInvoicePaymentBack=Rembourser Payments=Règlements PaymentsBack=Remboursements From e24ec99c8f541b5f144b279b08d62839f1f2171d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 11:51:34 +0200 Subject: [PATCH 41/65] Fix regression --- htdocs/compta/bank/bankentries_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 617094e1359..e77f4386de9 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -213,7 +213,7 @@ if (empty($reshook)) // Conciliation if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', 'alpha')) && $user->rights->banque->consolidate - && (!GETPOSTISSET('pageplusoneold') || (GETPOST('pageplusone') == GETPOST('pageplusoneold')))) + && (!GETPOSTISSET('pageplusone') || (GETPOST('pageplusone') == GETPOST('pageplusoneold')))) { $error = 0; From bbdf304f1e17c992ea0796ab26a49a80c920f203 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 9 Oct 2020 12:20:20 +0200 Subject: [PATCH 42/65] fix --- htdocs/fourn/commande/dispatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index ae29dd35ff2..03297d9f8fc 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -1290,7 +1290,7 @@ if ($id > 0 || !empty($ref)) { print '
'; print 'dispatchlineid .'#line_'. $objp->dispatchlineid . '">'; From efc5dedab4b5d62ff2819ae1d968b1db1bc5fcb2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 12:52:42 +0200 Subject: [PATCH 43/65] Fix format number on screen --- htdocs/accountancy/bookkeeping/balance.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 3608622916d..c3e225e5399 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -339,7 +339,7 @@ if ($action != 'export_csv') print ''.price($opening_balances["'".$line->numero_compte."'"]).''.price($line->debit).''.price($line->credit).''.price($line->debit - $line->credit).''.price(price2num($line->debit - $line->credit, 'MT')).''.$link; print '
'; print $formaccounting->select_account($search_accountparent, 'search_accountparent', 2); print '  '; From 327ca5f59567262a96e870d28502acf504676ac0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Oct 2020 18:18:18 +0200 Subject: [PATCH 51/65] css --- htdocs/accountancy/admin/categories.php | 2 +- htdocs/accountancy/admin/subaccount.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index d605105f8e9..f68fbc18905 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -172,7 +172,7 @@ if ($action == 'display' || $action == 'delete') { print ''; print ''; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', 'class="paddingleft"'); print ""; print "
"; + print ''; $accountparent->id = $obj->rowid2; $accountparent->label = $obj->label2; - $accountparent->account_number = $obj->account_number2; - - print ""; + $accountparent->account_number = $obj->account_number2; // Sotre an account number for output print $accountparent->getNomUrl(1); print " '; + if (!empty($obj->account_parent)) { + print ''; + } + print '
'; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && !empty($object->brouillon) && $usercancreate && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) + if ($action != 'editinvoicedate' && !empty($object->brouillon) && $usercancreate && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) print ''; print '
'; print $langs->trans('DateInvoice'); print 'id.'">'.img_edit($langs->trans('SetDate'), 1).'
'; print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE) { - if ($action == 'editinvoicedate') { - $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date, 'invoicedate'); - } else { - print dol_print_date($object->date, 'day'); - } + if ($action == 'editinvoicedate') { + $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date, 'invoicedate'); } else { print dol_print_date($object->date, 'day'); } From 47e6ebcb8fb17132dadec4806449983cb6aa73ea Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 10 Oct 2020 08:31:07 +0200 Subject: [PATCH 56/65] expose mariaddb port on docker-compose --- build/docker/docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/docker/docker-compose.yml b/build/docker/docker-compose.yml index efdc95d2858..7e4ceda902e 100644 --- a/build/docker/docker-compose.yml +++ b/build/docker/docker-compose.yml @@ -12,8 +12,11 @@ services: environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: dolibarr + ports: + - "3306:3306" networks: - internal-pod + - external-pod phpmyadmin: image: phpmyadmin/phpmyadmin From 705b02960804c80a5b64bb7d57bd52ad8374a634 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 10 Oct 2020 10:22:58 +0200 Subject: [PATCH 57/65] fix return on filtered page when modify accountancy code --- htdocs/accountancy/admin/account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 0ac79bcc3aa..866f2787943 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -481,11 +481,11 @@ if ($resql) // Action print ''; if ($user->rights->accounting->chartofaccount) { - print ''; + print ''; print img_edit(); print ''; print ' '; - print ''; + print ''; print img_delete(); print ''; } From 37b6a43c5c371998eef3f5132d1cde2ad4d1d195 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 10 Oct 2020 14:30:22 +0200 Subject: [PATCH 58/65] add some translations --- .../doc/pdf_canelle.modules.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index 80a222d9a6c..83733dc1d33 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -134,7 +134,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->name = "canelle"; $this->description = $langs->trans('SuppliersInvoiceModel'); - // Dimension page + // Page dimensions $this->type = 'pdf'; $formatarray = pdf_getFormat(); $this->page_largeur = $formatarray['width']; @@ -145,12 +145,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; - $this->option_logo = 1; // Affiche logo - $this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION - $this->option_modereg = 1; // Affiche mode reglement - $this->option_condreg = 1; // Affiche conditions reglement - $this->option_codeproduitservice = 1; // Affiche code produit-service - $this->option_multilang = 1; // Dispo en plusieurs langues + $this->option_logo = 1; // Display logo + $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION + $this->option_modereg = 1; // Display payment mode + $this->option_condreg = 1; // Display payment terms + $this->option_codeproduitservice = 1; // Display product-service code + $this->option_multilang = 1; // Available in several languages // Define column position $this->posxdesc = $this->marge_gauche + 1; @@ -489,7 +489,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetXY($this->postotalht, $curY); $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); - // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva + // Collection of totals by VAT value in $this->tva["taux"]=total_tva if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $object->lines[$i]->total_tva; @@ -668,7 +668,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->atleastoneratenotnull = 0; foreach ($this->tva as $tvakey => $tvaval) { - if ($tvakey > 0) // On affiche pas taux 0 + if ($tvakey > 0) // We do not display rate 0 { $this->atleastoneratenotnull++; @@ -1209,7 +1209,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } //Recipient name - // On peut utiliser le nom de la societe du contact + // We can use the name of the contact's company if ($usecontact && !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) { $thirdparty = $object->contact; } else { From 094dbc1265b3701512c4418a9ae0774e90016d25 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 10 Oct 2020 14:38:57 +0200 Subject: [PATCH 59/65] add some translations --- .../supplier_order/doc/pdf_muscadet.modules.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index b96f2f83a76..f6e27499dc2 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -142,13 +142,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; - $this->option_logo = 1; // Affiche logo - $this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION - $this->option_modereg = 1; // Affiche mode reglement - $this->option_condreg = 1; // Affiche conditions reglement - $this->option_codeproduitservice = 1; // Affiche code produit-service - $this->option_multilang = 1; // Dispo en plusieurs langues - $this->option_escompte = 0; // Affiche si il y a eu escompte + $this->option_logo = 1; // Display logo + $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION + $this->option_modereg = 1; // Display payment mode + $this->option_condreg = 1; // Display payment terms + $this->option_codeproduitservice = 1; // Display product-service code + $this->option_multilang = 1; // Available in several languages + $this->option_escompte = 0; // Displays if there has been a discount $this->option_credit_note = 0; // Support credit notes $this->option_freetext = 1; // Support add of a personalised text $this->option_draft_watermark = 1; // Support add of a watermark on drafts From ba674d09d3f59c37891acaf00ad148dfd2430b01 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 10 Oct 2020 14:45:58 +0200 Subject: [PATCH 60/65] add some translations --- .../supplier_payment/doc/pdf_standard.modules.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index adccb15892b..388ee06f7a9 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -139,8 +139,8 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; - $this->option_logo = 1; // Affiche logo - $this->option_multilang = 1; // Dispo en plusieurs langues + $this->option_logo = 1; // Display logo + $this->option_multilang = 1; // Available in several languages // Define column position $this->posxdate = $this->marge_gauche + 1; @@ -168,7 +168,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->atleastoneratenotnull = 0; $this->atleastonediscount = 0; - // Recupere emetteur + // Get source company $this->emetteur = $mysoc; if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined } @@ -462,13 +462,13 @@ class pdf_standard extends ModelePDFSuppliersPayments $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } - // Affiche zone cheèque + // Display check zone $posy = $this->_tableau_cheque($pdf, $object, $bottomlasttab, $outputlangs); // Affiche zone totaux //$posy=$this->_tableau_tot($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); - // Pied de page + // Footer page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); From 437eead69479a27bc84add0a636a2a2d1721ba04 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Oct 2020 15:45:04 +0200 Subject: [PATCH 61/65] Fix bad permission --- doc/images/invoice.png | Bin 0 -> 64306 bytes htdocs/core/modules/modHoliday.class.php | 2 +- htdocs/expensereport/card.php | 1 + htdocs/holiday/card.php | 16 ++++++++++------ htdocs/holiday/list.php | 2 +- .../install/mysql/migration/12.0.0-13.0.0.sql | 4 ++++ htdocs/theme/eldy/ckeditor/config.js | 2 +- 7 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 doc/images/invoice.png diff --git a/doc/images/invoice.png b/doc/images/invoice.png new file mode 100644 index 0000000000000000000000000000000000000000..9be03a52ed8411ebc6f8338fa1b1b1ae18c40b27 GIT binary patch literal 64306 zcmcG$RZtyW)GgWs4Z(s1hY;M|-JReL!QI^n1PBl$xVyW%1qkjM+}(BKoc{h>=jGOY zyXR0v!R~JM?p|xkm}8Df*jEKfWJEkf005AsrNop0;2j0{{f6)kJhGaRb_f1|b{3IV zMLm4aSesn-G0};6#?aPXru^P^7GaANQwIOTX=fNzPpBT_Mvym3P$qa*G z23sKljPIDU8ym%Kvfdv29!XocA?a~!djpF&;z|J|2!SN)M6VsR|NZt{CG;6y7!Agf zlxpX{6Y?;@1TeyA`C-{HLEvk)kC;wqFv2kufg&h@BnZ=DUkAa9g;Nm_xxtI2Foge4 z{PE4X-uEi<1R24;ely?ujivUM(C7(B<$oV|m1Kx1?t9Mj+)_I|-K^8JCg??$H1yA= z(L76_!V9u@>9O9X58lb3!3FVwW?8J1erPbcfFE7b5FkX8P{{9-jEixdg^&nd@^h(+ ze<%LxVPZT}{@1Vak`g5YOf^+LKKHZ5-4RoA^7R_K|DOK`T_lgU?|E1gcc0)ygp}Y_ zn*S3P?^gU9UsczU0ilx&Y+w_o9a*PG4jG=`s8hk!X@~cvp&|R++dl;z^kXe|6G^LBOtB>tEE*{r9bBJmRWu*ls9G3UsxEpWfVyA z-z|4W{)$)A@V+~>wzYrLJC68o&3~@!dq+_?dEMM9bU0pQ1{^NhP8s>{1g=`I30|q zNwlp~a)!HYG=4{QO%!s%|0(P9l+!6LlYL;3<937mYe7YN;K>Q+pFb&KVMiXKMKk=% z^_JK;2S?jMh7EsG$cFNh7`H`4!ascIGBEuJ8U%{ks34CjR08=I3wl~MqGc8etuJ1l=J!v`+jE3g1)PSnvT)w}>uO=-AzUYr;ole-Kx4s>VC=5SAE;;RX%*{%xn6&8D&sO=pAoDW| z6Jvu+4YgL>4kS9V$74b8rG=lxm9(U#5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d!eyZHU)$eDrxE;1+ZX)?bs}wt*|*{$L!3$rJ$PHVfi>XFAvF^Z_CNv62oC@F4L2H+0;3DNwI2 U3B{86@K0wM08pY*?0evU0bicoRsaA1 literal 0 HcmV?d00001 diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index 6673f55711c..a146a855ccb 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -177,7 +177,7 @@ class modHoliday extends DolibarrModules $this->rights[$r][0] = 20005; // Permission id (must not be already used) $this->rights[$r][1] = 'Create/modify leave requests for everybody'; // Permission label $this->rights[$r][3] = 0; // Permission by default for new user (0/1) - $this->rights[$r][4] = 'write_all'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) + $this->rights[$r][4] = 'writeall_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) $r++; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 2e826cb4080..8613c5db742 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1354,6 +1354,7 @@ if (empty($reshook)) $title = $langs->trans("ExpenseReport")." - ".$langs->trans("Card"); $helpurl = "EN:Module_Expense_Reports"; + llxHeader("", $title, $helpurl); $form = new Form($db); diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index d9bbe6607bf..cfc0deeef7b 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -82,7 +82,8 @@ if (($id > 0) || $ref) } $cancreate = 0; -if (!empty($user->rights->holiday->write_all)) $cancreate = 1; + +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->holiday->writeall_advance)) $cancreate = 1; if (!empty($user->rights->holiday->write) && in_array($fuserid, $childids)) $cancreate = 1; $candelete = 0; @@ -741,7 +742,8 @@ if (empty($reshook)) $object->fetch($id); // Si statut en attente de validation et valideur = valideur ou utilisateur, ou droits de faire pour les autres - if (($object->statut == Holiday::STATUS_VALIDATED || $object->statut == Holiday::STATUS_APPROVED) && ($user->id == $object->fk_validator || in_array($object->fk_user, $childids) || !empty($user->rights->holiday->write_all))) + if (($object->statut == Holiday::STATUS_VALIDATED || $object->statut == Holiday::STATUS_APPROVED) && ($user->id == $object->fk_validator || in_array($object->fk_user, $childids) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->holiday->writeall_advance)))) { $db->begin(); @@ -867,7 +869,7 @@ llxHeader('', $langs->trans('CPTitreMenu')); if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { // Si l'utilisateur n'a pas le droit de faire une demande - if (($fuserid == $user->id && empty($user->rights->holiday->write)) || ($fuserid != $user->id && empty($user->rights->holiday->write_all))) + if (($fuserid == $user->id && empty($user->rights->holiday->write)) || ($fuserid != $user->id && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)))) { $errors[] = $langs->trans('CantCreateCP'); } else { @@ -981,11 +983,13 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print ''.$langs->trans("User").''; print ''; - if (empty($user->rights->holiday->write_all)) + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) { print $form->select_dolusers(($fuserid ? $fuserid : $user->id), 'fuserid', 0, '', 0, 'hierarchyme', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300'); //print ''; - } else print $form->select_dolusers(GETPOST('fuserid', 'int') ?GETPOST('fuserid', 'int') : $user->id, 'fuserid', 0, '', 0, '', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300'); + } else { + print $form->select_dolusers(GETPOST('fuserid', 'int') ? GETPOST('fuserid', 'int') : $user->id, 'fuserid', 0, '', 0, '', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300'); + } print ''; print ''; @@ -1459,7 +1463,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print ''.$langs->trans("ActionRefuseCP").''; } } - if (($user->id == $object->fk_validator || in_array($object->fk_user, $childids) || !empty($user->rights->holiday->write_all)) && ($object->statut == 2 || $object->statut == 3)) // Status validated or approved + if (($user->id == $object->fk_validator || in_array($object->fk_user, $childids) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->holiday->writeall_advance))) && ($object->statut == 2 || $object->statut == 3)) // Status validated or approved { if (($object->date_debut > dol_now()) || $user->admin) print ''.$langs->trans("ActionCancelCP").''; else print ''.$langs->trans("ActionCancelCP").''; diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index ca83d9341f2..0cd0489c701 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -421,7 +421,7 @@ if ($resql) print '
'; - $canedit = (($user->id == $user_id && $user->rights->holiday->write) || ($user->id != $user_id && $user->rights->holiday->write_all)); + $canedit = (($user->id == $user_id && $user->rights->holiday->write) || ($user->id != $user_id && (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->holiday->writeall_advance)))); if ($canedit) { diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 6a34b69d1a2..1514a18e74c 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -359,3 +359,7 @@ ALTER TABLE llx_website_page ADD COLUMN fk_object varchar(255); DELETE FROM llx_const WHERE name in ('MAIN_INCLUDE_ZERO_VAT_IN_REPORTS'); ALTER TABLE llx_projet_task_time MODIFY COLUMN datec datetime; + +DELETE FROM llx_user_rights WHERE fk_id IN (SELECT id FROM llx_rights_def where module = 'holiday' and perms = 'lire_tous'); +DELETE FROM llx_rights_def where module = 'holiday' and perms = 'lire_tous'; + diff --git a/htdocs/theme/eldy/ckeditor/config.js b/htdocs/theme/eldy/ckeditor/config.js index b52fd6f7e51..50bf77c00ff 100644 --- a/htdocs/theme/eldy/ckeditor/config.js +++ b/htdocs/theme/eldy/ckeditor/config.js @@ -73,7 +73,7 @@ CKEDITOR.editorConfig = function( config ) ['Maximize'], ['SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone ['Undo','Redo','-','Find','Replace'], - ['Format','Font','FontSize'], + ['Font','FontSize'], ['Bold','Italic','Underline','Strike','Superscript','-','TextColor','RemoveFormat'], ['NumberedList','BulletedList','Outdent','Indent'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], From 0b619f63f369de99684c0280d1434aec37b453b6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Oct 2020 16:35:30 +0200 Subject: [PATCH 62/65] Fix error management on HR modules --- htdocs/expensereport/card.php | 15 +++++++++++++++ htdocs/holiday/card.php | 36 ++++++++++++++++++++++++----------- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 8613c5db742..4579c1a3e8f 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -214,6 +214,8 @@ if (empty($reshook)) if ($action == 'add' && $user->rights->expensereport->creer) { + $error = 0; + $object = new ExpenseReport($db); $object->date_debut = $date_start; @@ -222,6 +224,19 @@ if (empty($reshook)) $object->fk_user_author = GETPOST('fk_user_author', 'int'); if (!($object->fk_user_author > 0)) $object->fk_user_author = $user->id; + // Check that expense report is for a user inside the hierarchy or advanced permission for all is set + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->writeall_advance))) { + $error++; + setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); + } else { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) { + if (! in_array($object->fk_user_author, $childids)) { + $error++; + setEventMessages($langs->trans("UserNotInHierachy"), null, 'errors'); + } + } + } + $fuser = new User($db); $fuser->fetch($object->fk_user_author); diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index cfc0deeef7b..47f7744c5ae 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -147,12 +147,26 @@ if (empty($reshook)) $valideur = GETPOST('valideur', 'int'); $description = trim(GETPOST('description', 'restricthtml')); + // Check that leave is for a user inside the hierarchy or advanced permission for all is set + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->writeall_advance))) { + $error++; + setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); + } else { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) { + if (! in_array($fuserid, $childids)) { + $error++; + setEventMessages($langs->trans("UserNotInHierachy"), null, 'errors'); + $action = 'create'; + } + } + } + // If no type if ($type <= 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); $error++; - $action = 'add'; + $action = 'create'; } // If no start date @@ -160,21 +174,21 @@ if (empty($reshook)) { setEventMessages($langs->trans("NoDateDebut"), null, 'errors'); $error++; - $action = 'add'; + $action = 'create'; } // If no end date if (empty($date_fin)) { setEventMessages($langs->trans("NoDateFin"), null, 'errors'); $error++; - $action = 'add'; + $action = 'create'; } // If start date after end date if ($date_debut > $date_fin) { setEventMessages($langs->trans("ErrorEndDateCP"), null, 'errors'); $error++; - $action = 'add'; + $action = 'create'; } // Check if there is already holiday for this period @@ -183,16 +197,16 @@ if (empty($reshook)) { setEventMessages($langs->trans("alreadyCPexist"), null, 'errors'); $error++; - $action = 'add'; + $action = 'create'; } // If there is no Business Days within request $nbopenedday = num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); if ($nbopenedday < 0.5) { - setEventMessages($langs->trans("ErrorDureeCP"), null, 'errors'); + setEventMessages($langs->trans("ErrorDureeCP"), null, 'errors'); // No working day $error++; - $action = 'add'; + $action = 'create'; } // If no validator designated @@ -868,15 +882,15 @@ llxHeader('', $langs->trans('CPTitreMenu')); if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { - // Si l'utilisateur n'a pas le droit de faire une demande - if (($fuserid == $user->id && empty($user->rights->holiday->write)) || ($fuserid != $user->id && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)))) + // If user has no permission to create a leave + if ((in_array($fuserid, $childids) && empty($user->rights->holiday->write)) || (!in_array($fuserid, $childids) && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)))) { $errors[] = $langs->trans('CantCreateCP'); } else { - // Formulaire de demande de congés payés + // Form to add a leave request print load_fiche_titre($langs->trans('MenuAddCP'), '', 'title_hrm.png'); - // Si il y a une erreur + // Error management if (GETPOST('error')) { switch (GETPOST('error')) { case 'datefin' : From ced91d049d3fad071cc4aa3412e30ff9cc31a98b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Oct 2020 16:43:15 +0200 Subject: [PATCH 63/65] Show admin star on audit page list --- htdocs/admin/tools/listevents.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 32567f14074..82111e0716d 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -167,7 +167,7 @@ $usefilter = 0; $sql = "SELECT e.rowid, e.type, e.ip, e.user_agent, e.dateevent,"; $sql .= " e.fk_user, e.description, e.prefix_session,"; -$sql .= " u.login"; +$sql .= " u.login, u.admin, u.entity, u.firstname, u.lastname, u.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."events as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = e.fk_user"; $sql .= " WHERE e.entity IN (".getEntity('event').")"; @@ -337,7 +337,18 @@ if ($result) { $userstatic->id = $obj->fk_user; $userstatic->login = $obj->login; + $userstatic->admin = $obj->admin; + $userstatic->entity = $obj->entity; + $userstatic->status = $obj->status; + print $userstatic->getLoginUrl(1); + if (!empty($conf->multicompany->enabled) && $userstatic->admin && !$userstatic->entity) + { + print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); + } elseif ($userstatic->admin) + { + print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"'); + } } else print ' '; print ''; From 86c46bbb9713384500095aacd41a3d419ba15fdf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 11 Oct 2020 13:18:16 +0200 Subject: [PATCH 64/65] Fix backup - Exclude existing backup when path is uppercase. --- htdocs/admin/tools/dolibarr_export.php | 9 +++++++-- htdocs/admin/tools/export.php | 4 ++-- htdocs/admin/tools/export_files.php | 2 +- htdocs/main.inc.php | 14 +++++++------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 5f3f5c7ea54..5e990709d19 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -65,6 +65,7 @@ if ($action == 'delete') $action = ''; } + /* * View */ @@ -119,7 +120,9 @@ if (in_array($type, array('pgsql'))) { print "});\n"; print "\n"; -print load_fiche_titre($langs->trans("Backup"), '', 'title_setup'); +$title = $langs->trans("Backup"); + +print load_fiche_titre($title, '', 'title_setup'); //print_barre_liste($langs->trans("Backup"), '', '', '', '', '', $langs->trans("BackupDesc",DOL_DATA_ROOT), 0, 0, 'title_setup'); print '
'; @@ -139,7 +142,9 @@ print '
'; print '
'; -print load_fiche_titre($title ? $title : $langs->trans("BackupDumpWizard")); +$title = $langs->trans("BackupDumpWizard"); + +print load_fiche_titre($title); print ''; print ''; diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index cbe25f0ff75..7ab26f6f6e0 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -122,7 +122,7 @@ $utils = new Utils($db); // MYSQL if ($what == 'mysql') { - $cmddump = GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg + $cmddump = GETPOST("mysqldump", 'none'); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg $cmddump = dol_sanitizePathName($cmddump); if (!empty($dolibarr_main_restrict_os_commands)) @@ -163,7 +163,7 @@ if ($what == 'mysqlnobin') // POSTGRESQL if ($what == 'postgresql') { - $cmddump = GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg + $cmddump = GETPOST("postgresqldump", 'none'); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg $cmddump = dol_sanitizePathName($cmddump); /* Not required, the command is output on screen but not ran for pgsql diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index 485df8c318b..50866534b5b 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -113,7 +113,7 @@ $utils = new Utils($db); if ($compression == 'zip') { $file .= '.zip'; - $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.log|\/temp\/|documents\/admin\/documents\/)/'); + $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.log|\/temp\/|documents\/admin\/documents\/)/i'); if ($ret < 0) { if ($ret == -2) { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 61856b73f49..e2c4b605dcc 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -221,25 +221,25 @@ if (!empty($_POST["DOL_AUTOSET_COOKIE"])) } -// Init session. Name of session is specific to Dolibarr instance. -// Note: the function dol_getprefix may have been redefined to return a different key to manage another area to protect. -$prefix = dol_getprefix(''); +// Init the 5 global objects, this include will make the 'new Xxx()' and set properties for: $conf, $db, $langs, $user, $mysoc +require_once 'master.inc.php'; +// Init session. Name of session is specific to Dolibarr instance. +// Must be done after the include of master.inc.php so $conf file is loaded and vars like $dolibarr_main_force_https are set. +// Note: the function dol_getprefix may have been redefined to return a different key to manage another area to protect. +$prefix = dol_getprefix(''); // This uses the $conf file $sessionname = 'DOLSESSID_'.$prefix; $sessiontimeout = 'DOLSESSTIMEOUT_'.$prefix; if (!empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime', $_COOKIE[$sessiontimeout]); session_set_cookie_params(0, '/', null, (empty($dolibarr_main_force_https) ? false : true), true); // Add tag secure and httponly on session cookie (same as setting session.cookie_httponly into php.ini). Must be called before the session_start. session_name($sessionname); -// This create lock, released when session_write_close() or end of page. +// This create lock, released by session_write_close() or end of page. // We need this lock as long as we read/write $_SESSION ['vars']. We can remove lock when finished. if (!defined('NOSESSION')) { session_start(); } -// Init the 5 global objects, this include will make the 'new Xxx()' and set properties for: $conf, $db, $langs, $user, $mysoc -require_once 'master.inc.php'; - // Activate end of page function register_shutdown_function('dol_shutdown'); From 920b31140ba7e4f4e3fd1f0e9824f9c3a4cfd5d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 11 Oct 2020 13:32:50 +0200 Subject: [PATCH 65/65] Fix exclude of backup files when path are for Windows --- htdocs/admin/tools/export_files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index 50866534b5b..28eaa2d9d54 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -113,7 +113,7 @@ $utils = new Utils($db); if ($compression == 'zip') { $file .= '.zip'; - $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.log|\/temp\/|documents\/admin\/documents\/)/i'); + $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.back|\.old|\.log|[\\\/]temp[\\\/]|documents[\\\/]admin[\\\/]documents[\\\/])/i'); if ($ret < 0) { if ($ret == -2) {