Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
2ef65a2877
@ -724,7 +724,7 @@ function getFormeJuridiqueLabel($code)
|
|||||||
function getCountriesInEEC()
|
function getCountriesInEEC()
|
||||||
{
|
{
|
||||||
// List of all country codes that are in europe for european vat rules
|
// List of all country codes that are in europe for european vat rules
|
||||||
// List found on http://ec.europa.eu/taxation_customs/common/faq/faq_1179_en.htm#9
|
// List found on https://ec.europa.eu/taxation_customs/territorial-status-eu-countries-and-certain-territories_en
|
||||||
global $conf, $db;
|
global $conf, $db;
|
||||||
$country_code_in_EEC = array();
|
$country_code_in_EEC = array();
|
||||||
|
|
||||||
|
|||||||
@ -277,10 +277,14 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error && empty($conf->global->EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS) && $object->periode_existe($fuser, $object->date_debut, $object->date_fin)) {
|
if (!$error && empty($conf->global->EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS)) {
|
||||||
$error++;
|
$overlappingExpenseReportID = $object->periode_existe($fuser, $object->date_debut, $object->date_fin, true);
|
||||||
setEventMessages($langs->trans("ErrorDoubleDeclaration"), null, 'errors');
|
|
||||||
$action = 'create';
|
if ($overlappingExpenseReportID > 0) {
|
||||||
|
$error++;
|
||||||
|
setEventMessages($langs->trans("ErrorDoubleDeclaration").' <a href="'.$_SERVER['PHP_SELF'].'?id='.$overlappingExpenseReportID.'">'. $langs->trans('ShowTrip').'</a>', null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
|
|||||||
@ -2213,8 +2213,6 @@ class ExpenseReport extends CommonObject
|
|||||||
$date_d_form = $date_debut;
|
$date_d_form = $date_debut;
|
||||||
$date_f_form = $date_fin;
|
$date_f_form = $date_fin;
|
||||||
|
|
||||||
$existe = false;
|
|
||||||
|
|
||||||
while ($i < $num_rows) {
|
while ($i < $num_rows) {
|
||||||
$objp = $this->db->fetch_object($result);
|
$objp = $this->db->fetch_object($result);
|
||||||
|
|
||||||
@ -2222,17 +2220,13 @@ class ExpenseReport extends CommonObject
|
|||||||
$date_f_req = $this->db->jdate($objp->date_fin); // 4
|
$date_f_req = $this->db->jdate($objp->date_fin); // 4
|
||||||
|
|
||||||
if (!($date_f_form < $date_d_req || $date_d_form > $date_f_req)) {
|
if (!($date_f_form < $date_d_req || $date_d_form > $date_f_req)) {
|
||||||
$existe = true;
|
return $objp->rowid;
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($existe) {
|
return 0;
|
||||||
return 1;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -279,5 +279,5 @@ INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (24
|
|||||||
|
|
||||||
|
|
||||||
-- Set field eec
|
-- Set field eec
|
||||||
UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GR','HR','NL','HU','IE','IM','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI');
|
UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GR','HR','NL','HU','IE','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI');
|
||||||
|
|
||||||
|
|||||||
@ -618,11 +618,13 @@ if ($search_ref_supplier) {
|
|||||||
$param .= "&search_ref_supplier=".urlencode($search_ref_supplier);
|
$param .= "&search_ref_supplier=".urlencode($search_ref_supplier);
|
||||||
}
|
}
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
foreach ($search_array_options as $key => $val) {
|
if ($search_array_options) {
|
||||||
$crit = $val;
|
foreach ($search_array_options as $key => $val) {
|
||||||
$tmpkey = preg_replace('/search_options_/', '', $key);
|
$crit = $val;
|
||||||
if ($val != '') {
|
$tmpkey = preg_replace('/search_options_/', '', $key);
|
||||||
$param .= '&search_options_'.$tmpkey.'='.urlencode($val);
|
if ($val != '') {
|
||||||
|
$param .= '&search_options_' . $tmpkey . '=' . urlencode($val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user