Génération courrier kbis (beta)
This commit is contained in:
parent
220d6f9863
commit
b54d900729
@ -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>';
|
||||
|
||||
@ -314,10 +327,10 @@ function afficheCommande($commande, $type){
|
||||
' </td>'.
|
||||
' <td>';
|
||||
|
||||
if ($commande->type=='C'){
|
||||
if ( $commande->type=='C' ) {
|
||||
$output.= 'Commmande de kbis original par courrier.';
|
||||
|
||||
}elseif ($commande->type=='M'){
|
||||
} elseif ( $commande->type=='M' ) {
|
||||
$output.= 'Commmande de kbis par email.';
|
||||
}
|
||||
|
||||
@ -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>';
|
||||
}
|
||||
|
||||
|
@ -50,24 +50,39 @@ $pdfInfo = new StdClass();
|
||||
|
||||
// => Ref
|
||||
$id = $_REQUEST['id'];
|
||||
$pdfInfo->ref = 'C'.$id;
|
||||
$typeCommande = substr($id, 0, 1);
|
||||
$pdfInfo->ref = substr($id, 1);
|
||||
|
||||
// => Info Commande
|
||||
$q = Doctrine_Query::create()
|
||||
->from('Commandes')
|
||||
->where('idCommande = ?', $id)
|
||||
->andWhere('typeCommande = ?', 'C');
|
||||
if ( $typCommande == 'C' ) {
|
||||
|
||||
$commande = $q->fetchOne();
|
||||
if( preg_match('/^([0-9]{4}_).*?$/', $commande->refDocument, $matches) )
|
||||
{
|
||||
$typeDocument = 'bilans';
|
||||
}
|
||||
else
|
||||
{
|
||||
$typeDocument = 'actes';
|
||||
// => Info Commande
|
||||
$q = Doctrine_Query::create()
|
||||
->from('Commandes')
|
||||
->where('idCommande = ?', $pdfInfo->ref)
|
||||
->andWhere('typeCommande = ?', 'C');
|
||||
|
||||
$commande = $q->fetchOne();
|
||||
if( preg_match('/^([0-9]{4}_).*?$/', $commande->refDocument, $matches) )
|
||||
{
|
||||
$typeDocument = 'bilans';
|
||||
}
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user