27require
'../../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
31require_once DOL_DOCUMENT_ROOT.
"/core/lib/takepos.lib.php";
38$langs->loadLangs(array(
"admin",
"cashdesk",
"commercial"));
44if (
GETPOST(
'action',
'alpha') ==
'set') {
47 $res =
dolibarr_set_const($db,
"TAKEPOS_COLOR_THEME",
GETPOST(
'TAKEPOS_COLOR_THEME',
'alpha'),
'chaine', 0,
'', $conf->entity);
48 $res =
dolibarr_set_const($db,
"TAKEPOS_LINES_TO_SHOW",
GETPOST(
'TAKEPOS_LINES_TO_SHOW',
'alpha'),
'chaine', 0,
'', $conf->entity);
49 if (GETPOSTISSET(
'TAKEPOS_SHOW_PRODUCT_REFERENCE')) {
50 $res =
dolibarr_set_const($db,
"TAKEPOS_SHOW_PRODUCT_REFERENCE",
GETPOST(
'TAKEPOS_SHOW_PRODUCT_REFERENCE',
'alpha'),
'chaine', 0,
'', $conf->entity);
76llxHeader(
'', $langs->trans(
"CashDeskSetup"),
'',
'', 0, 0,
'',
'',
'',
'mod-takepos page-admin_appearance');
78$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php">'.$langs->trans(
"BackToModuleList").
'</a>';
79print
load_fiche_titre($langs->trans(
"CashDeskSetup").
' (TakePOS)', $linkback,
'title_setup');
83print
'<form action="'.$_SERVER[
"PHP_SELF"].
'?terminal='.(empty($terminal) ? 1 : $terminal).
'" method="post">';
84print
'<input type="hidden" name="token" value="'.newToken().
'">';
85print
'<input type="hidden" name="action" value="set">';
89print
'<table class="noborder centpercent">';
90print
'<tr class="liste_titre">';
91print
'<td>'.$langs->trans(
"Parameters").
'</td><td></td>';
95print
'<tr class="oddeven"><td>';
96print $langs->trans(
"ColorTheme");
98$array = array(0=>
"Eldy", 1=>$langs->trans(
"Colorful"));
99print $form->selectarray(
'TAKEPOS_COLOR_THEME', $array, (!
getDolGlobalString(
'TAKEPOS_COLOR_THEME') ?
'0' : $conf->global->TAKEPOS_COLOR_THEME), 0);
103print
'<tr class="oddeven"><td>';
104print $langs->trans(
'HideCategories');
106print ajax_constantonoff(
"TAKEPOS_HIDE_CATEGORIES", array(), $conf->entity, 0, 0, 1, 0);
111 print
'<tr class="oddeven"><td>';
112 print $langs->trans(
'HideCategoryImages');
114 print ajax_constantonoff(
"TAKEPOS_HIDE_CATEGORY_IMAGES", array(), $conf->entity, 0, 0, 1, 0);
115 print
"</td></tr>\n";
119print
'<tr class="oddeven"><td>';
120print $langs->trans(
'HideProductImages');
122print ajax_constantonoff(
"TAKEPOS_HIDE_PRODUCT_IMAGES", array(), $conf->entity, 0, 0, 1, 0);
126print
'<tr class="oddeven"><td>';
127print $langs->trans(
'ShowProductReference');
129$array = array(
"0"=>$langs->trans(
"Label"), 1=>$langs->trans(
"Ref").
'+'.$langs->trans(
"Label"), 2=>$langs->trans(
"Ref"));
130print $form->selectarray(
'TAKEPOS_SHOW_PRODUCT_REFERENCE', $array,
getDolGlobalInt(
'TAKEPOS_SHOW_PRODUCT_REFERENCE', 2), 0);
135print
'<tr class="oddeven"><td>';
136print $langs->trans(
"NumberOfLinesToShow");
138$array = array(1=>
"1", 2=>
"2", 3=>
"3", 4=>
"4", 5=>
"5", 6=>
"6");
139print $form->selectarray(
'TAKEPOS_LINES_TO_SHOW', $array,
getDolGlobalInt(
'TAKEPOS_LINES_TO_SHOW', 2), 0);
143print
'<tr class="oddeven"><td>';
144print $langs->trans(
'HideStockOnLine');
146print ajax_constantonoff(
"TAKEPOS_HIDE_STOCK_ON_LINE", array(), $conf->entity, 0, 0, 1, 0);
150print
'<tr class="oddeven"><td>';
151print $langs->trans(
'ShowOnlyProductInStock');
153print ajax_constantonoff(
"TAKEPOS_PRODUCT_IN_STOCK", array(), $conf->entity, 0, 0, 1, 0);
157print
'<tr class="oddeven"><td>';
158print $langs->trans(
'ShowCategoryDescription');
160print ajax_constantonoff(
"TAKEPOS_SHOW_CATEGORY_DESCRIPTION", array(), $conf->entity, 0, 0, 1, 0);
165print $form->buttonsSaveCancel(
"Save",
'');
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
takepos_admin_prepare_head()
Prepare array with list of tabs.