Suppression page greffescmd_courrier
This commit is contained in:
parent
ceecdd3e04
commit
96be15f158
@ -260,8 +260,6 @@ function defineMenu(){
|
||||
'href' => 'menu_href_administration');
|
||||
$children[] = array('data' => 'Commandes Greffe',
|
||||
'href' => 'menu_href_greffescmd');
|
||||
$children[] = array('data' => 'Commandes Greffe Courrier',
|
||||
'href' => 'menu_href_greffescmdcourrier');
|
||||
$children[] = array('data' => 'Commandes International',
|
||||
'href' => 'menu_href_internationalcmd',
|
||||
'perm' => array('list' => array( 'INTERNATIONAL' ),
|
||||
|
@ -464,16 +464,6 @@ function menu_href_greffescmd()
|
||||
return $href;
|
||||
}
|
||||
|
||||
function menu_href_greffescmdcourrier()
|
||||
{
|
||||
$href = false;
|
||||
if(hasModeEdition())
|
||||
{
|
||||
$href = './?page=greffescmd_courrier';
|
||||
}
|
||||
return $href;
|
||||
}
|
||||
|
||||
function menu_href_internationalcmd()
|
||||
{
|
||||
return './?page=international_commandes';
|
||||
|
@ -106,11 +106,6 @@ case 'greffescmd':
|
||||
$page2 = 'greffescmd.php';
|
||||
require_once realpath(dirname(__FILE__)).'/pages/main.php';
|
||||
break;
|
||||
case 'greffescmd_courrier':
|
||||
$title = 'Gestion des commandes Greffes par courrier';
|
||||
$page2 = 'greffescmd_courrier.php';
|
||||
require_once realpath(dirname(__FILE__)).'/pages/main.php';
|
||||
break;
|
||||
case 'international_commandes':
|
||||
$title = 'Commandes - International';
|
||||
$page2 = 'international_commandes.php';
|
||||
|
@ -1,212 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* Liste des commandes passés en mode courrier
|
||||
*
|
||||
*/
|
||||
|
||||
if (!$_SESSION['connected'])
|
||||
{
|
||||
?>
|
||||
<div id="center">
|
||||
Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
elseif(!hasModeEdition())
|
||||
{
|
||||
?>
|
||||
<div id="center">
|
||||
L'accès à cette page est restreint
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
//Affichage des commandes
|
||||
else
|
||||
{
|
||||
//Données
|
||||
isset($_REQUEST['num'])?
|
||||
$num = trim($_REQUEST['num']) :
|
||||
$num = '';
|
||||
isset($_REQUEST['siren'])?
|
||||
$siren = trim(preg_replace('/[^0-9]/','', $_REQUEST['siren'])) :
|
||||
$siren = '';
|
||||
isset($_REQUEST['statut'])?
|
||||
$statut = trim($_REQUEST['statut']) :
|
||||
$statut = 0;
|
||||
isset($_REQUEST['date'])?
|
||||
$date = trim($_REQUEST['date']) :
|
||||
$date = date('m');
|
||||
|
||||
require_once 'dbbootstrap.php';
|
||||
require_once 'infogreffe/constantes.php';
|
||||
setDbConn('sdv1');
|
||||
|
||||
$dateToday = date('m');
|
||||
$dateTime1 = date('Y-m-d H:i:s', mktime(0,0,0,$date,0,date('Y')));
|
||||
$dateTime2 = date('Y-m-d H:i:s', mktime(0,0,0,$date+1,0,date('Y')));
|
||||
$dateIntervalle = 6;
|
||||
|
||||
//Liste des statuts
|
||||
$q = Doctrine_Query::create()
|
||||
->from('CommandesStatut')
|
||||
->where('typeCommande = ?', 'C')
|
||||
->orderBy('ordre ASC');
|
||||
$cStatuts = $q->execute();
|
||||
|
||||
//Liste des commandes
|
||||
$q = Doctrine_Query::create()
|
||||
->from('Commandes')
|
||||
->where('typeCommande = ?', 'C')
|
||||
->andWhere('statutCommande = ?', $statut)
|
||||
->andWhere('dateCommande > ?', $dateTime1)
|
||||
->andWhere('dateCommande < ?', $dateTime2);
|
||||
|
||||
$firephp->log($q->getSql(),'SQL');
|
||||
$firephp->log($q->getParams(),'PARAMS');
|
||||
$commandes = $q->execute();
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
#center{width:760px; padding-right:10px; padding-left:10px;}
|
||||
.blockh2{margin:5px; }
|
||||
table {border-collapse:collapse; margin:5px 0; width:100%;}
|
||||
th, td {border:1px solid; padding:5px;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
var url = './pages/ajax/greffescmd_courrier.php';
|
||||
|
||||
$('.changeEtat').change(function(){
|
||||
var newEtat = $(this).val();
|
||||
var name = $(this).attr('name');
|
||||
$.post(url, { changeEtat: newEtat },
|
||||
function(data){ $('select[name='+name+']').replaceWith(data); }
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<div id="center">
|
||||
<h1>Commandes Courrier Greffes</h1>
|
||||
<div class="blockh2">
|
||||
<form name="" method="post" action="./?page=greffescmd_courrier">
|
||||
|
||||
<label>Etat</label>
|
||||
<select name="statut">
|
||||
<option value="0">Non traité</option>
|
||||
<?php
|
||||
foreach ($cStatuts as $cStatut)
|
||||
{
|
||||
$selected = '';
|
||||
if( $cStatut->ordre == $statut) $selected = 'selected';
|
||||
?>
|
||||
<option value="<?=$cStatut->ordre?>" <?=$selected?>>
|
||||
<?=$cStatut->libStatut?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<label>Date</label>
|
||||
<select name="date">
|
||||
<option>-</option>
|
||||
<?php
|
||||
|
||||
for($i=$dateToday-$dateIntervalle; $i<=$dateToday; $i++)
|
||||
{
|
||||
$dateTime = mktime(0, 0, 0, $i+1, 0, date('Y'));
|
||||
$selected = '';
|
||||
if( $i==$date ){ $selected = 'selected'; }
|
||||
?>
|
||||
<option value="<?=$i?>" <?=$selected?>>
|
||||
<?=date('m/Y', $dateTime)?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<br/>
|
||||
<label>Numéro de gestion</label>
|
||||
<input type="text" name="num" value="<?=$num?>"/>
|
||||
<label>Siren</label>
|
||||
<input type="text" name="siren" value="<?=$siren?>" />
|
||||
<input type="submit" name="submit" value="Rechercher"/>
|
||||
</form>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>N°</th>
|
||||
<th>Siren</th>
|
||||
<th>Email</th>
|
||||
<th>Document</th>
|
||||
<th>dateCommande</th>
|
||||
<th>dateReception</th>
|
||||
</tr>
|
||||
<?php
|
||||
if( $commandes->count() > 0 )
|
||||
{
|
||||
foreach($commandes as $commande)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td>C<?=$commande->idCommande?></td>
|
||||
<td>
|
||||
<a href="./?page=greffes&vue=actes&siret=<?=$commande->siren?>" target="_blank">
|
||||
<?=$commande->siren?></a>
|
||||
</td>
|
||||
<td><?=$commande->emailCommande?></td>
|
||||
|
||||
<td>
|
||||
Ref : <?=$commande->refDocument?> <br/>
|
||||
Type : <?=(array_key_exists('a'.substr($commande->refDocument, 0, 2), $typeActes)) ?
|
||||
$typeActes['a'.substr($commande->refDocument, 0, 2)] : '';
|
||||
?>
|
||||
<br/>
|
||||
Lib : <?=$commande->libDocument?>
|
||||
<br/>
|
||||
<select class="changeEtat" name="Etat<?=$commande->idCommande?>">
|
||||
<?php
|
||||
if($commande->statutCommande == 0)
|
||||
{
|
||||
?>
|
||||
<option value="0">Non traité</option>
|
||||
<?php
|
||||
}
|
||||
foreach ($cStatuts as $cStatut)
|
||||
{
|
||||
$selected = '';
|
||||
//Selection du statut en cours
|
||||
if($cStatut->ordre == $commande->statutCommande)
|
||||
{
|
||||
$selected = 'selected';
|
||||
}
|
||||
//Ne pas afficher les états précedents et les états suivant +2
|
||||
if( $cStatut->ordre == $commande->statutCommande ||
|
||||
$cStatut->ordre == $commande->statutCommande+1 )
|
||||
{
|
||||
?>
|
||||
<option value="<?=$commande->idCommande?>-<?=$cStatut->id?>" <?=$selected?>>
|
||||
<?=$cStatut->libStatut?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<br/>
|
||||
<a href="./pages_saisie/gencourrier.php?id=<?=$commande->idCommande?>"
|
||||
target="_blank">Générer le courrier</a>
|
||||
</td>
|
||||
<td><?=$commande->dateCommande?></td>
|
||||
<td><?=$commande->dateReception?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} // Fin permission d'accès
|
Loading…
x
Reference in New Issue
Block a user