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 $doc_date;
|
||||||
public $date_lim_reglement;
|
public $date_lim_reglement;
|
||||||
public $doc_type;
|
|
||||||
|
/**
|
||||||
|
* @var string doc_type
|
||||||
|
*/
|
||||||
|
public $doc_type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string doc_ref
|
||||||
|
*/
|
||||||
public $doc_ref;
|
public $doc_ref;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -82,12 +90,35 @@ class BookKeeping extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $fk_docdet;
|
public $fk_docdet;
|
||||||
|
|
||||||
public $thirdparty_code;
|
/**
|
||||||
|
* @var string thirdparty code
|
||||||
|
*/
|
||||||
|
public $thirdparty_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string subledger account
|
||||||
|
*/
|
||||||
public $subledger_account;
|
public $subledger_account;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string subledger label
|
||||||
|
*/
|
||||||
public $subledger_label;
|
public $subledger_label;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string doc_type
|
||||||
|
*/
|
||||||
public $numero_compte;
|
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 $debit;
|
||||||
public $credit;
|
public $credit;
|
||||||
public $montant;
|
public $montant;
|
||||||
|
|||||||
@ -231,9 +231,10 @@ $disable_delete = 0;
|
|||||||
// Bank account
|
// Bank account
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
|
$bankline=new AccountLine($db);
|
||||||
|
|
||||||
if ($object->fk_account > 0)
|
if ($object->fk_account > 0)
|
||||||
{
|
{
|
||||||
$bankline=new AccountLine($db);
|
|
||||||
$bankline->fetch($object->bank_line);
|
$bankline->fetch($object->bank_line);
|
||||||
if ($bankline->rappro)
|
if ($bankline->rappro)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,7 +10,7 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
if (empty($extrafieldsobjectkey) && is_object($object)) $extrafieldsobjectkey=$object->table_element;
|
if (empty($extrafieldsobjectkey) && is_object($object)) $extrafieldsobjectkey=$object->table_element;
|
||||||
|
|
||||||
// Loop to complete the sql search criterias from extrafields
|
// 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)
|
foreach ($search_array_options as $key => $val)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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, '507', 'Ltd. - Limited Company');
|
||||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '508', 'OHG - Offene Handelsgesellschaft');
|
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
|
-- 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 ('10201',102,'Ατομική επιχείρηση',0,1);
|
||||||
INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10202',102,'Εταιρική επιχείρηση',0,1);
|
INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10202',102,'Εταιρική επιχείρηση',0,1);
|
||||||
@ -314,3 +325,4 @@ 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, '17803', 'Sociedad de Responsabilidad Limitada', 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, '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_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_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 ref varchar(30) NULL after rowid;
|
||||||
ALTER TABLE llx_payment_salary ADD COLUMN fk_projet integer DEFAULT NULL after amount;
|
ALTER TABLE llx_payment_salary ADD COLUMN fk_projet integer DEFAULT NULL after amount;
|
||||||
|
|
||||||
|
|||||||
@ -177,7 +177,7 @@ class ProjectStats extends Stats
|
|||||||
if (! empty($this->status))
|
if (! empty($this->status))
|
||||||
$sqlwhere[] = " t.fk_opp_status IN (" . $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) {
|
if (count($sqlwhere) > 0) {
|
||||||
$sqlwhere_str = ' WHERE ' . implode(' AND ', $sqlwhere);
|
$sqlwhere_str = ' WHERE ' . implode(' AND ', $sqlwhere);
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
* Copyright (C) 2015-2018 Charlene Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2015-2018 Charlene Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.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
|
* 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
|
||||||
@ -2137,7 +2138,16 @@ else
|
|||||||
// Employee
|
// Employee
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.fieldLabel('Employee','employee',0).'</td><td>';
|
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>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Hierarchy
|
// Hierarchy
|
||||||
@ -2341,7 +2351,12 @@ else
|
|||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("ColorUser").'</td>';
|
print '<tr><td>'.$langs->trans("ColorUser").'</td>';
|
||||||
print '<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>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2364,7 +2379,12 @@ else
|
|||||||
foreach ($cats as $cat) {
|
foreach ($cats as $cat) {
|
||||||
$arrayselected[] = $cat->id;
|
$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>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2447,7 +2467,12 @@ else
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
print $object->showOptionals($extrafields,'edit');
|
if ($caneditfield)
|
||||||
|
{
|
||||||
|
print $object->showOptionals($extrafields,'edit');
|
||||||
|
}else{
|
||||||
|
print $object->showOptionals($extrafields,'view');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Signature
|
// Signature
|
||||||
@ -2496,7 +2521,11 @@ else
|
|||||||
print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
|
print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
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 '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -2506,7 +2535,12 @@ else
|
|||||||
print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classthm');
|
print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classthm');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
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 '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -2521,21 +2555,36 @@ else
|
|||||||
// Weeklyhours
|
// Weeklyhours
|
||||||
print '<tr><td>'.$langs->trans("WeeklyHours").'</td>';
|
print '<tr><td>'.$langs->trans("WeeklyHours").'</td>';
|
||||||
print '<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 '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Date employment
|
// Date employment
|
||||||
print '<tr><td>'.$langs->trans("DateEmployment").'</td>';
|
print '<tr><td>'.$langs->trans("DateEmployment").'</td>';
|
||||||
print '<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 '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Date employmentEnd
|
// Date employmentEnd
|
||||||
print '<tr><td>'.$langs->trans("DateEmploymentEnd").'</td>';
|
print '<tr><td>'.$langs->trans("DateEmploymentEnd").'</td>';
|
||||||
print '<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 '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -2543,7 +2592,12 @@ else
|
|||||||
// Date birth
|
// Date birth
|
||||||
print '<tr><td>'.$langs->trans("DateToBirth").'</td>';
|
print '<tr><td>'.$langs->trans("DateToBirth").'</td>';
|
||||||
print '<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 '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user