Skip to content
Snippets Groups Projects
Commit 68e55a55 authored by Rodolphe Quiedeville's avatar Rodolphe Quiedeville
Browse files

Nettoyage

parent 195f120d
No related branches found
No related tags found
No related merge requests found
......@@ -30,30 +30,6 @@ require_once DOL_DOCUMENT_ROOT."/lib/dolibarrmail.class.php";
*/
if ($user->societe_id > 0) accessforbidden();
if ($_POST["action"] == 'confirm_rejet')
{
if ( $_POST["confirm"] == 'yes')
{
if ($_POST["motif"] > 0)
{
$rej = new RejetPrelevement($db, $user);
$rej->create($user, $_GET["id"], $_GET["socid"], $_GET["previd"], $_POST["motif"]);
Header("Location: lignes.php?id=".$_GET["id"]);
}
else
{
Header("Location: lignes.php?id=".$_GET["id"]."&action=rejet&socid=".$_GET["socid"]."&previd=".$_GET["previd"]);
}
}
else
{
Header("Location: lignes.php?id=".$_GET["id"]);
}
}
llxHeader('','Bon de prlvement');
$h = 0;
......@@ -102,55 +78,6 @@ if ($_GET["id"])
}
}
if ($_GET["action"] == 'rejet')
{
$html = new Form($db);
$soc = new Societe($db);
$soc->fetch($_GET["socid"]);
//$html->form_confirm("factures.php"."?id=".$_GET["id"]."&socid=".$_GET["socid"]."&previd=".$_GET["previd"],"Rejet de prlvement","Etes-vous sr de vouloir saisir un rejet de prlvement pour la socit ".$soc->nom." ?","confirm_rejet");
$rej = new RejetPrelevement($db, $user);
print '<form method="post" action="lignes.php?id='.$_GET["id"]."&amp;socid=".$_GET["socid"]."&amp;previd=".$_GET["previd"].'">';
print '<input type="hidden" name="action" value="confirm_rejet">';
print '<table class="border" width="100%">';
print '<tr><td colspan="3">Rejet de prlvement</td></tr>';
print '<tr><td class="valid">Etes-vous sr de vouloir saisir un rejet de prlvement pour la socit '.$soc->nom.' ?</td>';
print '<td colspan="2" class="valid">';
print '<select name="confirm">';
print '<option value="yes">oui</option>';
print '<option value="no" selected>non</option>';
print '</select>';
print '</td></tr>';
print '<tr><td class="valid">Motif du rejet</td>';
print '<td class="valid">';
print '<select name="motif">';
print '<option value="0">(Motif du Rejet)</option>';
foreach($rej->motifs as $key => $value)
{
print '<option value="'.$key.'">'.$value.'</option>';
}
print '</select>';
print '</td>';
print '<td class="valid" align="center">';
print '<input type="submit" value="Confirmer"></td></tr>';
print '</table></form>';
print '<table class="border" width="100%">';
print '<tr><td width="20%">Rfrence</td><td>'.$bon->ref.'</td></tr>';
print '</table><br />';
}
$page = $_GET["page"];
$sortorder = $_GET["sortorder"];
$sortfield = $_GET["sortfield"];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment