diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 92fca0f81fe..9e4f73d8f7a 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -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 ''; - $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; + $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; $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 '
'; - $s = (($objp->type_l == 1) ? ''.$langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; + $s = ''.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; $shelp = ''; if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC"); elseif ($suggestedaccountingaccountfor == 'eecwithvat') $shelp = $langs->trans("SaleEECWithVAT"); diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 71093b20911..e03c717039f 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -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 ''; // Suggested accounting account - print ''; + print ''; print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone'); print ''; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index e8371c97d92..b6c220c347a 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -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 ''; - $s = (($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; + $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; $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 '
'; - $s = (($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; + $s = ''.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; $shelp = ''; if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC"); elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport"); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 6df80898af7..ff3038e85d1 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -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); diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 11a9fa8eff6..66f4aa94fd2 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -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 '
'; print ''; print ''."\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 ''; print ''; @@ -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')); diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index c83a0ff1aca..84bf44c84fe 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -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); } diff --git a/htdocs/mrp/index.php b/htdocs/mrp/index.php index 58bd8692893..e3ca5aeb394 100644 --- a/htdocs/mrp/index.php +++ b/htdocs/mrp/index.php @@ -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 '
'; print '
'.$langs->trans("Statistics").' - '.$langs->trans("Proposals").'
'.$propalstatic->LibStatut($status, 0).'
'; print ''."\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 ''; + print ''; + print ''; + print "\n"; + } + } if ($conf->use_javascript_ajax) { print '
'.$langs->trans("Statistics").' - '.$langs->trans("MO").'
'.$staticmo->LibStatut($status, 0).''.(isset($vals[$status]) ? $vals[$status] : 0).'
'; @@ -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')); diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 88293b6f899..c51f8be7a53 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -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;