Fix look and feel v13

This commit is contained in:
Laurent Destailleur 2020-11-04 18:05:48 +01:00
parent 60f55c81bf
commit 40e18741b3
4 changed files with 25 additions and 19 deletions

View File

@ -1594,7 +1594,10 @@ class ExpenseReport extends CommonObject
if ($short) return $url;
$label = img_picto('', $this->picto).' <u>'.$langs->trans("ExpenseReport").'</u>';
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("ExpenseReport").'</u>';
if (isset($this->status)) {
$label .= ' '.$this->getLibStatut(5);
}
if (!empty($this->ref))
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
if (!empty($this->total_ht))
@ -1603,9 +1606,6 @@ class ExpenseReport extends CommonObject
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
if (!empty($this->total_ttc))
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
if (isset($this->status)) {
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
}
if ($moretitle) $label .= ' - '.$moretitle;
//if ($option != 'nolink')

View File

@ -165,8 +165,8 @@ $max = 10;
$langs->load("boxes");
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut, u.photo, u.email, u.admin";
$sql .= ", d.rowid, d.ref, d.date_debut as dated, d.date_fin as datef, d.date_create as dm, d.total_ht, d.total_ttc, d.fk_statut as fk_status";
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut as user_status, u.photo, u.email, u.admin,";
$sql .= " d.rowid, d.ref, d.date_debut as dated, d.date_fin as datef, d.date_create as dm, d.total_ht, d.total_ttc, d.fk_statut as status";
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport as d, ".MAIN_DB_PREFIX."user as u";
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE u.rowid = d.fk_user_author";
@ -210,16 +210,20 @@ if ($result)
while ($i < $num && $i < $max)
{
$obj = $db->fetch_object($result);
$expensereportstatic->id = $obj->rowid;
$expensereportstatic->ref = $obj->ref;
$expensereportstatic->status = $obj->status;
$userstatic->id = $obj->uid;
$userstatic->admin = $obj->admin;
$userstatic->email = $obj->email;
$userstatic->lastname = $obj->lastname;
$userstatic->firstname = $obj->firstname;
$userstatic->login = $obj->login;
$userstatic->statut = $obj->statut;
$userstatic->statut = $obj->user_status;
$userstatic->photo = $obj->photo;
print '<tr class="oddeven">';
print '<td>'.$expensereportstatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(-1).'</td>';
@ -227,7 +231,7 @@ if ($result)
print '<td class="right">'.price($obj->total_ttc).'</td>';
print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>';
print '<td class="right">';
print $expensereportstatic->LibStatut($obj->fk_status, 3);
print $expensereportstatic->getLibStatut(3);
print '</td>';
print '</tr>';

View File

@ -1178,11 +1178,11 @@ class Holiday extends CommonObject
$result = '';
$label = img_picto('', $this->picto).' <u>'.$langs->trans("Holiday").'</u>';
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Holiday").'</u>';
if (isset($this->statut)) {
$label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5);
$label .= ' '.$this->getLibStatut(5);
}
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
$url = DOL_URL_ROOT.'/holiday/card.php?id='.$this->id;

View File

@ -396,7 +396,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
{
$holiday = new Holiday($db);
$sql = "SELECT h.rowid, h.statut, h.fk_type, h.date_debut, h.date_fin, h.halfday";
$sql = "SELECT h.rowid, h.statut as status, h.fk_type, h.date_debut, h.date_fin, h.halfday";
$sql .= " FROM ".MAIN_DB_PREFIX."holiday as h";
$sql .= " WHERE h.fk_user = ".$object->id;
$sql .= " AND h.entity = ".$conf->entity;
@ -419,17 +419,18 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
{
$objp = $db->fetch_object($resql);
print '<tr class="oddeven">';
print '<td class="nowrap">';
$holiday->id = $objp->rowid;
$holiday->ref = $objp->rowid;
$holiday->fk_type = $objp->fk_type;
$holiday->statut = $objp->status;
$nbopenedday = num_open_day($db->jdate($objp->date_debut), $db->jdate($objp->date_fin), 0, 1, $objp->halfday);
print '<tr class="oddeven">';
print '<td class="nowrap">';
print $holiday->getNomUrl(1);
print '</td><td class="right" width="80px">'.dol_print_date($db->jdate($objp->date_debut), 'day')."</td>\n";
print '<td class="right" style="min-width: 60px">'.$nbopenedday.' '.$langs->trans('DurationDays').'</td>';
print '<td class="right" style="min-width: 60px" class="nowrap">'.$holiday->LibStatut($objp->statut, 5).'</td></tr>';
print '<td class="right" style="min-width: 60px" class="nowrap">'.$holiday->LibStatut($objp->status, 5).'</td></tr>';
$i++;
}
$db->free($resql);
@ -450,7 +451,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
{
$exp = new ExpenseReport($db);
$sql = "SELECT e.rowid, e.ref, e.fk_statut, e.date_debut, e.total_ttc";
$sql = "SELECT e.rowid, e.ref, e.fk_statut as status, e.date_debut, e.total_ttc";
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport as e";
$sql .= " WHERE e.fk_user_author = ".$object->id;
$sql .= " AND e.entity = ".$conf->entity;
@ -473,16 +474,17 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
{
$objp = $db->fetch_object($resql);
print '<tr class="oddeven">';
print '<td class="nowrap">';
$exp->id = $objp->rowid;
$exp->ref = $objp->ref;
$exp->fk_type = $objp->fk_type;
$exp->status = $objp->status;
print '<tr class="oddeven">';
print '<td class="nowrap">';
print $exp->getNomUrl(1);
print '</td><td class="right" width="80px">'.dol_print_date($db->jdate($objp->date_debut), 'day')."</td>\n";
print '<td class="right" style="min-width: 60px">'.price($objp->total_ttc).'</td>';
print '<td class="right nowrap" style="min-width: 60px">'.$exp->LibStatut($objp->fk_statut, 5).'</td></tr>';
print '<td class="right nowrap" style="min-width: 60px">'.$exp->LibStatut($objp->status, 5).'</td></tr>';
$i++;
}
$db->free($resql);