Fix warnings
This commit is contained in:
parent
95b79094df
commit
bf94ce6aad
@ -460,7 +460,7 @@ class AccountingAccount extends CommonObject
|
|||||||
|
|
||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
$url = '';
|
$url = ''; $labelurl = '';
|
||||||
if (empty($option) || $option == 'ledger') {
|
if (empty($option) || $option == 'ledger') {
|
||||||
$url = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode($this->account_number).'&search_accountancy_code_end='.urlencode($this->account_number);
|
$url = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode($this->account_number).'&search_accountancy_code_end='.urlencode($this->account_number);
|
||||||
$labelurl = $langs->trans("ShowAccountingAccountInLedger");
|
$labelurl = $langs->trans("ShowAccountingAccountInLedger");
|
||||||
@ -617,16 +617,13 @@ class AccountingAccount extends CommonObject
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if ($mode == 0)
|
$fieldtouse = 'active';
|
||||||
{
|
if ($mode == 1) {
|
||||||
$fieldtouse = 'active';
|
|
||||||
} elseif ($mode == 1)
|
|
||||||
{
|
|
||||||
$fieldtouse = 'reconcilable';
|
$fieldtouse = 'reconcilable';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."accounting_account ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."accounting_account";
|
||||||
$sql .= "SET ".$fieldtouse." = '1'";
|
$sql .= " SET ".$fieldtouse." = '1'";
|
||||||
$sql .= " WHERE rowid = ".$this->db->escape($id);
|
$sql .= " WHERE rowid = ".$this->db->escape($id);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::account_activate ".$fieldtouse." sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::account_activate ".$fieldtouse." sql=".$sql, LOG_DEBUG);
|
||||||
|
|||||||
@ -225,7 +225,7 @@ print '<tr class="oddeven"><td>'.$langs->trans("CurrentTimeZone").'</td><td>'; /
|
|||||||
$a = getServerTimeZoneInt('now');
|
$a = getServerTimeZoneInt('now');
|
||||||
$b = getServerTimeZoneInt('winter');
|
$b = getServerTimeZoneInt('winter');
|
||||||
$c = getServerTimeZoneInt('summer');
|
$c = getServerTimeZoneInt('summer');
|
||||||
$daylight = (is_numeric($c) && is_numeric($b)) ?round($c - $b) : 'unknown';
|
$daylight = round($c - $b);
|
||||||
//print $a." ".$b." ".$c." ".$daylight;
|
//print $a." ".$b." ".$c." ".$daylight;
|
||||||
$val = ($a >= 0 ? '+' : '').$a;
|
$val = ($a >= 0 ? '+' : '').$a;
|
||||||
$val .= ' ('.($a == 'unknown' ? 'unknown' : ($a >= 0 ? '+' : '').($a * 3600)).')';
|
$val .= ' ('.($a == 'unknown' ? 'unknown' : ($a >= 0 ? '+' : '').($a * 3600)).')';
|
||||||
|
|||||||
@ -1206,16 +1206,17 @@ class ActionComm extends CommonObject
|
|||||||
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
||||||
*
|
*
|
||||||
* @param User $user Objet user
|
* @param User $user Objet user
|
||||||
* @param int $load_state_board Charge indicateurs this->nb de tableau de bord
|
* @param int $load_state_board Load indicator array this->nb
|
||||||
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
|
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
|
||||||
*/
|
*/
|
||||||
public function load_board($user, $load_state_board = 0)
|
public function load_board($user, $load_state_board = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if (empty($load_state_board)) $sql = "SELECT a.id, a.datep as dp";
|
if (empty($load_state_board)) {
|
||||||
else {
|
$sql = "SELECT a.id, a.datep as dp";
|
||||||
|
} else {
|
||||||
$this->nb = array();
|
$this->nb = array();
|
||||||
$sql = "SELECT count(a.id) as nb";
|
$sql = "SELECT count(a.id) as nb";
|
||||||
}
|
}
|
||||||
@ -1243,13 +1244,14 @@ class ActionComm extends CommonObject
|
|||||||
$response->img = img_object('', "action", 'class="inline-block valigntextmiddle"');
|
$response->img = img_object('', "action", 'class="inline-block valigntextmiddle"');
|
||||||
}
|
}
|
||||||
// This assignment in condition is not a bug. It allows walking the results.
|
// This assignment in condition is not a bug. It allows walking the results.
|
||||||
while ($obj = $this->db->fetch_object($resql))
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
{
|
|
||||||
if (empty($load_state_board)) {
|
if (empty($load_state_board)) {
|
||||||
$response->nbtodo++;
|
$response->nbtodo++;
|
||||||
$agenda_static->datep = $this->db->jdate($obj->dp);
|
$agenda_static->datep = $this->db->jdate($obj->dp);
|
||||||
if ($agenda_static->hasDelay()) $response->nbtodolate++;
|
if ($agenda_static->hasDelay()) $response->nbtodolate++;
|
||||||
} else $this->nb["actionscomm"] = $obj->nb;
|
} else {
|
||||||
|
$this->nb["actionscomm"] = $obj->nb;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|||||||
@ -78,7 +78,7 @@ function getServerTimeZoneString()
|
|||||||
* Return server timezone int.
|
* Return server timezone int.
|
||||||
*
|
*
|
||||||
* @param string $refgmtdate Reference period for timezone (timezone differs on winter and summer. May be 'now', 'winter' or 'summer')
|
* @param string $refgmtdate Reference period for timezone (timezone differs on winter and summer. May be 'now', 'winter' or 'summer')
|
||||||
* @return int An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer)
|
* @return float An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer). Note some countries use half and even quarter hours.
|
||||||
*/
|
*/
|
||||||
function getServerTimeZoneInt($refgmtdate = 'now')
|
function getServerTimeZoneInt($refgmtdate = 'now')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user