add entity
This commit is contained in:
parent
cd109d04cd
commit
6f33874d75
@ -11,6 +11,7 @@
|
|||||||
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -212,7 +213,7 @@ $tabsql[34]= "SELECT rowid, pos, code, label, c_level, active FROM ".MAIN_DB_PRE
|
|||||||
$tabsql[35]= "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_cat c";
|
$tabsql[35]= "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_cat c";
|
||||||
$tabsql[36]= "SELECT r.rowid, r.fk_c_exp_tax_cat, r.range_ik, r.active, r.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_range r";
|
$tabsql[36]= "SELECT r.rowid, r.fk_c_exp_tax_cat, r.range_ik, r.active, r.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_range r";
|
||||||
$tabsql[37]= "SELECT r.rowid, r.code, r.label, r.short_label, r.unit_type, r.scale, r.active FROM ".MAIN_DB_PREFIX."c_units r";
|
$tabsql[37]= "SELECT r.rowid, r.code, r.label, r.short_label, r.unit_type, r.scale, r.active FROM ".MAIN_DB_PREFIX."c_units r";
|
||||||
$tabsql[38]= "SELECT rowid, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks";
|
$tabsql[38]= "SELECT rowid, entity, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks";
|
||||||
|
|
||||||
// Criteria to sort dictionaries
|
// Criteria to sort dictionaries
|
||||||
$tabsqlsort=array();
|
$tabsqlsort=array();
|
||||||
@ -294,7 +295,7 @@ $tabfield[34]= "code,label";
|
|||||||
$tabfield[35]= "label";
|
$tabfield[35]= "label";
|
||||||
$tabfield[36]= "range_ik,fk_c_exp_tax_cat";
|
$tabfield[36]= "range_ik,fk_c_exp_tax_cat";
|
||||||
$tabfield[37]= "code,label,short_label,unit_type,scale";
|
$tabfield[37]= "code,label,short_label,unit_type,scale";
|
||||||
$tabfield[38]= "code,label,url,icon";
|
$tabfield[38]= "code,label,url,icon,entity";
|
||||||
|
|
||||||
// Nom des champs d'edition pour modification d'un enregistrement
|
// Nom des champs d'edition pour modification d'un enregistrement
|
||||||
$tabfieldvalue=array();
|
$tabfieldvalue=array();
|
||||||
@ -377,7 +378,7 @@ $tabfieldinsert[34]= "code,label";
|
|||||||
$tabfieldinsert[35]= "label";
|
$tabfieldinsert[35]= "label";
|
||||||
$tabfieldinsert[36]= "range_ik,fk_c_exp_tax_cat";
|
$tabfieldinsert[36]= "range_ik,fk_c_exp_tax_cat";
|
||||||
$tabfieldinsert[37]= "code,label,short_label,unit_type,scale";
|
$tabfieldinsert[37]= "code,label,short_label,unit_type,scale";
|
||||||
$tabfieldinsert[38]= "code,label,url,icon";
|
$tabfieldinsert[38]= "entity,code,label,url,icon";
|
||||||
|
|
||||||
// Rowid name of field depending if field is autoincrement on or off..
|
// Rowid name of field depending if field is autoincrement on or off..
|
||||||
// Use "" if id field is "rowid" and has autoincrement on
|
// Use "" if id field is "rowid" and has autoincrement on
|
||||||
|
|||||||
@ -2195,6 +2195,7 @@ function getArrayOfSocialNetworks()
|
|||||||
{
|
{
|
||||||
global $conf, $db;
|
global $conf, $db;
|
||||||
$sql = "SELECT rowid, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks";
|
$sql = "SELECT rowid, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks";
|
||||||
|
$sql.= " WHERE entity=".$conf->entity;
|
||||||
$socialnetworks = array();
|
$socialnetworks = array();
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
|
|||||||
@ -166,6 +166,7 @@ INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, m
|
|||||||
create table llx_c_socialnetworks
|
create table llx_c_socialnetworks
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
entity integer DEFAULT 1 NOT NULL,
|
||||||
code varchar(100),
|
code varchar(100),
|
||||||
label varchar(150),
|
label varchar(150),
|
||||||
url text,
|
url text,
|
||||||
@ -175,15 +176,15 @@ create table llx_c_socialnetworks
|
|||||||
|
|
||||||
ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code (code);
|
ALTER TABLE llx_c_socialnetworks ADD UNIQUE INDEX idx_c_socialnetworks_code (code);
|
||||||
|
|
||||||
INSERT INTO llx_c_socialnetworks (code, label, url, icon, active) VALUES('facebook', 'Facebook', 'https://www.facebook.com/{socialid}', 'fa-facebook', 1);
|
INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'facebook', 'Facebook', 'https://www.facebook.com/{socialid}', 'fa-facebook', 1);
|
||||||
INSERT INTO llx_c_socialnetworks (code, label, url, icon, active) VALUES('skype', 'Skype', 'https://www.skype.com/{socialid}', 'fa-skype', 1);
|
INSERT INTO llx_c_socialnetworks (entity,code, label, url, icon, active) VALUES(1, 'skype', 'Skype', 'https://www.skype.com/{socialid}', 'fa-skype', 1);
|
||||||
INSERT INTO llx_c_socialnetworks (code, label, url, icon, active) VALUES('twitter', 'Twitter', 'https://www.twitter.com/{socialid}', 'fa-twitter', 1);
|
INSERT INTO llx_c_socialnetworks (entity,code, label, url, icon, active) VALUES(1, 'twitter', 'Twitter', 'https://www.twitter.com/{socialid}', 'fa-twitter', 1);
|
||||||
INSERT INTO llx_c_socialnetworks (code, label, url, icon, active) VALUES('linkedin', 'LinkedIn', 'https://www.linkedin.com/{socialid}', 'fa-linkedin', 1);
|
INSERT INTO llx_c_socialnetworks (entity,code, label, url, icon, active) VALUES(1, 'linkedin', 'LinkedIn', 'https://www.linkedin.com/{socialid}', 'fa-linkedin', 1);
|
||||||
INSERT INTO llx_c_socialnetworks (code, label, url, icon, active) VALUES('instagram', 'Instagram', 'https://www.instagram.com/{socialid}', 'fa-instagram', 1);
|
INSERT INTO llx_c_socialnetworks (entity,code, label, url, icon, active) VALUES(1, 'instagram', 'Instagram', 'https://www.instagram.com/{socialid}', 'fa-instagram', 1);
|
||||||
INSERT INTO llx_c_socialnetworks (code, label, url, icon, active) VALUES('snapchat', 'Snapchat', '{socialid}', 'fa-snapchat', 1);
|
INSERT INTO llx_c_socialnetworks (entity,code, label, url, icon, active) VALUES(1, 'snapchat', 'Snapchat', '{socialid}', 'fa-snapchat', 1);
|
||||||
INSERT INTO llx_c_socialnetworks (code, label, url, icon, active) VALUES('googleplus', 'GooglePlus', 'https://www.googleplus.com/{socialid}', 'fa-google-plus-g', 1);
|
INSERT INTO llx_c_socialnetworks (entity,code, label, url, icon, active) VALUES(1, 'googleplus', 'GooglePlus', 'https://www.googleplus.com/{socialid}', 'fa-google-plus-g', 1);
|
||||||
INSERT INTO llx_c_socialnetworks (code, label, url, icon, active) VALUES('youtube', 'Youtube', 'https://www.youtube.com/{socialid}', 'fa-youtube', 1);
|
INSERT INTO llx_c_socialnetworks (entity,code, label, url, icon, active) VALUES(1, 'youtube', 'Youtube', 'https://www.youtube.com/{socialid}', 'fa-youtube', 1);
|
||||||
INSERT INTO llx_c_socialnetworks (code, label, url, icon, active) VALUES('whatsapp', 'Whatsapp', '{socialid}', 'fa-whatsapp', 1);
|
INSERT INTO llx_c_socialnetworks (entity,code, label, url, icon, active) VALUES(1, 'whatsapp', 'Whatsapp', '{socialid}', 'fa-whatsapp', 1);
|
||||||
|
|
||||||
ALTER TABLE llx_adherent ADD COLUMN socialnetworks text DEFAULT NULL AFTER email;
|
ALTER TABLE llx_adherent ADD COLUMN socialnetworks text DEFAULT NULL AFTER email;
|
||||||
ALTER TABLE llx_societe ADD COLUMN socialnetworks text DEFAULT NULL AFTER email;
|
ALTER TABLE llx_societe ADD COLUMN socialnetworks text DEFAULT NULL AFTER email;
|
||||||
|
|||||||
@ -964,6 +964,7 @@ DictionaryAccountancyJournal=Accounting journals
|
|||||||
DictionaryEMailTemplates=Email Templates
|
DictionaryEMailTemplates=Email Templates
|
||||||
DictionaryUnits=Units
|
DictionaryUnits=Units
|
||||||
DictionaryMeasuringUnits=Measuring Units
|
DictionaryMeasuringUnits=Measuring Units
|
||||||
|
DictionarySocialNetworks=Social Networks
|
||||||
DictionaryProspectStatus=Prospect status
|
DictionaryProspectStatus=Prospect status
|
||||||
DictionaryHolidayTypes=Types of leave
|
DictionaryHolidayTypes=Types of leave
|
||||||
DictionaryOpportunityStatus=Lead status for project/lead
|
DictionaryOpportunityStatus=Lead status for project/lead
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user