Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
6f8cc269f5
10 changed files with 40 additions and 22 deletions
|
|
@ -2999,7 +2999,7 @@ DROP TABLE IF EXISTS `llx_c_type_contact`;
|
|||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `llx_c_type_contact` (
|
||||
`rowid` int(11) NOT NULL,
|
||||
`rowid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`element` varchar(30) NOT NULL,
|
||||
`source` varchar(8) NOT NULL DEFAULT 'external',
|
||||
`code` varchar(32) NOT NULL,
|
||||
|
|
|
|||
|
|
@ -770,11 +770,11 @@ if (empty($reshook) && $action == 'update') {
|
|||
if ($fulldayevent) {
|
||||
$tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT');
|
||||
// For "full day" events, we must store date in GMT (It must be viewed as same moment everywhere)
|
||||
$datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), $tzforfullday ? $tzforfullday : 'tzuserrel');
|
||||
$datef = dol_mktime($fulldayevent ? '23' : GETPOSTINT("p2hour"), $fulldayevent ? '59' : GETPOSTINT("p2min"), $fulldayevent ? '59' : GETPOSTINT("apsec"), GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), $tzforfullday ? $tzforfullday : 'tzuserrel');
|
||||
$datep = dol_mktime('00', '00', '00', GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel');
|
||||
$datef = dol_mktime('23', '59', '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel');
|
||||
} else {
|
||||
$datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), 'tzuserrel');
|
||||
$datef = dol_mktime($fulldayevent ? '23' : GETPOSTINT("p2hour"), $fulldayevent ? '59' : GETPOSTINT("p2min"), $fulldayevent ? '59' : GETPOSTINT("apsec"), GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), 'tzuserrel');
|
||||
$datep = dol_mktime(GETPOST("aphour", 'int'), GETPOST("apmin", 'int'), GETPOST("apsec", 'int'), GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), 'tzuserrel');
|
||||
$datef = dol_mktime(GETPOST("p2hour", 'int'), GETPOST("p2min", 'int'), GETPOST("apsec", 'int'), GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuserrel');
|
||||
}
|
||||
|
||||
if ($object->elementtype == 'ticket') { // code should be TICKET_MSG, TICKET_MSG_PRIVATE, TICKET_MSG_SENTBYMAIL, TICKET_MSG_PRIVATE_SENTBYMAIL
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ if ($permission) {
|
|||
print '<input type="hidden" name="withproject" value="'.$withproject.'">';
|
||||
} ?>
|
||||
|
||||
<div class="tagtd"><?php echo $conf->global->MAIN_INFO_SOCIETE_NOM; ?></div>
|
||||
<div class="tagtd"><span class="paddingleft"><?php echo getDolGlobalString('MAIN_INFO_SOCIETE_NOM'); ?></span></div>
|
||||
<!-- <div class="nowrap tagtd"><?php echo img_object('', 'user').' '.$langs->trans("Users"); ?></div> -->
|
||||
<div class="tagtd maxwidthonsmartphone">
|
||||
<?php echo img_object('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($user->id, 'userid', 1, (!empty($userAlreadySelected) ? $userAlreadySelected : null), 0, null, null, 0, 56, 0, '', 0, '', 'minwidth100imp widthcentpercentminusxx maxwidth400 userselectcontact');
|
||||
|
|
@ -141,7 +141,7 @@ if ($permission) {
|
|||
if (($object->element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) {
|
||||
$tmpobject = $objectsrc;
|
||||
}
|
||||
$formcompany->selectTypeContact($tmpobject, '', 'type', 'internal', 'position', 0, 'minwidth125imp widthcentpercentminusx maxwidth400'); ?></div>
|
||||
$formcompany->selectTypeContact($tmpobject, '', 'type', 'internal', 'position', 0, 'minwidth150imp widthcentpercentminusx maxwidth400'); ?></div>
|
||||
<div class="tagtd"> </div>
|
||||
<div class="tagtd center"><input type="submit" class="button small" value="<?php echo $langs->trans("Add"); ?>"></div>
|
||||
</form>
|
||||
|
|
@ -164,7 +164,7 @@ if ($permission) {
|
|||
<div class="tagtd nowrap noborderbottom">
|
||||
<?php
|
||||
$selectedCompany = GETPOSTISSET("newcompany") ? GETPOSTINT("newcompany") : (empty($object->socid) ? 0 : $object->socid);
|
||||
$selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); // This also print the select component?>
|
||||
$selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp maxwidth400 widthcentpercentminusx'); // This also print the select component?>
|
||||
</div>
|
||||
<div class="tagtd noborderbottom minwidth500imp">
|
||||
<?php
|
||||
|
|
@ -186,7 +186,7 @@ if ($permission) {
|
|||
if (($object->element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) {
|
||||
$tmpobject = $objectsrc;
|
||||
}
|
||||
$formcompany->selectTypeContact($tmpobject, $preselectedtypeofcontact, 'typecontact', 'external', 'position', 0, 'minwidth125imp widthcentpercentminusx maxwidth400'); ?>
|
||||
$formcompany->selectTypeContact($tmpobject, $preselectedtypeofcontact, 'typecontact', 'external', 'position', 0, 'minwidth150imp widthcentpercentminusx maxwidth400'); ?>
|
||||
</div>
|
||||
<div class="tagtd noborderbottom"> </div>
|
||||
<div class="tagtd center noborderbottom">
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
-- Notes
|
||||
--
|
||||
-- Do not place a comment at the end of the line, this file is parsed when
|
||||
-- of the install and all the acronyms '-' are removed.
|
||||
-- of the install and all the acronyms '-' are removed.
|
||||
--
|
||||
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
|
||||
-- de l'install et tous les sigles '--' sont supprimés.
|
||||
|
|
@ -33,10 +33,10 @@
|
|||
--
|
||||
-- The types of contact of an element
|
||||
--
|
||||
-- The unique key is set on (element, source, code)
|
||||
-- The unique key is set on (element, source, code)
|
||||
--
|
||||
|
||||
-- Contract / Contrat
|
||||
-- Contract / Contrat
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'internal', 'SALESREPSIGN', 'Commercial signataire du contrat', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'internal', 'SALESREPFOLL', 'Commercial suivi du contrat', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'external', 'BILLING', 'Contact client facturation contrat', 1);
|
||||
|
|
@ -118,3 +118,6 @@ insert into llx_c_type_contact (element, source, code, libelle, active ) values
|
|||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1);
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1);
|
||||
|
||||
-- Thirdparty
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('societe', 'internal', 'SALESREPTHIRD', 'Sales Representative', 1);
|
||||
|
|
|
|||
|
|
@ -321,6 +321,18 @@ ALTER TABLE llx_rights_def ADD COLUMN enabled text NULL AFTER bydefault;
|
|||
DELETE FROM llx_c_action_trigger WHERE code = 'BILLREC_AUTOCREATEBILL';
|
||||
|
||||
|
||||
insert into llx_c_type_contact (element, source, code, libelle, active) values ('thirdparty', 'internal', 'SALESREPTHIRD', 'Sales Representative', 1);
|
||||
|
||||
ALTER TABLE llx_societe_commerciaux ADD COLUMN fk_c_type_contact_code varchar(32) NOT NULL DEFAULT 'SALESREPTHIRD';
|
||||
|
||||
-- VMYSQL4.1 DROP INDEX uk_societe_commerciaux ON llx_societe_commerciaux;
|
||||
-- VPGSQL8.2 DROP INDEX uk_societe_commerciaux;
|
||||
ALTER TABLE llx_societe_commerciaux ADD UNIQUE INDEX uk_societe_commerciaux_c_type_contact (fk_soc, fk_user, fk_c_type_contact_code);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_c_type_contact_code FOREIGN KEY (fk_c_type_contact_code) REFERENCES llx_c_type_contact(code);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_user FOREIGN KEY (fk_user) REFERENCES llx_user(rowid);
|
||||
|
||||
|
||||
-- element_element, see https://github.com/Dolibarr/dolibarr/pull/29329
|
||||
|
||||
ALTER TABLE llx_element_element ADD COLUMN relationtype varchar(64) DEFAULT NULL AFTER targettype;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ create table llx_c_type_contact
|
|||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
element varchar(64) NOT NULL,
|
||||
source varchar(8) DEFAULT 'external' NOT NULL,
|
||||
source varchar(8) DEFAULT 'external' NOT NULL, -- 'internal' (for link object-user) or 'external' (for link object-third party)
|
||||
code varchar(32) NOT NULL,
|
||||
libelle varchar(128) NOT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL,
|
||||
|
|
|
|||
|
|
@ -20,12 +20,11 @@
|
|||
|
||||
create table llx_element_contact
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
datecreate datetime NULL, -- date de creation de l'enregistrement
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
datecreate datetime NULL, -- date of creation of record
|
||||
statut smallint DEFAULT 5, -- 5 inactif, 4 actif
|
||||
|
||||
element_id int NOT NULL, -- la reference de l'element.
|
||||
fk_c_type_contact int NOT NULL, -- nature du contact.
|
||||
fk_socpeople integer NOT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
element_id int NOT NULL, -- ID of element.
|
||||
fk_c_type_contact int NOT NULL, -- nature of contact.
|
||||
fk_socpeople integer NOT NULL -- ID of contact
|
||||
)ENGINE=innodb;
|
||||
|
|
|
|||
|
|
@ -16,4 +16,7 @@
|
|||
--
|
||||
-- ===================================================================
|
||||
|
||||
ALTER TABLE llx_societe_commerciaux ADD UNIQUE INDEX uk_societe_commerciaux (fk_soc, fk_user);
|
||||
ALTER TABLE llx_societe_commerciaux ADD UNIQUE INDEX uk_societe_commerciaux_c_type_contact (fk_soc, fk_user, fk_c_type_contact_code);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_c_type_contact_code FOREIGN KEY (fk_c_type_contact_code) REFERENCES llx_c_type_contact(code);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
|
||||
ALTER TABLE llx_societe_commerciaux ADD CONSTRAINT fk_societe_commerciaux_fk_user FOREIGN KEY (fk_user) REFERENCES llx_user(rowid);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@ create table llx_societe_commerciaux
|
|||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_soc integer,
|
||||
fk_user integer,
|
||||
fk_c_type_contact_code varchar(32) NOT NULL DEFAULT 'SALESREPTHIRD',
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
||||
|
|
|
|||
|
|
@ -1781,6 +1781,7 @@ maxscreenheightless200 {
|
|||
.minwidth50imp { min-width: 50px !important; }
|
||||
.minwidth75imp { min-width: 75px !important; }
|
||||
.minwidth100imp { min-width: 100px !important; }
|
||||
.minwidth150imp { min-width: 150px !important; }
|
||||
.minwidth200imp { min-width: 200px !important; }
|
||||
.minwidth250imp { min-width: 250px !important; }
|
||||
.minwidth300imp { min-width: 300px !important; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue