diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 57eb78df405..b1b7b3c8fe5 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3613,7 +3613,7 @@ class Commande extends CommonOrder if ($status == self::STATUS_CANCELED) { $labelStatus = $langs->trans('StatusOrderCanceled'); $labelStatusShort = $langs->trans('StatusOrderCanceledShort'); - $statusType = 'status5'; + $statusType = 'status9'; } elseif ($status == self::STATUS_DRAFT) { $labelStatus = $langs->trans('StatusOrderDraft'); @@ -3628,7 +3628,7 @@ class Commande extends CommonOrder elseif ($status == self::STATUS_SHIPMENTONPROCESS) { $labelStatus = $langs->trans('StatusOrderSentShort').$billedtext; $labelStatusShort = $langs->trans('StatusOrderSentShort').$billedtext; - $statusType = 'status3'; + $statusType = 'status4'; } elseif ($status == self::STATUS_CLOSED && (!$billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { $labelStatus = $langs->trans('StatusOrderToBill'); diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 072abe9625b..651ef2862e9 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -72,7 +72,6 @@ print '
'; if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo { // Search customer orders - $var = false; print '
'; print ''; print '
'; @@ -88,7 +87,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles * Statistics */ -$sql = "SELECT count(c.rowid), c.fk_statut"; +$sql = "SELECT count(c.rowid) as nb, c.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande as c"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -117,7 +116,7 @@ if ($resql) //if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1)) { if (! isset($vals[$row[1]])) $vals[$row[1]]=0; - $vals[$row[1].$bool]+=$row[0]; + $vals[$row[1]]+=$row[0]; $totalinprocess+=$row[0]; } $total+=$row[0]; @@ -125,13 +124,32 @@ if ($resql) $i++; } $db->free($resql); + + include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + print '
'; print ''; print ''."\n"; $listofstatus=array(0,1,2,3,-1); foreach ($listofstatus as $status) { - $dataseries[]=array($commandestatic->LibStatut($status, $bool, 1), (isset($vals[$status.$bool])?(int) $vals[$status.$bool]:0)); + $dataseries[] = array($commandestatic->LibStatut($status, 0, 1, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0)); + if ($status == Commande::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; + if ($status == Commande::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1; + if ($status == Commande::STATUS_SHIPMENTONPROCESS) $colorseries[$status] = $badgeStatus4; + if ($status == Commande::STATUS_CLOSED && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) $colorseries[$status] = $badgeStatus6; + if ($status == Commande::STATUS_CLOSED && (!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) $colorseries[$status] = $badgeStatus6; + if ($status == Commande::STATUS_CANCELED) $colorseries[$status] = $badgeStatus9; + + if (empty($conf->use_javascript_ajax)) + { + print ''; + print ''; + print ''; + print "\n"; + } } if ($conf->use_javascript_ajax) { @@ -140,6 +158,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')); @@ -149,19 +168,6 @@ if ($resql) print ''; } - else - { - foreach ($listofstatus as $status) - { - print ''; - print ''; - print ''; - print "\n"; - } - } //if ($totalinprocess != $total) print ''; print "
'.$langs->trans("Statistics").' - '.$langs->trans("CustomersOrders").'
'.$commandestatic->LibStatut($status, 0, 0, 1).''.(isset($vals[$status]) ? $vals[$status] : 0).' '; + print $commandestatic->LibStatut($status, 0, 3, 1); + print '
'.$commandestatic->LibStatut($status, $bool, 0).''.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' '; - print $commandestatic->LibStatut($status, $bool, 3); - print ''; - print '
'.$langs->trans("Total").''.$total.'

"; @@ -202,7 +208,6 @@ if (!empty($conf->commande->enabled)) if ($num) { $i = 0; - $var = true; while ($i < $num) { $obj = $db->fetch_object($resql); @@ -241,7 +246,7 @@ print '
'; $max = 5; /* - * Last modified orders + * Lattest modified orders */ $sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, c.date_cloture as datec, c.tms as datem,"; @@ -272,7 +277,6 @@ if ($resql) if ($num) { $i = 0; - $var = true; while ($i < $num) { $obj = $db->fetch_object($resql); @@ -320,6 +324,7 @@ if ($resql) } else dol_print_error($db); +$max = 10; /* * Orders to process @@ -335,7 +340,7 @@ if (!empty($conf->commande->enabled)) if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('commande').")"; - $sql .= " AND c.fk_statut = 1"; + $sql .= " AND c.fk_statut = ".Commande::STATUS_VALIDATED; if ($socid) $sql .= " AND c.fk_soc = ".$socid; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; $sql .= " ORDER BY c.rowid DESC"; @@ -344,16 +349,16 @@ if (!empty($conf->commande->enabled)) if ($resql) { $num = $db->num_rows($resql); + print '
'; print ''; print ''; - print ''; + print ''; if ($num) { $i = 0; - $var = true; - while ($i < $num) + while ($i < $num && $i < $max) { $obj = $db->fetch_object($resql); print ''; @@ -395,6 +400,9 @@ if (!empty($conf->commande->enabled)) print ''; $i++; } + if ($i < $num) { + print ''; + } } print "
'.$langs->trans("OrdersToProcess").' '.$num.'
'.$langs->trans("OrdersToProcess").' '.$num.'
'.$langs->trans("More").'...

"; @@ -403,7 +411,7 @@ if (!empty($conf->commande->enabled)) } /* - * Orders thar are in a shipping process + * Orders that are in process */ if (!empty($conf->commande->enabled)) { @@ -416,7 +424,7 @@ if (!empty($conf->commande->enabled)) if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('commande').")"; - $sql .= " AND c.fk_statut = 2 "; + $sql .= " AND c.fk_statut = ".Commande::STATUS_ACCEPTED; if ($socid) $sql .= " AND c.fk_soc = ".$socid; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; $sql .= " ORDER BY c.rowid DESC"; @@ -429,13 +437,12 @@ if (!empty($conf->commande->enabled)) print '
'; print ''; print ''; - print ''; + print ''; if ($num) { $i = 0; - $var = true; - while ($i < $num) + while ($i < $num && $i < $max) { $obj = $db->fetch_object($resql); print ''; @@ -477,6 +484,9 @@ if (!empty($conf->commande->enabled)) print ''; $i++; } + if ($i < $num) { + print ''; + } } print "
'.$langs->trans("OnProcessOrders").' '.$num.'
'.$langs->trans("OnProcessOrders").' '.$num.'
'.$langs->trans("More").'...

"; } diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index ef9ee7f2cd7..a8af4262d58 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -830,7 +830,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) { - print ''."\n"; + print ''."\n"; print ''; print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); if ($projectstatic->title) @@ -1449,7 +1449,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ if ($val['checked'] && substr($key, 0, 5) == 'efpt.') $addcolspan++; } - print ''."\n"; + print ''."\n"; print ''; print $projectstatic->getNomUrl(1, '', 0, ''.$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); if ($thirdpartystatic->id > 0) print ' - '.$thirdpartystatic->getNomUrl(1); @@ -1797,7 +1797,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) { - print ''."\n"; + print ''."\n"; print ''; print $projectstatic->getNomUrl(1, '', 0, ''.$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); if ($thirdpartystatic->id > 0) print ' - '.$thirdpartystatic->getNomUrl(1); diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 2489104eb34..3ae9866d73f 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -606,8 +606,8 @@ if (!empty($arrayfields['t.progress']['checked'])) /*print ''.$langs->trans("TimeSpent").''; if ($usertoprocess->id == $user->id) print ''.$langs->trans("TimeSpentByYou").''; else print ''.$langs->trans("TimeSpentByUser").'';*/ -print ''.$langs->trans("TimeSpent").'
('.$langs->trans("Everybody").')'; -print ''.$langs->trans("TimeSpent").($usertoprocess->firstname ? '
('.dol_trunc($usertoprocess->firstname, 10).')' : '').''; +print ''.$langs->trans("TimeSpent").'
'.$langs->trans("Everybody").''; +print ''.$langs->trans("TimeSpent").($usertoprocess->firstname ? '
'.dol_trunc($usertoprocess->firstname, 10).'' : '').''; print ''.$langs->trans("HourStart").''; // By default, we can edit only tasks we are assigned to diff --git a/htdocs/projet/activity/permonth.php b/htdocs/projet/activity/permonth.php index b5d4bcc633d..7f337818c1d 100644 --- a/htdocs/projet/activity/permonth.php +++ b/htdocs/projet/activity/permonth.php @@ -500,8 +500,8 @@ print ''.$langs->trans("ProgressDeclared"). /*print ''.$langs->trans("TimeSpent").''; if ($usertoprocess->id == $user->id) print ''.$langs->trans("TimeSpentByYou").''; else print ''.$langs->trans("TimeSpentByUser").'';*/ -print ''.$langs->trans("TimeSpent").'
('.$langs->trans("Everybody").')'; -print ''.$langs->trans("TimeSpent").($usertoprocess->firstname ? '
('.dol_trunc($usertoprocess->firstname, 10).')' : '').''; +print ''.$langs->trans("TimeSpent").'
'.$langs->trans("Everybody").''; +print ''.$langs->trans("TimeSpent").($usertoprocess->firstname ? '
'.dol_trunc($usertoprocess->firstname, 10).'' : '').''; foreach ($TWeek as $week_number) { diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 7a153d41631..8b8ba5d7295 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -660,8 +660,8 @@ if (!empty($arrayfields['t.progress']['checked'])) /*print ''.$langs->trans("TimeSpent").''; if ($usertoprocess->id == $user->id) print ''.$langs->trans("TimeSpentByYou").''; else print ''.$langs->trans("TimeSpentByUser").'';*/ -print ''.$langs->trans("TimeSpent").'
('.$langs->trans("Everybody").')'; -print ''.$langs->trans("TimeSpent").($usertoprocess->firstname ? '
('.dol_trunc($usertoprocess->firstname, 10).')' : '').''; +print ''.$langs->trans("TimeSpent").'
'.$langs->trans("Everybody").''; +print ''.$langs->trans("TimeSpent").($usertoprocess->firstname ? '
'.dol_trunc($usertoprocess->firstname, 10).'' : '').''; for ($idw = 0; $idw < 7; $idw++) { diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 5067a4935bc..133f0c1c0a6 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1557,7 +1557,7 @@ if ($action == 'create') print ''; print ''; if ($action == 'editdate_livraison') { - print ''; + print ''; print ''; print ''; print $form->selectDate($object->date_livraison, 'liv_', '', '', '', "editdate_livraison"); @@ -1806,12 +1806,13 @@ if ($action == 'create') if ($action == 'statut') { // Form to set proposal accepted/refused - $form_close = ''; - if (! empty($conf->global->SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL)) $form_close .= '

'.$langs->trans('SupplierProposalRefFournNotice').'

'; // TODO Suggest a permanent checkbox instead of option + $form_close = ''; $form_close .= ''; + $form_close .= ''; + + if (! empty($conf->global->SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL)) $form_close .= '

'.$langs->trans('SupplierProposalRefFournNotice').'

'; // TODO Suggest a permanent checkbox instead of option $form_close .= ''; $form_close .= '
' . $langs->trans("CloseAs") . ''; - $form_close .= ''; $form_close .= ''; print ''."\n"; $listofstatus = array(0, 1, 2, 3, 4); foreach ($listofstatus as $status) { - $dataseries[] = array($supplier_proposalstatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0)); - if (!$conf->use_javascript_ajax) - { - print ''; - print ''; - print ''; - print "\n"; - } + $dataseries[] = array($supplier_proposalstatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0)); + if ($status == SupplierProposal::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; + if ($status == SupplierProposal::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1; + if ($status == SupplierProposal::STATUS_SIGNED) $colorseries[$status] = $badgeStatus4; + if ($status == SupplierProposal::STATUS_NOTSIGNED) $colorseries[$status] = $badgeStatus9; + if ($status == SupplierProposal::STATUS_CLOSE) $colorseries[$status] = $badgeStatus6; + + if (empty($conf->use_javascript_ajax)) + { + print ''; + print ''; + print ''; + print "\n"; + } } if ($conf->use_javascript_ajax) { @@ -144,6 +153,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/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index eb1a2450521..2be4ec32f0b 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3224,6 +3224,9 @@ td.evenodd, tr.nohoverpair td, #trlinefordates td { border-bottom: 1pt solid black !important; /* background-color: # !important; */ } +.trforbreak.nobold td a, .trforbreak.nobold span.secondary { + font-weight: normal !important; +} table.dataTable td { padding: 5px 8px 5px 8px !important;
'.$langs->trans("Statistics").' - '.$langs->trans("CommRequests").'
'.$supplier_proposalstatic->LibStatut($status, 0).''.(isset($vals[$status]) ? $vals[$status] : 0).'
'.$supplier_proposalstatic->LibStatut($status, 0).''.(isset($vals[$status]) ? $vals[$status] : 0).'