Génération courrier kbis (beta)

This commit is contained in:
Michael RICOIS 2010-06-15 12:46:12 +00:00
parent 220d6f9863
commit b54d900729
2 changed files with 52 additions and 18 deletions

View File

@ -301,8 +301,21 @@ function afficheCommande($commande, $type){
'<b>K' . $commande->id . '</b>' .
'</td>';
/*
* Formulaire pour modifier l'état d'une commande courrier S&D
*/
$contenuEtat = '';
if ($typeCommande=='C' && hasModeEdition()){
$cStatuts = listStatus();
$contenuEtat.= '<a href="./pages_saisie/gencourrier.php?id=K'.
$commande->idCommande.'"target="_blank">Générer le courrier</a>';
}
if ($colspan == 1){
$output.= '<td colspan="2">'.''.'</td>';
$output.= '<td colspan="2">' . $contenuEtat . '</td>';
}
$output.= '</tr>';
@ -403,7 +416,7 @@ function afficheCommande($commande, $type){
}
$contenuEtat.= '</select></div>';
$contenuEtat.= '<a href="./pages_saisie/gencourrier.php?id='.
$contenuEtat.= '<a href="./pages_saisie/gencourrier.php?id=C'.
$commande->idCommande.'"target="_blank">Générer le courrier</a>';
}

View File

@ -50,12 +50,15 @@ $pdfInfo = new StdClass();
// => Ref
$id = $_REQUEST['id'];
$pdfInfo->ref = 'C'.$id;
$typeCommande = substr($id, 0, 1);
$pdfInfo->ref = substr($id, 1);
if ( $typCommande == 'C' ) {
// => Info Commande
$q = Doctrine_Query::create()
->from('Commandes')
->where('idCommande = ?', $id)
->where('idCommande = ?', $pdfInfo->ref)
->andWhere('typeCommande = ?', 'C');
$commande = $q->fetchOne();
@ -68,6 +71,18 @@ else
$typeDocument = 'actes';
}
} elseif ( $typeCommande == 'K'){
// => Info Commande
$q = Doctrine_Query::create()
->from('CommandesKbis')
->where('idCommande = ?', $pdfInfo->ref)
->andWhere('typeCommande = ?', 'C');
$commande = $q->fetchOne();
$typeDocument = 'kbis';
}
// => Identite
$siren = $commande->siren;
@ -208,6 +223,12 @@ elseif( $typeDocument == 'actes' )
substr($commande->refDocument,9,2).'/'.
substr($commande->refDocument,7,2).'/'.
substr($commande->refDocument,3,4);
}
elseif ($typeDocument == 'kbis' )
{
}
$positionY = $pdf->GetY()+2;