117 |
if ($action == 'ACTION_CREATE') |
if ($action == 'ACTION_CREATE') |
118 |
{ |
{ |
119 |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
120 |
|
$langs->load("other"); |
121 |
|
|
122 |
// Initialisation donnees (date,duree,nom_societe,libelle) |
// Initialisation donnees (date,duree,texte,desc) |
123 |
if ($object->type_id == 5 && $object->contact->fullname) |
if ($object->type_id == 5 && $object->contact->fullname) |
124 |
{ |
{ |
125 |
$libellecal =$langs->trans("TaskRDVWith",$object->contact->fullname)."\n"; |
$libellecal =$langs->trans("TaskRDVWith",$object->contact->fullname)."\n"; |
145 |
if ($action == 'COMPANY_CREATE') |
if ($action == 'COMPANY_CREATE') |
146 |
{ |
{ |
147 |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
148 |
|
$langs->load("other"); |
149 |
// Initialisation donnees (date,duree,nom_societe,libelle) |
|
150 |
|
// Initialisation donnees (date,duree,texte,desc) |
151 |
$this->date=time(); |
$this->date=time(); |
152 |
$this->duree=0; |
$this->duree=0; |
153 |
$this->texte=$langs->trans("NewCompanyToDolibarr",$object->nom); |
$this->texte=$langs->trans("NewCompanyToDolibarr",$object->nom); |
161 |
if ($action == 'CONTRACT_VALIDATE') |
if ($action == 'CONTRACT_VALIDATE') |
162 |
{ |
{ |
163 |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
164 |
|
$langs->load("other"); |
165 |
|
|
166 |
|
// Initialisation donnees (date,duree,texte,desc) |
167 |
|
$this->date=time(); |
168 |
|
$this->duree=0; |
169 |
|
$this->texte=$langs->trans("ContractValidatedInDolibarr",$object->ref); |
170 |
|
$this->desc=$langs->trans("ContractValidatedInDolibarr",$object->ref); |
171 |
|
$this->desc.="\n".$langs->trans("ValidatedBy").': '.$user->code; |
172 |
} |
} |
173 |
if ($action == 'CONTRACT_CANCEL') |
if ($action == 'CONTRACT_CANCEL') |
174 |
{ |
{ |
175 |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
176 |
|
$langs->load("other"); |
177 |
|
|
178 |
|
$this->date=time(); |
179 |
|
$this->duree=0; |
180 |
|
$this->texte=$langs->trans("ContractCanceledInDolibarr",$object->ref); |
181 |
|
$this->desc=$langs->trans("ContractCanceledInDolibarr",$object->ref); |
182 |
|
$this->desc.="\n".$langs->trans("CanceledBy").': '.$user->code; |
183 |
} |
} |
184 |
if ($action == 'CONTRACT_CLOSE') |
if ($action == 'CONTRACT_CLOSE') |
185 |
{ |
{ |
186 |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
187 |
|
$langs->load("other"); |
188 |
|
|
189 |
|
$this->date=time(); |
190 |
|
$this->duree=0; |
191 |
|
$this->texte=$langs->trans("ContractClosedInDolibarr",$object->ref); |
192 |
|
$this->desc=$langs->trans("ContractClosedInDolibarr",$object->ref); |
193 |
|
$this->desc.="\n".$langs->trans("ClosedBy").': '.$user->code; |
194 |
} |
} |
195 |
|
|
196 |
if ($action == 'BILL_VALIDATE') |
if ($action == 'BILL_VALIDATE') |
197 |
{ |
{ |
198 |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
199 |
|
$langs->load("other"); |
200 |
|
|
201 |
|
$this->date=time(); |
202 |
|
$this->duree=0; |
203 |
|
$this->texte=$langs->trans("InvoiceValidatedInDolibarr",$object->number); |
204 |
|
$this->desc=$langs->trans("InvoiceValidatedInDolibarr",$object->number); |
205 |
|
$this->desc.="\n".$langs->trans("ValidatedBy").': '.$user->code; |
206 |
} |
} |
207 |
if ($action == 'BILL_PAYED') |
if ($action == 'BILL_PAYED') |
208 |
{ |
{ |
209 |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
210 |
|
$langs->load("other"); |
211 |
|
|
212 |
|
$this->date=time(); |
213 |
|
$this->duree=0; |
214 |
|
$this->texte=$langs->trans("InvoicePayedInDolibarr",$object->number); |
215 |
|
$this->desc=$langs->trans("InvoicePayedInDolibarr",$object->number); |
216 |
|
$this->desc.="\n".$langs->trans("EditedBy").': '.$user->code; |
217 |
} |
} |
218 |
if ($action == 'BILL_CANCELED') |
if ($action == 'BILL_CANCELED') |
219 |
{ |
{ |
220 |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched. id=".$object->id); |
221 |
|
$langs->load("other"); |
222 |
|
|
223 |
|
$this->date=time(); |
224 |
|
$this->duree=0; |
225 |
|
$this->texte=$langs->trans("InvoiceCanceledInDolibarr",$object->number); |
226 |
|
$this->desc=$langs->trans("InvoiceCanceledInDolibarr",$object->number); |
227 |
|
$this->desc.="\n".$langs->trans("CanceledBy").': '.$user->code; |
228 |
} |
} |
229 |
|
|
230 |
// Ajoute entrée dans webcal |
// Ajoute entrée dans webcal |