Fix bad closing td
Fix missing value into list of time spent Fix typo error into constant PROJECT_TIMES_SPENT_FORMAT Fix sql error when updating time spent into updateTimeSpent Fix supplier orders not visible into link to
This commit is contained in:
parent
9451296f6b
commit
72e7558356
@ -4900,20 +4900,20 @@ class Form
|
||||
print '<td align="left">' . $langs->trans("AmountHTShort") . '</td>';
|
||||
print '<td align="left">' . $langs->trans("Company") . '</td>';
|
||||
print '</tr>';
|
||||
while ($i < $num) {
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $this->db->fetch_object($resqlorderlist);
|
||||
if ($objp->socid == $societe->id) {
|
||||
$var = ! $var;
|
||||
print '<tr ' . $bc [$var] . '>';
|
||||
print '<td aling="left">';
|
||||
print '<input type="radio" name="linkedOrder" value=' . $objp->rowid . '>';
|
||||
print '<td align="center">' . $objp->ref . '</td>';
|
||||
print '<td>' . $objp->ref_supplier . '</td>';
|
||||
print '<td>' . price($objp->total_ht) . '</td>';
|
||||
print '<td>' . $objp->name . '</td>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
$var = ! $var;
|
||||
print '<tr ' . $bc [$var] . '>';
|
||||
print '<td aling="left">';
|
||||
print '<input type="radio" name="linkedOrder" value=' . $objp->rowid . '>';
|
||||
print '<td align="center">' . $objp->ref . '</td>';
|
||||
print '<td>' . $objp->ref_supplier . '</td>';
|
||||
print '<td>' . price($objp->total_ht) . '</td>';
|
||||
print '<td>' . $objp->name . '</td>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$i ++;
|
||||
}
|
||||
|
||||
@ -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 '<td align="right">';
|
||||
|
||||
@ -421,6 +421,7 @@ if ($object->id > 0)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
$var = True;
|
||||
while ($i < $num && $i <= $MAXLIST)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
@ -494,6 +495,7 @@ if ($object->id > 0)
|
||||
print '</tr></table>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
$var=True;
|
||||
while ($i < min($num,$MAXLIST))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
@ -45,8 +45,8 @@ foreach($linkedObjectBlock as $object)
|
||||
{
|
||||
$var=!$var;
|
||||
?>
|
||||
<tr <?php echo $bc[$var]; ?> ><td>
|
||||
<a href="<?php echo DOL_URL_ROOT.'/fourn/commande/card.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowOrder"),"order").' '.$object->ref; ?></a></td>
|
||||
<tr <?php echo $bc[$var]; ?> >
|
||||
<td><a href="<?php echo DOL_URL_ROOT.'/fourn/commande/card.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowOrder"),"order").' '.$object->ref; ?></a></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->fournisseur->commande->lire) {
|
||||
@ -60,7 +60,7 @@ foreach($linkedObjectBlock as $object)
|
||||
|
||||
?>
|
||||
<tr class="liste_total">
|
||||
<td align="left" colspan="2"><?php echo $langs->trans('TotalHT'); ?></td>
|
||||
<td align="left" colspan="2"><?php echo $langs->trans("TotalHT"); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->fournisseur->commande->lire) {
|
||||
echo price($total);
|
||||
|
||||
@ -49,7 +49,7 @@ foreach($linkedObjectBlock as $object)
|
||||
$var=!$var;
|
||||
?>
|
||||
<tr <?php echo $bc[$var]; ?> >
|
||||
<td></td><a href="<?php echo DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$object->id ?>"><?php echo img_object($langs->trans("ShowBill"),"bill").' '.$object->ref; ?></a></td>
|
||||
<td><a href="<?php echo DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$object->id ?>"><?php echo img_object($langs->trans("ShowBill"),"bill").' '.$object->ref; ?></a></td>
|
||||
<td align="left"><?php echo $object->ref_supplier; ?></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||
<td align="right"><?php
|
||||
|
||||
@ -1045,7 +1045,7 @@ class Task extends CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."projet_task_time SET";
|
||||
$sql.= " task_date = '".$this->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");
|
||||
|
||||
@ -475,7 +475,7 @@ foreach ($listofreferent as $key => $value)
|
||||
}
|
||||
// and the final balance
|
||||
print '<tr class="liste_total">';
|
||||
print '<td align="right" colspan=2 >'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right" colspan=2 >'.$langs->trans("Profit").'</td>';
|
||||
print '<td align="right" >'.price($balance_ht).'</td>';
|
||||
print '<td align="right" >'.price($balance_ttc).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -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 '<td>'.$langs->trans("By").'</td>';
|
||||
print '<td align="left">'.$langs->trans("Note").'</td>';
|
||||
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
||||
if ($conf->salaries->enabled)
|
||||
{
|
||||
print '<td align="right">'.$langs->trans("Value").'</td>';
|
||||
}
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$total = 0;
|
||||
$totalvalue = 0;
|
||||
foreach ($tasks as $task_time)
|
||||
{
|
||||
$var=!$var;
|
||||
@ -543,6 +548,14 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Value spent
|
||||
if ($conf->salaries->enabled)
|
||||
{
|
||||
print '<td align="right">';
|
||||
print price(price2num($task_time->thm * $task_time->task_duration / 3600), 1, $langs, 1, -1, -1, $conf->currency);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Edit and delete icon
|
||||
print '<td align="center" valign="middle" width="80">';
|
||||
if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid)
|
||||
@ -568,9 +581,15 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print "</tr>\n";
|
||||
$total += $task_time->task_duration;
|
||||
$totalvalue += price2num($task_time->thm * $task_time->task_duration / 3600);
|
||||
}
|
||||
print '<tr class="liste_total"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right" class="nowrap liste_total">'.convertSecondToTime($total,'allhourmin').'</td><td> </td>';
|
||||
print '<td align="right" class="nowrap liste_total">'.convertSecondToTime($total,'allhourmin').'</td>';
|
||||
if ($conf->salaries->enabled)
|
||||
{
|
||||
print '<td align="right">'.price($totalvalue, 1, $langs, 1, -1, -1, $conf->currency).'</td>';
|
||||
}
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user