diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 69f480bd202..211bf7bfbe8 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -1601,7 +1601,7 @@ class Form
* - La date du jour si set_time vaut ''
* - Aucune date (champs vides) si set_time vaut -1
*/
- function select_date($set_time='', $prefix='re', $h = 0, $m = 0, $empty=0)
+ function select_date($set_time='', $prefix='re', $h = 0, $m = 0, $empty=0,$form_name="")
{
global $conf,$langs;
@@ -1673,12 +1673,17 @@ class Form
}
print '';
$timearray=getDate($set_time);
+ // print '
'.$timearray['mon'];
$formated_date=dolibarr_print_date($set_time,$conf->format_date_short);
print ' ';
print ''."\n";
print ''."\n";
print ''."\n";
- print ''.img_cal().'';
+ if($form_name =="")
+ print ''.img_cal().'';
+ else
+ print ''.img_cal().'';
+
}
/*
* Affiche date en select
diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php
index 14bb5d968b3..d690c266ad9 100644
--- a/htdocs/propal.class.php
+++ b/htdocs/propal.class.php
@@ -731,7 +731,6 @@ class Propal
{
$sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fin_validite = ".$this->db->idate($date_fin_validite);
$sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
-
if ($this->db->query($sql) )
{
$this->fin_validite = $date_fin_validite;
@@ -745,6 +744,32 @@ class Propal
}
}
}
+ /**
+ * \brief Définit une date de livraison
+ * \param user Objet utilisateur qui modifie
+ * \param date_livraison date de livraison
+ * \return int <0 si ko, >0 si ok
+ */
+ function set_date_livraison($user, $date_livraison)
+ {
+ if ($user->rights->propale->creer)
+ {
+ $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET date_livraison = ".$this->db->idate($date_livraison);
+ $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
+
+ if ($this->db->query($sql) )
+ {
+ $this->date_livraison = $date_livraison;
+ return 1;
+ }
+ else
+ {
+ $this->error=$this->db->error();
+ dolibarr_syslog("Propal::set_date_livraison Erreur SQL");
+ return -1;
+ }
+ }
+ }
/**