diff --git a/ChangeLog b/ChangeLog index a83fc453a653d81bd9f24a0a6897541cf5523a75..290ef46808598cb45dad6c960c032edbd9e51146 100644 --- a/ChangeLog +++ b/ChangeLog @@ -712,6 +712,23 @@ Dolibarr better: - Function get_exdir require now 6 parameters. This is to prepare a future feature. +***** ChangeLog for 3.7.4 compared to 3.7.3 ***** +FIX: #3694 +FIX: #4239 +FIX: #4291 Correctly filter external calendar GETPOSTs +FIX: #4341 +FIX: #4414 Supplier invoices use FAC_FORCE_DATE_VALIDATION client invoices property +FIX: #4440 Wrong price is filled by Product::fetch into multiprices arrays +FIX: add missing global def for ttc column +FIX: Contrat card don't consider user permissions to show active/unactive service button +FIX: CVE CVE-2015-8685 +FIX: Email templates not compatible with Multicompany +Fix: for avoid division by 0 +FIX: ISSUE #4506 : make working the PROPAL_CLONE_ON_CREATE_PAGE hidden constant +FIX: $outputlangs is not defined (dolibarr 3.7, 3.8, 3.9) +FIX: sql injection even when code is on several lines +FIX: The third dashboard don't consider user permissions + ***** ChangeLog for 3.7.3 compared to 3.7.2 ***** FIX: #3734 Do not show empty links of deleted source objects in stock movement list FIX: #3890 Expected transactions bank account page, shows negative numbers diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 19c2c08aa724b11307c4e13085bd01dadc0ce63f..81c3168d532d8edefd1095908595e6db15e915fc 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -176,7 +176,7 @@ $tabsql[21]= "SELECT c.rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX $tabsql[22]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason"; $tabsql[23]= "SELECT t.rowid as rowid, t.taux, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid"; $tabsql[24]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource"; -$tabsql[25]= "SELECT rowid as rowid, label, type_template, private, position, topic, content, active FROM ".MAIN_DB_PREFIX."c_email_templates"; +$tabsql[25]= "SELECT rowid as rowid, label, type_template, private, position, topic, content, active FROM ".MAIN_DB_PREFIX."c_email_templates WHERE entity IN (".getEntity('email_template',1).")"; $tabsql[26]= "SELECT rowid as rowid, code, label, short_label, active FROM ".MAIN_DB_PREFIX."c_units"; $tabsql[27]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_stcomm"; $tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newByMonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid"; @@ -316,7 +316,7 @@ $tabfieldinsert[21]= "code,label"; $tabfieldinsert[22]= "code,label"; $tabfieldinsert[23]= "fk_pays,taux,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldinsert[24]= "code,label"; -$tabfieldinsert[25]= "label,type_template,position,topic,content"; +$tabfieldinsert[25]= "label,type_template,private,position,topic,content,entity"; $tabfieldinsert[26]= "code,label,short_label"; $tabfieldinsert[27]= "code,libelle"; $tabfieldinsert[28]= "code,label,affect,delay,newByMonth,fk_country"; diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 887c3698af5cf39c0737d8d0948af1b2536b6122..d7b6b897ec3c7d1e669a4445e1b7aebbda269aff 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -174,9 +174,11 @@ for ($m = 1 ; $m < 13 ; $m++ ) { $parameters["mode"] = $modetax; $parameters["year"] = $y; $parameters["month"] = $m; + $parameters["type"] = 'localtax'.$localTaxType; + // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('externalbalance')); - $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if (! is_array($coll_listbuy) && $coll_listbuy == -1) { $langs->load("errors"); diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 7c1e99b35373e3e3a6014646fa938cef66eda70b..e8b77636d3f1363504d78ba1fbf61cc70c4344fd 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -210,9 +210,8 @@ $total = 0; $i=0; // Load arrays of datas -$x_coll= local_by_date($db, 0, 0, $date_start, $date_end, $modetax, 'sell', $local); -//$x_coll = vat_by_date($db, 0, 0, $date_start, $date_end, $modetax, 'sell'); -$x_paye = local_by_date($db, 0, 0, $date_start, $date_end, $modetax, 'buy', $local); +$x_coll = vat_by_date($db, 0, 0, $date_start, $date_end, $modetax, 'sell'); +$x_paye = vat_by_date($db, 0, 0, $date_start, $date_end, $modetax, 'buy'); echo '<table class="noborder" width="100%">'; @@ -235,9 +234,9 @@ else { //foreach($x_coll[$my_coll_rate][localtax1_list]){ $x_both[$my_coll_rate]['coll']['totalht'] = $x_coll[$my_coll_rate]['totalht']; - $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; + $x_both[$my_coll_rate]['coll']['localtax'.$local] = $x_coll[$my_coll_rate]['localtax'.$local]; $x_both[$my_coll_rate]['paye']['totalht'] = 0; - $x_both[$my_coll_rate]['paye']['vat'] = 0; + $x_both[$my_coll_rate]['paye']['localtax'.$local] = 0; $x_both[$my_coll_rate]['coll']['links'] = ''; $x_both[$my_coll_rate]['coll']['detail'] = array(); foreach($x_coll[$my_coll_rate]['facid'] as $id=>$dummy) diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index c49b24102cb18cf5e620000964499840b55dbae2..f6308a3790db594eb143cce77e8629661b8b3cb2 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -161,9 +161,11 @@ for ($m = 1 ; $m < 13 ; $m++ ) $parameters["mode"] = $modetax; $parameters["year"] = $y; $parameters["month"] = $m; + $parameters["type"] = 'vat'; + // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('externalbalance')); - $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if (! is_array($coll_listbuy) && $coll_listbuy == -1) { diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 90a4d70130d7b8a933e7f5a7173d3bf95e380149..8e699e8ee918c833b20ac5d7d92cac96e65c2e9b 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1169,14 +1169,21 @@ class Project extends CommonObject //Generate next ref $defaultref=''; $obj = empty($conf->global->PROJECT_ADDON)?'mod_project_simple':$conf->global->PROJECT_ADDON; - if (! empty($conf->global->PROJECT_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/project/".$conf->global->PROJECT_ADDON.".php")) + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); + foreach($dirmodels as $reldir) { - - require_once DOL_DOCUMENT_ROOT ."/core/modules/project/".$conf->global->PROJECT_ADDON.'.php'; - $modProject = new $obj; - $defaultref = $modProject->getNextValue(is_object($clone_project->thirdparty)?$clone_project->thirdparty->id:0,$clone_project); + $file=dol_buildpath($reldir."core/modules/project/".$obj.'.php',0); + if (file_exists($file)) + { + $filefound=1; + dol_include_once($reldir."core/modules/project/".$obj.'.php'); + $modProject = new $obj; + $defaultref = $modProject->getNextValue(is_object($clone_project->thirdparty)?$clone_project->thirdparty:null, $clone_project); + break; + } } - if (is_numeric($defaultref) && $defaultref <= 0) $defaultref=''; $clone_project->ref=$defaultref;