Uniformize code
This commit is contained in:
parent
9b949351ac
commit
1f12ccb9a5
@ -86,7 +86,7 @@ print '<td>';
|
||||
$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 '<input name="warehouse_id" class="texte_login" type="warehouse_id" value="" />';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -71,11 +71,11 @@ if ($_POST["action"] == 'add' && $user->rights->stock->creer)
|
||||
}
|
||||
|
||||
$_GET["action"] = 'create';
|
||||
$mesg="<div class='error'>".$entrepot->error."</div>";
|
||||
$mesg='<div class="error">'.$entrepot->error.'</div>';
|
||||
}
|
||||
else {
|
||||
$mesg="<div class='error'>".$langs->trans("ErrorWarehouseRefRequired")."</div>";
|
||||
$_GET["action"]="create"; // Force retour sur page cr<EFBFBD>ation
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorWarehouseRefRequired").'</div>';
|
||||
$_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 = '<div class="ok">Fiche mise <EFBFBD> jour</div>';
|
||||
//$mesg = '<div class="ok">Fiche mise a jour</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -161,10 +161,7 @@ if ($_GET["action"] == 'create')
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">'."\n";
|
||||
|
||||
if ($mesg)
|
||||
{
|
||||
print $mesg;
|
||||
}
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -199,16 +196,17 @@ if ($_GET["action"] == 'create')
|
||||
print '</select>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Create").'"></td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center><br><input type="submit" class="button" value="'.$langs->trans("Create").'"></center>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($_GET["id"])
|
||||
{
|
||||
if ($mesg) print $mesg;
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
$entrepot = new Entrepot($db);
|
||||
$result = $entrepot->fetch($_GET["id"]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user