diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php
index 9249186f574..1bc3fea3909 100644
--- a/htdocs/admin/tools/purge.php
+++ b/htdocs/admin/tools/purge.php
@@ -48,60 +48,10 @@ if (! empty($conf->syslog->enabled))
*/
if ($action=='purge' && ! preg_match('/^confirm/i',$choice) && ($choice != 'allfiles' || $confirm == 'yes') )
{
- $filesarray=array();
+ require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
+ $utils = new Utils($db);
+ $count = $utils->purgeFiles($choice);
- if ($choice=='tempfiles')
- {
- // Delete temporary files
- if ($dolibarr_main_data_root)
- {
- $filesarray=dol_dir_list($dolibarr_main_data_root,"directories",1,'^temp$');
- }
- }
-
- if ($choice=='allfiles')
- {
- // Delete all files
- if ($dolibarr_main_data_root)
- {
- $filesarray=dol_dir_list($dolibarr_main_data_root,"all",0,'','install\.lock$');
- }
- }
-
- if ($choice=='logfile')
- {
- $filesarray[]=array('fullname'=>$filelog,'type'=>'file');
- }
-
- $count=0;
- if (count($filesarray))
- {
- foreach($filesarray as $key => $value)
- {
- //print "x ".$filesarray[$key]['fullname']."
\n";
- if ($filesarray[$key]['type'] == 'dir')
- {
- $count+=dol_delete_dir_recursive($filesarray[$key]['fullname']);
- }
- elseif ($filesarray[$key]['type'] == 'file')
- {
- // If (file that is not logfile) or (if logfile with option logfile)
- if ($filesarray[$key]['fullname'] != $filelog || $choice=='logfile')
- {
- $count+=(dol_delete_file($filesarray[$key]['fullname'])?1:0);
- }
- }
- }
-
- // Update cachenbofdoc
- if (! empty($conf->ecm->enabled) && $choice=='allfiles')
- {
- require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php';
- $ecmdirstatic = new EcmDirectory($db);
- $result = $ecmdirstatic->refreshcachenboffile(1);
- }
- }
-
if ($count) $mesg=$langs->trans("PurgeNDirectoriesDeleted", $count);
else $mesg=$langs->trans("PurgeNothingToDelete");
setEventMessages($mesg, null, 'mesgs');
@@ -159,7 +109,7 @@ if (preg_match('/^confirm/i',$choice))
{
print '
';
$formquestion=array();
- print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').' '.img_warning(), 'purge', $formquestion, 'no', 2);
+ print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2);
}
diff --git a/htdocs/cashdesk/css/style.css b/htdocs/cashdesk/css/style.css
index d639230564b..bbb03bafde5 100644
--- a/htdocs/cashdesk/css/style.css
+++ b/htdocs/cashdesk/css/style.css
@@ -337,7 +337,7 @@ p.titre {
/* -------------- Boutons --------------------- */
.bouton_ajout_article {
margin-top: 10px;
- width: 100%;
+ width: 60%;
height: 40px;
}
diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index 0f73e5cb6cf..13b65f0baf1 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -535,7 +535,7 @@ if ($result)
if ($user->rights->banque->modifier)
{
print '
';
- print 'rappro?' disabled':'').' value="'.price($objp->amount).'"> '.$langs->trans("Currency".$conf->currency);
+ print 'rappro?' disabled':'').' value="'.price($objp->amount).'"> '.$langs->trans("Currency".$acct->currency_code);
print ' | ';
}
else
diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php
index a2d7cb832b5..6e91a180e50 100644
--- a/htdocs/compta/bank/rappro.php
+++ b/htdocs/compta/bank/rappro.php
@@ -154,6 +154,7 @@ $acct->fetch($id);
$now=dol_now();
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type as type";
+$sql.= ", b.fk_bordereau";
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
$sql.= " WHERE rappro=0 AND fk_account=".$acct->id;
$sql.= " ORDER BY dateo ASC";
@@ -291,7 +292,7 @@ if ($resql)
// Type + Number
$label=($langs->trans("PaymentType".$objp->type)!="PaymentType".$objp->type)?$langs->trans("PaymentType".$objp->type):$objp->type; // $objp->type is a code
if ($label=='SOLD') $label='';
- print ''.$label.($objp->num_chq?' '.$objp->num_chq:'').' | ';
+ print ''.$label.($objp->num_chq?' '.$objp->num_chq:'').($objp->fk_bordereau>0?' ('.$objp->fk_bordereau.')':'').' | ';
// Description
print '';
diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index 84c2edde0dd..0025fb62fd8 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -327,6 +327,7 @@ else
// Recherche les ecritures pour le releve
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,";
$sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,";
+ $sql.= " b.fk_bordereau,";
$sql.= " ba.rowid as bankid, ba.ref as bankref, ba.label as banklabel";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= ", ".MAIN_DB_PREFIX."bank as b";
@@ -373,7 +374,7 @@ else
} else {
$type_label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type;
}
- print ' | '.$type_label.' '.($objp->num_chq?$objp->num_chq:'').' | ';
+ print ''.$type_label.' '.($objp->num_chq?$objp->num_chq:'').($objp->fk_bordereau>0?' ('.$objp->fk_bordereau.')':'').' | ';
// Description
print '';
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 558ba09ef8f..b3f3bd25c17 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2992,7 +2992,7 @@ else if ($id > 0 || ! empty($ref))
print '| ';
print $langs->trans('Date');
print ' | ';
- if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer)
+ if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer && empty($conf->global->FAC_FORCE_DATE_VALIDATION))
print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . ' | ';
print ' ';
print ' | ';
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 78f12335f36..a1a1d1cc69a 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -706,6 +706,11 @@ if (empty($reshook))
$result = $object->validate($user);
}
+ else if ($action == 'reopen' && $user->rights->contrat->creer)
+ {
+ $result = $object->reopen($user);
+ }
+
// Close all lines
else if ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer)
{
@@ -1916,7 +1921,12 @@ else
if ($user->rights->contrat->creer) print '';
else print '';
}
-
+ if ($object->statut == 1 && $nbofservices)
+ {
+ if ($user->rights->contrat->creer) print '';
+ else print '';
+ }
+
if (! empty($conf->facture->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices)
{
$langs->load("bills");
@@ -1976,6 +1986,12 @@ else
print '';
+ // List of actions on element
+ include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
+ $formactions = new FormActions($db);
+ $somethingshown = $formactions->showactions($object, 'contract', $socid);
+
+
print ' ';
}
}
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index 905c9fa08a2..9e8b1de5d07 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -472,7 +472,71 @@ class Contrat extends CommonObject
}
+ /**
+ * Unvalidate a contract
+ *
+ * @param User $user Objet User
+ * @param int $notrigger 1=Does not execute triggers, 0=execute triggers
+ * @return int <0 if KO, >0 if OK
+ */
+ function reopen($user, $notrigger=0)
+ {
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+ global $langs, $conf;
+ $now=dol_now();
+
+ $error=0;
+ dol_syslog(get_class($this).'::reopen user='.$user->id);
+
+ $this->db->begin();
+
+ $this->fetch_thirdparty();
+
+ $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET statut = 0";
+ //$sql.= ", fk_user_valid = null, date_valid = null";
+ $sql .= " WHERE rowid = ".$this->id . " AND statut = 1";
+
+ dol_syslog(get_class($this)."::validate", LOG_DEBUG);
+ $resql = $this->db->query($sql);
+ if (! $resql)
+ {
+ dol_print_error($this->db);
+ $error++;
+ $this->error=$this->db->lasterror();
+ }
+
+ // Trigger calls
+ if (! $error && ! $notrigger)
+ {
+ // Call trigger
+ $result=$this->call_trigger('CONTRACT_REOPEN',$user);
+ if ($result < 0) {
+ $error++;
+ }
+ // End call triggers
+ }
+
+ // Set new ref and define current statut
+ if (! $error)
+ {
+ $this->statut=0;
+ $this->brouillon=1;
+ $this->date_validation=$now;
+ }
+
+ if (! $error)
+ {
+ $this->db->commit();
+ return 1;
+ }
+ else
+ {
+ $this->db->rollback();
+ return -1;
+ }
+ }
+
/**
* Load a contract from database
*
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 498604d9307..4f65d5327d1 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -539,9 +539,10 @@ class FormProjets
* @param int $showempty Add an empty line
* @param int $useshortlabel Use short label
* @param int $showallnone Add choice "All" and "None"
+ * @param int $showpercent Show default probability for status
* @return int|string The HTML select list of element or '' if nothing or -1 if KO
*/
- function selectOpportunityStatus($htmlname, $preselected=0, $showempty=1, $useshortlabel=0, $showallnone=0)
+ function selectOpportunityStatus($htmlname, $preselected=0, $showempty=1, $useshortlabel=0, $showallnone=0, $showpercent=0)
{
global $conf, $langs;
@@ -557,7 +558,7 @@ class FormProjets
$i = 0;
if ($num > 0)
{
- $sellist = ' | ';
+ // Opportunity percent
+ print '| '.$langs->trans("OpportunityProbability").' | ';
+ if (strcmp($object->opp_percent,'')) print price($object->opp_percent,'',$langs,1,0).' %';
+ print ' |
';
+
// Opportunity Amount
print '| '.$langs->trans("OpportunityAmount").' | ';
- if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
+ if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,1,0,0,$conf->currency);
print ' |
';
}
// Budget
print '| '.$langs->trans("Budget").' | ';
- if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
+ if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,1,0,0,$conf->currency);
print ' |
';
// Description
@@ -788,7 +824,24 @@ else
print '';
-
+ // Change probability from status
+ print '';
+
+
/*
* Boutons actions
*/
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index a0a6bd7ae94..bf08da2231e 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -231,11 +231,12 @@ class Project extends CommonObject
global $langs, $conf;
$error=0;
-
+
// Clean parameters
$this->title = trim($this->title);
$this->description = trim($this->description);
if ($this->opp_amount < 0) $this->opp_amount='';
+ if ($this->opp_percent < 0) $this->opp_percent='';
if (dol_strlen(trim($this->ref)) > 0)
{
@@ -247,7 +248,7 @@ class Project extends CommonObject
$sql.= ", description = '" . $this->db->escape($this->description) . "'";
$sql.= ", fk_soc = " . ($this->socid > 0 ? $this->socid : "null");
$sql.= ", fk_statut = " . $this->statut;
- $sql.= ", fk_opp_status = " . ($this->opp_status > 0 ? $this->opp_status : 'null');
+ $sql.= ", fk_opp_status = " . ((is_numeric($this->opp_status) && $this->opp_status != '') ? $this->opp_status : 'null');
$sql.= ", opp_percent = " . ((is_numeric($this->opp_percent) && $this->opp_percent != '') ? $this->opp_percent : 'null');
$sql.= ", public = " . ($this->public ? 1 : 0);
$sql.= ", datec=" . ($this->date_c != '' ? "'".$this->db->idate($this->date_c)."'" : 'null');
diff --git a/htdocs/projet/graph_opportunities.inc.php b/htdocs/projet/graph_opportunities.inc.php
index 6cae34bddfa..558bd7307ee 100644
--- a/htdocs/projet/graph_opportunities.inc.php
+++ b/htdocs/projet/graph_opportunities.inc.php
@@ -1,7 +1,7 @@
global->PROJECT_USE_OPPORTUNITIES))
{
- $sql = "SELECT COUNT(p.rowid) as nb, SUM(p.opp_amount) as opp_amount, p.fk_opp_status as opp_status";
+ $sql = "SELECT COUNT(p.rowid) as nb, SUM(p.opp_amount) as opp_amount, SUM(p.opp_amount * p.opp_percent) as ponderated_opp_amount, p.fk_opp_status as opp_status";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= " WHERE p.entity = ".$conf->entity;
$sql.= " AND p.fk_statut = 1";
@@ -9,6 +9,7 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
$sql.= " GROUP BY p.fk_opp_status";
$resql = $db->query($sql);
+
if ($resql)
{
$num = $db->num_rows($resql);
@@ -32,7 +33,7 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
$valsamount[$obj->opp_status]=$obj->opp_amount;
$totalnb+=$obj->nb;
$totalamount+=$obj->opp_amount;
- $ponderated_opp_amount = $ponderated_opp_amount + price2num($listofoppstatus[$obj->opp_status] * $obj->opp_amount / 100);
+ $ponderated_opp_amount+=$obj->ponderated_opp_amount;
}
$total+=$row[0];
}
@@ -40,6 +41,8 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
}
$db->free($resql);
+ $ponderated_opp_amount = $ponderated_opp_amount / 100;
+
print '';
print '| '.$langs->trans("Statistics").' - '.$langs->trans("OpportunitiesStatusForOpenedProjects").' |
'."\n";
$var=true;
@@ -53,7 +56,7 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
if (empty($labelstatus)) $labelstatus=$listofopplabel[$status];
//$labelstatus .= ' ('.$langs->trans("Coeff").': '.price2num($listofoppstatus[$status]).')';
- $labelstatus .= ' - '.price2num($listofoppstatus[$status]).'%';
+ //$labelstatus .= ' - '.price2num($listofoppstatus[$status]).'%';
$dataseries[]=array('label'=>$labelstatus,'data'=>(isset($valsamount[$status])?(float) $valsamount[$status]:0));
if (! $conf->use_javascript_ajax)
@@ -75,7 +78,7 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
//if ($totalinprocess != $total)
//print '| '.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").') | '.$totalinprocess.' |
';
print '| '.$langs->trans("OpportunityTotalAmount").' | '.price($totalamount, 0, '', 1, -1, -1, $conf->currency).' |
';
- print '| '.$langs->trans("OpportunityPonderatedAmount").' | '.price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency).' |
';
+ print '| '.$langs->trans("OpportunityPonderatedAmount").' | '.price(price2num($ponderated_opp_amount,'MT'), 0, '', 1, -1, -1, $conf->currency).' |
';
print "
";
}
else
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index b5fb7e31666..7eea03111ee 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2015 Laurent Destailleur
+ * Copyright (C) 2004-2016 Laurent Destailleur
* Copyright (C) 2005 Marc Bariley / Ocebo
* Copyright (C) 2005-2010 Regis Houssin
* Copyright (C) 2013 Cédric Salvador
@@ -70,6 +70,7 @@ $search_year=GETPOST("search_year");
$search_all=GETPOST("search_all");
$search_status=GETPOST("search_status",'int');
$search_opp_status=GETPOST("search_opp_status",'alpha');
+$search_opp_percent=GETPOST("search_opp_percent",'alpha');
$search_public=GETPOST("search_public",'int');
$search_user=GETPOST('search_user','int');
$search_sale=GETPOST('search_sale','int');
@@ -127,8 +128,9 @@ $arrayfields=array(
'p.datee'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1, 'position'=>101),
'p.public'=>array('label'=>$langs->trans("Visibility"), 'checked'=>1, 'position'=>102),
'p.opp_amount'=>array('label'=>$langs->trans("OpportunityAmountShort"), 'checked'=>1, 'enabled'=>$conf->global->PROJECT_USE_OPPORTUNITIES, 'position'=>103),
- 'p.fk_opp_status'=>array('label'=>$langs->trans("OpportunityStatusShort"), 'checked'=>1, 'enabled'=>$conf->global->PROJECT_USE_OPPORTUNITIES, 'position'=>104),
- 'p.datec'=>array('label'=>$langs->trans("DateCreationShort"), 'checked'=>0, 'position'=>500),
+ 'p.fk_opp_status'=>array('label'=>$langs->trans("OpportunityStatusShort"), 'checked'=>1, 'enabled'=>$conf->global->PROJECT_USE_OPPORTUNITIES, 'position'=>104),
+ 'p.opp_percent'=>array('label'=>$langs->trans("OpportunityProbabilityShort"), 'checked'=>1, 'enabled'=>$conf->global->PROJECT_USE_OPPORTUNITIES, 'position'=>105),
+ 'p.datec'=>array('label'=>$langs->trans("DateCreationShort"), 'checked'=>0, 'position'=>500),
'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
'p.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
);
@@ -208,7 +210,7 @@ if (count($listofprojectcontacttype) == 0) $listofprojectcontacttype[0]='0';
$distinct='DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once.
$sql = "SELECT ".$distinct." p.rowid as projectid, p.ref, p.title, p.fk_statut, p.fk_opp_status, p.public, p.fk_user_creat";
-$sql.= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.tms as date_update";
+$sql.= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, p.tms as date_update";
$sql.= ", s.nom as name, s.rowid as socid";
$sql.= ", cls.code as opp_status_code";
// Add fields for extrafields
@@ -311,6 +313,7 @@ if ($resql)
if ($search_societe != '') $param.='&search_societe='.$search_societe;
if ($search_status >= 0) $param.='&search_status='.$search_status;
if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all','none'))) $param.='&search_opp_status='.urlencode($search_opp_status);
+ if ((is_numeric($search_opp_percent) && $search_opp_percent >= 0) || in_array($search_opp_percent, array('all','none'))) $param.='&search_opp_percent='.urlencode($search_opp_percent);
if ($search_public != '') $param.='&search_public='.$search_public;
if ($search_user > 0) $param.='&search_user='.$search_user;
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
@@ -392,7 +395,8 @@ if ($resql)
if (! empty($arrayfields['p.datee']['checked'])) print_liste_field_titre($arrayfields['p.datee']['label'],$_SERVER["PHP_SELF"],"p.datee","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['p.public']['checked'])) print_liste_field_titre($arrayfields['p.public']['label'],$_SERVER["PHP_SELF"],"p.public","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'],$_SERVER["PHP_SELF"],'p.opp_amount',"",$param,'align="right"',$sortfield,$sortorder);
- if (! empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'],$_SERVER["PHP_SELF"],'p.fk_opp_status',"",$param,'align="center"',$sortfield,$sortorder);
+ if (! empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'],$_SERVER["PHP_SELF"],'p.fk_opp_status',"",$param,'align="center"',$sortfield,$sortorder);
+ if (! empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'],$_SERVER["PHP_SELF"],'p.opp_percent',"",$param,'align="right"',$sortfield,$sortorder);
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
@@ -475,6 +479,11 @@ if ($resql)
print $formproject->selectOpportunityStatus('search_opp_status',$search_opp_status,1,1,1);
print '';
}
+ if (! empty($arrayfields['p.opp_percent']['checked']))
+ {
+ print '';
+ print ' | ';
+ }
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
@@ -559,7 +568,7 @@ if ($resql)
}
print '';
}
- // Sales Rapresentatives
+ // Sales Representatives
if (! empty($arrayfields['commercial']['checked']))
{
print '';
@@ -623,7 +632,7 @@ if ($resql)
if (! empty($arrayfields['p.opp_amount']['checked']))
{
print ' | ';
- if ($obj->opp_status_code) print price($obj->opp_amount, 1, '', 1, - 1, - 1, $conf->currency);
+ if ($obj->opp_status_code) print price($obj->opp_amount, 1, '', 1, -1, -1, $conf->currency);
print ' | ';
}
if (! empty($arrayfields['p.fk_opp_status']['checked']))
@@ -632,6 +641,12 @@ if ($resql)
if ($obj->opp_status_code) print $langs->trans("OppStatusShort".$obj->opp_status_code);
print '';
}
+ if (! empty($arrayfields['p.opp_percent']['checked']))
+ {
+ print '';
+ if ($obj->opp_percent) print price($obj->opp_percent, 1, '', 1, 0).'%';
+ print ' | ';
+ }
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index ac0adf33c77..5ed3655615e 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -395,7 +395,7 @@ if ($id > 0 || ! empty($ref))
if (count($contactsoftask)>0)
{
$userid=$contactsoftask[0];
- print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTask"));
+ print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTheTask"));
}
else
{
@@ -405,7 +405,7 @@ if ($id > 0 || ! empty($ref))
// Note
print '';
- print '';
+ print '';
print ' | ';
// Progress declared
@@ -528,7 +528,7 @@ if ($id > 0 || ! empty($ref))
print '';
if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
{
- print '';
+ print '';
}
else
{
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index ccb3f01d293..30f97b557d4 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -1195,7 +1195,7 @@ div.vmenu, td.vmenu {
.searchform { padding-top: 4px; }
a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { font-size:px; font-family: ; text-align: ; font-weight: bold; }
-font.vmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: bold; color: #aaa; }
+font.vmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: bold; color: #aaa; margin-left: 4px; }
a.vmenu:link, a.vmenu:visited { color: #; }
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active, span.vsmenu { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #202020; margin: 1px 1px 1px 8px; }
@@ -2233,6 +2233,10 @@ div.pagination li.litext a:hover {
background-color: transparent;
background-image: none;
}
+div.pagination li.litext a:hover {
+ background-color: transparent;
+ background-image: none;
+}
dol_use_jmobile)) { ?>
div.pagination li.litext {
padding-top: 13px;
diff --git a/htdocs/theme/md/img/object_billa.png b/htdocs/theme/md/img/object_billa.png
index 19d4be8371d..1485aea5aef 100644
Binary files a/htdocs/theme/md/img/object_billa.png and b/htdocs/theme/md/img/object_billa.png differ
diff --git a/htdocs/theme/md/img/object_billd.png b/htdocs/theme/md/img/object_billd.png
index 19d4be8371d..93b0e55d046 100644
Binary files a/htdocs/theme/md/img/object_billd.png and b/htdocs/theme/md/img/object_billd.png differ
diff --git a/htdocs/theme/md/img/object_billr.png b/htdocs/theme/md/img/object_billr.png
index 19d4be8371d..e921b9d9f1f 100644
Binary files a/htdocs/theme/md/img/object_billr.png and b/htdocs/theme/md/img/object_billr.png differ
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 782eb0d66a2..02896756c64 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -1231,11 +1231,11 @@ div.vmenu, td.vmenu {
.searchform { padding-top: 8px; }
a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active { font-size:px; font-family: ; text-align: ; font-weight: bold; }
-font.vmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: bold; color: #93a5aa; }
+font.vmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: bold; color: #aaa; margin-left: 4px; }
a.vmenu:link, a.vmenu:visited { color: #; }
a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active, span.vsmenu { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #202020; margin: 1px 1px 1px 8px; }
-font.vsmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #93a5aa; }
+font.vsmenudisabled { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #aaa; }
a.vsmenu:link, a.vsmenu:visited { color: #; }
font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; }
diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php
index 542e2980c45..50b8e80e363 100644
--- a/htdocs/webservices/server_thirdparty.php
+++ b/htdocs/webservices/server_thirdparty.php
@@ -685,9 +685,9 @@ function getListOfThirdParties($authentication,$filterthirdparty)
foreach($filterthirdparty as $key => $val)
{
if ($key == 'name' && $val != '') $sql.=" AND s.name LIKE '%".$db->escape($val)."%'";
- if ($key == 'client' && $val != '') $sql.=" AND s.client = ".$db->escape($val);
- if ($key == 'supplier' && $val != '') $sql.=" AND s.fournisseur = ".$db->escape($val);
- if ($key == 'category' && $val != '') $sql.=" AND s.rowid IN (SELECT fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe WHERE fk_categorie=".$db->escape($val).") ";
+ if ($key == 'client' && (int) $val > 0) $sql.=" AND s.client = ".$db->escape($val);
+ if ($key == 'supplier' && (int) $val > 0) $sql.=" AND s.fournisseur = ".$db->escape($val);
+ if ($key == 'category' && (int) $val > 0) $sql.=" AND s.rowid IN (SELECT fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe WHERE fk_categorie=".$db->escape($val).") ";
}
dol_syslog("Function: getListOfThirdParties", LOG_DEBUG);
|