Correction mise en erreur commande et intégration méthode ajax
This commit is contained in:
parent
94087954a4
commit
baf46f17f6
@ -403,7 +403,7 @@ function afficheCommande($commande, $type){
|
||||
hasModeEdition()){
|
||||
$contenuLien.= '<div>'.
|
||||
'<a class="changeEtat" title="Erreur sur la commande" target="_blank" '.
|
||||
'href="./pages/greffescmd.php?id='.$commande->idCommande.'&erreur=9&ajax=true">'.
|
||||
'href="./?page=saisieajax&q=greffescmd/erreur/'.$commande->idCommande.'">'.
|
||||
'Placer cette commande en erreur'.
|
||||
'</a>'.
|
||||
'</div>';
|
||||
|
@ -47,6 +47,7 @@ switch ( $action ) {
|
||||
break;
|
||||
case 'greffescmd':
|
||||
$output = '';
|
||||
|
||||
//Enregistrement du changement d'état
|
||||
if ( $_REQUEST['changeEtat'] ){
|
||||
require_once 'dbbootstrap.php';
|
||||
@ -84,8 +85,32 @@ switch ( $action ) {
|
||||
'Générer le courrier</a>';
|
||||
}
|
||||
}
|
||||
echo $output;
|
||||
// Fin change etat
|
||||
} elseif ($params[1]=='erreur') {
|
||||
$idCommande = $params[2];
|
||||
?>
|
||||
<form id="formComment" name="formComment" action="/?page=saisieajax&q=greffescmd/comment" method="post">
|
||||
<span id="message"></span><br/>
|
||||
<input type="hidden" name="idCommande" value="<?=$idCommande?>"/>
|
||||
<input type="hidden" name="statutCommande" value="9"/>
|
||||
Commentaire sur la commande G<?=$idCommande?><br/>
|
||||
<textarea name="commentaire" cols="40" rows="3"></textarea>
|
||||
</form>
|
||||
<?php
|
||||
// Fin formulaire erreur
|
||||
} elseif ($params[1]=='comment') {
|
||||
require_once 'dbbootstrap.php';
|
||||
setDbConn('sdv1');
|
||||
$q = Doctrine_Query::create()
|
||||
->update('Commandes')
|
||||
->set('statutCommande', '?', $_REQUEST['statutCommande'])
|
||||
->set('commentaire', '?', $_REQUEST['commentaire'])
|
||||
->where('idCommande = ?', $_REQUEST['idCommande']);
|
||||
//echo $q->getSql();
|
||||
//print_r($q->getFlattenedParams());
|
||||
echo $rows = $q->execute();
|
||||
}
|
||||
echo $output;
|
||||
break;
|
||||
//Gestion des logos
|
||||
case 'logo':
|
||||
|
@ -5,20 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
if ( isset($_REQUEST['submit']) && $_REQUEST['submit']=='comment' ){
|
||||
require_once 'dbbootstrap.php';
|
||||
setDbConn('sdv1');
|
||||
$q = Doctrine_Query::create()
|
||||
->update('Commandes')
|
||||
->set('statutCommande', '?', $_REQUEST['statutCommande'])
|
||||
->set('commentaire', '?', $_REQUEST['commentaire'])
|
||||
->where('idCommande = ?', $_REQUEST['idCommande']);
|
||||
//echo $q->getSql();
|
||||
//print_r($q->getFlattenedParams());
|
||||
echo $rows = $q->execute();
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( isset($_REQUEST['rs']) ){
|
||||
$client = new SoapClient( null,
|
||||
array( 'trace' => 1,
|
||||
@ -38,19 +24,6 @@ if ( isset($_REQUEST['rs']) ){
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['ajax'])){
|
||||
?>
|
||||
<form>
|
||||
<span id="message"></span><br/>
|
||||
<input type="hidden" name="idCommande" value="<?=$_REQUEST['id']?>"/>
|
||||
<input type="hidden" name="statutCommande" value="<?=$_REQUEST['erreur']?>"/>
|
||||
Commentaire sur la commande G<?=$_REQUEST['id']?><br/>
|
||||
<textarea name="commentaire" cols="40" rows="3"></textarea>
|
||||
</form>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
table {width:100%; border-collapse:collapse; margin:5px 0;}
|
||||
|
Loading…
x
Reference in New Issue
Block a user