Merge remote-tracking branch 'origin/3.6' into 3.7
Conflicts: htdocs/langs/en_US/users.lang htdocs/product/stock/class/mouvementstock.class.php
This commit is contained in:
commit
7105fabb79
@ -572,7 +572,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR')
|
|||||||
if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'ErrorDates must use same hours and must be GMT dates';
|
if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'ErrorDates must use same hours and must be GMT dates';
|
||||||
|
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($timestampStart < $timestampEnd && ($i < 50000)) // Loop end when equals (Test on i is a security loop to avoid infinite loop)
|
while ($timestampStart <= $timestampEnd && ($i < 50000)) // Loop end when equals (Test on i is a security loop to avoid infinite loop)
|
||||||
{
|
{
|
||||||
$ferie=false;
|
$ferie=false;
|
||||||
$countryfound=0;
|
$countryfound=0;
|
||||||
|
|||||||
@ -119,4 +119,5 @@ UseTypeFieldToChange=Use field Type to change
|
|||||||
OpenIDURL=OpenID URL
|
OpenIDURL=OpenID URL
|
||||||
LoginUsingOpenID=Use OpenID to login
|
LoginUsingOpenID=Use OpenID to login
|
||||||
WeeklyHours=Weekly hours
|
WeeklyHours=Weekly hours
|
||||||
ColorUser=Color of the user
|
ColorUser=Color of the user
|
||||||
|
DisabledInMonoUserMode=Disabled in maintenance mode
|
||||||
|
|||||||
@ -451,7 +451,7 @@ class MouvementStock extends CommonObject
|
|||||||
* @param int $qty Quantity of product with batch number
|
* @param int $qty Quantity of product with batch number
|
||||||
* @return int <0 if KO, else return productbatch id
|
* @return int <0 if KO, else return productbatch id
|
||||||
*/
|
*/
|
||||||
function _create_batch($dluo, $qty ) {
|
function _create_batch($dluo, $qty) {
|
||||||
$pdluo=New Productbatch($this->db);
|
$pdluo=New Productbatch($this->db);
|
||||||
|
|
||||||
//Try to find an existing record with batch same batch number or id
|
//Try to find an existing record with batch same batch number or id
|
||||||
@ -497,7 +497,15 @@ class MouvementStock extends CommonObject
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_origin($fk_origin, $origintype) {
|
/**
|
||||||
|
* Return Url link of origin object
|
||||||
|
*
|
||||||
|
* @param int $fk_origin Id origin
|
||||||
|
* @param int $origintype Type origin
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function get_origin($fk_origin, $origintype)
|
||||||
|
{
|
||||||
switch ($origintype) {
|
switch ($origintype) {
|
||||||
case 'commande':
|
case 'commande':
|
||||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
@ -525,7 +533,10 @@ class MouvementStock extends CommonObject
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$origin->fetch($fk_origin);
|
if ($origin->fetch($fk_origin) > 0) {
|
||||||
return $origin->getNomUrl(1);
|
return $origin->getNomUrl(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2413,7 +2413,7 @@ class Societe extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Verify duplicate entries
|
//Verify duplicate entries
|
||||||
$sql = "SELECT COUNT(*) as idprof FROM ".MAIN_DB_PREFIX."societe WHERE ".$field." = '".$value."'";
|
$sql = "SELECT COUNT(*) as idprof FROM ".MAIN_DB_PREFIX."societe WHERE ".$field." = '".$value."' AND entity IN (".getEntity('societe',1).")";
|
||||||
if($socid) $sql .= " AND rowid <> ".$socid;
|
if($socid) $sql .= " AND rowid <> ".$socid;
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user