Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_bug3
This commit is contained in:
commit
8eb3f3bc06
@ -865,6 +865,7 @@ if ($mode == 'deploy')
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
if ($allowfromweb >= 0)
|
if ($allowfromweb >= 0)
|
||||||
{
|
{
|
||||||
@ -885,12 +886,20 @@ if ($mode == 'deploy')
|
|||||||
if ($allowfromweb == 1)
|
if ($allowfromweb == 1)
|
||||||
{
|
{
|
||||||
print $langs->trans("UnpackPackageInModulesRoot",$dirins).'<br>';
|
print $langs->trans("UnpackPackageInModulesRoot",$dirins).'<br>';
|
||||||
print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
|
||||||
print '<input type="hidden" name="action" value="install">';
|
print '<input type="hidden" name="action" value="install">';
|
||||||
print '<input type="hidden" name="mode" value="deploy">';
|
print '<input type="hidden" name="mode" value="deploy">';
|
||||||
print $langs->trans("YouCanSubmitFile").' <input type="file" name="fileinstall"> ';
|
print $langs->trans("YouCanSubmitFile").' <input type="file" name="fileinstall"> ';
|
||||||
print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">';
|
print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print '<div class="center"><div class="logo_setup"></div></div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -525,7 +525,7 @@ if ($resql)
|
|||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
||||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300');
|
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view prospects other than his'
|
// If the user can view prospects other than his'
|
||||||
@ -533,7 +533,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
||||||
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view products
|
// If the user can view products
|
||||||
|
|||||||
@ -803,7 +803,7 @@ if ($resql)
|
|||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
||||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300');
|
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view other users
|
// If the user can view other users
|
||||||
@ -811,7 +811,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
||||||
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view prospects other than his'
|
// If the user can view prospects other than his'
|
||||||
@ -821,7 +821,7 @@ if ($resql)
|
|||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
|
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
|
|||||||
@ -3426,7 +3426,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print $object->situation_counter;
|
print $object->situation_counter;
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right" class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
|
|
||||||
$prevsits_total_amount = 0;
|
$prevsits_total_amount = 0;
|
||||||
foreach ($prevsits as $situation) {
|
foreach ($prevsits as $situation) {
|
||||||
@ -3434,9 +3434,9 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
$prevsits_total_amount += $object->total_ht;
|
$prevsits_total_amount += $object->total_ht;
|
||||||
|
|
||||||
print price($prevsits_total_amount);
|
print price($prevsits_total_amount, 0, $langs, 1, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) );
|
||||||
print '</td>';
|
|
||||||
print '<td>' . $langs->trans('Currency' . $conf->currency) . '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Previous situation(s) deduction(s)
|
// Previous situation(s) deduction(s)
|
||||||
for ($i = 0; $i < $cprevsits; $i++) {
|
for ($i = 0; $i < $cprevsits; $i++) {
|
||||||
@ -3447,10 +3447,9 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print $prevsits[$i]->situation_counter;
|
print $prevsits[$i]->situation_counter;
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
|
|
||||||
print '<td align="right" class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print '- ' . price($prevsits[$i]->total_ht);
|
print '- ' . price($prevsits[$i]->total_ht, 0, $langs, 1, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) );
|
||||||
print '</td>';
|
print '</td></tr>';
|
||||||
print '<td>' . $langs->trans('Currency' . $conf->currency) . '</td></tr>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -191,7 +191,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
|
|
||||||
// Do we click on purge search criteria ?
|
// Do we click on purge search criteria ?
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter") || GETPOST("button_removefilter.x")) // Both test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter") || GETPOST("button_removefilter.x")) // All tests are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search_user='';
|
$search_user='';
|
||||||
$search_sale='';
|
$search_sale='';
|
||||||
@ -717,7 +717,7 @@ if ($resql)
|
|||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
||||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300');
|
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view prospects other than his'
|
// If the user can view prospects other than his'
|
||||||
@ -725,7 +725,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
||||||
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view prospects other than his'
|
// If the user can view prospects other than his'
|
||||||
@ -735,7 +735,7 @@ if ($resql)
|
|||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
|
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
|
|||||||
@ -358,7 +358,7 @@ if ($resql)
|
|||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
||||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user,0,1,'maxwidth300');
|
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user,0,1,'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view other users
|
// If the user can view other users
|
||||||
@ -366,7 +366,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
||||||
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view categories of products
|
// If the user can view categories of products
|
||||||
@ -376,7 +376,7 @@ if ($resql)
|
|||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
|
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -309,10 +309,11 @@ class FormOther
|
|||||||
* @param string $htmlname Name of combo list
|
* @param string $htmlname Name of combo list
|
||||||
* @param int $nocateg Show also an entry "Not categorized"
|
* @param int $nocateg Show also an entry "Not categorized"
|
||||||
* @param int $showempty Add also an empty line
|
* @param int $showempty Add also an empty line
|
||||||
* @return string Html combo list code
|
* @param string $morecss More CSS
|
||||||
|
* @return string Html combo list code
|
||||||
* @see select_all_categories
|
* @see select_all_categories
|
||||||
*/
|
*/
|
||||||
function select_categories($type,$selected=0,$htmlname='search_categ',$nocateg=0,$showempty=1)
|
function select_categories($type, $selected=0, $htmlname='search_categ', $nocateg=0, $showempty=1, $morecss='')
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
@ -328,18 +329,16 @@ class FormOther
|
|||||||
$tab_categs = $static_categs->get_full_arbo($type);
|
$tab_categs = $static_categs->get_full_arbo($type);
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
$nodatarole = '';
|
|
||||||
// Enhance with select2
|
// Enhance with select2
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||||
$comboenhancement = ajax_combobox('select_categ_'.$htmlname);
|
$comboenhancement = ajax_combobox('select_categ_'.$htmlname);
|
||||||
$moreforfilter.=$comboenhancement;
|
$moreforfilter.=$comboenhancement;
|
||||||
$nodatarole=($comboenhancement?' data-role="none"':'');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print a select with each of them
|
// Print a select with each of them
|
||||||
$moreforfilter.='<select class="flat minwidth100" id="select_categ_'.$htmlname.'" name="'.$htmlname.'"'.$nodatarole.'>';
|
$moreforfilter.='<select class="flat minwidth100'.($morecss?' '.$morecss:'').'" id="select_categ_'.$htmlname.'" name="'.$htmlname.'">';
|
||||||
if ($showempty) $moreforfilter.='<option value="0"> </option>'; // Should use -1 to say nothing
|
if ($showempty) $moreforfilter.='<option value="0"> </option>'; // Should use -1 to say nothing
|
||||||
|
|
||||||
if (is_array($tab_categs))
|
if (is_array($tab_categs))
|
||||||
@ -379,7 +378,6 @@ class FormOther
|
|||||||
$langs->load('users');
|
$langs->load('users');
|
||||||
|
|
||||||
$out = '';
|
$out = '';
|
||||||
$nodatarole = '';
|
|
||||||
// Enhance with select2
|
// Enhance with select2
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
@ -389,11 +387,10 @@ class FormOther
|
|||||||
if ($comboenhancement)
|
if ($comboenhancement)
|
||||||
{
|
{
|
||||||
$out.=$comboenhancement;
|
$out.=$comboenhancement;
|
||||||
$nodatarole=($comboenhancement?' data-role="none"':'');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Select each sales and print them in a select input
|
// Select each sales and print them in a select input
|
||||||
$out.='<select class="flat'.($morecss?' '.$morecss:'').'" id="'.$htmlname.'" name="'.$htmlname.'"'.$nodatarole.'>';
|
$out.='<select class="flat'.($morecss?' '.$morecss:'').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||||
if ($showempty) $out.='<option value="0"> </option>';
|
if ($showempty) $out.='<option value="0"> </option>';
|
||||||
|
|
||||||
// Get list of users allowed to be viewed
|
// Get list of users allowed to be viewed
|
||||||
|
|||||||
@ -39,8 +39,11 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
|||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$langs->load("agenda");
|
$langs->load("agenda");
|
||||||
|
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
|
|
||||||
|
|||||||
@ -47,6 +47,8 @@ if (! defined('DISABLE_SELECT2')) define('DISABLE_SELECT2',1);
|
|||||||
|
|
||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
|
|
||||||
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
|
|||||||
@ -411,6 +411,9 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
|
|||||||
case 'intcomma':
|
case 'intcomma':
|
||||||
if (preg_match('/[^0-9,]+/i',$out)) $out='';
|
if (preg_match('/[^0-9,]+/i',$out)) $out='';
|
||||||
break;
|
break;
|
||||||
|
case 'intcomma':
|
||||||
|
if (preg_match('/[^0-9,]+/i',$out)) $out='';
|
||||||
|
break;
|
||||||
case 'alpha':
|
case 'alpha':
|
||||||
$out=trim($out);
|
$out=trim($out);
|
||||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||||
@ -755,7 +758,7 @@ function dol_string_unaccent($str)
|
|||||||
*/
|
*/
|
||||||
function dol_string_nospecial($str,$newstr='_',$badcharstoreplace='')
|
function dol_string_nospecial($str,$newstr='_',$badcharstoreplace='')
|
||||||
{
|
{
|
||||||
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
$forbidden_chars_to_replace=array(" ", "'", "/", "\\", ":", "*", "?", "\"", "<", ">", "|", "[", "]", ",", ";", "=");
|
||||||
$forbidden_chars_to_remove=array();
|
$forbidden_chars_to_remove=array();
|
||||||
if (is_array($badcharstoreplace)) $forbidden_chars_to_replace=$badcharstoreplace;
|
if (is_array($badcharstoreplace)) $forbidden_chars_to_replace=$badcharstoreplace;
|
||||||
//$forbidden_chars_to_remove=array("(",")");
|
//$forbidden_chars_to_remove=array("(",")");
|
||||||
|
|||||||
@ -166,8 +166,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
-- Accountancy - Supplier invoice
|
-- Accountancy - Supplier invoice
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1600__+MAX_llx_menu__, 'accountancy', 'supplier_bills', 6__+MAX_llx_menu__, '/fourn/facture/list.php?leftmenu=suppliers_bills', 'BillsSuppliers', 0, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1600__+MAX_llx_menu__, 'accountancy', 'supplier_bills', 6__+MAX_llx_menu__, '/fourn/facture/list.php?leftmenu=suppliers_bills', 'BillsSuppliers', 0, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 3, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1601__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/card.php?action=create&leftmenu=suppliers_bills', 'NewBill', 1, 'bills', '$user->rights->fournisseur->facture->creer', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1601__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/card.php?action=create&leftmenu=suppliers_bills', 'NewBill', 1, 'bills', '$user->rights->fournisseur->facture->creer', '', 2, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1602__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/impayees.php?leftmenu=suppliers_bills', 'Unpaid', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 1, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1602__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/list.php?leftmenu=suppliers_bills', 'List', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 1, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1603__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/paiement.php?leftmenu=suppliers_bills', 'Payments', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 2, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1603__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/paiement.php?leftmenu=suppliers_bills', 'Payments', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 2, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1605__+MAX_llx_menu__, 'accountancy', '', 1603__+MAX_llx_menu__, '/fourn/facture/rapport.php?leftmenu=suppliers_bills', 'Reporting', 2, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 1, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1604__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier', 'Statistics', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 8, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1604__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier', 'Statistics', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 8, __ENTITY__);
|
||||||
-- Accountancy - Customer invoice
|
-- Accountancy - Customer invoice
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1700__+MAX_llx_menu__, 'accountancy', 'customer_bills', 6__+MAX_llx_menu__, '/compta/facture/list.php?leftmenu=customers_bills', 'BillsCustomers', 0, 'bills', '$user->rights->facture->lire', '', 2, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1700__+MAX_llx_menu__, 'accountancy', 'customer_bills', 6__+MAX_llx_menu__, '/compta/facture/list.php?leftmenu=customers_bills', 'BillsCustomers', 0, 'bills', '$user->rights->facture->lire', '', 2, 3, __ENTITY__);
|
||||||
@ -275,9 +276,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2603__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/bankentries.php?leftmenu=bank', 'ListTransactions', 1, 'banks', '$user->rights->banque->lire', '', 0, 2, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2603__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/bankentries.php?leftmenu=bank', 'ListTransactions', 1, 'banks', '$user->rights->banque->lire', '', 0, 2, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2604__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/budget.php?leftmenu=bank', 'ListTransactionsByCategory', 1, 'banks', '$user->rights->banque->lire', '', 0, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2604__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/budget.php?leftmenu=bank', 'ListTransactionsByCategory', 1, 'banks', '$user->rights->banque->lire', '', 0, 3, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2606__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/transfer.php?leftmenu=bank', 'BankTransfers', 1, 'banks', '$user->rights->banque->transfer', '', 0, 5, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2606__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/transfer.php?leftmenu=bank', 'BankTransfers', 1, 'banks', '$user->rights->banque->transfer', '', 0, 5, __ENTITY__);
|
||||||
-- Account - Categories
|
-- Bank - Categories
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 2650__+MAX_llx_menu__, 'accountancy', 'cat', 14__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=5', 'Categories', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 2650__+MAX_llx_menu__, 'accountancy', 'cat', 14__+MAX_llx_menu__, '/categories/index.php?leftmenu=bank&type=5', 'Categories', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 2651__+MAX_llx_menu__, 'accountancy', '', 2650__+MAX_llx_menu__, '/categories/card.php?action=create&type=5', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 2651__+MAX_llx_menu__, 'accountancy', '', 2650__+MAX_llx_menu__, '/categories/card.php?leftmenu=bank&action=create&type=5', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__);
|
||||||
-- Project
|
-- Project
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3600__+MAX_llx_menu__, 'project', 'projects', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects', 'Projects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3600__+MAX_llx_menu__, 'project', 'projects', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects', 'Projects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3601__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/card.php?leftmenu=projects&action=create', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3601__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/card.php?leftmenu=projects&action=create', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||||
|
|||||||
@ -300,6 +300,8 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
// We update newmenu for special dynamic menus
|
// We update newmenu for special dynamic menus
|
||||||
if ($conf->banque->enabled && $user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account
|
if ($conf->banque->enabled && $user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account
|
||||||
{
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Required for to get Account::TYPE_CASH for example
|
||||||
|
|
||||||
$sql = "SELECT rowid, label, courant, rappro, courant";
|
$sql = "SELECT rowid, label, courant, rappro, courant";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||||
$sql.= " WHERE entity = ".$conf->entity;
|
$sql.= " WHERE entity = ".$conf->entity;
|
||||||
@ -470,10 +472,12 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
// Menu level > 0
|
// Menu level > 0
|
||||||
if ($menu_array[$i]['level'] > 0)
|
if ($menu_array[$i]['level'] > 0)
|
||||||
{
|
{
|
||||||
|
$cssmenu = '';
|
||||||
|
if ($menu_array[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$menu_array[$i]['url']));
|
||||||
|
|
||||||
if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled.
|
if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled.
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring;
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring;
|
||||||
//print $lastlevel0;
|
|
||||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||||
else print '<span class="vsmenu">';
|
else print '<span class="vsmenu">';
|
||||||
print $menu_array[$i]['titre'];
|
print $menu_array[$i]['titre'];
|
||||||
@ -485,7 +489,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
}
|
}
|
||||||
else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled.
|
else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled.
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -811,7 +811,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2",$langs->trans("BillShortStatusPaid"),2,$user->rights->facture->lire);
|
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2",$langs->trans("BillShortStatusPaid"),2,$user->rights->facture->lire);
|
||||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3",$langs->trans("BillShortStatusCanceled"),2,$user->rights->facture->lire);
|
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3",$langs->trans("BillShortStatusCanceled"),2,$user->rights->facture->lire);
|
||||||
}
|
}
|
||||||
$newmenu->add("/compta/facture/fiche-rec.php",$langs->trans("ListOfTemplates"),1,$user->rights->facture->lire);
|
$newmenu->add("/compta/facture/fiche-rec.php",$langs->trans("ListOfTemplates"),1,$user->rights->facture->creer); // No need to see recurring invoices, if user has no permission to create invoice.
|
||||||
|
|
||||||
$newmenu->add("/compta/paiement/list.php",$langs->trans("Payments"),1,$user->rights->facture->lire);
|
$newmenu->add("/compta/paiement/list.php",$langs->trans("Payments"),1,$user->rights->facture->lire);
|
||||||
|
|
||||||
@ -1651,10 +1651,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
// Menu level > 0
|
// Menu level > 0
|
||||||
if ($menu_array[$i]['level'] > 0)
|
if ($menu_array[$i]['level'] > 0)
|
||||||
{
|
{
|
||||||
|
$cssmenu = '';
|
||||||
|
if ($menu_array[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$menu_array[$i]['url']));
|
||||||
|
|
||||||
if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled.
|
if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled.
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring;
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring;
|
||||||
//print $lastlevel0;
|
|
||||||
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
if ($menu_array[$i]['url']) print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>';
|
||||||
else print '<span class="vsmenu">';
|
else print '<span class="vsmenu">';
|
||||||
print $menu_array[$i]['titre'];
|
print $menu_array[$i]['titre'];
|
||||||
@ -1666,7 +1668,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
}
|
}
|
||||||
else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled.
|
else if ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled.
|
||||||
{
|
{
|
||||||
print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -201,8 +201,12 @@ class MenuManager
|
|||||||
print '<div class="menu_top"></div>'."\n";
|
print '<div class="menu_top"></div>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->menu->liste[$i]['level'] > 0) {
|
if ($this->menu->liste[$i]['level'] > 0)
|
||||||
print '<div class="menu_contenu">';
|
{
|
||||||
|
$cssmenu = '';
|
||||||
|
if ($this->menu->liste[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/','',$this->menu->liste[$i]['url']));
|
||||||
|
|
||||||
|
print '<div class="menu_contenu'.$cssmenu.'">';
|
||||||
|
|
||||||
if ($this->menu->liste[$i]['enabled'])
|
if ($this->menu->liste[$i]['enabled'])
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,7 +35,10 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
|||||||
|
|
||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
|
|
||||||
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
|
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
|
|
||||||
|
|||||||
@ -362,7 +362,7 @@ if ($resql)
|
|||||||
if ($user->rights->expensereport->readall || $user->rights->expensereport->lire_tous)
|
if ($user->rights->expensereport->readall || $user->rights->expensereport->lire_tous)
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre maxwidthonspartphone" align="left">';
|
print '<td class="liste_titre maxwidthonspartphone" align="left">';
|
||||||
print $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
print $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
|
|||||||
@ -2634,19 +2634,29 @@ elseif (! empty($object->id))
|
|||||||
// Create bill
|
// Create bill
|
||||||
if (! empty($conf->facture->enabled))
|
if (! empty($conf->facture->enabled))
|
||||||
{
|
{
|
||||||
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->billed != 1)) // 2 means accepted
|
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) // statut 2 means approved, 7 means canceled
|
||||||
{
|
{
|
||||||
if ($user->rights->fournisseur->facture->creer)
|
if ($user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && !empty($object->linkedObjectsIds['invoice_supplier']))
|
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Classify billed manually (need one invoice if module invoice is on, no condition on invoice if not)
|
||||||
|
if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && $object->statut != 7 && $object->billed != 1) // statut 2 means approved
|
||||||
|
{
|
||||||
|
if (empty($conf->facture->enabled))
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||||
|
}
|
||||||
|
else if (!empty($object->linkedObjectsIds['invoice_supplier']))
|
||||||
|
{
|
||||||
|
if ($user->rights->fournisseur->facture->creer)
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a remote order using WebService only if module is activated
|
// Create a remote order using WebService only if module is activated
|
||||||
|
|||||||
@ -537,12 +537,11 @@ if ($billed != '' && $billed >= 0) $sql .= " AND cf.billed = ".$billed;
|
|||||||
//Required triple check because statut=0 means draft filter
|
//Required triple check because statut=0 means draft filter
|
||||||
if (GETPOST('statut', 'alpha') !== '')
|
if (GETPOST('statut', 'alpha') !== '')
|
||||||
{
|
{
|
||||||
$sql .= " AND cf.fk_statut IN (".GETPOST('statut', 'alpha').")";
|
$sql .= " AND cf.fk_statut IN (".$db->escape(GETPOST('statut', 'alpha')).")";
|
||||||
}
|
}
|
||||||
if ($search_status != '' && $search_status >= 0)
|
if ($search_status != '' && $search_status >= 0)
|
||||||
{
|
{
|
||||||
if (strstr($search_status, ',')) $sql.=" AND cf.fk_statut IN (".$db->escape($search_status).")";
|
$sql.=" AND cf.fk_statut IN (".$db->escape($search_status).")";
|
||||||
else $sql.=" AND cf.fk_statut = ".$search_status;
|
|
||||||
}
|
}
|
||||||
if ($ordermonth > 0)
|
if ($ordermonth > 0)
|
||||||
{
|
{
|
||||||
@ -573,11 +572,11 @@ else if ($deliveryyear > 0)
|
|||||||
if ($search_town) $sql.= natural_search('s.town', $search_town);
|
if ($search_town) $sql.= natural_search('s.town', $search_town);
|
||||||
if ($search_zip) $sql.= natural_search("s.zip",$search_zip);
|
if ($search_zip) $sql.= natural_search("s.zip",$search_zip);
|
||||||
if ($search_state) $sql.= natural_search("state.nom",$search_state);
|
if ($search_state) $sql.= natural_search("state.nom",$search_state);
|
||||||
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
|
if ($search_country) $sql .= " AND s.fk_pays IN (".$db->escape($search_country).')';
|
||||||
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
|
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search_type_thirdparty).')';
|
||||||
if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
||||||
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale;
|
if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$db->escape($search_sale);
|
||||||
if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='supplier_order' AND tc.source='internal' AND ec.element_id = cf.rowid AND ec.fk_socpeople = ".$search_user;
|
if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='supplier_order' AND tc.source='internal' AND ec.element_id = cf.rowid AND ec.fk_socpeople = ".$db->escape($search_user);
|
||||||
if ($search_total_ht != '') $sql.= natural_search('cf.total_ht', $search_total_ht, 1);
|
if ($search_total_ht != '') $sql.= natural_search('cf.total_ht', $search_total_ht, 1);
|
||||||
if ($search_total_vat != '') $sql.= natural_search('cf.tva', $search_total_vat, 1);
|
if ($search_total_vat != '') $sql.= natural_search('cf.tva', $search_total_vat, 1);
|
||||||
if ($search_total_ttc != '') $sql.= natural_search('cf.total_ttc', $search_total_ttc, 1);
|
if ($search_total_ttc != '') $sql.= natural_search('cf.total_ttc', $search_total_ttc, 1);
|
||||||
@ -833,7 +832,7 @@ if ($resql)
|
|||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
||||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300');
|
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view other users
|
// If the user can view other users
|
||||||
@ -841,7 +840,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
||||||
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view prospects other than his'
|
// If the user can view prospects other than his'
|
||||||
@ -851,7 +850,7 @@ if ($resql)
|
|||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
|
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
|
|||||||
@ -635,7 +635,7 @@ if ($resql)
|
|||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
||||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300');
|
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view prospects other than his'
|
// If the user can view prospects other than his'
|
||||||
@ -643,7 +643,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
||||||
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
// If the user can view prospects other than his'
|
// If the user can view prospects other than his'
|
||||||
@ -653,7 +653,7 @@ if ($resql)
|
|||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
|
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
|
|||||||
@ -310,14 +310,14 @@ print '</td>';
|
|||||||
if ($user->rights->holiday->write_all)
|
if ($user->rights->holiday->write_all)
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
||||||
print $form->select_dolusers($search_employe,"search_employe",1,"",0,'','',0,32,0,'',0,'','maxwidth200');
|
print $form->select_dolusers($search_employe,"search_employe",1,"",0,'','',0,0,0,'',0,'','maxwidth200');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//print '<td class="liste_titre"> </td>';
|
//print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
||||||
print $form->select_dolusers($user->id,"search_employe",1,"",1,'','',0,32,0,'',0,'','maxwidth200');
|
print $form->select_dolusers($user->id,"search_employe",1,"",1,'','',0,0,0,'',0,'','maxwidth200');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,7 +331,7 @@ if($user->rights->holiday->write_all)
|
|||||||
$valideurobjects = $validator->listUsersForGroup($excludefilter);
|
$valideurobjects = $validator->listUsersForGroup($excludefilter);
|
||||||
$valideurarray = array();
|
$valideurarray = array();
|
||||||
foreach($valideurobjects as $val) $valideurarray[$val->id]=$val->id;
|
foreach($valideurobjects as $val) $valideurarray[$val->id]=$val->id;
|
||||||
print $form->select_dolusers($search_valideur,"search_valideur",1,"",0,$valideurarray,'', 0, 32,0,'',0,'','maxwidth200');
|
print $form->select_dolusers($search_valideur,"search_valideur",1,"",0,$valideurarray,'', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -265,7 +265,7 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP 5.
|
|||||||
|
|
||||||
// Defini objet langs
|
// Defini objet langs
|
||||||
$langs = new Translate('..',$conf);
|
$langs = new Translate('..',$conf);
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang'));
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09'));
|
||||||
else $langs->setDefaultLang('auto');
|
else $langs->setDefaultLang('auto');
|
||||||
|
|
||||||
$bc[false]=' class="bg1"';
|
$bc[false]=' class="bg1"';
|
||||||
|
|||||||
@ -11,7 +11,14 @@ ModuleBuilderDescobjects=Define here the new objects you want to manage with you
|
|||||||
ModuleBuilderDescmenus=This tab is dedicated to define menu entries provided by your module.
|
ModuleBuilderDescmenus=This tab is dedicated to define menu entries provided by your module.
|
||||||
ModuleBuilderDescpermissions=This tab is dedicated to define the new permissions you want to provide with your module.
|
ModuleBuilderDescpermissions=This tab is dedicated to define the new permissions you want to provide with your module.
|
||||||
ModuleBuilderDesctriggers=This is the view of triggers provided by your module. To include code executed when a triggered business event is launched, just edit this file with your IDE.
|
ModuleBuilderDesctriggers=This is the view of triggers provided by your module. To include code executed when a triggered business event is launched, just edit this file with your IDE.
|
||||||
|
ModuleBuilderDeschooks=This tab is dedicated to hooks.
|
||||||
|
ModuleBuilderDescwidgets=This tab is dedicated to manage/build widgets.
|
||||||
ModuleBuilderDescbuildpackage=You can generate here a "ready to distribute" package file (a normalized .zip file) of your module. Just click on button to get your module package file.
|
ModuleBuilderDescbuildpackage=You can generate here a "ready to distribute" package file (a normalized .zip file) of your module. Just click on button to get your module package file.
|
||||||
|
ModuleBuilderDescdangerzone=You can delete your module. WARNING: All files of module will be definetly lost !
|
||||||
|
DangerZone=Danger zone
|
||||||
BuildPackage=Build package
|
BuildPackage=Build package
|
||||||
ModuleIsNotActive=This module was not activated yet (go into Home-Setup-Module to make it live)
|
ModuleIsNotActive=This module was not activated yet (go into Home-Setup-Module to make it live)
|
||||||
ModuleIsLive=This module has been activated. Any change on it may break a current active feature.
|
ModuleIsLive=This module has been activated. Any change on it may break a current active feature.
|
||||||
|
DescriptionLong=Long description
|
||||||
|
EditorName=Name of editor
|
||||||
|
EditorUrl=URL of editor
|
||||||
@ -113,6 +113,19 @@ if ($dirins && $action == 'initmodule' && $modulename)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($dirins && $action == 'confirm_delete')
|
||||||
|
{
|
||||||
|
$modulelowercase=strtolower($module);
|
||||||
|
|
||||||
|
// Dir for module
|
||||||
|
$dir = $dirins.'/'.$modulelowercase;
|
||||||
|
|
||||||
|
dol_delete_dir_recursive($dir);
|
||||||
|
|
||||||
|
header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?module=initmodule');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
if ($dirins && $action == 'generatepackage')
|
if ($dirins && $action == 'generatepackage')
|
||||||
{
|
{
|
||||||
$modulelowercase=strtolower($module);
|
$modulelowercase=strtolower($module);
|
||||||
@ -373,16 +386,31 @@ elseif (! empty($module))
|
|||||||
$head2[$h][2] = 'permissions';
|
$head2[$h][2] = 'permissions';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=hooks&module='.$module;
|
||||||
|
$head2[$h][1] = $langs->trans("Hooks");
|
||||||
|
$head2[$h][2] = 'hooks';
|
||||||
|
$h++;
|
||||||
|
|
||||||
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=triggers&module='.$module;
|
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=triggers&module='.$module;
|
||||||
$head2[$h][1] = $langs->trans("Triggers");
|
$head2[$h][1] = $langs->trans("Triggers");
|
||||||
$head2[$h][2] = 'triggers';
|
$head2[$h][2] = 'triggers';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=widgets&module='.$module;
|
||||||
|
$head2[$h][1] = $langs->trans("Widgets");
|
||||||
|
$head2[$h][2] = 'widgets';
|
||||||
|
$h++;
|
||||||
|
|
||||||
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=buildpackage&module='.$module;
|
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=buildpackage&module='.$module;
|
||||||
$head2[$h][1] = $langs->trans("BuildPackage");
|
$head2[$h][1] = $langs->trans("BuildPackage");
|
||||||
$head2[$h][2] = 'buildpackage';
|
$head2[$h][2] = 'buildpackage';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=dangerzone&module='.$module;
|
||||||
|
$head2[$h][1] = $langs->trans("DangerZone");
|
||||||
|
$head2[$h][2] = 'dangerzone';
|
||||||
|
$h++;
|
||||||
|
|
||||||
print $modulestatusinfo.'<br><br>';
|
print $modulestatusinfo.'<br><br>';
|
||||||
|
|
||||||
dol_fiche_head($head2, $tab, '', -1, '');
|
dol_fiche_head($head2, $tab, '', -1, '');
|
||||||
@ -421,7 +449,7 @@ elseif (! empty($module))
|
|||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans("Family");
|
print $langs->trans("Family");
|
||||||
print "<br>'crm','financial','hr','projects','products','ecm','technic','interface','other'";
|
//print "<br>'crm','financial','hr','projects','products','ecm','technic','interface','other'";
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $moduleobj->family;
|
print $moduleobj->family;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -445,7 +473,7 @@ elseif (! empty($module))
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans("LongDescription");
|
print $langs->trans("DescriptionLong");
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $moduleobj->getDescLong();
|
print $moduleobj->getDescLong();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -453,14 +481,6 @@ elseif (! empty($module))
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '<br><br>';
|
|
||||||
print '<form name="delete">';
|
|
||||||
print '<input type="hidden" name="action" value="confirm_delete">';
|
|
||||||
print '<input type="hidden" name="tab" value="'.dol_escape_htmltag($tab).'">';
|
|
||||||
print '<input type="hidden" name="module" value="'.dol_escape_htmltag($module).'">';
|
|
||||||
print '<input type="submit" class="buttonDelete" value="'.$langs->trans("Delete").'"'.($dirins?'':' disabled="disabled"').'>';
|
|
||||||
print '</form>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($tab == 'objects')
|
if ($tab == 'objects')
|
||||||
@ -483,6 +503,12 @@ elseif (! empty($module))
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($tab == 'hooks')
|
||||||
|
{
|
||||||
|
print $langs->trans("FeatureNotYetAvailable");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if ($tab == 'triggers')
|
if ($tab == 'triggers')
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
|
||||||
@ -520,6 +546,12 @@ elseif (! empty($module))
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($tab == 'widget')
|
||||||
|
{
|
||||||
|
print $langs->trans("FeatureNotYetAvailable");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if ($tab == 'buildpackage')
|
if ($tab == 'buildpackage')
|
||||||
{
|
{
|
||||||
if (! class_exists('ZipArchive') && ! defined('ODTPHP_PATHTOPCLZIP'))
|
if (! class_exists('ZipArchive') && ! defined('ODTPHP_PATHTOPCLZIP'))
|
||||||
@ -536,6 +568,16 @@ elseif (! empty($module))
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($tab == 'dangerzone')
|
||||||
|
{
|
||||||
|
print '<form name="delete">';
|
||||||
|
print '<input type="hidden" name="action" value="confirm_delete">';
|
||||||
|
print '<input type="hidden" name="tab" value="'.dol_escape_htmltag($tab).'">';
|
||||||
|
print '<input type="hidden" name="module" value="'.dol_escape_htmltag($module).'">';
|
||||||
|
print '<input type="submit" class="buttonDelete" value="'.$langs->trans("Delete").'"'.($dirins?'':' disabled="disabled"').'>';
|
||||||
|
print '</form>';
|
||||||
|
}
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,4 +3,4 @@
|
|||||||
## Features
|
## Features
|
||||||
MyModuleDescription
|
MyModuleDescription
|
||||||
|
|
||||||
Other modules are available on <a href="https://www.dolistore.com target="_new">Dolistore.com</a>.
|
Other modules are available on <a href="https://www.dolistore.com" target="_new">Dolistore.com</a>.
|
||||||
|
|||||||
@ -20,8 +20,6 @@
|
|||||||
* \file htdocs/modulebuilder/template/admin/about.php
|
* \file htdocs/modulebuilder/template/admin/about.php
|
||||||
* \ingroup mymodule
|
* \ingroup mymodule
|
||||||
* \brief About page of module MyModule.
|
* \brief About page of module MyModule.
|
||||||
*
|
|
||||||
* MyModuleDescription.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Load Dolibarr environment
|
// Load Dolibarr environment
|
||||||
@ -84,8 +82,8 @@ echo $langs->trans("MyModuleAboutPage");
|
|||||||
|
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
|
|
||||||
require_once '../core/modulebuilder/mymodule/core/modules/modMyModule.class.php';
|
dol_include_once('/mymodule/core/modules/modMyModule.class.php');
|
||||||
$tmpmodule = new MyModule($db);
|
$tmpmodule = new modMyModule($db);
|
||||||
print $tmpmodule->getDescLong();
|
print $tmpmodule->getDescLong();
|
||||||
|
|
||||||
// Page end
|
// Page end
|
||||||
|
|||||||
@ -19,9 +19,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/modulebuilder/template/admin/setup.php
|
* \file htdocs/modulebuilder/template/admin/setup.php
|
||||||
* \ingroup mymodule
|
* \ingroup mymodule
|
||||||
* \brief Example module setup page.
|
* \brief MyModule setup page.
|
||||||
*
|
|
||||||
* Put detailed description here.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Load Dolibarr environment
|
// Load Dolibarr environment
|
||||||
|
|||||||
@ -56,6 +56,8 @@ class ActionsMyModule
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
public function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 360 B |
@ -705,9 +705,9 @@ else
|
|||||||
$product_static->status = $obj->tosell;
|
$product_static->status = $obj->tosell;
|
||||||
$product_static->entity = $obj->entity;
|
$product_static->entity = $obj->entity;
|
||||||
|
|
||||||
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $search_type != 1) // To optimize call of load_stock
|
if ((! empty($conf->stock->enabled) && $user->rights->stock->lire && $search_type != 1) || ! empty($conf->global->STOCK_DISABLE_OPTIM_LOAD)) // To optimize call of load_stock
|
||||||
{
|
{
|
||||||
if ($obj->fk_product_type != 1) // Not a service
|
if ($obj->fk_product_type != 1 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) // Not a service
|
||||||
{
|
{
|
||||||
$product_static->load_stock('nobatch'); // Load stock_reel + stock_warehouse. This also call load_virtual_stock()
|
$product_static->load_stock('nobatch'); // Load stock_reel + stock_warehouse. This also call load_virtual_stock()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1332,7 +1332,9 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
print '<div class="divlogofpreviouscustomerprice">';
|
||||||
|
|
||||||
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
if (! $num)
|
if (! $num)
|
||||||
{
|
{
|
||||||
@ -1475,6 +1477,8 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
print "<br>";
|
print "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -444,7 +444,7 @@ if (! empty($conf->categorie->enabled))
|
|||||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('ProjectCategories'). ': ';
|
$moreforfilter.=$langs->trans('ProjectCategories'). ': ';
|
||||||
$moreforfilter.=$formother->select_categories('project',$search_categ,'search_categ',1);
|
$moreforfilter.=$formother->select_categories('project', $search_categ, 'search_categ', 1, 1, 'maxwidth300');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -453,7 +453,7 @@ $moreforfilter.='<div class="divsearchfield">';
|
|||||||
$moreforfilter.=$langs->trans('ProjectsWithThisUserAsContact'). ': ';
|
$moreforfilter.=$langs->trans('ProjectsWithThisUserAsContact'). ': ';
|
||||||
$includeonly='';
|
$includeonly='';
|
||||||
if (empty($user->rights->user->user->lire)) $includeonly=array($user->id);
|
if (empty($user->rights->user->user->lire)) $includeonly=array($user->id);
|
||||||
$moreforfilter.=$form->select_dolusers($search_project_user?$search_project_user:'', 'search_project_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
$moreforfilter.=$form->select_dolusers($search_project_user?$search_project_user:'', 'search_project_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
|
|
||||||
// If the user can view thirdparties other than his'
|
// If the user can view thirdparties other than his'
|
||||||
@ -462,7 +462,7 @@ if ($user->rights->societe->client->voir || $socid)
|
|||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
||||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300');
|
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -442,7 +442,7 @@ if (! empty($conf->categorie->enabled))
|
|||||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('ProjectCategories'). ': ';
|
$moreforfilter.=$langs->trans('ProjectCategories'). ': ';
|
||||||
$moreforfilter.=$formother->select_categories('project',$search_categ,'search_categ',1);
|
$moreforfilter.=$formother->select_categories('project', $search_categ, 'search_categ', 1, 'maxwidth300');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -451,7 +451,7 @@ $moreforfilter.='<div class="divsearchfield">';
|
|||||||
$moreforfilter.=$langs->trans('ProjectsWithThisUserAsContact'). ' ';
|
$moreforfilter.=$langs->trans('ProjectsWithThisUserAsContact'). ' ';
|
||||||
$includeonly='';
|
$includeonly='';
|
||||||
if (empty($user->rights->user->user->lire)) $includeonly=array($user->id);
|
if (empty($user->rights->user->user->lire)) $includeonly=array($user->id);
|
||||||
$moreforfilter.=$form->select_dolusers($search_project_user?$search_project_user:'', 'search_project_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
$moreforfilter.=$form->select_dolusers($search_project_user?$search_project_user:'', 'search_project_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
|
|
||||||
// If the user can view users
|
// If the user can view users
|
||||||
@ -459,7 +459,7 @@ $moreforfilter.='<div class="divsearchfield">';
|
|||||||
$moreforfilter.=$langs->trans('TasksWithThisUserAsContact'). ': ';
|
$moreforfilter.=$langs->trans('TasksWithThisUserAsContact'). ': ';
|
||||||
$includeonly='';
|
$includeonly='';
|
||||||
if (empty($user->rights->user->user->lire)) $includeonly=array($user->id);
|
if (empty($user->rights->user->user->lire)) $includeonly=array($user->id);
|
||||||
$moreforfilter.=$form->select_dolusers($search_task_user, 'search_task_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
$moreforfilter.=$form->select_dolusers($search_task_user, 'search_task_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
|
|
||||||
if (! empty($moreforfilter))
|
if (! empty($moreforfilter))
|
||||||
|
|||||||
@ -803,11 +803,6 @@ if (empty($reshook))
|
|||||||
$price_min = $product->multiprices_min [$object->thirdparty->price_level];
|
$price_min = $product->multiprices_min [$object->thirdparty->price_level];
|
||||||
|
|
||||||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||||
|
|
||||||
if ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) {
|
|
||||||
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
|
||||||
$error ++;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$type = GETPOST('type');
|
$type = GETPOST('type');
|
||||||
$label = (GETPOST('product_label') ? GETPOST('product_label') : '');
|
$label = (GETPOST('product_label') ? GETPOST('product_label') : '');
|
||||||
|
|||||||
@ -149,7 +149,7 @@ if (empty($conf->db->user)) $conf->db->user='';
|
|||||||
|
|
||||||
// Defini objet langs
|
// Defini objet langs
|
||||||
$langs = new Translate('..',$conf);
|
$langs = new Translate('..',$conf);
|
||||||
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang'));
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09'));
|
||||||
else $langs->setDefaultLang('auto');
|
else $langs->setDefaultLang('auto');
|
||||||
|
|
||||||
$bc[false]=' class="bg1"';
|
$bc[false]=' class="bg1"';
|
||||||
|
|||||||
@ -76,6 +76,8 @@ else header('Cache-Control: no-cache');
|
|||||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
||||||
|
|
||||||
if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL
|
if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL
|
||||||
|
if (GETPOST('lang','aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
|
||||||
|
|
||||||
$langs->load("main",0,1);
|
$langs->load("main",0,1);
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
|
|||||||
@ -77,6 +77,8 @@ else header('Cache-Control: no-cache');
|
|||||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
||||||
|
|
||||||
if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL
|
if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL
|
||||||
|
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL
|
||||||
|
|
||||||
$langs->load("main",0,1);
|
$langs->load("main",0,1);
|
||||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||||
|
|||||||
@ -1163,7 +1163,7 @@ else
|
|||||||
|
|
||||||
// Check if user has rights
|
// Check if user has rights
|
||||||
$object->getrights();
|
$object->getrights();
|
||||||
if(empty($object->nb_rights)) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
if (empty($object->nb_rights) && $object->statut != 0) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
||||||
|
|
||||||
// Connexion ldap
|
// Connexion ldap
|
||||||
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||||
@ -204,7 +204,7 @@ else
|
|||||||
}
|
}
|
||||||
if ($socid > 0) $sql.= " AND u.fk_soc = ".$socid;
|
if ($socid > 0) $sql.= " AND u.fk_soc = ".$socid;
|
||||||
//if ($search_user != '') $sql.=natural_search(array('u.login', 'u.lastname', 'u.firstname'), $search_user);
|
//if ($search_user != '') $sql.=natural_search(array('u.login', 'u.lastname', 'u.firstname'), $search_user);
|
||||||
if ($search_supervisor > 0) $sql.= " AND u.fk_user = ".$db->escape($search_supervisor);
|
if ($search_supervisor > 0) $sql.= " AND u.fk_user IN (".$db->escape($search_supervisor).")";
|
||||||
if ($search_thirdparty != '') $sql.= natural_search(array('s.nom'), $search_thirdparty);
|
if ($search_thirdparty != '') $sql.= natural_search(array('s.nom'), $search_thirdparty);
|
||||||
if ($search_login != '') $sql.= natural_search("u.login", $search_login);
|
if ($search_login != '') $sql.= natural_search("u.login", $search_login);
|
||||||
if ($search_lastname != '') $sql.= natural_search("u.lastname", $search_lastname);
|
if ($search_lastname != '') $sql.= natural_search("u.lastname", $search_lastname);
|
||||||
@ -360,9 +360,12 @@ if (! empty($arrayfields['u.entity']['checked']))
|
|||||||
{
|
{
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
}
|
}
|
||||||
|
// Supervisor
|
||||||
if (! empty($arrayfields['u.fk_user']['checked']))
|
if (! empty($arrayfields['u.fk_user']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre">';
|
||||||
|
print $form->select_dolusers($search_supervisor, 'search_supervisor', 1, array(), 0, '', 0, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||||
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['u.datelastlogin']['checked']))
|
if (! empty($arrayfields['u.datelastlogin']['checked']))
|
||||||
{
|
{
|
||||||
@ -665,6 +668,7 @@ while ($i < min($num,$limit))
|
|||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user