Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
f9aec93d73
@ -32,6 +32,7 @@
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -209,6 +209,7 @@ if ($resql)
|
||||
$moreforfilter='';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_MEMBER,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
|
||||
@ -299,6 +299,7 @@ if ($resql)
|
||||
$moreforfilter='';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
|
||||
@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
|
||||
$langs->load("products");
|
||||
$langs->load("categories");
|
||||
|
||||
@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("categories");
|
||||
|
||||
@ -275,6 +275,7 @@ if ($result)
|
||||
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
|
||||
@ -28,6 +28,8 @@ require_once DOL_DOCUMENT_ROOT .'/core/db/DoliDB.class.php';
|
||||
|
||||
/**
|
||||
* Class to manage Dolibarr database access for a MySQL database using the mysql extension
|
||||
*
|
||||
* @deprecated Use DoliDBMysqli
|
||||
*/
|
||||
class DoliDBMysql extends DoliDB
|
||||
{
|
||||
|
||||
@ -84,6 +84,7 @@ function societe_prepare_head(Societe $object)
|
||||
//show categorie tab
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$type = Categorie::TYPE_CUSTOMER;
|
||||
if ($object->fournisseur) $type = Categorie::TYPE_SUPPLIER;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/categories/categorie.php?socid='.$object->id."&type=".$type;
|
||||
|
||||
@ -89,6 +89,7 @@ function contact_prepare_head(Contact $object)
|
||||
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$type = Categorie::TYPE_CONTACT;
|
||||
$head[$tab][0] = DOL_URL_ROOT.'/categories/categorie.php?id='.$object->id."&type=".$type;
|
||||
$head[$tab][1] = $langs->trans('Categories');
|
||||
|
||||
@ -789,14 +789,15 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p
|
||||
|
||||
if ($displaytab > $limittoshow)
|
||||
{
|
||||
$out.='<div id="moretabs" class="inline-block tabsElem">';
|
||||
$tabsname=str_replace ("@", "", $picto);
|
||||
$out.='<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
|
||||
$out.='<a href="" data-role="button" style="background-color: #f0f0f0;" class="tab inline-block">'.$langs->trans("More").'...</a>';
|
||||
$out.='<div id="moretabsList" style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div>';
|
||||
$out.='<div id="moretabsList'.$tabsname.'" style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div>';
|
||||
$out.="</div>\n";
|
||||
|
||||
$out.="<script>";
|
||||
$out.="$('#moretabs').mouseenter( function() { $('#moretabsList').css('left','auto');});";
|
||||
$out.="$('#moretabs').mouseleave( function() { $('#moretabsList').css('left','-999em');});";
|
||||
$out.="$('#moretabs".$tabsname.").mouseenter( function() { $('#moretabsList".$tabsname.").css('left','auto');});";
|
||||
$out.="$('#moretabs".$tabsname.").mouseleave( function() { $('#moretabsList".$tabsname.").css('left','-999em');});";
|
||||
$out.="</script>";
|
||||
}
|
||||
|
||||
|
||||
@ -637,10 +637,21 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
//$date=dol_mktime(12, 0, 0, 1, 1, 1900);
|
||||
//$date=dol_stringtotime('20130101');
|
||||
|
||||
$hasglobalcounter=false;
|
||||
// Extract value for mask counter, mask raz and mask offset
|
||||
if (! preg_match('/\{(0+)([@\+][0-9\-\+\=]+)?([@\+][0-9\-\+\=]+)?\}/i',$mask,$reg)) return 'ErrorBadMask';
|
||||
$masktri=$reg[1].(! empty($reg[2])?$reg[2]:'').(! empty($reg[3])?$reg[3]:'');
|
||||
$maskcounter=$reg[1];
|
||||
if (preg_match('/\{(0+)([@\+][0-9\-\+\=]+)?([@\+][0-9\-\+\=]+)?\}/i',$mask,$reg))
|
||||
{
|
||||
$masktri=$reg[1].(! empty($reg[2])?$reg[2]:'').(! empty($reg[3])?$reg[3]:'');
|
||||
$maskcounter=$reg[1];
|
||||
$hasglobalcounter=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// setting some defaults so the rest of the code won't fail if there is a third party counter
|
||||
$masktri='00000';
|
||||
$maskcounter='00000';
|
||||
}
|
||||
|
||||
$maskraz=-1;
|
||||
$maskoffset=0;
|
||||
$resetEveryMonth=false;
|
||||
@ -659,6 +670,12 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
if (dol_strlen($maskrefclient_maskcounter) > 0 && dol_strlen($maskrefclient_maskcounter) < 3) return 'ErrorCounterMustHaveMoreThan3Digits';
|
||||
}
|
||||
else $maskrefclient='';
|
||||
|
||||
// fail if there is neither a global nor a third party counter
|
||||
if (! $hasglobalcounter && ($maskrefclient_maskcounter == ''))
|
||||
{
|
||||
return 'ErrorBadMask';
|
||||
}
|
||||
|
||||
// Extract value for third party type
|
||||
if (preg_match('/\{(t+)\}/i',$mask,$regType))
|
||||
@ -993,10 +1010,21 @@ function check_value($mask,$value)
|
||||
{
|
||||
$result=0;
|
||||
|
||||
$hasglobalcounter=false;
|
||||
// Extract value for mask counter, mask raz and mask offset
|
||||
if (! preg_match('/\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}/i',$mask,$reg)) return 'ErrorBadMask';
|
||||
$masktri=$reg[1].(isset($reg[2])?$reg[2]:'').(isset($reg[3])?$reg[3]:'');
|
||||
$maskcounter=$reg[1];
|
||||
if (preg_match('/\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}/i',$mask,$reg))
|
||||
{
|
||||
$masktri=$reg[1].(isset($reg[2])?$reg[2]:'').(isset($reg[3])?$reg[3]:'');
|
||||
$maskcounter=$reg[1];
|
||||
$hasglobalcounter=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// setting some defaults so the rest of the code won't fail if there is a third party counter
|
||||
$masktri='00000';
|
||||
$maskcounter='00000';
|
||||
}
|
||||
|
||||
$maskraz=-1;
|
||||
$maskoffset=0;
|
||||
if (dol_strlen($maskcounter) < 3) return 'ErrorCounterMustHaveMoreThan3Digits';
|
||||
@ -1015,6 +1043,12 @@ function check_value($mask,$value)
|
||||
}
|
||||
else $maskrefclient='';
|
||||
|
||||
// fail if there is neither a global nor a third party counter
|
||||
if (! $hasglobalcounter && ($maskrefclient_maskcounter == ''))
|
||||
{
|
||||
return 'ErrorBadMask';
|
||||
}
|
||||
|
||||
$maskwithonlyymcode=$mask;
|
||||
$maskwithonlyymcode=preg_replace('/\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}/i',$maskcounter,$maskwithonlyymcode);
|
||||
$maskwithonlyymcode=preg_replace('/\{dd\}/i','dd',$maskwithonlyymcode);
|
||||
|
||||
@ -71,6 +71,7 @@ function member_prepare_head(Adherent $object)
|
||||
// Show category tab
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$type = Categorie::TYPE_MEMBER;
|
||||
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type;
|
||||
$head[$h][1] = $langs->trans('Categories');
|
||||
|
||||
@ -61,6 +61,7 @@ function product_prepare_head($object)
|
||||
/* No more required. Replaced with new multiselect component
|
||||
if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$type = Categorie::TYPE_PRODUCT;
|
||||
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type;
|
||||
$head[$h][1] = $langs->trans('Categories');
|
||||
|
||||
@ -168,6 +168,7 @@ if ($resql)
|
||||
$moreforfilter='';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
|
||||
@ -328,8 +328,9 @@ if (! empty($force_install_message))
|
||||
$option.='>';
|
||||
$option.=$type.' ';
|
||||
if ($note) $option.=' '.$note;
|
||||
// Experimental
|
||||
if ($type=='mssql') $option.=' '.$langs->trans("Experimental");
|
||||
// Deprecated and experimental
|
||||
if ($type=='mysql') $option.=' ' . $langs->trans("Deprecated");
|
||||
elseif ($type=='mssql') $option.=' '.$langs->trans("Experimental");
|
||||
elseif ($type=='sqlite') $option.=' '.$langs->trans("Experimental");
|
||||
elseif ($type=='sqlite3') $option.=' '.$langs->trans("Experimental");
|
||||
// No available
|
||||
|
||||
@ -64,6 +64,7 @@ DatabaseSuperUserAccess=Database server - Superuser access
|
||||
CheckToCreateDatabase=Check box if database does not exist and must be created.<br>In this case, you must fill the login/password for superuser account at the bottom of this page.
|
||||
CheckToCreateUser=Check box if database owner does not exist and must be created.<br>In this case, you must choose its login and password and also fill the login/password for the superuser account at the bottom of this page. If this box is unchecked, owner database and its passwords must exists.
|
||||
Experimental=(experimental)
|
||||
Deprecated=(deprecated)
|
||||
DatabaseRootLoginDescription=Login of the user allowed to create new databases or new users, mandatory if your database or its owner does not already exists.
|
||||
KeepEmptyIfNoPassword=Leave empty if user has no password (avoid this)
|
||||
SaveConfigurationFile=Save values
|
||||
@ -211,4 +212,4 @@ MigrationCategorieAssociation=Migration of categories
|
||||
MigrationEvents=Migration of events to add event owner into assignement table
|
||||
|
||||
ShowNotAvailableOptions=Show not available options
|
||||
HideNotAvailableOptions=Hide not available options
|
||||
HideNotAvailableOptions=Hide not available options
|
||||
|
||||
@ -473,6 +473,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
print '<tr><td>'.$langs->trans("CategoryFilter").' </td>';
|
||||
print '<td class="maxwidthonsmartphone">'.$form->select_all_categories(Categorie::TYPE_PRODUCT, $parent).'</td></tr>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user