Compare commits

...

35 Commits
9.0.1 ... 6.0

Author SHA1 Message Date
Laurent Destailleur
d13633d9d6 Fix curly braces 2025-11-04 04:39:32 +01:00
Laurent Destailleur
654e5c6824 Fix curly braces 2025-11-04 04:38:27 +01:00
Laurent Destailleur
256cad1c29 Fix curly braces 2025-11-04 04:37:09 +01:00
Laurent Destailleur
5d942c9d1a Fix infinit logs 2022-03-10 15:46:00 +01:00
Laurent Destailleur
3ea9c297ea Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2020-03-30 19:46:23 +02:00
Laurent Destailleur
474260e526 Merge pull request #13447 from c3do/patch-1
Fix can set desiredstock to (int) 0 from API Rest
2020-03-30 19:46:02 +02:00
Cédric
eead9a93d3 Fix can set desiredstock to (int) 0 from API Rest
When you set desiredstock to 0 as an integer from the API, it registers to null in the database. Using is_numeric() fixes this.
2020-03-30 13:03:13 +02:00
Laurent Destailleur
7f759c6ff5 Merge pull request #13322 from atm-lena/6.0_FIX_FournCommandClone_ExtrafieldsLines
FIX - Clone Fourn Command, add line's extrafields
2020-03-11 16:36:27 +01:00
atm-lena
20aa51f26b FIX - Clone Fourn Command, add line's extrafields Part 2 2020-03-11 15:26:49 +01:00
atm-lena
35f32391a0 FIX - Clone Fourn Command, add line's extrafields 2020-03-10 14:46:15 +01:00
Laurent Destailleur
e0c8ccb9fb Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2020-01-10 19:45:35 +01:00
Laurent Destailleur
ef00cb0736 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2020-01-10 19:44:52 +01:00
Laurent Destailleur
d7f7f5bf3d Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2020-01-10 19:42:34 +01:00
Laurent Destailleur
7c0a6946a7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2020-01-10 19:42:15 +01:00
Laurent Destailleur
1ecc1afa9e Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2020-01-10 19:41:49 +01:00
Laurent Destailleur
ceb1e699b7 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2020-01-10 19:37:16 +01:00
Laurent Destailleur
c028819cab FIX clone of purchase order 2020-01-10 19:35:49 +01:00
Laurent Destailleur
53149bb7cd Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2019-12-08 04:22:50 +01:00
Laurent Destailleur
394104291a Fix function not found when creating a payment of an expense report 2019-12-08 04:22:09 +01:00
Laurent Destailleur
a872b7d42f Merge pull request #11532 from atm-gauthier/6.0_fix_phone_search
FIX : search by phone pro
2019-07-22 18:30:07 +02:00
gauthier
cd7d3f1a36 FIX : search by phone pro 2019-07-19 15:41:44 +02:00
Laurent Destailleur
c5572e0176 Add info on signature generator 2019-06-25 23:19:00 +02:00
Laurent Destailleur
5259547b96 Merge pull request #11069 from atm-gauthier/6.0_fix_select_prev_situ
Fix prev situation invoice selection (backport fix 8.0)
2019-04-25 18:59:48 +02:00
gauthier
31897f54ac Fix prev situation invoice selection (backport fix 8.0) 2019-04-25 12:37:05 +02:00
Laurent Destailleur
5dfc1c0897 Merge pull request #10921 from atm-greg/Fix_hook_in_margins_heads
FIX missing hook completeTabsHead in margins module
2019-03-31 18:21:48 +02:00
atm-greg
83d7750274 FIX missing hook completeTabsHead in margins module 2019-03-27 09:33:51 +01:00
Laurent Destailleur
8711e51bce Merge pull request #10841 from atm-gauthier/6.0_notest_tab_documents_on_expensereport
FIX : no need to test anything to display documents tabs on expense report
2019-03-15 10:56:53 +01:00
gauthier
8375b47e74 FIX : in fact expensereport must be in $check array 2019-03-15 10:21:50 +01:00
gauthier
3fb6978bc8 FIX : no need to test anything to display documents tabs on expense report 2019-03-14 17:36:49 +01:00
Laurent Destailleur
eab1e13343 Merge pull request #10839 from atm-gauthier/6.0_fix_useless_join
FIX : useless join
2019-03-14 17:12:38 +01:00
gauthier
885797b748 FIX : useless join 2019-03-14 17:00:51 +01:00
Laurent Destailleur
22bb62d900 Merge pull request #10737 from atm-gauthier/6.0_fix_wrong_redirect_link
FIX : wrong redirect link on holiday refuse
2019-03-05 18:43:57 +01:00
gauthier
dada8c8ff5 FIX : wrong redirect link on holiday refuse 2019-03-04 17:23:29 +01:00
Laurent Destailleur
d59b1bb0c6 Merge 2018-11-23 11:44:07 +01:00
Laurent Destailleur
9d582a53ca Fix compatibility with new mysql versions 2018-11-23 11:28:28 +01:00
12 changed files with 31 additions and 20 deletions

View File

@@ -99,6 +99,7 @@ else
}
print "Release : ".$release."\n";
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
print "Include custom in signature : ".$includecustom."\n";
print "Include constants in signature : ";
foreach ($includeconstants as $countrycode => $tmp)

View File

@@ -290,7 +290,7 @@ if ($search_firstname) $sql.= natural_search('p.firstname', $search
if ($search_societe) $sql.= natural_search('s.nom', $search_societe);
if (strlen($search_poste)) $sql.= natural_search('p.poste', $search_poste);
if (strlen($search_phone_perso)) $sql.= natural_search('p.phone_perso', $search_phone_perso);
if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone);
if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_phone_pro);
if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $search_phone_mobile);
if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax);
if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype);

View File

@@ -3242,7 +3242,7 @@ class Form
if ($obj->situation_final != 1) {
//Not prov?
if (substr($obj->facnumber, 1, 4) != 'PROV') {
if ($selected == $obj->situation_final) {
if ($selected == $obj->rowid) {
$opt .= '<option value="' . $obj->rowid . '" selected>' . $obj->facnumber . '</option>';
} else {
$opt .= '<option value="' . $obj->rowid . '">' . $obj->facnumber . '</option>';

View File

@@ -292,17 +292,19 @@ class Utils
dol_syslog("Run command ".$fullcommandcrypted);
$handlein = popen($fullcommandclear, 'r');
$i=0;
while (!feof($handlein))
{
$i++; // output line number
$read = fgets($handlein);
// Exclude warning line we don't want
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
fwrite($handle,$read);
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
if ($handlein) {
while (!feof($handlein))
{
$i++; // output line number
$read = fgets($handlein);
// Exclude warning line we don't want
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
fwrite($handle,$read);
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
}
pclose($handlein);
}
pclose($handlein);
if ($compression == 'none') fclose($handle);
if ($compression == 'gz') gzclose($handle);

View File

@@ -1251,6 +1251,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
{
if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experience trouble with pdf thumb generation and imagick, you can disable here.
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$ret = dol_convert_file($file, 'png', $fileimage);
if ($ret < 0) $error++;
}
@@ -4964,7 +4965,7 @@ function dol_string_is_good_iso($s)
$ok=1;
for($scursor=0;$scursor<$len;$scursor++)
{
$ordchar=ord($s{$scursor});
$ordchar=ord($s[$scursor]);
//print $scursor.'-'.$ordchar.'<br>';
if ($ordchar < 32 && $ordchar != 13 && $ordchar != 10) { $ok=0; break; }
if ($ordchar > 126 && $ordchar < 160) { $ok=0; break; }

View File

@@ -118,7 +118,7 @@ function _val($val)
*/
for ($c = 0; $c < $strlen_var; ++$c) {
$ord_var_c = ord($val{$c});
$ord_var_c = ord($val[$c]);
switch (true) {
case $ord_var_c == 0x08:
@@ -141,7 +141,7 @@ function _val($val)
case $ord_var_c == 0x2F:
case $ord_var_c == 0x5C:
// double quote, slash, slosh
$ascii .= '\\'.$val{$c};
$ascii .= '\\'.$val[$c];
break;
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):

View File

@@ -377,7 +377,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh
if ($feature == 'project') $feature='projet';
if ($feature == 'task') $feature='projet_task';
$check = array('adherent','banque','user','usergroup','produit','service','produit|service','categorie'); // Test on entity only (Objects with no link to company)
$check = array('adherent','banque','user','usergroup','produit','service','produit|service','categorie','expensereport'); // Test on entity only (Objects with no link to company)
$checksoc = array('societe'); // Test for societe object
$checkother = array('contact','agenda'); // Test on entity and link to third party. Allowed if link is empty (Ex: contacts...).
$checkproject = array('projet','project'); // Test for project object

View File

@@ -1178,7 +1178,7 @@ class CommandeFournisseur extends CommonOrder
false,
$this->lines[$i]->date_start,
$this->lines[$i]->date_end,
0,
$this->lines[$i]->array_options,
$this->lines[$i]->fk_unit
);
if ($result < 0)
@@ -1288,6 +1288,10 @@ class CommandeFournisseur extends CommonOrder
$this->db->begin();
// get extrafields so they will be clone
foreach($this->lines as $line)
$line->fetch_optionals($line->rowid);
// Load source object
$objFrom = clone $this;

View File

@@ -568,7 +568,7 @@ if ($action == 'confirm_refuse')
}
} else {
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=NoMotifRefuse');
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'&error=NoMotifRefuse');
exit;
}
}

View File

@@ -299,7 +299,7 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire
{
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut, u.photo, x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status";
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
//if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE u.rowid = x.fk_user_author";
$sql.= " AND x.entity = ".$conf->entity;
if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) $sql.=' AND x.fk_user_author IN ('.join(',',$childids).')';

View File

@@ -96,6 +96,9 @@ function marges_prepare_head()
$head[$h][2] = 'checkMargins';
}
complete_head_from_modules($conf,$langs,null,$head,$h,'margins','remove');
complete_head_from_modules($conf,$langs,null,$head,$h,'margins');
return $head;
}

View File

@@ -884,7 +884,7 @@ class Product extends CommonObject
$sql.= ", duration = '" . $this->db->escape($this->duration_value . $this->duration_unit) ."'";
$sql.= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy)."'";
$sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'";
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? $this->desiredstock : "null");
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? $this->desiredstock : "null");
$sql.= ", cost_price = " . ($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
$sql.= ", fk_unit= " . (!$this->fk_unit ? 'NULL' : $this->fk_unit);
$sql.= ", price_autogen = " . (!$this->price_autogen ? 0 : 1);