29require
'../../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/report.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountancycategory.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountancyreport.class.php';
47$langs->loadLangs(array(
'compta',
'bills',
'donation',
'salaries',
'accountancy'));
57$action =
GETPOST(
'action',
'aZ09');
58$cat_id =
GETPOST(
'account_category');
62$cancel =
GETPOST(
'cancel',
'alpha');
63$showaccountdetail =
GETPOST(
'showaccountdetail',
'aZ09') ?
GETPOST(
'showaccountdetail',
'aZ09') :
'no';
66$date_startmonth =
GETPOSTINT(
'date_startmonth');
83 $year_start = $year_current - ($nbofyear - 1);
85 $year_current = $year;
87 $year_start = $year - ($nbofyear - 1);
90$date_end =
dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear);
93if (empty($date_start) || empty($date_end)) {
97 $year_end = $year_start + ($nbofyear - 1);
99 $date_startmonth = $month_start;
101 if (!$year && $month_start > $month_current) {
105 $month_end = $month_start - 1;
106 if ($month_end < 1) {
112 $month_end = $month_start;
141$start_year = $tmps[
'year'];
142$start_month = $tmps[
'mon'];
144$year_end = $tmpe[
'year'];
145$month_end = $tmpe[
'mon'];
146$nbofyear = ($year_end - $start_year) + 1;
148$date_startmonth = $start_month;
149$date_endmonth = $month_end;
164 $modecompta =
'BOOKKEEPING';
166if (
GETPOST(
"modecompta",
'alpha')) {
167 $modecompta =
GETPOST(
"modecompta",
'alpha');
174if ($user->socid > 0) {
175 $socid = $user->socid;
177$hookmanager->initHooks([
'resultreportlist']);
182 $result =
restrictedArea($user,
'accounting',
'',
'',
'comptarapport');
190 $langs->trans(
"MonthShort01"),
191 $langs->trans(
"MonthShort02"),
192 $langs->trans(
"MonthShort03"),
193 $langs->trans(
"MonthShort04"),
194 $langs->trans(
"MonthShort05"),
195 $langs->trans(
"MonthShort06"),
196 $langs->trans(
"MonthShort07"),
197 $langs->trans(
"MonthShort08"),
198 $langs->trans(
"MonthShort09"),
199 $langs->trans(
"MonthShort10"),
200 $langs->trans(
"MonthShort11"),
201 $langs->trans(
"MonthShort12"),
204llxHeader(
'', $langs->trans(
'ReportInOut'));
214$textprevyear =
'<a href="'.$_SERVER[
"PHP_SELF"].
'?year='.($start_year - 1).
'&showaccountdetail='.urlencode($showaccountdetail).
'">'.
img_previous().
'</a>';
215$textnextyear =
' <a href="'.$_SERVER[
"PHP_SELF"].
'?year='.($start_year + 1).
'&showaccountdetail='.urlencode($showaccountdetail).
'">'.
img_next().
'</a>';
219if ($modecompta ==
"CREANCES-DETTES") {
220 $name = $langs->trans(
"AnnualByAccountDueDebtMode");
221 $calcmode = $langs->trans(
"CalcModeDebt");
222 $calcmode .=
'<br>('.$langs->trans(
"SeeReportInInputOutputMode",
'<a href="'.$_SERVER[
"PHP_SELF"].
'?year='.$start_year.(GETPOST(
"month") > 0 ?
'&month='.GETPOST(
"month") :
'').
'&modecompta=RECETTES-DEPENSES">',
'</a>').
')';
224 $calcmode .=
'<br>('.$langs->trans(
"SeeReportInBookkeepingMode",
'<a href="'.$_SERVER[
"PHP_SELF"].
'?year='.$start_year.
'&modecompta=BOOKKEEPING">',
'</a>').
')';
226 $period = $form->selectDate($date_start,
'date_start', 0, 0, 0,
'', 1, 0).
' - '.$form->selectDate($date_end,
'date_end', 0, 0, 0,
'', 1, 0);
228 $description = $langs->trans(
"RulesResultDue");
230 $description .= $langs->trans(
"DepositsAreNotIncluded");
232 $description .= $langs->trans(
"DepositsAreIncluded");
235 $description .= $langs->trans(
"SupplierDepositsAreNotIncluded");
239} elseif ($modecompta ==
"RECETTES-DEPENSES") {
240 $name = $langs->trans(
"AnnualByAccountInputOutputMode");
241 $calcmode = $langs->trans(
"CalcModePayment");
242 $calcmode .=
'<br>('.$langs->trans(
"SeeReportInDueDebtMode",
'<a href="'.$_SERVER[
"PHP_SELF"].
'?year='.$year.(GETPOST(
"month") > 0 ?
'&month='.GETPOST(
"month") :
'').
'&modecompta=CREANCES-DETTES">',
'</a>').
')';
244 $calcmode .=
'<br>('.$langs->trans(
"SeeReportInBookkeepingMode",
'<a href="'.$_SERVER[
"PHP_SELF"].
'?year='.$year.
'&modecompta=BOOKKEEPING">',
'</a>').
')';
246 $period = $form->selectDate($date_start,
'date_start', 0, 0, 0,
'', 1, 0).
' - '.$form->selectDate($date_end,
'date_end', 0, 0, 0,
'', 1, 0);
248 $description = $langs->trans(
"RulesResultInOut");
251} elseif ($modecompta ==
"BOOKKEEPING") {
253 $accountingreportstatic->fetch($id_report);
255 $reportLabel = $accountingreportstatic->label;
257 $name = $langs->trans(
"ReportInOut").
', '.$langs->trans(
"ByPersonalizedAccountGroups").
' '.$reportLabel;
258 $calcmode = $langs->trans(
"CalcModeBookkeeping");
261 $period = $form->selectDate($date_start,
'date_start', 0, 0, 0,
'', 1, 0).
' - '.$form->selectDate($date_end,
'date_end', 0, 0, 0,
'', 1, 0);
262 $arraylist = array(
'no' => $langs->trans(
"None"),
'yes' => $langs->trans(
"AccountWithNonZeroValues"),
'all' => $langs->trans(
"All"));
263 $period .=
' <span class="opacitymedium">'.$langs->trans(
"DetailBy").
'</span> '.$form->selectarray(
'showaccountdetail', $arraylist, $showaccountdetail, 0);
264 $periodlink = $textprevyear.$textnextyear;
266 $description = $langs->trans(
"RulesResultBookkeepingPersonalized");
267 $description .=
' ('.$langs->trans(
"SeePageForSetup", DOL_URL_ROOT.
'/accountancy/admin/categories_list.php?search_country_id='.
$mysoc->country_id.
'&mainmenu=accountancy&leftmenu=accountancy_admin', $langs->transnoentitiesnoconv(
"Accountancy").
' / '.$langs->transnoentitiesnoconv(
"Setup").
' / '.$langs->transnoentitiesnoconv(
"AccountingCategory")).
')';
271report_header($name,
'', $period, $periodlink ??
'', $description, $builddate, $exportlink ??
'', array(
'modecompta' => $modecompta,
'action' =>
''), $calcmode);
274if (
isModEnabled(
'accounting') && $modecompta !=
'BOOKKEEPING') {
275 print
info_admin($langs->trans(
"WarningReportNotReliable"), 0, 0,
'1');
281print
'<div class="div-table-responsive">';
282print
'<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
284print
'<tr class="liste_titre">';
285print
'<th class="liste_titre">'.$langs->trans(
"AccountingCategory").
'</th>';
286print
'<th class="liste_titre"></th>';
287print
'<th class="liste_titre right">'.$langs->trans(
"PreviousPeriod").
'</th>';
288print
'<th class="liste_titre right">'.$langs->trans(
"SelectedPeriod").
'</th>';
289foreach ($months as $k => $v) {
290 if (($k + 1) >= $date_startmonth && (($date_startmonth <= $date_endmonth && ($k + 1) <= $date_endmonth) || ($date_startmonth > $date_endmonth))) {
291 print
'<th class="liste_titre right width50">'.$langs->trans(
'MonthShort'.sprintf(
"%02d", ($k + 1))).
'</th>';
294if ($date_startmonth > $date_endmonth) {
295 foreach ($months as $k => $v) {
296 if (($k + 1) < $date_startmonth && ($k + 1) <= $date_endmonth) {
297 print
'<th class="liste_titre right width50">'.$langs->trans(
'MonthShort'.sprintf(
"%02d", ($k + 1))).
'</th>';
303if ($modecompta ==
'CREANCES-DETTES') {
306} elseif ($modecompta ==
"RECETTES-DEPENSES") {
309} elseif ($modecompta ==
"BOOKKEEPING") {
311 $cats = $AccCat->getCats(-1, 1, $id_report);
312 $unactive_cats = $AccCat->getCats(-1, 0, $id_report);
341 $totPerAccount = array();
342 if (!is_array($cats) && $cats < 0) {
344 } elseif (is_array($cats) && count($cats) == 0) {
345 print
'<tr class="liste_total">';
346 print
'<td colspan="15">';
347 print
'<span class="opacitymedium">';
348 print $langs->trans(
"ErrorNoAccountingCategoryForThisCountry",
$mysoc->country_code, $langs->transnoentitiesnoconv(
"Accountancy"), $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"AccountingCategory"));
352 } elseif (is_array($cats) && count($cats) > 0) {
354 foreach ($cats as $cat) {
355 if (!empty($cat[
'category_type'])) {
359 $formula = $cat[
'formula'];
361 print
'<tr class="liste_total">';
364 print
'<td class="liste_total tdoverflowmax100" title="'.dol_escape_htmltag($cat[
'code']).
'">';
366 print
'</td><td class="tdoverflowmax250 borderright" title="'.dol_escape_htmltag($cat[
'label']).
'">';
373 foreach ($unactive_cats as $un_cat) {
374 $vars[$un_cat[
'code']] = 0;
380 foreach ($sommes as $code_idx => $det) {
382 $vars[$code_idx] = empty($det[
'NP']) ? 0 : $det[
'NP'];
385 $result = strtr($formula, $vars);
386 $result = str_replace(
'--',
'+', $result);
388 if (preg_match(
'/[a-z]/i', $result)) {
389 $r =
'Error bad formula: '.$result;
391 print
'<td class="liste_total right"><span class="amount" title="'.dol_escape_htmltag($r).
'">'.$rshort.
'</span></td>';
395 $r = (float)
dol_eval((
string) $result, 1, 1,
'1');
398 print
'<td class="liste_total right"><span class="amount">'.price($r, 0,
'', 1, 0, 0).
'</span></td>';
400 print
'<td class="liste_total right"><span class="amount">'.price($r).
'</span></td>';
404 if ($code !==
null && !isset($sommes[$code])) {
405 $sommes[$code] = array();
408 $code = $cat[
'code'];
409 if (empty($sommes[$code][
'NP'])) {
410 $sommes[$code][
'NP'] = $r;
412 $sommes[$code][
'NP'] += $r;
416 if (!empty($sommes)) {
417 foreach ($sommes as $code_idx => $det) {
419 $vars[$code_idx] = empty($det[
'N']) ? 0 : $det[
'N'];
423 $result = strtr($formula, $vars);
424 $result = str_replace(
'--',
'+', $result);
427 $r = (float)
dol_eval((
string) $result, 1, 1,
'1');
430 print
'<td class="liste_total right borderright"><span class="amount">'.price($r, 0,
'', 1, 0, 0).
'</span></td>';
432 print
'<td class="liste_total right borderright"><span class="amount">'.price($r).
'</span></td>';
434 if (empty($sommes[$code][
'N'])) {
435 $sommes[$code][
'N'] = $r;
437 $sommes[$code][
'N'] += $r;
441 foreach ($months as $k => $v) {
442 if (($k + 1) >= $date_startmonth && (($date_startmonth <= $date_endmonth && ($k + 1) <= $date_endmonth) || ($date_startmonth > $date_endmonth))) {
443 foreach ($sommes as $code_idx => $det) {
445 $vars[$code_idx] = empty($det[
'M'][$k]) ? 0 : $det[
'M'][$k];
447 $result = strtr($formula, $vars);
448 $result = str_replace(
'--',
'+', $result);
451 $r = (float)
dol_eval((
string) $result, 1, 1,
'1');
455 print
'<td class="liste_total right"><span class="amount">'.price($r, 0,
'', 1, 0, 0).
'</span></td>';
457 print
'<td class="liste_total right"><span class="amount">'.price($r).
'</span></td>';
459 if (empty($sommes[$code][
'M'][$k])) {
460 $sommes[$code][
'M'][$k] = $r;
462 $sommes[$code][
'M'][$k] += $r;
467 if ($date_startmonth > $date_endmonth) {
468 foreach ($months as $k => $v) {
469 if (($k + 1) < $date_startmonth && ($k + 1) <= $date_endmonth) {
470 foreach ($sommes as $code_idx => $det) {
472 $vars[$code_idx] = empty($det[
'M'][$k]) ? 0 : $det[
'M'][$k];
474 $result = strtr($formula, $vars);
475 $result = str_replace(
'--',
'+', $result);
478 $r = (float)
dol_eval((
string) $result, 1, 1,
'1');
481 print
'<td class="liste_total right"><span class="amount">'.price($r, 0,
'', 1, 0, 0).
'</span></td>';
483 print
'<td class="liste_total right"><span class="amount">'.price($r).
'</span></td>';
485 if (empty($sommes[$code][
'M'][$k])) {
486 $sommes[$code][
'M'][$k] = $r;
488 $sommes[$code][
'M'][$k] += $r;
498 $code = $cat[
'code'];
503 $totCat[
'M'] = array();
504 foreach ($months as $k => $v) {
505 $totCat[
'M'][$k] = 0;
507 if (!isset($sommes[$code])) {
508 $sommes[$code] = array();
512 $cpts = $AccCat->getCptsCat((
int) $cat[
'rowid']);
518 $arrayofaccountforfilter = array();
519 foreach ($cpts as $i => $cpt) {
520 if (isset($cpt[
'account_number'])) {
521 $arrayofaccountforfilter[] = $cpt[
'account_number'];
526 if (!empty($arrayofaccountforfilter)) {
527 $return = $AccCat->getSumDebitCredit($arrayofaccountforfilter, $date_start_previous, $date_end_previous, empty($cat[
'dc']) ? 0 : $cat[
'dc']);
532 foreach ($cpts as $i => $cpt) {
533 $resultNP = empty($AccCat->sdcperaccount[$cpt[
'account_number']]) ? 0 : $AccCat->sdcperaccount[$cpt[
'account_number']];
535 if (empty($totCat[
'NP'])) {
536 $totCat[
'NP'] = $resultNP;
538 $totCat[
'NP'] += $resultNP;
540 if (empty($sommes[$code][
'NP'])) {
541 $sommes[$code][
'NP'] = $resultNP;
543 $sommes[$code][
'NP'] += $resultNP;
545 $totPerAccount[$cpt[
'account_number']][
'NP'] = $resultNP;
552 foreach ($cpts as $i => $cpt) {
558 foreach ($months as $k => $v) {
559 $monthtoprocess = $k + 1;
560 $yeartoprocess = $start_year;
561 if (($k + 1) < $start_month) {
565 if (($yeartoprocess == $start_year && ($k + 1) >= $date_startmonth && $k < $date_endmonth) ||
566 ($yeartoprocess == $start_year + 1 && ($k + 1) < $date_startmonth)
569 if (isset($cpt[
'account_number'])) {
570 $return = $AccCat->getSumDebitCredit((
int) $cpt[
'account_number'], $date_start, $date_end, empty($cat[
'dc']) ? 0 : $cat[
'dc'],
'nofilter', $monthtoprocess, $yeartoprocess);
575 $resultM = $AccCat->sdc;
580 if (empty($totCat[
'M'][$k])) {
581 $totCat[
'M'][$k] = $resultM;
583 $totCat[
'M'][$k] += $resultM;
585 if (empty($sommes[$code][
'M'][$k])) {
586 $sommes[$code][
'M'][$k] = $resultM;
588 $sommes[$code][
'M'][$k] += $resultM;
590 if (isset($cpt[
'account_number'])) {
591 $totPerAccount[$cpt[
'account_number']][
'M'][$k] = $resultM;
594 $resultN += $resultM;
598 if (empty($totCat)) {
599 $totCat[
'N'] = $resultN;
601 $totCat[
'N'] += $resultN;
603 if (empty($sommes[$code][
'N'])) {
604 $sommes[$code][
'N'] = $resultN;
606 $sommes[$code][
'N'] += $resultN;
608 if (isset($cpt[
'account_number'])) {
609 $totPerAccount[$cpt[
'account_number']][
'N'] = $resultN;
616 print
'<tr'.($showaccountdetail !=
'no' ?
' class="trforbreak"' :
'').
'>';
619 print
'<td class="tdoverflowmax100" title="'.dol_escape_htmltag($cat[
'code']).
'">';
625 if (count($cpts) > 0 && !empty($cpts[0])) {
627 foreach ($cpts as $cpt) {
629 $labeltoshow .=
'...)';
633 $labeltoshow .=
', ';
635 $labeltoshow .=
' (';
644 $labeltoshow .=
' - <span class="warning">'.$langs->trans(
"GroupIsEmptyCheckSetup").
'</span>';
646 print
'<td class="tdoverflowmax250 borderright" title="'.dol_escape_htmltag(
dol_string_nohtmltag($labeltoshow)).
'">';
651 print
'<td class="right"><span class="amount">'.price($totCat[
'NP'], 0,
'', 1, 0, 0).
'</span></td>';
652 print
'<td class="right borderright"><span class="amount">'.price($totCat[
'N'], 0,
'', 1, 0, 0).
'</span></td>';
654 print
'<td class="right"><span class="amount">'.price($totCat[
'NP']).
'</span></td>';
655 print
'<td class="right borderright"><span class="amount">'.price($totCat[
'N']).
'</span></td>';
659 foreach ($totCat[
'M'] as $k => $v) {
660 if (($k + 1) >= $date_startmonth && (($date_startmonth <= $date_endmonth && ($k + 1) <= $date_endmonth) || ($date_startmonth > $date_endmonth))) {
662 print
'<td class="right nowraponall"><span class="amount">'.price($v, 0,
'', 1, 0, 0).
'</span></td>';
664 print
'<td class="right nowraponall"><span class="amount">'.price($v).
'</span></td>';
668 if ($date_startmonth > $date_endmonth) {
669 foreach ($totCat[
'M'] as $k => $v) {
670 if (($k + 1) < $date_startmonth && ($k + 1) <= $date_endmonth) {
672 print
'<td class="right nowraponall"><span class="amount">'.price($v, 0,
'', 1, 0, 0).
'</span></td>';
674 print
'<td class="right nowraponall"><span class="amount">'.price($v).
'</span></td>';
683 if ($showaccountdetail !=
'no') {
684 foreach ($cpts as $i => $cpt) {
685 if (isset($cpt[
'account_number'])) {
686 $resultNP = $totPerAccount[$cpt[
'account_number']][
'NP'];
687 $resultN = $totPerAccount[$cpt[
'account_number']][
'N'];
693 if ($showaccountdetail ==
'all' || $resultN != 0) {
697 if (isset($cpt[
'account_number'])) {
698 $labeldetail =
' '.length_accountg($cpt[
'account_number']).
' - '.$cpt[
'account_label'];
703 print
'<td class="tdoverflowmax250 borderright" title="'.dol_escape_htmltag($labeldetail).
'">';
707 print
'<td class="right"><span class="amount">'.price($resultNP, 0,
'', 1, 0, 0).
'</span></td>';
708 print
'<td class="right borderright"><span class="amount">'.price($resultN, 0,
'', 1, 0, 0).
'</span></td>';
710 print
'<td class="right"><span class="amount">'.price($resultNP).
'</span></td>';
711 print
'<td class="right borderright"><span class="amount">'.price($resultN).
'</span></td>';
715 foreach ($months as $k => $v) {
716 if (($k + 1) >= $date_startmonth && (($date_startmonth <= $date_endmonth && ($k + 1) <= $date_endmonth) || ($date_startmonth > $date_endmonth))) {
717 if (isset($cpt[
'account_number'])) {
718 $resultM = $totPerAccount[$cpt[
'account_number']][
'M'][$k];
722 print
'<td class="right"><span class="amount">'.price($resultM).
'</span></td>';
725 if ($date_startmonth > $date_endmonth) {
726 foreach ($months as $k => $v) {
727 if (($k + 1) < $date_startmonth && ($k + 1) <= $date_endmonth) {
728 if (isset($cpt[
'account_number'])) {
729 $resultM = empty($totPerAccount[$cpt[
'account_number']][
'M'][$k]) ? 0 : $totPerAccount[$cpt[
'account_number']][
'M'][$k];
733 print
'<td class="right"><span class="amount">'.price($resultM).
'</span></td>';
$id
Support class for third parties, contacts, members, users or resources.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage categories of an accounting account.
Class to manage reports for accounting categories.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
$date_start
Variables from include:
dol_now($mode='gmt')
Return date for now.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='', $textonpictotooltip='')
Show information in HTML for admin users or standard users.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
img_previous($titlealt='default', $moreatt='')
Show previous logo.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
img_next($titlealt='default', $moreatt='')
Show next logo.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
report_header($reportname, $notused, $period, $periodlink, $description, $builddate, $exportlink='', $moreparam=array(), $calcmode='', $varlink='')
Show header of a report.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.