2
0
forked from Wavyzz/dolibarr

Compare commits

...

36 Commits
10.0.1 ... 7.0

Author SHA1 Message Date
Laurent Destailleur
af6e95aa79 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/class/utils.class.php
2022-03-10 15:49:51 +01:00
Laurent Destailleur
5d942c9d1a Fix infinit logs 2022-03-10 15:46:00 +01:00
Laurent Destailleur
10e32c056e FIX avoid infinite loop on dump with popen 2022-01-07 15:35:33 +01:00
Laurent Destailleur
eb7dd74026 Revert error 2020-06-04 16:05:40 +02:00
Laurent Destailleur
88f6c71e88 Add tuto for live streaming 2020-06-04 16:05:04 +02:00
Laurent Destailleur
b081cf5cba Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:48:41 +02: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
4bdf10c995 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2020-03-11 16:44:03 +01: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
ec6e933f66 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2020-01-10 19:47:00 +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
5dbf060f00 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/lib/functions.lib.php
2019-12-09 13:24:01 +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
b847eb1b7e Merge pull request #12056 from atm-florianm/FIX_7.0_email_addresses_in_email_sending_error_message
FIX 7.0: addresses not displayed in e-mail sending error messages
2019-10-07 20:25:01 +02:00
Florian Mortgat
2aee62ea28 FIX: $from and $sendto variables are unescaped in the sending error message
This causes addresses like Tom <tom@examp.le> not to be shown in the message.
2019-10-07 17:32:52 +02:00
Laurent Destailleur
7aac67f79c Merge pull request #11884 from frederic34/patch-10
fix colspan in show_project
2019-09-14 16:33:02 +02:00
Laurent Destailleur
935e84d985 Merge pull request #11885 from frederic34/patch-12
Create .stickler.yml
2019-09-14 16:32:25 +02:00
Laurent Destailleur
fbb8808f29 Merge pull request #11887 from frederic34/patch-14
Update index.php
2019-09-14 16:32:11 +02:00
Frédéric FRANCE
00394493eb Update index.php 2019-09-12 22:02:39 +02:00
Frédéric FRANCE
6db7414f88 Create .stickler.yml 2019-09-12 21:45:04 +02:00
Frédéric FRANCE
0d3a2f800b fix colspan in show_project 2019-09-12 21:39:57 +02:00
Laurent Destailleur
bdd57ecce7 Merge pull request #11727 from hregis/7.0_price
FIX avoid sql error if fk_project is empty during update
2019-08-26 16:38:57 +02:00
Regis Houssin
2d59f6bb3d FIX avoid sql error if fk_project is empty during update 2019-08-23 07:59:36 +02: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
9 changed files with 45 additions and 24 deletions

10
.stickler.yml Normal file
View File

@@ -0,0 +1,10 @@
---
linters:
phpcs:
standard: 'dev/setup/codesniffer/ruleset.xml'
extensions: 'php'
tab_width: 4
fixer: true
fixers:
enable: true

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@@ -60,6 +61,7 @@ $langs->load("loans");
llxHeader('', $langs->trans("AccountancyArea"));
print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy');
dol_fiche_head();
$step = 0;
@@ -175,6 +177,7 @@ else
{
print $langs->trans("Module10Desc")."<br>\n";
}
dol_fiche_end();
llxFooter();
$db->close();

View File

@@ -291,17 +291,17 @@ class ChargeSociales extends CommonObject
$sql.= ", date_ech='".$this->db->idate($this->date_ech)."'";
$sql.= ", periode='".$this->db->idate($this->periode)."'";
$sql.= ", amount='".price2num($this->amount,'MT')."'";
$sql.= ", fk_projet='".$this->db->escape($this->fk_project)."'";
$sql.= ", fk_projet=".($this->fk_project>0?$this->db->escape($this->fk_project):"NULL");
$sql.= ", fk_user_modif=".$user->id;
$sql.= " WHERE rowid=".$this->id;
dol_syslog(get_class($this)."::update", LOG_DEBUG);
$resql=$this->db->query($sql);
if (! $resql) {
$error++; $this->errors[]="Error ".$this->db->lasterror();
}
if (! $error)
{
if (! $notrigger)
@@ -312,7 +312,7 @@ class ChargeSociales extends CommonObject
// End call triggers
}
}
// Commit or rollback
if ($error)
{
@@ -329,8 +329,8 @@ class ChargeSociales extends CommonObject
$this->db->commit();
return 1;
}
}
/**

View File

@@ -460,7 +460,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$mesg='<div class="error">';
if ($mailfile->error)
{
$mesg.=$langs->trans('ErrorFailedToSendMail',$from,$sendto);
$mesg.=$langs->transnoentities('ErrorFailedToSendMail',dol_escape_htmltag($from),dol_escape_htmltag($sendto));
$mesg.='<br>'.$mailfile->error;
}
else

View File

@@ -291,18 +291,20 @@ class Utils
$ok=0;
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) {
$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;
}
pclose($handlein);
}
pclose($handlein);
if ($compression == 'none') fclose($handle);
if ($compression == 'gz') gzclose($handle);

View File

@@ -739,7 +739,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin
}
else
{
print '<tr class="oddeven"><td colspan="5" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
print '<tr class="oddeven"><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
}
$db->free($result);
}

View File

@@ -1376,6 +1376,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$fileimagebis = $file.'_preview-0.png'; // If PDF has more than one page
$relativepathimage = $relativepath.'_preview.png';
// Si fichier PDF existe
if (file_exists($file))
{
@@ -1387,7 +1388,8 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
{
if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experienc trouble with pdf thumb generation and imagick, you can disable here.
{
$ret = dol_convert_file($file, 'png', $fileimage);
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$ret = dol_convert_file($file, 'png', $fileimage);
if ($ret < 0) $error++;
}
}

View File

@@ -1228,7 +1228,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)
@@ -1338,6 +1338,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

@@ -897,7 +897,7 @@ class Product extends CommonObject
$sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'";
$sql.= ", accountancy_code_sell_intra= '" . $this->db->escape($this->accountancy_code_sell_intra)."'";
$sql.= ", accountancy_code_sell_export= '" . $this->db->escape($this->accountancy_code_sell_export)."'";
$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);