';
llxFooter();
exit;
}
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 34ea7b0a2e8..022bf55f243 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -514,7 +514,17 @@ class FormProjets
}
$linkedtothirdparty = false;
- if (!in_array($table_element, array('don', 'expensereport_det', 'expensereport', 'loan', 'stock_mouvement', 'payment_salary', 'payment_various', 'chargesociales', 'entrepot'))) {
+ if (!in_array($table_element, array(
+ 'don',
+ 'expensereport_det',
+ 'expensereport', 'loan',
+ 'stock_mouvement',
+ 'payment_salary',
+ 'payment_various',
+ 'salary',
+ 'chargesociales',
+ 'entrepot')
+ )) {
$linkedtothirdparty = true;
}
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index b9f320b7db8..7e2154ee309 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -1,17 +1,18 @@
- * Copyright (C) 2016 Christophe Battarel
- * Copyright (C) 2019 Frédéric France
- * Copyright (C) 2021 Juanjo Menent
+/* Copyright (C) 2013-2015 Jean-François FERRY
+ * Copyright (C) 2016 Christophe Battarel
+ * Copyright (C) 2019 Frédéric France
+ * Copyright (C) 2021 Juanjo Menent
+ * Copyright (C) 2021 Alexandre Spangaro
*
* 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 2 of the License, or
+ * 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
+ * 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
@@ -508,11 +509,13 @@ class FormTicket
print '
';
}
- if (!empty($conf->projet->enabled) && !$this->ispublic) {
- $formproject = new FormProjets($this->db);
- print '
';
+ }
}
// Other attributes
diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php
index 47edfcc9ca2..0d4a85e00ae 100644
--- a/htdocs/core/modules/modAdherent.class.php
+++ b/htdocs/core/modules/modAdherent.class.php
@@ -349,7 +349,7 @@ class modAdherent extends DolibarrModules
$this->import_fields_array[$r]['a.fk_soc'] = "ThirdParty";
}
// Add extra fields
- $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity IN (0,".$conf->entity.")";
+ $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'adherent' AND entity IN (0,".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) { // This can fail when class is used on old database (during migration for example)
while ($obj = $this->db->fetch_object($resql)) {
diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php
index 3caf5db88c6..f72dc00cfaf 100644
--- a/htdocs/core/modules/modProduct.class.php
+++ b/htdocs/core/modules/modProduct.class.php
@@ -638,7 +638,7 @@ class modProduct extends DolibarrModules
// Add extra fields
$import_extrafield_sample = array();
- $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0, ".$conf->entity.")";
+ $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'product' AND entity IN (0, ".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) { // This can fail when class is used on old database (during migration for example)
while ($obj = $this->db->fetch_object($resql)) {
diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php
index 2d89baa07a3..08eb3c58adc 100644
--- a/htdocs/core/modules/modProjet.class.php
+++ b/htdocs/core/modules/modProjet.class.php
@@ -296,7 +296,7 @@ class modProjet extends DolibarrModules
$this->import_tables_array[$r] = array('t'=>MAIN_DB_PREFIX.'projet_task', 'extra'=>MAIN_DB_PREFIX.'projet_task_extrafields'); // List of tables to insert into (insert done in same order)
$this->import_fields_array[$r] = array('t.fk_projet'=>'ProjectRef*', 't.ref'=>'RefTask*', 't.label'=>'LabelTask*', 't.dateo'=>"DateStart", 't.datee'=>"DateEnd", 't.planned_workload'=>"PlannedWorkload", 't.progress'=>"Progress", 't.note_private'=>"NotePrivate", 't.note_public'=>"NotePublic", 't.datec'=>"DateCreation");
// Add extra fields
- $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'projet_task' AND entity IN (0,".$conf->entity.")";
+ $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'projet_task' AND entity IN (0,".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) { // This can fail when class is used on old database (during migration for example)
while ($obj = $this->db->fetch_object($resql)) {
diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php
index 6f2d3f8d409..377d5aadbc4 100644
--- a/htdocs/core/modules/modResource.class.php
+++ b/htdocs/core/modules/modResource.class.php
@@ -268,7 +268,7 @@ class modResource extends DolibarrModules
$this->import_tables_array[$r] = array('r'=>MAIN_DB_PREFIX.'resource', 'extra'=>MAIN_DB_PREFIX.'resource_extrafields'); // List of tables to insert into (insert done in same order)
$this->import_fields_array[$r] = array('r.ref'=>"ResourceFormLabel_ref*", 'r.fk_code_type_resource'=>'ResourceTypeCode', 'r.description'=>'ResourceFormLabel_description', 'r.note_private'=>"NotePrivate", 'r.note_public'=>"NotePublic", 'r.asset_number'=>'AssetNumber', 'r.datec'=>'DateCreation');
// Add extra fields
- $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'resource' AND entity IN (0,".$conf->entity.")";
+ $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'resource' AND entity IN (0,".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) { // This can fail when class is used on old database (during migration for example)
while ($obj = $this->db->fetch_object($resql)) {
diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php
index 21a26bdc750..0390a23cc83 100644
--- a/htdocs/core/modules/modService.class.php
+++ b/htdocs/core/modules/modService.class.php
@@ -584,7 +584,7 @@ class modService extends DolibarrModules
}
// Add extra fields
$import_extrafield_sample = array();
- $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0,".$conf->entity.")";
+ $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'product' AND entity IN (0,".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) { // This can fail when class is used on old database (during migration for example)
while ($obj = $this->db->fetch_object($resql)) {
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index c3eba65673b..ca5b484499a 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -496,7 +496,7 @@ class modSociete extends DolibarrModules
$this->import_fields_array[$r] += array('s.accountancy_code_sell'=>'ProductAccountancySellCode', 's.accountancy_code_buy'=>'ProductAccountancyBuyCode');
}
// Add extra fields
- $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
+ $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) { // This can fail when class is used on old database (during migration for example)
while ($obj = $this->db->fetch_object($resql)) {
@@ -674,7 +674,7 @@ class modSociete extends DolibarrModules
's.note_public' => "NotePublic"
);
// Add extra fields
- $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")";
+ $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) { // This can fail when class is used on an old database (during a migration for example)
while ($obj = $this->db->fetch_object($resql)) {
diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php
index abeca50b77d..4b660e6159a 100644
--- a/htdocs/core/modules/modUser.class.php
+++ b/htdocs/core/modules/modUser.class.php
@@ -298,7 +298,7 @@ class modUser extends DolibarrModules
'u.statut'=>'Status'
);
// Add extra fields
- $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'user' AND entity IN (0,".$conf->entity.")";
+ $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'user' AND entity IN (0,".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) { // This can fail when class is used on old database (during migration for example)
while ($obj = $this->db->fetch_object($resql)) {
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index bc79aa4d6e1..6c152c5751e 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -2093,7 +2093,7 @@ class CommandeFournisseur extends CommonOrder
// Test we can delete
$this->fetchObjectLinked(null, 'order_supplier');
- if (!empty($this->linkedObjects)) {
+ if (!empty($this->linkedObjects) && array_key_exists('reception', $this->linkedObjects)) {
foreach ($this->linkedObjects['reception'] as $element) {
if ($element->statut >= 0) {
$this->errors[] = $langs->trans('ReceptionExist');
diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php
index 4227aed6afa..cd416585101 100644
--- a/htdocs/imports/import.php
+++ b/htdocs/imports/import.php
@@ -465,7 +465,7 @@ if ($step == 2 && $datatoimport) {
print '
';
// Module
- print '
'.$langs->trans("Module").'
';
+ print '
'.$langs->trans("Module").'
';
print '
';
$titleofmodule = $objimport->array_import_module[0]['module']->getName();
// Special cas for import common to module/services
@@ -571,10 +571,10 @@ if ($step == 3 && $datatoimport) {
print '';
print '
';
- print '
';
+ print '
';
// Module
- print '
'.$langs->trans("Module").'
';
+ print '
'.$langs->trans("Module").'
';
print '
';
$titleofmodule = $objimport->array_import_module[0]['module']->getName();
// Special cas for import common to module/services
@@ -603,7 +603,7 @@ if ($step == 3 && $datatoimport) {
print '
';
$titleofmodule = $objimport->array_import_module[0]['module']->getName();
// Special cas for import common to module/services
@@ -905,7 +905,7 @@ if ($step == 4 && $datatoimport) {
print '
';
$titleofmodule = $objimport->array_import_module[0]['module']->getName();
// Special cas for import common to module/services
@@ -1414,7 +1415,7 @@ if ($step == 5 && $datatoimport) {
print '
';
$titleofmodule = $objimport->array_import_module[0]['module']->getName();
// Special cas for import common to module/services
@@ -1852,7 +1859,7 @@ if ($step == 6 && $datatoimport) {
print '
';
diff --git a/htdocs/langs/en_US/salaries.lang b/htdocs/langs/en_US/salaries.lang
index d4dc53f42ed..c0e115a20df 100644
--- a/htdocs/langs/en_US/salaries.lang
+++ b/htdocs/langs/en_US/salaries.lang
@@ -6,6 +6,7 @@ CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT=By default, leave empty the option "Autom
Salary=Salary
Salaries=Salaries
NewSalary=New salary
+AddSalary=Add salary
NewSalaryPayment=New salary card
AddSalaryPayment=Add salary payment
SalaryPayment=Salary payment
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index 62d9ac6cc99..8c0cc76f075 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -63,6 +63,7 @@ RuleForWarehouse=Rule for warehouses
WarehouseAskWarehouseOnThirparty=Set a warehouse on Third-parties
WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals
WarehouseAskWarehouseDuringOrder=Set a warehouse on Sales Orders
+WarehouseAskWarehouseDuringProject=Set a warehouse on Projects
UserDefaultWarehouse=Set a warehouse on Users
MainDefaultWarehouse=Default warehouse
MainDefaultWarehouseUser=Use a default warehouse for each user
@@ -262,4 +263,4 @@ ErrorSameBatchNumber=Same batch number found in inventory list
ProductBatchDoesNotExist=Product with batch/serial does not exist
ProductBarcodeDoesNotExist=Product with barcode does not exist
WarehouseId=Warehouse ID
-WarehouseRef=Warehouse Ref
\ No newline at end of file
+WarehouseRef=Warehouse Ref
diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php
index 8ffae0bee8c..32a2cd08cc9 100644
--- a/htdocs/product/popuprop.php
+++ b/htdocs/product/popuprop.php
@@ -178,7 +178,7 @@ $arrayofmode = array(
'facture' => 'Facture'
);
$title .= ' '.$form->selectarray('mode', $arrayofmode, $mode, 1);
-$title .= ' ';
+$title .= ' ';
print '