Look and feel v12: Use color of status for dotnuts
This commit is contained in:
parent
3b72005f93
commit
6e71bb8707
@ -401,7 +401,7 @@ if ($result) {
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', '', '', '');
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', '', '', 'nowraponall ');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', '', '', '', 'center ');
|
||||
$checkpicto = '';
|
||||
if ($massactionbutton) $checkpicto = $form->showCheckAddButtons('checkforselect', 1);
|
||||
@ -568,7 +568,7 @@ if ($result) {
|
||||
|
||||
// Current account
|
||||
print '<td class="center" style="'.$code_sell_p_notset.'">';
|
||||
$s = '<span class="opacitymedium">'.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': </span>';
|
||||
$s = '<span class="small">'.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': </span>';
|
||||
$shelp = '';
|
||||
if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC");
|
||||
elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp .= $langs->trans("SaleExport");
|
||||
@ -577,7 +577,7 @@ if ($result) {
|
||||
if ($objp->product_id > 0)
|
||||
{
|
||||
print '<br>';
|
||||
$s = (($objp->type_l == 1) ? '<span class="opacitymedium">'.$langs->trans("ThisService") : $langs->trans("ThisProduct")).': </span>';
|
||||
$s = '<span class="small">'.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': </span>';
|
||||
$shelp = '';
|
||||
if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC");
|
||||
elseif ($suggestedaccountingaccountfor == 'eecwithvat') $shelp = $langs->trans("SaleEECWithVAT");
|
||||
|
||||
@ -313,8 +313,8 @@ if ($result) {
|
||||
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right maxwidth50 ');
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', $sortfield, $sortorder, '');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', '', '', 'nowraponall ');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', '', '', '', '');
|
||||
$checkpicto = '';
|
||||
if ($massactionbutton) $checkpicto = $form->showCheckAddButtons('checkforselect', 1);
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
|
||||
@ -371,7 +371,7 @@ if ($result) {
|
||||
print '</td>';
|
||||
|
||||
// Suggested accounting account
|
||||
print '<td class="center">';
|
||||
print '<td>';
|
||||
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -401,7 +401,7 @@ if ($result) {
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', '', '', ' ');
|
||||
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', '', '', 'nowraponall ');
|
||||
print_liste_field_titre("IntoAccount", '', '', '', '', '', '', '', 'center ');
|
||||
$checkpicto = '';
|
||||
if ($massactionbutton) $checkpicto = $form->showCheckAddButtons('checkforselect', 1);
|
||||
@ -550,7 +550,7 @@ if ($result) {
|
||||
|
||||
// Current account
|
||||
print '<td style="'.$code_buy_p_notset.'">';
|
||||
$s = (($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': ';
|
||||
$s = '<span class="small">'.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': </span>';
|
||||
$shelp = '';
|
||||
if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC");
|
||||
elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp .= $langs->trans("SaleExport");
|
||||
@ -559,7 +559,7 @@ if ($result) {
|
||||
if ($objp->product_id > 0)
|
||||
{
|
||||
print '<br>';
|
||||
$s = (($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': ';
|
||||
$s = '<span class="small">'.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': </span>';
|
||||
$shelp = '';
|
||||
if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC");
|
||||
elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport");
|
||||
|
||||
@ -3342,8 +3342,8 @@ class Propal extends CommonObject
|
||||
$statusType = '';
|
||||
if ($status == self::STATUS_DRAFT) $statusType = 'status0';
|
||||
elseif ($status == self::STATUS_VALIDATED) $statusType = 'status1';
|
||||
elseif ($status == self::STATUS_SIGNED) $statusType = 'status3';
|
||||
elseif ($status == self::STATUS_NOTSIGNED) $statusType = 'status5';
|
||||
elseif ($status == self::STATUS_SIGNED) $statusType = 'status4';
|
||||
elseif ($status == self::STATUS_NOTSIGNED) $statusType = 'status9';
|
||||
elseif ($status == self::STATUS_BILLED) $statusType = 'status6';
|
||||
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
|
||||
@ -82,7 +82,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles
|
||||
* Statistics
|
||||
*/
|
||||
|
||||
$sql = "SELECT count(p.rowid), p.fk_statut";
|
||||
$sql = "SELECT count(p.rowid) as nb, p.fk_statut as status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."propal as p";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -101,24 +101,26 @@ if ($resql)
|
||||
$total = 0;
|
||||
$totalinprocess = 0;
|
||||
$dataseries = array();
|
||||
$colorseries = array();
|
||||
$vals = array();
|
||||
|
||||
// -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Sent/Received, billed or not)
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
if ($row)
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj)
|
||||
{
|
||||
//if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1))
|
||||
{
|
||||
$vals[$row[1]] = $row[0];
|
||||
$totalinprocess += $row[0];
|
||||
}
|
||||
$total += $row[0];
|
||||
$vals[$obj->status] = $obj->nb;
|
||||
$totalinprocess += $obj->nb;
|
||||
|
||||
$total += $obj->nb;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Proposals").'</td></tr>'."\n";
|
||||
@ -126,7 +128,13 @@ if ($resql)
|
||||
foreach ($listofstatus as $status)
|
||||
{
|
||||
$dataseries[] = array($propalstatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0));
|
||||
if (!$conf->use_javascript_ajax)
|
||||
if ($status == Propal::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0;
|
||||
if ($status == Propal::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1;
|
||||
if ($status == Propal::STATUS_SIGNED) $colorseries[$status] = $badgeStatus4;
|
||||
if ($status == Propal::STATUS_NOTSIGNED) $colorseries[$status] = $badgeStatus9;
|
||||
if ($status == Propal::STATUS_BILLED) $colorseries[$status] = $badgeStatus6;
|
||||
|
||||
if (empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$propalstatic->LibStatut($status, 0).'</td>';
|
||||
@ -141,6 +149,7 @@ if ($resql)
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
$dolgraph = new DolGraph();
|
||||
$dolgraph->SetData($dataseries);
|
||||
$dolgraph->SetDataColor(array_values($colorseries));
|
||||
$dolgraph->setShowLegend(2);
|
||||
$dolgraph->setShowPercent(1);
|
||||
$dolgraph->SetType(array('pie'));
|
||||
|
||||
@ -1093,7 +1093,7 @@ class Mo extends CommonObject
|
||||
if ($status == self::STATUS_VALIDATED) $statusType = 'status1';
|
||||
if ($status == self::STATUS_INPROGRESS) $statusType = 'status4';
|
||||
if ($status == self::STATUS_PRODUCED) $statusType = 'status6';
|
||||
if ($status == self::STATUS_CANCELED) $statusType = 'status5';
|
||||
if ($status == self::STATUS_CANCELED) $statusType = 'status9';
|
||||
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
@ -77,6 +77,7 @@ if ($conf->use_javascript_ajax)
|
||||
$totalnb=0;
|
||||
$dataseries = array();
|
||||
$colorseries = array();
|
||||
$vals = array();
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
@ -85,14 +86,9 @@ if ($conf->use_javascript_ajax)
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj)
|
||||
{
|
||||
$dataseries[$obj->status]=array(0=>$staticmo->LibStatut($obj->status), $obj->nb);
|
||||
if ($obj->status == Mo::STATUS_DRAFT) $coloseries[$obj->status] = '-'.$badgeStatus0;
|
||||
if ($obj->status == Mo::STATUS_VALIDATED) $coloseries[$obj->status] = $badgeStatus1;
|
||||
if ($obj->status == Mo::STATUS_INPROGRESS) $coloseries[$obj->status] = $badgeStatus4;
|
||||
if ($obj->status == Mo::STATUS_PRODUCED) $coloseries[$obj->status] = $badgeStatus6;
|
||||
if ($obj->status == Mo::STATUS_CANCELED) $coloseries[$obj->status] = '-'.$badgeStatus5;
|
||||
$vals[$obj->status]=$obj->nb;
|
||||
|
||||
$totalnb+=$obj->nb;
|
||||
$totalnb += $obj->nb;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
@ -101,6 +97,24 @@ if ($conf->use_javascript_ajax)
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("MO").'</th></tr>'."\n";
|
||||
$listofstatus = array(0, 1, 2, 3, 9);
|
||||
foreach ($listofstatus as $status)
|
||||
{
|
||||
$dataseries[] = array($staticmo->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0));
|
||||
if ($status == Mo::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0;
|
||||
if ($status == Mo::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1;
|
||||
if ($status == Mo::STATUS_INPROGRESS) $colorseries[$status] = $badgeStatus4;
|
||||
if ($status == Mo::STATUS_PRODUCED) $colorseries[$status] = $badgeStatus6;
|
||||
if ($status == Mo::STATUS_CANCELED) $colorseries[$status] = $badgeStatus9;
|
||||
|
||||
if (empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$staticmo->LibStatut($status, 0).'</td>';
|
||||
print '<td class="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).'</a></td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<tr><td class="center" colspan="2">';
|
||||
@ -108,7 +122,7 @@ if ($conf->use_javascript_ajax)
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
$dolgraph = new DolGraph();
|
||||
$dolgraph->SetData($dataseries);
|
||||
$dolgraph->SetDataColor(array_values($coloseries));
|
||||
$dolgraph->SetDataColor(array_values($colorseries));
|
||||
$dolgraph->setShowLegend(2);
|
||||
$dolgraph->setShowPercent(1);
|
||||
$dolgraph->SetType(array('pie'));
|
||||
|
||||
@ -801,6 +801,9 @@ select.flat.selectlimit {
|
||||
width: 130px;
|
||||
}
|
||||
/* using a tdoverflowxxx make the min-width not working */
|
||||
.tdnooverflowimp {
|
||||
text-overflow: none;
|
||||
}
|
||||
.tdoverflow {
|
||||
max-width: 0;
|
||||
overflow: hidden;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user