From 1f12ccb9a5632ea13fea86576824623653334714 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 14 Sep 2011 23:01:07 +0000 Subject: [PATCH] Uniformize code --- htdocs/cashdesk/index.php | 2 +- htdocs/product/stock/fiche.php | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index ad74c066bd7..0e8a6af9265 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -86,7 +86,7 @@ print ''; $disabled=0; $langs->load("companies"); if (! empty($conf->global->CASHDESK_ID_THIRDPARTY)) $disabled=1; // If a particular third party is defined, we disable choice -$form->select_societes(GETPOST('socid')?GETPOST('socid'):$conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client=1',!$disabled,$disabled,1); +$form->select_societes(GETPOST('socid')?GETPOST('socid'):$conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',!$disabled,$disabled,1); //print ''; print ''; print "\n"; diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index cc3fca7e327..e3b6fbff645 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -71,11 +71,11 @@ if ($_POST["action"] == 'add' && $user->rights->stock->creer) } $_GET["action"] = 'create'; - $mesg="
".$entrepot->error."
"; + $mesg='
'.$entrepot->error.'
'; } else { - $mesg="
".$langs->trans("ErrorWarehouseRefRequired")."
"; - $_GET["action"]="create"; // Force retour sur page cr�ation + $mesg='
'.$langs->trans("ErrorWarehouseRefRequired").'
'; + $_GET["action"]="create"; // Force retour sur page creation } } @@ -116,7 +116,7 @@ if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) { $_GET["action"] = ''; $_GET["id"] = $_POST["id"]; - //$mesg = '
Fiche mise � jour
'; + //$mesg = '
Fiche mise a jour
'; } else { @@ -161,10 +161,7 @@ if ($_GET["action"] == 'create') print ''; print ''."\n"; - if ($mesg) - { - print $mesg; - } + dol_htmloutput_mesg($mesg); print ''; @@ -199,16 +196,17 @@ if ($_GET["action"] == 'create') print ''; print ''; - print ''; - print '
'; + + print '

'; + print ''; } else { if ($_GET["id"]) { - if ($mesg) print $mesg; + dol_htmloutput_mesg($mesg); $entrepot = new Entrepot($db); $result = $entrepot->fetch($_GET["id"]);