forked from Wavyzz/dolibarr
Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/contact/vcard.php htdocs/core/boxes/box_birthdays.php htdocs/core/boxes/box_birthdays_members.php htdocs/core/lib/date.lib.php
This commit is contained in:
@@ -79,7 +79,7 @@ if ($company->id)
|
|||||||
if (!$contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE");
|
if (!$contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE");
|
||||||
if (!$contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX");
|
if (!$contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX");
|
||||||
if (!$contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country, "TYPE=WORK;POSTAL");
|
if (!$contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country, "TYPE=WORK;POSTAL");
|
||||||
if ($company->email != $contact->email) $v->setEmail($company->email, 'TYPE=PREF,INTERNET');
|
if (empty($contact->email)) $v->setEmail($company->email, 'TYPE=PREF,INTERNET');
|
||||||
// Si contact lie a un tiers non de type "particulier"
|
// Si contact lie a un tiers non de type "particulier"
|
||||||
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name);
|
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class box_birthdays extends ModeleBoxes
|
|||||||
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth";
|
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql .= " WHERE u.entity IN (".getEntity('user').")";
|
$sql .= " WHERE u.entity IN (".getEntity('user').")";
|
||||||
$sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], $tmparray['year']);
|
$sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
|
||||||
$sql .= " ORDER BY u.birth ASC";
|
$sql .= " ORDER BY u.birth ASC";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class box_birthdays_members extends ModeleBoxes
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as u";
|
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as u";
|
||||||
$sql .= " WHERE u.entity IN (".getEntity('adherent').")";
|
$sql .= " WHERE u.entity IN (".getEntity('adherent').")";
|
||||||
$sql .= " AND u.statut = 1";
|
$sql .= " AND u.statut = 1";
|
||||||
$sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], $tmparray['year']);
|
$sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
|
||||||
$sql .= " ORDER BY u.birth ASC";
|
$sql .= " ORDER BY u.birth ASC";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date, $exclu
|
|||||||
$sqldate .= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month_date, $day_date, $year_date));
|
$sqldate .= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month_date, $day_date, $year_date));
|
||||||
$sqldate .= "' AND '".$db->idate(dol_mktime(23, 59, 59, $month_date, $day_date, $year_date))."'";
|
$sqldate .= "' AND '".$db->idate(dol_mktime(23, 59, 59, $month_date, $day_date, $year_date))."'";
|
||||||
} else
|
} else
|
||||||
$sqldate .= ($excludefirstand ? "" : " AND ")." date_format( ".$datefield.", '%m') = '".$db->escape($month_date)."'";
|
$sqldate .= ($excludefirstand ? "" : " AND ")." date_format( ".$datefield.", '%c') = '".$db->escape($month_date)."'";
|
||||||
} elseif ($year_date > 0) {
|
} elseif ($year_date > 0) {
|
||||||
$sqldate .= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_get_first_day($year_date, 1, false));
|
$sqldate .= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_get_first_day($year_date, 1, false));
|
||||||
$sqldate .= "' AND '".$db->idate(dol_get_last_day($year_date, 12, false))."'";
|
$sqldate .= "' AND '".$db->idate(dol_get_last_day($year_date, 12, false))."'";
|
||||||
|
|||||||
Reference in New Issue
Block a user