diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index c7b7374a8f9..5287155357f 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4900,20 +4900,20 @@ class Form
print '
' . $langs->trans("AmountHTShort") . ' | ';
print '' . $langs->trans("Company") . ' | ';
print '';
- while ($i < $num) {
+ while ($i < $num)
+ {
$objp = $this->db->fetch_object($resqlorderlist);
- if ($objp->socid == $societe->id) {
- $var = ! $var;
- print '';
- print '| ';
- print '';
- print ' | ' . $objp->ref . ' | ';
- print '' . $objp->ref_supplier . ' | ';
- print '' . price($objp->total_ht) . ' | ';
- print '' . $objp->name . ' | ';
- print '';
- print '
';
- }
+
+ $var = ! $var;
+ print '';
+ print '| ';
+ print '';
+ print ' | ' . $objp->ref . ' | ';
+ print '' . $objp->ref_supplier . ' | ';
+ print '' . price($objp->total_ht) . ' | ';
+ print '' . $objp->name . ' | ';
+ print '';
+ print '
';
$i ++;
}
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 9eee63a4877..f924922cb87 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -401,7 +401,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
$plannedworkloadoutputformat='allhourmin';
$timespentoutputformat='allhourmin';
if (! empty($conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT)) $plannedworkloadoutputformat=$conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT;
- if (! empty($conf->global->PROJECT_TIMES_PENT_FORMAT)) $timespentoutputformat=$conf->global->PROJECT_TIME_SPENT_FORMAT;
+ if (! empty($conf->global->PROJECT_TIMES_SPENT_FORMAT)) $timespentoutputformat=$conf->global->PROJECT_TIME_SPENT_FORMAT;
// Planned Workload (in working hours)
print '';
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index 200556f6a3d..78a78195d37 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -421,6 +421,7 @@ if ($object->id > 0)
print ' | ';
}
+ $var = True;
while ($i < $num && $i <= $MAXLIST)
{
$obj = $db->fetch_object($resql);
@@ -494,6 +495,7 @@ if ($object->id > 0)
print '';
print '';
}
+ $var=True;
while ($i < min($num,$MAXLIST))
{
$obj = $db->fetch_object($resql);
diff --git a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php
index 0c2d5eed0af..b0ed5906d14 100644
--- a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php
@@ -45,8 +45,8 @@ foreach($linkedObjectBlock as $object)
{
$var=!$var;
?>
- >|
- trans("ShowOrder"),"order").' '.$object->ref; ?> |
+
>
+ | trans("ShowOrder"),"order").' '.$object->ref; ?> |
date,'day'); ?> |
rights->fournisseur->commande->lire) {
@@ -60,7 +60,7 @@ foreach($linkedObjectBlock as $object)
?>
|
- | trans('TotalHT'); ?> |
+ trans("TotalHT"); ?> |
rights->fournisseur->commande->lire) {
echo price($total);
diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php
index 500e3ed50f3..669d5043c01 100644
--- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php
@@ -49,7 +49,7 @@ foreach($linkedObjectBlock as $object)
$var=!$var;
?>
|
>
- | trans("ShowBill"),"bill").' '.$object->ref; ?>
+ trans("ShowBill"),"bill").' '.$object->ref; ?> |
ref_supplier; ?> |
date,'day'); ?> |
db->idate($this->timespent_date)."',";
$sql.= " task_datehour = '".$this->db->idate($this->timespent_datehour)."',";
- $sql.= " task_date_withhour = ".(empty($this->timespent_withhour)?0:1);
+ $sql.= " task_date_withhour = ".(empty($this->timespent_withhour)?0:1).",";
$sql.= " task_duration = ".$this->timespent_duration.",";
$sql.= " fk_user = ".$this->timespent_fk_user.",";
$sql.= " note = ".(isset($this->timespent_note)?"'".$this->db->escape($this->timespent_note)."'":"null");
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index fbb6995f8ac..6302994181a 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -475,7 +475,7 @@ foreach ($listofreferent as $key => $value)
}
// and the final balance
print ' |
';
-print '| '.$langs->trans("Total").' | ';
+print ''.$langs->trans("Profit").' | ';
print ''.price($balance_ht).' | ';
print ''.price($balance_ttc).' | ';
print '
';
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 8f0398d3f69..f5eab2587cf 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -430,7 +430,7 @@ if ($id > 0 || ! empty($ref))
/*
* List of time spent
*/
- $sql = "SELECT t.rowid, t.task_date, t.task_datehour, t.task_date_withhour, t.task_duration, t.fk_user, t.note";
+ $sql = "SELECT t.rowid, t.task_date, t.task_datehour, t.task_date_withhour, t.task_duration, t.fk_user, t.note, t.thm";
$sql.= ", u.lastname, u.firstname";
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t";
$sql .= " , ".MAIN_DB_PREFIX."user as u";
@@ -470,10 +470,15 @@ if ($id > 0 || ! empty($ref))
print ''.$langs->trans("By").' | ';
print ''.$langs->trans("Note").' | ';
print ''.$langs->trans("TimeSpent").' | ';
+ if ($conf->salaries->enabled)
+ {
+ print ''.$langs->trans("Value").' | ';
+ }
print ' | ';
print "\n";
$total = 0;
+ $totalvalue = 0;
foreach ($tasks as $task_time)
{
$var=!$var;
@@ -543,6 +548,14 @@ if ($id > 0 || ! empty($ref))
}
print '';
+ // Value spent
+ if ($conf->salaries->enabled)
+ {
+ print '';
+ print price(price2num($task_time->thm * $task_time->task_duration / 3600), 1, $langs, 1, -1, -1, $conf->currency);
+ print ' | ';
+ }
+
// Edit and delete icon
print '';
if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid)
@@ -568,9 +581,15 @@ if ($id > 0 || ! empty($ref))
print "\n";
$total += $task_time->task_duration;
+ $totalvalue += price2num($task_time->thm * $task_time->task_duration / 3600);
}
print ' | | '.$langs->trans("Total").' | ';
- print ''.convertSecondToTime($total,'allhourmin').' | | ';
+ print ''.convertSecondToTime($total,'allhourmin').' | ';
+ if ($conf->salaries->enabled)
+ {
+ print ''.price($totalvalue, 1, $langs, 1, -1, -1, $conf->currency).' | ';
+ }
+ print ' | ';
print '
';
print "";