Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
10033e8f64
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -51,16 +52,15 @@ class Notify
|
|||||||
public $errors = array();
|
public $errors = array();
|
||||||
|
|
||||||
var $author;
|
var $author;
|
||||||
|
var $ref;
|
||||||
/**
|
|
||||||
* @var string Ref
|
|
||||||
*/
|
|
||||||
public $ref;
|
|
||||||
|
|
||||||
var $date;
|
var $date;
|
||||||
var $duree;
|
var $duree;
|
||||||
var $note;
|
var $note;
|
||||||
var $fk_project;
|
|
||||||
|
/**
|
||||||
|
* @var int Project ID
|
||||||
|
*/
|
||||||
|
public $fk_project;
|
||||||
|
|
||||||
// Les codes actions sont definis dans la table llx_notify_def
|
// Les codes actions sont definis dans la table llx_notify_def
|
||||||
|
|
||||||
@ -369,6 +369,14 @@ class Notify
|
|||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $this->db->num_rows($result);
|
$num = $this->db->num_rows($result);
|
||||||
|
$projtitle='';
|
||||||
|
if (! empty($object->fk_project))
|
||||||
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
$proj = new Project($this->db);
|
||||||
|
$proj->fetch($object->fk_project);
|
||||||
|
$projtitle='('.$proj->title.')';
|
||||||
|
}
|
||||||
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
@ -390,7 +398,7 @@ class Notify
|
|||||||
$outputlangs->setDefaultLang($obj->default_lang);
|
$outputlangs->setDefaultLang($obj->default_lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
$subject = '['.$mysoc->name.'] '.$outputlangs->transnoentitiesnoconv("DolibarrNotification");
|
$subject = '['.$mysoc->name.'] '.$outputlangs->transnoentitiesnoconv("DolibarrNotification").($projtitle?' '.$projtitle:'');
|
||||||
|
|
||||||
switch ($notifcode) {
|
switch ($notifcode) {
|
||||||
case 'BILL_VALIDATE':
|
case 'BILL_VALIDATE':
|
||||||
@ -572,7 +580,7 @@ class Notify
|
|||||||
$link = '';
|
$link = '';
|
||||||
$num++;
|
$num++;
|
||||||
|
|
||||||
$subject = '['.$mysoc->name.'] '.$langs->transnoentitiesnoconv("DolibarrNotification");
|
$subject = '['.$mysoc->name.'] '.$langs->transnoentitiesnoconv("DolibarrNotification").($projtitle?' '.$projtitle:'');
|
||||||
|
|
||||||
switch ($notifcode) {
|
switch ($notifcode) {
|
||||||
case 'BILL_VALIDATE':
|
case 'BILL_VALIDATE':
|
||||||
@ -734,5 +742,6 @@ class Notify
|
|||||||
if (! $error) return $num;
|
if (! $error) return $num;
|
||||||
else return -1 * $error;
|
else return -1 * $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user