Skip to content

Commit

Permalink
Show option for service only if module service is on
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 26, 2011
1 parent 6bf85f4 commit a8361cd
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions htdocs/cashdesk/admin/cashdesk.php
Expand Up @@ -20,7 +20,7 @@
* \file htdocs/cashdesk/admin/cashdesk.php
* \ingroup cashdesk
* \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");
Expand Down Expand Up @@ -49,7 +49,7 @@
if (GETPOST("action") == 'set')
{
$db->begin();

if (GETPOST("socid") < 0) $_POST["socid"]='';
/*if (GETPOST("CASHDESK_ID_BANKACCOUNT") < 0) $_POST["CASHDESK_ID_BANKACCOUNT"]='';
if (GETPOST("CASHDESK_ID_WAREHOUSE") < 0) $_POST["CASHDESK_ID_WAREHOUSE"]='';*/
Expand All @@ -62,9 +62,9 @@
$res = dolibarr_set_const($db,"CASHDESK_SERVICES", GETPOST("CASHDESK_SERVICES"),'chaine',0,'',$conf->entity);

dol_syslog("admin/cashdesk: level ".GETPOST("level"));

if (! $res > 0) $error++;

if (! $error)
{
$db->commit();
Expand All @@ -84,7 +84,7 @@
$form=new Form($db);
$formproduct=new FormProduct($db);

llxHeader();
llxHeader('',$langs->trans("CashDeskSetup"));

$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("CashDeskSetup"),$linkback,'setup');
Expand Down Expand Up @@ -136,12 +136,15 @@
print '</td></tr>';
}

$var=! $var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("CashdeskShowServices");
print '<td colspan="2">';;
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
print "</td></tr>\n";
if ($conf->service->enabled)
{
$var=! $var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("CashdeskShowServices");
print '<td colspan="2">';;
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
print "</td></tr>\n";
}

print '</table>';
print '<br>';
Expand All @@ -151,7 +154,8 @@
print "</form>\n";

dol_htmloutput_mesg($mesg);

$db->close();

llxFooter('$Date: 2011/08/26 15:05:41 $ - $Revision: 1.9 $');
llxFooter('$Date: 2011/08/26 23:56:14 $ - $Revision: 1.10 $');
?>

0 comments on commit a8361cd

Please sign in to comment.