From 648bf73bac5cf8a6ed14fde9e71886b51559f6af Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Dec 2013 15:49:08 +0100 Subject: [PATCH 1/2] Fix: [ bug #1179 ] Wrong warnings on commande/liste.php / delivery date should be checked Conflicts: htdocs/commande/liste.php --- htdocs/commande/liste.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index 869eb03feb6..481a01b8980 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -316,7 +316,8 @@ if ($resql) print ''; print ''; - if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning"); + if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_valid),$db->jdate($objp->date_livraison)) < ($now - $conf->commande->client->warning_delay)) + print img_picto($langs->trans("Late"),"warning"); print ''; print ''; From db9ef992eb5c531b6bb7fa288c11727b01e2ab0e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Dec 2013 17:25:57 +0100 Subject: [PATCH 2/2] Fix: Clean var --- htdocs/comm/propal/class/propal.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index dd80dbe9bb4..51999290e96 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -407,7 +407,7 @@ class Propal extends CommonObject $this->line->date_start=$date_start; $this->line->date_end=$date_end; - + // infos marge $this->line->fk_fournprice = $fk_fournprice; $this->line->pa_ht = $pa_ht; @@ -1320,17 +1320,17 @@ class Propal extends CommonObject if (file_exists($dirsource)) { dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); - + if (@rename($dirsource, $dirdest)) { - + dol_syslog("Rename ok"); // Deleting old PDF in new rep dol_delete_file($conf->propal->dir_output.'/'.$snumfa.'/'.$facref.'*.*'); } } } - + $this->brouillon=0; $this->statut = 1; $this->user_valid_id=$user->id; @@ -2943,7 +2943,8 @@ class PropaleLigne if (empty($this->total_localtax2)) $this->total_localtax2=0; if (empty($this->marque_tx)) $this->marque_tx=0; if (empty($this->marge_tx)) $this->marge_tx=0; - if (empty($this->remise)) $this->remise=0; + if (empty($this->price)) $this->price=0; // TODO A virer + if (empty($this->remise)) $this->remise=0; // TODO A virer if (empty($this->remise_percent)) $this->remise_percent=0; if (empty($this->info_bits)) $this->info_bits=0; if (empty($this->special_code)) $this->special_code=0;