Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
6297e03ea9
@ -69,7 +69,15 @@ class BookKeeping extends CommonObject
|
||||
|
||||
public $doc_date;
|
||||
public $date_lim_reglement;
|
||||
public $doc_type;
|
||||
|
||||
/**
|
||||
* @var string doc_type
|
||||
*/
|
||||
public $doc_type;
|
||||
|
||||
/**
|
||||
* @var string doc_ref
|
||||
*/
|
||||
public $doc_ref;
|
||||
|
||||
/**
|
||||
@ -82,12 +90,35 @@ class BookKeeping extends CommonObject
|
||||
*/
|
||||
public $fk_docdet;
|
||||
|
||||
public $thirdparty_code;
|
||||
/**
|
||||
* @var string thirdparty code
|
||||
*/
|
||||
public $thirdparty_code;
|
||||
|
||||
/**
|
||||
* @var string subledger account
|
||||
*/
|
||||
public $subledger_account;
|
||||
|
||||
/**
|
||||
* @var string subledger label
|
||||
*/
|
||||
public $subledger_label;
|
||||
|
||||
/**
|
||||
* @var string doc_type
|
||||
*/
|
||||
public $numero_compte;
|
||||
public $label_compte;
|
||||
public $label_operation;
|
||||
|
||||
/**
|
||||
* @var string label compte
|
||||
*/
|
||||
public $label_compte;
|
||||
|
||||
/**
|
||||
* @var string label operation
|
||||
*/
|
||||
public $label_operation;
|
||||
public $debit;
|
||||
public $credit;
|
||||
public $montant;
|
||||
|
||||
@ -231,9 +231,10 @@ $disable_delete = 0;
|
||||
// Bank account
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
$bankline=new AccountLine($db);
|
||||
|
||||
if ($object->fk_account > 0)
|
||||
{
|
||||
$bankline=new AccountLine($db);
|
||||
$bankline->fetch($object->bank_line);
|
||||
if ($bankline->rappro)
|
||||
{
|
||||
|
||||
@ -10,7 +10,7 @@ if (empty($conf) || ! is_object($conf))
|
||||
if (empty($extrafieldsobjectkey) && is_object($object)) $extrafieldsobjectkey=$object->table_element;
|
||||
|
||||
// Loop to complete the sql search criterias from extrafields
|
||||
if (! empty($extrafieldsobjectkey) && ! empty($search_array_options)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
|
||||
if (! empty($extrafieldsobjectkey) && ! empty($search_array_options) && is_array($search_array_options)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
|
||||
{
|
||||
foreach ($search_array_options as $key => $val)
|
||||
{
|
||||
|
||||
@ -89,9 +89,9 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'29','Group
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'31','Personne morale de droit étranger, immatriculée au RCS');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'32','Personne morale de droit étranger, non immatriculée au RCS');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'35','Régime auto-entrepreneur');
|
||||
|
||||
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'41','Etablissement public ou régie à caractère industriel ou commercial');
|
||||
|
||||
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'51','Société coopérative commerciale particulière');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'52','Société en nom collectif');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'53','Société en commandite');
|
||||
@ -108,18 +108,18 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'63','Soci
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'64','Société non commerciale d assurances');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'65','Société civile');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'69','Personnes de droit privé inscrites au RCS');
|
||||
|
||||
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'71','Administration de l état');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'72','Collectivité territoriale');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'73','Etablissement public administratif');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'74','Personne morale de droit public administratif');
|
||||
|
||||
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'81','Organisme gérant régime de protection social à adhésion obligatoire');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'82','Organisme mutualiste');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'83','Comité d entreprise');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'84','Organisme professionnel');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'85','Organisme de retraite à adhésion non obligatoire');
|
||||
|
||||
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'91','Syndicat de propriétaires');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'92','Association loi 1901 ou assimilé');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'93','Fondation');
|
||||
@ -159,6 +159,17 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '506', 'KG
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '507', 'Ltd. - Limited Company');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '508', 'OHG - Offene Handelsgesellschaft');
|
||||
|
||||
-- Denmark
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8001', 'Aktieselvskab A/S');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8002', 'Anparts Selvskab ApS');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8003', 'Personlig ejet selvskab');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8004', 'Iværksætterselvskab IVS');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8005', 'Interessentskab I/S');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8006', 'Holdingselskab');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8007', 'Selskab Med Begrænset Hæftelse SMBA');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8008', 'Kommanditselskab K/S');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8009', 'SPE-selskab');
|
||||
|
||||
-- Greece
|
||||
INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10201',102,'Ατομική επιχείρηση',0,1);
|
||||
INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10202',102,'Εταιρική επιχείρηση',0,1);
|
||||
@ -313,4 +324,5 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178,
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17802', 'Asociación General', 1);
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17803', 'Sociedad de Responsabilidad Limitada', 1);
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17804', 'Sociedad Civil', 1);
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17805', 'Sociedad Anónima', 1);
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17805', 'Sociedad Anónima', 1);
|
||||
|
||||
|
||||
@ -72,6 +72,16 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203);
|
||||
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8001', 'Aktieselvskab A/S');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8002', 'Anparts Selvskab ApS');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8003', 'Personlig ejet selvskab');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8004', 'Iværksætterselvskab IVS');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8005', 'Interessentskab I/S');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8006', 'Holdingselskab');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8007', 'Selskab Med Begrænset Hæftelse SMBA');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8008', 'Kommanditselskab K/S');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8009', 'SPE-selskab');
|
||||
|
||||
ALTER TABLE llx_payment_salary ADD COLUMN ref varchar(30) NULL after rowid;
|
||||
ALTER TABLE llx_payment_salary ADD COLUMN fk_projet integer DEFAULT NULL after amount;
|
||||
|
||||
@ -142,26 +152,26 @@ UPDATE llx_holiday SET ref = rowid WHERE ref IS NULL;
|
||||
|
||||
CREATE TABLE llx_emailcollector_emailcollector(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
entity integer DEFAULT 1 NOT NULL,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
entity integer DEFAULT 1 NOT NULL,
|
||||
ref varchar(128) NOT NULL,
|
||||
label varchar(255),
|
||||
label varchar(255),
|
||||
description text,
|
||||
host varchar(255),
|
||||
user varchar(128),
|
||||
host varchar(255),
|
||||
user varchar(128),
|
||||
password varchar(128),
|
||||
source_directory varchar(255) NOT NULL,
|
||||
target_directory varchar(255),
|
||||
datelastresult datetime,
|
||||
codelastresult varchar(16),
|
||||
datelastresult datetime,
|
||||
codelastresult varchar(16),
|
||||
lastresult varchar(255),
|
||||
note_public text,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp NOT NULL,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
note_public text,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp NOT NULL,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
status integer NOT NULL
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
@ -174,28 +184,28 @@ CREATE TABLE llx_emailcollector_emailcollectoraction(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
fk_emailcollector INTEGER NOT NULL,
|
||||
type varchar(128) NOT NULL,
|
||||
actionparam varchar(255) NULL,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp NOT NULL,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
type varchar(128) NOT NULL,
|
||||
actionparam varchar(255) NULL,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp NOT NULL,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
status integer NOT NULL
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
|
||||
CREATE TABLE llx_emailcollector_emailcollectorfilter(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
fk_emailcollector INTEGER NOT NULL,
|
||||
type varchar(128) NOT NULL,
|
||||
rulevalue varchar(255) NULL,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp NOT NULL,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
type varchar(128) NOT NULL,
|
||||
rulevalue varchar(255) NULL,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp NOT NULL,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
status integer NOT NULL
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
|
||||
@ -177,7 +177,7 @@ class ProjectStats extends Stats
|
||||
if (! empty($this->status))
|
||||
$sqlwhere[] = " t.fk_opp_status IN (" . $this->status . ")";
|
||||
|
||||
if (! $user->rights->projet->all->lire) $sqlwhere[] = " AND p.rowid IN (".$projectsListId.")"; // public and assigned to, or restricted to company for external users
|
||||
if (! $user->rights->projet->all->lire) $sqlwhere[] = " t.rowid IN (".$projectsListId.")"; // public and assigned to, or restricted to company for external users
|
||||
|
||||
if (count($sqlwhere) > 0) {
|
||||
$sqlwhere_str = ' WHERE ' . implode(' AND ', $sqlwhere);
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
* Copyright (C) 2015-2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 David Beniamine <David.Beniamine@Tetras-Libre.fr>
|
||||
*
|
||||
* 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
|
||||
@ -2137,7 +2138,16 @@ else
|
||||
// Employee
|
||||
print '<tr>';
|
||||
print '<td>'.fieldLabel('Employee','employee',0).'</td><td>';
|
||||
print $form->selectyesno("employee",$object->employee,1);
|
||||
if ($caneditfield)
|
||||
{
|
||||
print $form->selectyesno("employee",$object->employee,1);
|
||||
}else{
|
||||
if ($object->employee){
|
||||
print $langs->trans("Yes");
|
||||
}else{
|
||||
print $langs->trans("No");
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Hierarchy
|
||||
@ -2341,7 +2351,12 @@ else
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ColorUser").'</td>';
|
||||
print '<td>';
|
||||
print $formother->selectColor(GETPOST('color')?GETPOST('color'):$object->color, 'color', null, 1, '', 'hideifnotset');
|
||||
if ($caneditfield)
|
||||
{
|
||||
print $formother->selectColor(GETPOST('color')?GETPOST('color'):$object->color, 'color', null, 1, '', 'hideifnotset');
|
||||
}else{
|
||||
print $formother->showColor($object->color, '');
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -2364,7 +2379,12 @@ else
|
||||
foreach ($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
}
|
||||
print $form->multiselectarray( 'usercats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%' );
|
||||
if ($caneditfield)
|
||||
{
|
||||
print $form->multiselectarray( 'usercats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%' );
|
||||
}else{
|
||||
print $form->showCategories( $object->id, 'user', 1 );
|
||||
}
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
@ -2447,7 +2467,12 @@ else
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
if ($caneditfield)
|
||||
{
|
||||
print $object->showOptionals($extrafields,'edit');
|
||||
}else{
|
||||
print $object->showOptionals($extrafields,'view');
|
||||
}
|
||||
}
|
||||
|
||||
// Signature
|
||||
@ -2496,7 +2521,11 @@ else
|
||||
print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="thm" value="'.price2num(GETPOST('thm')?GETPOST('thm'):$object->thm).'">';
|
||||
if($caneditfield){
|
||||
print '<input size="8" type="text" name="thm" value="'.price2num(GETPOST('thm')?GETPOST('thm'):$object->thm).'">';
|
||||
}else{
|
||||
print ($object->thm!=''?price($object->thm,'',$langs,1,-1,-1,$conf->currency):'');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -2506,7 +2535,12 @@ else
|
||||
print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classthm');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="tjm" value="'.price2num(GETPOST('tjm')?GETPOST('tjm'):$object->tjm).'">';
|
||||
if($caneditfield)
|
||||
{
|
||||
print '<input size="8" type="text" name="tjm" value="'.price2num(GETPOST('tjm')?GETPOST('tjm'):$object->tjm).'">';
|
||||
}else{
|
||||
print ($object->tjm!=''?price($object->tjm,'',$langs,1,-1,-1,$conf->currency):'');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -2521,21 +2555,36 @@ else
|
||||
// Weeklyhours
|
||||
print '<tr><td>'.$langs->trans("WeeklyHours").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="8" type="text" name="weeklyhours" value="'.price2num(GETPOST('weeklyhours')?GETPOST('weeklyhours'):$object->weeklyhours).'">';
|
||||
if($caneditfield)
|
||||
{
|
||||
print '<input size="8" type="text" name="weeklyhours" value="'.price2num(GETPOST('weeklyhours')?GETPOST('weeklyhours'):$object->weeklyhours).'">';
|
||||
}else{
|
||||
print price2num($object->weeklyhours);
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Date employment
|
||||
print '<tr><td>'.$langs->trans("DateEmployment").'</td>';
|
||||
print '<td>';
|
||||
print $form->selectDate(GETPOST('dateemployment')?GETPOST('dateemployment'):$object->dateemployment, 'dateemployment', 0, 0, 1, 'formdateemployment', 1, 0);
|
||||
if($caneditfield)
|
||||
{
|
||||
print $form->selectDate(GETPOST('dateemployment')?GETPOST('dateemployment'):$object->dateemployment, 'dateemployment', 0, 0, 1, 'formdateemployment', 1, 0);
|
||||
}else{
|
||||
print dol_print_date($object->dateemployment, 'day');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Date employmentEnd
|
||||
print '<tr><td>'.$langs->trans("DateEmploymentEnd").'</td>';
|
||||
print '<td>';
|
||||
print $form->selectDate(GETPOST('dateemploymentend')?GETPOST('dateemploymentend'):$object->dateemploymentend, 'dateemploymentend', 0, 0, 1, 'formdateemploymentend', 1, 0);
|
||||
if($caneditfield)
|
||||
{
|
||||
print $form->selectDate(GETPOST('dateemploymentend')?GETPOST('dateemploymentend'):$object->dateemploymentend, 'dateemploymentend', 0, 0, 1, 'formdateemploymentend', 1, 0);
|
||||
}else{
|
||||
print dol_print_date($object->dateemploymentend, 'day');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -2543,7 +2592,12 @@ else
|
||||
// Date birth
|
||||
print '<tr><td>'.$langs->trans("DateToBirth").'</td>';
|
||||
print '<td>';
|
||||
print $form->selectDate(GETPOST('birth')?GETPOST('birth'):$object->birth, 'birth', 0, 0, 1, 'updateuser', 1, 0);
|
||||
if($caneditfield)
|
||||
{
|
||||
echo $form->selectDate(GETPOST('birth')?GETPOST('birth'):$object->birth, 'birth', 0, 0, 1, 'updateuser', 1, 0);
|
||||
}else{
|
||||
print dol_print_date($object->birth, 'day');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user