32require
'../../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
41require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
47$langs->loadLangs(array(
'companies',
'bills',
'products',
'supplier_proposal'));
49$action =
GETPOST(
'action',
'aZ');
55$fieldvalue = (!empty($id) ?
$id : (!empty($ref) ? $ref :
''));
56$fieldtype = (!empty($ref) ?
'ref' :
'rowid');
58if (!empty($user->socid)) {
59 $socid = $user->socid;
63$hookmanager->initHooks(array(
'productstatsinvoice'));
67$extrafields->fetch_name_optionals_label(
'facture');
69$search_array_options = $extrafields->getOptionalsFromPost(
'facture',
'',
'search_');
71$showmessage =
GETPOST(
'showmessage');
75$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
76$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
78if (empty($page) || $page == -1) {
81$offset = $limit * $page;
88 $sortfield =
"f.datef";
93$search_date_startday =
GETPOSTINT(
'search_date_startday');
94if (!empty($search_date_startday)) {
95 $option .=
'&search_date_startday='.$search_date_startday;
97$search_date_startmonth =
GETPOSTINT(
'search_date_startmonth');
98if (!empty($search_date_startmonth)) {
99 $option .=
'&search_date_startmonth='.$search_date_startmonth;
101$search_date_startyear =
GETPOSTINT(
'search_date_startyear');
102if (!empty($search_date_startyear)) {
103 $option .=
'&search_date_startyear='.$search_date_startyear;
105$search_date_endday =
GETPOSTINT(
'search_date_endday');
106if (!empty($search_date_endday)) {
107 $option .=
'&search_date_endday='.$search_date_endday;
109$search_date_endmonth =
GETPOSTINT(
'search_date_endmonth');
110if (!empty($search_date_endmonth)) {
111 $option .=
'&search_date_endmonth='.$search_date_endmonth;
113$search_date_endyear =
GETPOSTINT(
'search_date_endyear');
114if (!empty($search_date_endyear)) {
115 $option .=
'&search_date_endyear='.$search_date_endyear;
117$search_date_start =
dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
118$search_date_end =
dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
120$search_company =
GETPOSTINT(
'search_company');
121if (empty($search_type)) $search_type = -1;
123if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
124 $search_date_startday =
'';
125 $search_date_startmonth =
'';
126 $search_date_startyear =
'';
127 $search_date_endday =
'';
128 $search_date_endmonth =
'';
129 $search_date_endyear =
'';
130 $search_date_start =
'';
131 $search_date_end =
'';
133 $search_company =
'';
136$result =
restrictedArea($user,
'produit|service', $fieldvalue,
'product&product',
'',
'', $fieldtype);
143$toselect =
GETPOST(
'toselect',
'array:int');
144$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'invoicelist';
145$massaction =
GETPOST(
'massaction',
'alpha');
146$diroutputmassaction =
isModEnabled(
'invoice') ?
$conf->invoice->dir_output.
'/temp/massgeneration/'.$user->id :
'';
148if (
GETPOST(
'cancel',
'alpha')) {
152if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
160 'f.ref' => array(
'label' =>
"Ref",
'checked' =>
'1',
'position' => 5),
161 's.nom' => array(
'label' =>
"ThirdParty",
'checked' =>
'1',
'position' => 50),
162 's.code_client' => array(
'label' =>
"CustomerCodeShort",
'checked' =>
'-1',
'position' => 52),
163 'f.datef' => array(
'label' =>
"DateInvoice",
'checked' =>
'1',
'position' => 60),
164 'd.qty' => array(
'label' =>
"Qty",
'checked' =>
'1',
'position' => 65),
165 'd.total_ht' => array(
'label' =>
"AmountHT",
'checked' =>
'1',
'position' => 70),
166 'f.fk_statut' => array(
'label' =>
"Status",
'checked' =>
'1',
'position' => 1000),
169$invoicestatic =
new Facture($db);
170$societestatic =
new Societe($db);
172$form =
new Form($db);
177$arrayofmassactions = array();
179 $arrayofmassactions[
'presend'] = img_picto(
'',
'email',
'class="pictofixedwidth"').$langs->trans(
"SendByMail");
181$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
182$arrayofselected = is_array($toselect) ? $toselect : array();
183$selectedfields = (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
186$totalarray = array();
187$totalarray[
'nbfield'] = 0;
189$parameters = array(
'socid' => $socid,
'arrayfields' => &$arrayfields);
190$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
192 setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
195 $objectclass =
'Facture';
196 $objectlabel =
'Invoices';
197 $permissiontoread = $user->hasRight(
"facture",
"lire");
198 $permissiontoadd = $user->hasRight(
"facture",
"creer");
199 $permissiontodelete = $user->hasRight(
"facture",
"supprimer");
200 $uploaddir =
$conf->invoice->dir_output;
202 if (isset($_POST[
'massaction'])) {
203 $massaction = $_POST[
'massaction'];
206 if (isset($_POST[
'confirmmassaction']) && isset($_POST[
'massaction']) && $_POST[
'massaction'] ==
'presend') {
207 global $arrayofselected;
209 $toselect = is_array($_POST[
'toselect']) ? $_POST[
'toselect'] : array();
210 $arrayofselected = array();
213 foreach ($toselect as $invoice_id) {
215 if ($objecttmp->fetch((
int) $invoice_id) > 0) {
217 if (empty($objecttmp->thirdparty) || !is_object($objecttmp->thirdparty)) {
218 $objecttmp->fetch_thirdparty();
222 if (!empty($objecttmp->thirdparty->email)) {
224 $arrayofselected[] = $invoice_id;
229 if (empty($arrayofselected)) {
230 setEventMessages($langs->trans(
"DefaultStatusEmptyMandatory").
' '.$langs->trans(
"Select"),
null,
'errors');
231 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".$id);
235 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
244if ($id > 0 || !empty($ref)) {
246 $result = $product->fetch($id, $ref);
250 $parameters = array(
'id' => $id);
251 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $product, $action);
253 setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
256 $title = $langs->trans(
'ProductServiceCard');
260 $title = $langs->trans(
'Product').
" ".$shortlabel.
" - ".$langs->trans(
'Referers');
261 $helpurl =
'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
264 $title = $langs->trans(
'Service').
" ".$shortlabel.
" - ".$langs->trans(
'Referers');
265 $helpurl =
'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
268 llxHeader(
'', $title, $helpurl,
'', 0, 0,
'',
'',
'',
'mod-product page-stats_facture');
272 $titre = $langs->trans(
"CardProduct".$product->type);
276 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $product, $action);
277 print $hookmanager->resPrint;
279 setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
282 $linkback =
'<a href="'.DOL_URL_ROOT.
'/product/list.php?restore_lastsearch_values=1&type='.
$object->type.
'">'.$langs->trans(
"BackToList").
'</a>';
283 $object->next_prev_filter =
"(te.fk_product_type:=:".((int)
$object->type).
")";
286 if ($user->socid && !in_array(
'product', explode(
',',
getDolGlobalString(
'MAIN_MODULES_FOR_EXTERNAL')))) {
290 dol_banner_tab(
$object,
'ref', $linkback, $shownav,
'ref');
292 print
'<div class="fichecenter">';
294 print
'<div class="clearboth"></div>';
295 print
'<table class="noborder tableforfield centpercent">';
302 print
'<div class="clearboth"></div>';
306 if ($showmessage && $nboflines > 1) {
308 } elseif ($user->hasRight(
'facture',
'lire')) {
309 $sql =
"SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client,";
310 $sql .=
" f.ref, f.datef, f.paye, f.type, f.fk_statut as statut, f.rowid as facid,";
311 $sql .=
" d.rowid, d.total_ht as total_ht, d.qty";
312 if (!$user->hasRight(
'societe',
'client',
'voir')) {
313 $sql .=
", sc.fk_soc, sc.fk_user ";
316 if (!empty($extrafields->attributes[
'facture'][
'label'])) {
317 foreach ($extrafields->attributes[
'facture'][
'label'] as $key => $val) {
318 $sql .= ($extrafields->attributes[
'facture'][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
322 $parameters = array();
323 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters,
$object, $action);
324 $sql .= $hookmanager->resPrint;
325 $sql = preg_replace(
'/,\s*$/',
'', $sql);
327 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s";
328 $sql .=
", ".MAIN_DB_PREFIX.
"facture as f";
329 if (isset($extrafields->attributes[
'facture'][
'label']) && is_array($extrafields->attributes[
'facture'][
'label']) && count($extrafields->attributes[
'facture'][
'label'])) {
330 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
'facture'.
"_extrafields as ef on (f.rowid = ef.fk_object)";
332 $sql .=
", ".MAIN_DB_PREFIX.
"facturedet as d";
333 if (!$user->hasRight(
'societe',
'client',
'voir')) {
334 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
337 $parameters = array();
338 $reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters,
$object);
339 $sql .= $hookmanager->resPrint;
341 $sql .=
" WHERE f.fk_soc = s.rowid";
342 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
343 $sql .=
" AND d.fk_facture = f.rowid";
344 $sql .=
" AND d.fk_product = ".((int) $product->id);
345 if ($search_date_start) {
346 $sql .=
" AND f.datef >= '".$db->idate($search_date_start).
"'";
348 if ($search_date_end) {
349 $sql .=
" AND f.datef <= '".$db->idate($search_date_end).
"'";
351 if ($search_type !=
'' && $search_type !=
'-1') {
352 $sql .=
" AND f.type = ".((int) $search_type);
354 if (!$user->hasRight(
'societe',
'client',
'voir')) {
355 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
358 $sql .=
" AND f.fk_soc = ".((int) $socid);
359 } elseif ($search_company > 0) {
360 $sql .=
" AND f.fk_soc = ".((int) $search_company);
364 $extrafieldsobjectkey =
'facture';
365 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
367 $parameters = array();
368 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters,
$object, $action);
369 $sql .= $hookmanager->resPrint;
372 $parameters = array();
373 $reshook = $hookmanager->executeHooks(
'printFieldListHaving', $parameters,
$object, $action);
374 if (empty($reshook)) {
375 $sql .= empty($hookmanager->resPrint) ?
"" :
" HAVING 1=1 ".$hookmanager->resPrint;
377 $sql = $hookmanager->resPrint;
380 $sql .= $db->order($sortfield, $sortorder);
387 $totalofrecords =
'';
389 $result = $db->query($sql);
390 $totalofrecords = $db->num_rows($result);
393 $sql .= $db->plimit($limit + 1, $offset);
395 $result = $db->query($sql);
397 $num = $db->num_rows($result);
400 $num = $db->num_rows($result);
401 while ($row = $db->fetch_object($result)) {
407 $option .=
'&id='.$product->id;
409 if ($limit > 0 && $limit !=
$conf->liste_limit) {
410 $option .=
'&limit='.((int) $limit);
414 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
416 '@phan-var-force string $param';
418 $parameters = array(
'param' => &$param);
419 $reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters,
$object, $action);
420 $option .= $hookmanager->resPrint;
422 print
'<span id="anchorundermenu" class="anchorundermenu"></span>';
423 print
'<form method="post" action="'.$_SERVER [
'PHP_SELF'].
'?id='.$product->id.
'" name="search_form">'.
"\n";
424 print
'<input type="hidden" name="token" value="'.newToken().
'">';
425 print
'<input type="hidden" name="page_y" value="">';
426 if (!empty($sortfield)) {
427 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'"/>';
429 if (!empty($sortorder)) {
430 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'"/>';
434 print_barre_liste($langs->trans(
"CustomersInvoices"), $page, $_SERVER[
"PHP_SELF"], $option, $sortfield, $sortorder, $massactionbutton, $num, $totalofrecords,
'', 0,
'',
'', $limit, 0, 0, 1);
436 if ($massaction ==
'presend' && !empty($arrayofselected)) {
438 $topicmail =
"SendBillRef";
439 $modelmail =
"facture_send";
441 $trackid =
'inv'.$id;
443 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
447 $option .=
'&page='.urlencode((
string) ($page));
450 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
451 print
'<div class="divsearchfield">';
452 print $langs->trans(
'Period').
' ('.$langs->trans(
"DateInvoice").
') - ';
453 print $form->selectDate($search_date_start ? $search_date_start : -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
454 print $form->selectDate($search_date_end ? $search_date_end : -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
455 if (empty($socid)) print $langs->trans(
'Company').
' : '.$form->select_company($search_company,
'search_company',
'(s.client:in:1,2,3)', 1);
456 print $langs->trans(
'Type').
' : ';
467 print $form->selectarray(
'search_type', $listtype, $search_type, 1, 0, 0,
'', 0, 0, 0,
'',
'maxwidth75');
469 $parameters = array();
470 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters,
$object, $action);
471 print $hookmanager->resPrint;
473 print
'<div style="vertical-align: middle; display: inline-block">';
474 print
'<input type="image" class="liste_titre reposition" name="button_search" src="'.img_picto($langs->trans(
"Search"),
'search.png',
'', 0, 1).
'" value="'.
dol_escape_htmltag($langs->trans(
"Search")).
'" title="'.
dol_escape_htmltag($langs->trans(
"Search")).
'">';
475 print
'<input type="image" class="liste_titre reposition" name="button_removefilter" src="'.img_picto($langs->trans(
"Search"),
'searchclear.png',
'', 0, 1).
'" value="'.
dol_escape_htmltag($langs->trans(
"RemoveFilter")).
'" title="'.
dol_escape_htmltag($langs->trans(
"RemoveFilter")).
'">';
482 print
'<div class="div-table-responsive">';
483 print
'<table class="tagtable liste listwithfilterbefore centpercent">';
484 print
'<tr class="liste_titre">';
486 if (
$conf->main_checkbox_left_column) {
487 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
492 print_liste_field_titre(
"CustomerCode", $_SERVER[
"PHP_SELF"],
"s.code_client",
"", $option,
'', $sortfield, $sortorder);
493 print_liste_field_titre(
"DateInvoice", $_SERVER[
"PHP_SELF"],
"f.datef",
"", $option,
'align="center"', $sortfield, $sortorder);
494 print_liste_field_titre(
"Qty", $_SERVER[
"PHP_SELF"],
"d.qty",
"", $option,
'align="center"', $sortfield, $sortorder);
495 print_liste_field_titre(
"AmountHT", $_SERVER[
"PHP_SELF"],
"d.total_ht",
"", $option,
'align="right"', $sortfield, $sortorder);
496 print_liste_field_titre(
"Status", $_SERVER[
"PHP_SELF"],
"f.paye,f.fk_statut",
"", $option,
'align="right"', $sortfield, $sortorder);
498 $parameters = array(
'param' => $option,
'sortfield' => $sortfield,
'sortorder' => $sortorder);
499 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters,
$object, $action);
500 print $hookmanager->resPrint;
502 if (!
$conf->main_checkbox_left_column) {
503 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
508 while ($i < min($num, $limit)) {
509 $objp = $all_rows[$i];
511 $objp->qty = -($objp->qty);
514 $total_ht += $objp->total_ht;
515 $total_qty += $objp->qty;
517 $invoicestatic->id = $objp->facid;
518 $invoicestatic->ref = $objp->ref;
519 $societestatic->fetch($objp->socid);
520 $paiement = $invoicestatic->getSommePaiement();
522 print
'<tr data-row-id="'.$invoicestatic->id.
'" class="oddeven row-with-select status2">';
525 if (
$conf->main_checkbox_left_column) {
526 print
'<td class="nowrap center">';
527 if (($massactionbutton || $massaction) && $contextpage !=
'poslist') {
529 if (in_array($invoicestatic->id, $arrayofselected)) {
532 print
'<input id="cb'.$invoicestatic->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$invoicestatic->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
536 $totalarray[
'nbfield']++;
540 print
'<td class="tdoverflowmax150">';
541 print $invoicestatic->getNomUrl(1);
543 print
'<td class="tdoverflowmax125">'.$societestatic->getNomUrl(1).
'</td>';
544 print
'<td class="tdoverflowmax125">'.dolPrintHTML($objp->code_client).
"</td>\n";
545 print
'<td class="center">';
546 print
dol_print_date($db->jdate($objp->datef),
'dayhour').
"</td>";
547 print
'<td class="center">'.dolPrintHTML($objp->qty).
"</td>\n";
548 print
'<td class="right">'.price($objp->total_ht).
"</td>\n";
549 print
'<td class="right">'.$invoicestatic->LibStatut($objp->paye, $objp->statut, 5, $paiement, $objp->type).
'</td>';
551 $parameters = array();
552 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters,
$object, $action);
553 print $hookmanager->resPrint;
556 if (!
$conf->main_checkbox_left_column) {
557 print
'<td class="nowrap center">';
558 if (($massactionbutton || $massaction) && $contextpage !=
'poslist') {
560 if (in_array($invoicestatic->id, $arrayofselected)) {
563 print
'<input id="cb'.$invoicestatic->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$invoicestatic->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
567 $totalarray[
'nbfield']++;
577 print
'<tr class="liste_total">';
578 if ($num < $limit && empty($offset)) {
579 print
'<td>'.$langs->trans(
"Total").
'</td>';
581 print
'<td>'.$form->textwithpicto($langs->trans(
"Total"), $langs->trans(
"Totalforthispage")).
'</td>';
583 print
'<td colspan="'.$colspan.
'"></td>';
584 print
'<td class="center">'.$total_qty.
'</td>';
585 print
'<td class="right">'.price($total_ht).
'</td>';
591 dol_print_error($db);
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
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 invoices.
const TYPE_REPLACEMENT
Replacement invoice.
const TYPE_STANDARD
Standard invoice.
const TYPE_SITUATION
Situation invoice.
const TYPE_DEPOSIT
Deposit invoice.
const TYPE_CREDIT_NOTE
Credit note invoice.
Class to manage products or services.
const TYPE_PRODUCT
Regular product.
const TYPE_SERVICE
Service.
Class to manage third parties objects (customers, suppliers, prospects...)
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...
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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).
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '...' if string larger than length.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
product_prepare_head($object)
Prepare array with list of tabs.
show_stats_for_company($product, $socid)
Show stats for a product.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $nodie=0, $mode='')
Check permissions of a user to show a page and an object.