diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index eeffd1aea4a..65f2233b7ae 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6509,14 +6509,31 @@ class Form
}
if (getDolGlobalString('SERVICE_ARE_ECOMMERCE_200238EC')) { // If option to have vat for end customer for services is on
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
- if (!isInEEC($societe_vendeuse) && (!is_object($societe_acheteuse) || (isInEEC($societe_acheteuse) && !$societe_acheteuse->isACompany()))) {
+ // If SERVICE_ARE_ECOMMERCE_200238EC=1 combo list vat rate of purchaser and seller countries
+ // If SERVICE_ARE_ECOMMERCE_200238EC=2 combo list only the vat rate of the purchaser country
+ $selectVatComboMode = getDolGlobalString('SERVICE_ARE_ECOMMERCE_200238EC');
+ if (isInEEC($societe_vendeuse) && isInEEC($societe_acheteuse) && !$societe_acheteuse->isACompany()) {
// We also add the buyer country code
if (is_numeric($type)) {
if ($type == 1) { // We know product is a service
- $code_country .= ",'" . $societe_acheteuse->country_code . "'";
+ switch ($selectVatComboMode) {
+ case '1':
+ $code_country .= ",'" . $societe_acheteuse->country_code . "'";
+ break;
+ case '2':
+ $code_country = "'" . $societe_acheteuse->country_code . "'";
+ break;
+ }
}
} elseif (!$idprod) { // We don't know type of product
- $code_country .= ",'" . $societe_acheteuse->country_code . "'";
+ switch ($selectVatComboMode) {
+ case '1':
+ $code_country .= ",'" . $societe_acheteuse->country_code . "'";
+ break;
+ case '2':
+ $code_country = "'" . $societe_acheteuse->country_code . "'";
+ break;
+ }
} else {
$prodstatic = new Product($this->db);
$prodstatic->fetch($idprod);
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 48e941aae91..8a4c7f1c976 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -173,6 +173,9 @@ if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a ded
}
$arrayfields['author'] = array('label' => $langs->trans("By"), 'checked' => 1);
$arrayfields['t.note'] = array('label' => $langs->trans("Note"), 'checked' => 1);
+if (!getDolGlobalInt('PROJECT_HIDE_TASKS') && getDolGlobalInt('PROJECT_BILL_TIME_SPENT') && !$projectstatic->usage_bill_time ) {
+ $projectstatic->usage_bill_time=1;
+}
if (isModEnabled('service') && !empty($projectstatic->thirdparty) && $projectstatic->thirdparty->id > 0 && $projectstatic->usage_bill_time) {
$arrayfields['t.fk_product'] = array('label' => $langs->trans("Product"), 'checked' => 1);
}
@@ -2282,7 +2285,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
$userstatic->lastname = $task_time->lastname;
$userstatic->firstname = $task_time->firstname;
$userstatic->photo = $task_time->photo;
- $userstatic->statut = $task_time->user_status;
+ $userstatic->status = $task_time->user_status;
print $userstatic->getNomUrl(-1);
}
print '';
@@ -2564,7 +2567,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
$userstatic->lastname = $task_time->lastname;
$userstatic->firstname = $task_time->firstname;
$userstatic->photo = $task_time->photo;
- $userstatic->statut = $task_time->user_status;
+ $userstatic->status = $task_time->user_status;
print $userstatic->getNomUrl(-1);
}
print '';
@@ -2720,7 +2723,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
$userstatic->lastname = $task_time->lastname;
$userstatic->firstname = $task_time->firstname;
$userstatic->photo = $task_time->photo;
- $userstatic->statut = $task_time->user_status;
+ $userstatic->status = $task_time->user_status;
print $userstatic->getNomUrl(-1);
}
print '';