Ajout du wrapper pour les remises de cheque dans show documents

This commit is contained in:
Rodolphe Quiedeville 2006-12-21 21:52:45 +00:00
parent 0c4263efb5
commit 2a6793fb79

View File

@ -2641,108 +2641,116 @@ class Form
// Affiche en-tete tableau // Affiche en-tete tableau
if ($genallowed) if ($genallowed)
{ {
$modellist=array(); $modellist=array();
if ($modulepart == 'propal') if ($modulepart == 'propal')
{ {
if (is_array($genallowed)) $modellist=$genallowed; if (is_array($genallowed)) $modellist=$genallowed;
else else
{ {
include_once(DOL_DOCUMENT_ROOT.'/includes/modules/propale/modules_propale.php'); include_once(DOL_DOCUMENT_ROOT.'/includes/modules/propale/modules_propale.php');
$model=new ModelePDFPropales(); $model=new ModelePDFPropales();
$modellist=$model->liste_modeles($this->db); $modellist=$model->liste_modeles($this->db);
} }
} }
else if ($modulepart == 'commande') else if ($modulepart == 'commande')
{ {
if (is_array($genallowed)) $modellist=$genallowed; if (is_array($genallowed)) $modellist=$genallowed;
else else
{ {
include_once(DOL_DOCUMENT_ROOT.'/includes/modules/commande/modules_commande.php'); include_once(DOL_DOCUMENT_ROOT.'/includes/modules/commande/modules_commande.php');
$model=new ModelePDFCommandes(); $model=new ModelePDFCommandes();
$modellist=$model->liste_modeles($this->db); $modellist=$model->liste_modeles($this->db);
} }
} }
elseif ($modulepart == 'expedition') elseif ($modulepart == 'expedition')
{ {
if (is_array($genallowed)) $modellist=$genallowed; if (is_array($genallowed)) $modellist=$genallowed;
else else
{ {
include_once(DOL_DOCUMENT_ROOT.'/expedition/mods/pdf/ModelePdfExpedition.class.php'); include_once(DOL_DOCUMENT_ROOT.'/expedition/mods/pdf/ModelePdfExpedition.class.php');
$model=new ModelePDFExpedition(); $model=new ModelePDFExpedition();
$modellist=$model->liste_modeles($this->db); $modellist=$model->liste_modeles($this->db);
} }
} }
elseif ($modulepart == 'livraison') elseif ($modulepart == 'livraison')
{ {
if (is_array($genallowed)) $modellist=$genallowed; if (is_array($genallowed)) $modellist=$genallowed;
else else
{ {
include_once(DOL_DOCUMENT_ROOT.'/livraison/mods/modules_livraison.php'); include_once(DOL_DOCUMENT_ROOT.'/livraison/mods/modules_livraison.php');
$model=new ModelePDFDeliveryOrder(); $model=new ModelePDFDeliveryOrder();
$modellist=$model->liste_modeles($this->db); $modellist=$model->liste_modeles($this->db);
} }
} }
else if ($modulepart == 'ficheinter') else if ($modulepart == 'ficheinter')
{ {
if (is_array($genallowed)) $modellist=$genallowed; if (is_array($genallowed)) $modellist=$genallowed;
else else
{ {
include_once(DOL_DOCUMENT_ROOT.'/includes/modules/fichinter/modules_fichinter.php'); include_once(DOL_DOCUMENT_ROOT.'/includes/modules/fichinter/modules_fichinter.php');
$model=new ModelePDFFicheinter(); $model=new ModelePDFFicheinter();
$modellist=$model->liste_modeles($this->db); $modellist=$model->liste_modeles($this->db);
} }
} }
elseif ($modulepart == 'facture') elseif ($modulepart == 'facture')
{ {
if (is_array($genallowed)) $modellist=$genallowed; if (is_array($genallowed)) $modellist=$genallowed;
else else
{ {
include_once(DOL_DOCUMENT_ROOT.'/includes/modules/facture/modules_facture.php'); include_once(DOL_DOCUMENT_ROOT.'/includes/modules/facture/modules_facture.php');
$model=new ModelePDFFactures(); $model=new ModelePDFFactures();
$modellist=$model->liste_modeles($this->db); $modellist=$model->liste_modeles($this->db);
} }
} }
elseif ($modulepart == 'export') elseif ($modulepart == 'export')
{ {
if (is_array($genallowed)) $modellist=$genallowed; if (is_array($genallowed)) $modellist=$genallowed;
else else
{ {
include_once(DOL_DOCUMENT_ROOT.'/includes/modules/export/modules_export.php'); include_once(DOL_DOCUMENT_ROOT.'/includes/modules/export/modules_export.php');
$model=new ModeleExports(); $model=new ModeleExports();
$modellist=$model->liste_modeles($this->db); $modellist=$model->liste_modeles($this->db);
} }
} }
else if ($modulepart == 'commande_fournisseur') else if ($modulepart == 'commande_fournisseur')
{ {
if (is_array($genallowed)) $modellist=$genallowed; if (is_array($genallowed)) $modellist=$genallowed;
else else
{ {
include_once(DOL_DOCUMENT_ROOT.'/fourn/commande/modules/modules_commandefournisseur.php'); include_once(DOL_DOCUMENT_ROOT.'/fourn/commande/modules/modules_commandefournisseur.php');
$model=new ModelePDFCommandesSuppliers(); $model=new ModelePDFCommandesSuppliers();
$modellist=$model->liste_modeles($this->db); $modellist=$model->liste_modeles($this->db);
} }
} }
else if ($modulepart == 'facture_fournisseur') else if ($modulepart == 'facture_fournisseur')
{ {
if (is_array($genallowed)) $modellist=$genallowed; if (is_array($genallowed)) $modellist=$genallowed;
else else
{ {
include_once(DOL_DOCUMENT_ROOT.'/fourn/facture/modules/modules_facturefournisseur.php'); include_once(DOL_DOCUMENT_ROOT.'/fourn/facture/modules/modules_facturefournisseur.php');
$model=new ModelePDFFacturesSuppliers(); $model=new ModelePDFFacturesSuppliers();
$modellist=$model->liste_modeles($this->db); $modellist=$model->liste_modeles($this->db);
} }
} }
else else if ($modulepart == 'remisecheque')
{
if (is_array($genallowed)) $modellist=$genallowed;
else
{
// ??
}
}
else
{ {
dolibarr_print_error($this->db,'Bad value for modulepart'); dolibarr_print_error($this->db,'Bad value for modulepart');
return -1; return -1;
} }
$headershown=1; $headershown=1;
print '<form action="'.$urlsource.'#builddoc" method="post">'; print '<form action="'.$urlsource.'#builddoc" method="post">';
print '<input type="hidden" name="action" value="builddoc">'; print '<input type="hidden" name="action" value="builddoc">';
print_titre($langs->trans("Documents")); print_titre($langs->trans("Documents"));
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';