Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop
This commit is contained in:
Laurent Destailleur 2019-10-07 20:48:54 +02:00
commit e5026157e3
3 changed files with 16 additions and 17 deletions

View File

@ -71,13 +71,11 @@ class box_accountancy_last_manual_entries extends ModeleBoxes
*/
public function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
$this->max = $max;
global $user, $langs, $conf;
include_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
$bookkeepingstatic = new BookKeeping($db);
$bookkeepingstatic = new BookKeeping($this->db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastManualEntries", $max));
@ -92,17 +90,17 @@ class box_accountancy_last_manual_entries extends ModeleBoxes
$sql.= " WHERE b.fk_doc = 0";
$sql.= " AND b.entity = ".$conf->entity;
$sql.= " ORDER BY b.piece_num DESC ";
$sql.= $db->plimit($max, 0);
$sql.= $this->db->plimit($max, 0);
$result = $db->query($sql);
$result = $this->db->query($sql);
if ($result) {
$num = $db->num_rows($result);
$num = $this->db->num_rows($result);
$line = 0;
while ($line < $num) {
$objp = $db->fetch_object($result);
$date = $db->jdate($objp->date_movement);
$objp = $this->db->fetch_object($result);
$date = $this->db->jdate($objp->date_movement);
$journal = $objp->code_journal;
$label = $objp->label_operation;
$amount = $objp->montant;
@ -144,12 +142,12 @@ class box_accountancy_last_manual_entries extends ModeleBoxes
if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'class="center"','text'=>$langs->trans("NoRecordedManualEntries"));
$db->free($result);
$this->db->free($result);
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
'maxlength'=>500,
'text' => ($db->error().' sql='.$sql),
'text' => ($this->db->error().' sql='.$sql),
);
}
} else {

View File

@ -37,7 +37,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
public $boxlabel="BoxSuspenseAccount";
public $depends = array("accounting");
/**
/**
* @var DoliDB Database handler.
*/
public $db;
@ -70,11 +70,11 @@ class box_accountancy_suspense_account extends ModeleBoxes
*/
public function loadBox()
{
global $user, $langs, $db, $conf;
global $user, $langs, $conf;
include_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
$bookkeepingstatic = new BookKeeping($db);
$bookkeepingstatic = new BookKeeping($this->db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleSuspenseAccount"));
@ -88,10 +88,11 @@ class box_accountancy_suspense_account extends ModeleBoxes
$sql .= " WHERE b.numero_compte = ". $suspenseAccount;
$sql .= " AND b.entity = " . $conf->entity;
$result = $db->query($sql);
$result = $this->db->query($sql);
$nbSuspenseAccount = 0;
if ($result)
{
$obj=$db->fetch_object($result);
$obj=$this->db->fetch_object($result);
$nbSuspenseAccount = $obj->nb_suspense_account;
}

View File

@ -85,7 +85,7 @@ class modSyslog extends DolibarrModules
// Cronjobs
$comment = 'Compress and archive log files. The number of versions to keep is defined into the setup of module. ';
$comment.= 'Warning: Main application cron script must be run with same account than your web server to avoid to get log files with different owner than required by web server.';
$comment.= 'Warning: Main application cron script must be run with same account than your web server to avoid to get log files with different owner than required by web server. ';
$comment.= 'Another solution is to set web server Operating System group as the group of directory documents and set GROUP permission "rws" on this directory so log files will always have the group and permissions of the web server Operating System group.';
$this->cronjobs = array(