[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 02/03: Task #1073 - FOLLOWUP : destinataire i
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 02/03: Task #1073 - FOLLOWUP : destinataire interne ne fonctionne plus Fix new + update |
Date: |
Sat, 13 Dec 2014 17:41:32 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit e28773ea44628e51363bc40ce5ed94897f355f0b
Author: Dany De Bontridder <address@hidden>
Date: Sat Dec 13 17:47:26 2014 +0100
Task #1073 - FOLLOWUP : destinataire interne ne fonctionne plus
Fix new + update
---
include/class_follow_up.php | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/class_follow_up.php b/include/class_follow_up.php
index 6ddad04..95040a4 100644
--- a/include/class_follow_up.php
+++ b/include/class_follow_up.php
@@ -612,7 +612,8 @@ class Follow_Up
// f_id exp
$exp = new Fiche($this->db);
$exp->get_by_qcode($this->qcode_dest);
-
+ $exp->id=($exp->id==0)?null:$exp->id;
+
$contact = new Fiche($this->db);
$contact->get_by_qcode($this->ag_contact);
@@ -863,7 +864,7 @@ class Follow_Up
if (trim($this->qcode_dest) == "")
{
// internal document
- $this->f_id_dest = 0; // internal document
+ $this->f_id_dest = null; // internal document
}
else
{
@@ -1018,7 +1019,7 @@ class Follow_Up
$this->ag_id = (isset($p_array['ag_id'])) ? $p_array['ag_id'] :
0;
$this->ag_ref = (isset($p_array['ag_ref'])) ?
$p_array['ag_ref'] : "";
$this->qcode_dest = (isset($p_array['qcode_dest'])) ?
$p_array['qcode_dest'] : "";
- $this->f_id_dest = (isset($p_array['f_id_dest'])) ?
$p_array['f_id_dest'] : 0;
+ $this->f_id_dest = (isset($p_array['f_id_dest'])) ?
$p_array['f_id_dest'] : null;
$this->ag_timestamp = (isset($p_array['ag_timestamp'])) ?
$p_array['ag_timestamp'] : date('d.m.Y');
$this->qcode_dest = (isset($p_array['qcode_dest'])) ?
$p_array['qcode_dest'] : "";
$this->dt_id = (isset($p_array['dt_id'])) ? $p_array['dt_id'] :
"";
@@ -1641,6 +1642,7 @@ class Follow_Up
throw new Exception (_('Date invalide'),20);
if ( isDate($this->ag_remind_date) != $this->ag_remind_date )
throw new Exception (_('Date invalide'),30);
+ if ( $this->f_id_dest == 0 ) $this->f_id_dest=null;
}
/**
* Add another concerned (tiers, supplier...)