Show option for service only if module service is on
This commit is contained in:
parent
7fb0b2850a
commit
d67f2feb7f
@ -20,7 +20,7 @@
|
|||||||
* \file htdocs/cashdesk/admin/cashdesk.php
|
* \file htdocs/cashdesk/admin/cashdesk.php
|
||||||
* \ingroup cashdesk
|
* \ingroup cashdesk
|
||||||
* \brief Setup page for cashdesk module
|
* \brief Setup page for cashdesk module
|
||||||
* \version $Id: cashdesk.php,v 1.9 2011/08/26 15:05:41 simnandez Exp $
|
* \version $Id: cashdesk.php,v 1.10 2011/08/26 23:56:14 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
@ -49,7 +49,7 @@ $langs->load("cashdesk");
|
|||||||
if (GETPOST("action") == 'set')
|
if (GETPOST("action") == 'set')
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
if (GETPOST("socid") < 0) $_POST["socid"]='';
|
if (GETPOST("socid") < 0) $_POST["socid"]='';
|
||||||
/*if (GETPOST("CASHDESK_ID_BANKACCOUNT") < 0) $_POST["CASHDESK_ID_BANKACCOUNT"]='';
|
/*if (GETPOST("CASHDESK_ID_BANKACCOUNT") < 0) $_POST["CASHDESK_ID_BANKACCOUNT"]='';
|
||||||
if (GETPOST("CASHDESK_ID_WAREHOUSE") < 0) $_POST["CASHDESK_ID_WAREHOUSE"]='';*/
|
if (GETPOST("CASHDESK_ID_WAREHOUSE") < 0) $_POST["CASHDESK_ID_WAREHOUSE"]='';*/
|
||||||
@ -62,9 +62,9 @@ if (GETPOST("action") == 'set')
|
|||||||
$res = dolibarr_set_const($db,"CASHDESK_SERVICES", GETPOST("CASHDESK_SERVICES"),'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db,"CASHDESK_SERVICES", GETPOST("CASHDESK_SERVICES"),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
dol_syslog("admin/cashdesk: level ".GETPOST("level"));
|
dol_syslog("admin/cashdesk: level ".GETPOST("level"));
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@ -84,7 +84,7 @@ if (GETPOST("action") == 'set')
|
|||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
$formproduct=new FormProduct($db);
|
$formproduct=new FormProduct($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader('',$langs->trans("CashDeskSetup"));
|
||||||
|
|
||||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
print_fiche_titre($langs->trans("CashDeskSetup"),$linkback,'setup');
|
print_fiche_titre($langs->trans("CashDeskSetup"),$linkback,'setup');
|
||||||
@ -136,12 +136,15 @@ if ($conf->stock->enabled)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$var=! $var;
|
if ($conf->service->enabled)
|
||||||
print '<tr '.$bc[$var].'><td>';
|
{
|
||||||
print $langs->trans("CashdeskShowServices");
|
$var=! $var;
|
||||||
print '<td colspan="2">';;
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
|
print $langs->trans("CashdeskShowServices");
|
||||||
print "</td></tr>\n";
|
print '<td colspan="2">';;
|
||||||
|
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
|
||||||
|
print "</td></tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -151,7 +154,8 @@ print '<center><input type="submit" class="button" value="'.$langs->trans("Save"
|
|||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
dol_htmloutput_mesg($mesg);
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/08/26 15:05:41 $ - $Revision: 1.9 $');
|
llxFooter('$Date: 2011/08/26 23:56:14 $ - $Revision: 1.10 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user