Skip to content

Commit

Permalink
Fix: CRLF
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed May 21, 2014
1 parent c82ff0a commit 4a7e9e4
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion htdocs/core/db/pgsql.class.php
Expand Up @@ -214,7 +214,7 @@ static function convertSQLFromMysql($line,$type='auto',$unescapeslashquot=0)

// nuke unsigned
$line=preg_replace('/(int\w+|smallint)\s+unsigned/i','\\1',$line);
$line=preg_replace('/as signed/i','as integer',$line);
$line=preg_replace('/as signed/i','as integer',$line);

// blob -> text
$line=preg_replace('/\w*blob/i','text',$line);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/functions2.lib.php
Expand Up @@ -802,7 +802,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
if ($counter >= pow(10, dol_strlen($maskcounter)))
{
$counter='ErrorMaxNumberReachForThisMask';
}
}

if (! empty($maskrefclient_maskcounter))
{
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/modules/contract/mod_contract_serpis.php
Expand Up @@ -123,8 +123,8 @@ function getNextValue($objsoc,$contract)
$date=$contract->date_contrat;
$yymm = strftime("%y%m",$date);

if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);

dol_syslog("mod_contract_serpis::getNextValue return ".$this->prefix.$yymm."-".$num);
return $this->prefix.$yymm."-".$num;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/modules/expedition/mod_expedition_safor.php
Expand Up @@ -123,8 +123,8 @@ function getNextValue($objsoc,$shipment)
$date=time();
$yymm = strftime("%y%m",$date);

if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);

dol_syslog("mod_expedition_safor::getNextValue return ".$this->prefix.$yymm."-".$num);
return $this->prefix.$yymm."-".$num;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/modules/livraison/mod_livraison_jade.php
Expand Up @@ -135,8 +135,8 @@ function getNextValue($objsoc,$object)
if (empty($date)) $date=dol_now();
$yymm = strftime("%y%m",$date);

if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);

dol_syslog("mod_livraison_jade::getNextValue return ".$this->prefix.$yymm."-".$num);
return $this->prefix.$yymm."-".$num;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/modules/project/mod_project_simple.php
Expand Up @@ -131,8 +131,8 @@ function getNextValue($objsoc,$project)
//$yymm = strftime("%y%m",time());
$yymm = strftime("%y%m",$date);

if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);

dol_syslog("mod_project_simple::getNextValue return ".$this->prefix.$yymm."-".$num);
return $this->prefix.$yymm."-".$num;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/modules/project/task/mod_task_simple.php
Expand Up @@ -131,8 +131,8 @@ function getNextValue($objsoc,$task)
//$yymm = strftime("%y%m",time());
$yymm = strftime("%y%m",$date);

if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);

dol_syslog("mod_task_simple::getNextValue return ".$this->prefix.$yymm."-".$num);
return $this->prefix.$yymm."-".$num;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/modules/propale/mod_propale_marbre.php
Expand Up @@ -131,8 +131,8 @@ function getNextValue($objsoc,$propal)
$date = time();
$yymm = strftime("%y%m",$date);

if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);

dol_syslog("mod_propale_marbre::getNextValue return ".$this->prefix.$yymm."-".$num);
return $this->prefix.$yymm."-".$num;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/modules/societe/mod_codeclient_monkey.php
Expand Up @@ -140,8 +140,8 @@ function getNextValue($objsoc=0,$type=-1)
$date = dol_now();
$yymm = strftime("%y%m",$date);

if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);

dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num);
return $prefix.$yymm."-".$num;
Expand Down
Expand Up @@ -158,8 +158,8 @@ function getNextValue($objsoc,$object,$mode='next')
$date=$object->date; // This is invoice date (not creation date)
$yymm = strftime("%y%m",$date);

if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);

dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num);
return $prefix.$yymm."-".$num;
Expand Down
Expand Up @@ -126,8 +126,8 @@ function getNextValue($objsoc=0,$object='')
if (empty($date)) $date=$object->date; // Creation date is order date for suppliers orders
$yymm = strftime("%y%m",$date);

if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s",$max+1);

return $this->prefix.$yymm."-".$num;
}
Expand Down

0 comments on commit 4a7e9e4

Please sign in to comment.