Skip to content
Snippets Groups Projects
Commit 7a557818 authored by Eric Seigne's avatar Eric Seigne
Browse files

mise en page un peu plus belle quand on regarde le code html généré (retours à...

mise en page un peu plus belle quand on regarde le code html généré (retours à la ligne, identation), on n'affiche ce qui concerne les commandes que si le module est actif, amélioration du formulaire d'envoi pour avoir une pièce jointe en plus
parent 3914f0eb
Branches
No related tags found
No related merge requests found
<?php <?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -500,16 +501,16 @@ if ($_GET["propalid"]) ...@@ -500,16 +501,16 @@ if ($_GET["propalid"])
*/ */
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print "<tr ".$bc[$var].">\n";
print '<td>&nbsp;</td>'; print " <td>&nbsp;</td>\n";
print '<td><input type="text" size="28" name="np_desc"></td>'; print " <td><textarea cols=\"50\" name=\"np_desc\"></textarea></td>\n";
print '<td align="center">'; print " <td align=\"center\">";
print $html->select_tva("np_tva_tx",$conf->defaulttx) . '</td>'; print $html->select_tva("np_tva_tx",$conf->defaulttx) . "</td>\n";
print '<td align="center"><input type="text" size="3" value="1" name="np_qty"></td>'; print " <td align=\"center\"><input type=\"text\" size=\"3\" value=\"1\" name=\"np_qty\"></td>\n";
print '<td align="center"><input type="text" size="3" value="'.$societe->remise_client.'" name="np_remise"> %</td>'; print " <td align=\"center\"><input type=\"text\" size=\"3\" value=\"".$societe->remise_client."\" name=\"np_remise\"> %</td>\n";
print '<td align="right"><input type="text" size="6" name="np_price"></td>'; print " <td align=\"right\"><input type=\"text\" size=\"6\" name=\"np_price\"></td>\n";
print '<td align="center"><input type="submit" value="'.$langs->trans("Add").'" name="addproduct"></td>'; print " <td align=\"center\"><input type=\"submit\" value=\"".$langs->trans("Add")."\" name=\"addproduct\"></td>\n";
print '</tr>'; print "</tr>";
/* /*
* Ligne d'ajout de produits/services prdfinis * Ligne d'ajout de produits/services prdfinis
...@@ -689,8 +690,9 @@ if ($_GET["propalid"]) ...@@ -689,8 +690,9 @@ if ($_GET["propalid"])
print "</table>\n"; print "</table>\n";
/* /*
* * Si le module commandes est activ ...
*/ */
if($conf->commande->enabled) {
$nb_commande = sizeof($propal->commande_liste_array()); $nb_commande = sizeof($propal->commande_liste_array());
if ($nb_commande > 0) if ($nb_commande > 0)
{ {
...@@ -701,9 +703,9 @@ if ($_GET["propalid"]) ...@@ -701,9 +703,9 @@ if ($_GET["propalid"])
{ {
print "<tr><td>Commande rattache : "; print "<tr><td>Commande rattache : ";
print '<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[$i].'">'; print '<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[0].'">';
print img_file(); print img_file();
print '</a>&nbsp;<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[$i].'">'.$coms[$i]."</a>"; print '</a>&nbsp;<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[0].'">'.$coms[0]."</a>";
print "</td></tr>\n"; print "</td></tr>\n";
} }
else else
...@@ -718,7 +720,7 @@ if ($_GET["propalid"]) ...@@ -718,7 +720,7 @@ if ($_GET["propalid"])
} }
print "</table>"; print "</table>";
} }
}
...@@ -788,19 +790,18 @@ if ($_GET["propalid"]) ...@@ -788,19 +790,18 @@ if ($_GET["propalid"])
$message = "Veuillez trouver ci-joint notre proposition commerciale $propal->ref\n\nCordialement\n\n"; $message = "Veuillez trouver ci-joint notre proposition commerciale $propal->ref\n\nCordialement\n\n";
print "<form method=\"post\" ENCTYPE=\"multipart/form-data\" action=\"propal.php?propalid=$propal->id&amp;action=send\">\n"; print "<form method=\"post\" ENCTYPE=\"multipart/form-data\" action=\"propal.php?propalid=$propal->id&amp;action=send\">\n";
print '<input type="hidden" name="replytoname" value="'.$replytoname.'">'; print '<input type="hidden" name="replytoname" value="'.$replytoname.'">';
print '<input type="hidden" name="replytomail" value="'.$replytomail.'">'; print '<input type="hidden" name="replytomail" value="'.$replytomail.'">';
print '<input type="hidden" name="max_file_size" value="2000000">'; print '<input type="hidden" name="max_file_size" value="2000000">';
print_titre("Envoyer la propale par mail"); print_titre("Envoyer la propale par mail");
$form=new Form($db);
// Formulaire envoi mail // Formulaire envoi mail
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Destinataire // Destinataire
print "<tr><td width=\"180\">Destinataire</td>"; print "<tr><td width=\"180\">Destinataire</td>";
print "<td colspan=\"6\" align=\"left\"><input size=\"50\" name=\"sendto\" value=\"" . ucfirst(strtolower($obj->firstname)) . " " . ucfirst(strtolower($obj->name)) . " <$obj->email>\"></td></tr>"; print "<td colspan=\"6\" align=\"left\"><input size=\"50\" name=\"sendto\" value=\"" . ucfirst(strtolower($obj->firstname)) . " " . ucfirst(strtolower($obj->name)) . " <$obj->email>\"></td></tr>";
// CC // CC
...@@ -811,11 +812,11 @@ if ($_GET["propalid"]) ...@@ -811,11 +812,11 @@ if ($_GET["propalid"])
print "<tr><td>Expediteur</td><td colspan=\"5\">$from_name</td><td>$from_mail</td></tr>"; print "<tr><td>Expediteur</td><td colspan=\"5\">$from_name</td><td>$from_mail</td></tr>";
print "<tr><td>Reply-to</td><td colspan=\"5\">$replytoname</td>"; print "<tr><td>Reply-to</td><td colspan=\"5\">$replytoname</td>";
print "<td>$replytomail</td></tr>"; print "<td>$replytomail</td></tr>";
print "<tr><td valign=\"top\">Joindre un fichier en plus de la propale<br>(conditions gnrales de ventes ...)</td><td colspan=\"6\"><input type=\"file\" name=\"addedfile\" size=\"40\" maxlength=\"80\"></td></tr>";
print "<tr><td valign=\"top\">Message</td><td colspan=\"6\"><textarea rows=\"5\" cols=\"40\" name=\"message\">$message</textarea></td></tr>";
print "</table>"; print "</table>";
$form->mail_topicmessagefile(0,1,1,$message);
print "<input type=\"submit\" value=\"".$langs->trans("Send")."\">"; print "<input type=\"submit\" value=\"".$langs->trans("Send")."\">";
print "</form>"; print "</form>";
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment