From 09385574955c56268a1830164f8b87a8046fbd26 Mon Sep 17 00:00:00 2001 From: Rui Strecht Date: Wed, 28 Feb 2018 15:55:24 +0000 Subject: [PATCH] Added profid validation dictionnary tables --- .../mysql/data/llx_c_profid_validate.sql | 31 +++++++++++++++++++ .../tables/llx_c_profid_validate.key.sql | 21 +++++++++++++ .../mysql/tables/llx_c_profid_validate.sql | 29 +++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 htdocs/install/mysql/data/llx_c_profid_validate.sql create mode 100644 htdocs/install/mysql/tables/llx_c_profid_validate.key.sql create mode 100644 htdocs/install/mysql/tables/llx_c_profid_validate.sql diff --git a/htdocs/install/mysql/data/llx_c_profid_validate.sql b/htdocs/install/mysql/data/llx_c_profid_validate.sql new file mode 100644 index 00000000000..f9a92ff27e8 --- /dev/null +++ b/htdocs/install/mysql/data/llx_c_profid_validate.sql @@ -0,0 +1,31 @@ +-- Copyright (C) 2001-2004 Rodolphe Quiedeville +-- Copyright (C) 2003 Jean-Louis Bergamo +-- Copyright (C) 2004-2012 Laurent Destailleur +-- Copyright (C) 2004 Benoit Mortier +-- Copyright (C) 2004 Guillaume Delecourt +-- Copyright (C) 2005-2012 Regis Houssin +-- Copyright (C) 2007 Patrick Raguin +-- Copyright (C) 2011 Juanjo Menent +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . + +-- +-- ProfId Validation URL (country code - profid number - validation url) +-- + +INSERT INTO llx_c_profid_validate ( country_code, profid_field_number, validation_url_prefix, validation_url_suffix, active ) VALUES ( 'FR', 1, 'http://www.societe.com/cgi-bin/search?champs=', '', 1); +INSERT INTO llx_c_profid_validate ( country_code, profid_field_number, validation_url_prefix, validation_url_suffix, active ) VALUES ( 'GB', 1, 'https://beta.companieshouse.gov.uk/company/', '', 1); +INSERT INTO llx_c_profid_validate ( country_code, profid_field_number, validation_url_prefix, validation_url_suffix, active ) VALUES ( 'ES', 1, 'http://www.e-informa.es/servlet/app/portal/ENTP/screen/SProducto/prod/ETIQUETA_EMPRESA/nif/', '', 1); +INSERT INTO llx_c_profid_validate ( country_code, profid_field_number, validation_url_prefix, validation_url_suffix, active ) VALUES ( 'IN', 1, 'http://www.tinxsys.com/TinxsysInternetWeb/dealerControllerServlet?tinNumber=', ';&searchBy=TIN&backPage=searchByTin_Inter.jsp', 1); +INSERT INTO llx_c_profid_validate ( country_code, profid_field_number, validation_url_prefix, validation_url_suffix, active ) VALUES ( 'PT', 1, 'http://www.nif.pt/', '', 1); diff --git a/htdocs/install/mysql/tables/llx_c_profid_validate.key.sql b/htdocs/install/mysql/tables/llx_c_profid_validate.key.sql new file mode 100644 index 00000000000..0aac3c7a3e8 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_profid_validate.key.sql @@ -0,0 +1,21 @@ +-- ======================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- Copyright (C) 2018 Rui Strecht +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ======================================================================== + + +ALTER TABLE llx_c_profid_validate ADD CONSTRAINT uk_profid_validate_fieldnumber_country UNIQUE (country_code, profid_field_number); diff --git a/htdocs/install/mysql/tables/llx_c_profid_validate.sql b/htdocs/install/mysql/tables/llx_c_profid_validate.sql new file mode 100644 index 00000000000..8ee14c03e5f --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_profid_validate.sql @@ -0,0 +1,29 @@ +-- ======================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- Copyright (C) 2018 Rui Strecht +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ======================================================================== + +create table llx_c_profid_validate +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + country_code varchar(2) NOT NULL, + profid_field_number int(1) DEFAULT 1 NOT NULL, + validation_url_prefix varchar(255) DEFAULT NOT NULL, + validation_url_suffix varchar(255) DEFAULT NULL, + active tinyint DEFAULT 1 NOT NULL +)ENGINE=innodb; +