';
+ print '| '.$langs->trans("Ref").' | | ';
+
print '';
print $langs->trans("Comments").' |
';
- print "| Date | ";
- print_date_select();
- print " | ";
-
+ print '
| '.$langs->trans("Company").' | '.$soc->nom.' | ';
print '';
print '';
+ print ' |
';
- print '| Auteur | '.$user->fullname.' |
';
- print '| Numéro | |
'."\n";
- print '| Validité | jours |
';
+ print "| ".$langs->trans("Date")." | ";
+ print_date_select();
+ print " |
";
+
+ print '| '.$langs->trans("Author").' | '.$user->fullname.' |
';
+ print '| Durée de validité | '.$langs->trans("days").' |
';
+
/*
- *
* Destinataire de la propale
- *
*/
- print "| Contact | \n";
+ print " |
| ".$langs->trans("Contact")." | \n";
$sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email FROM ".MAIN_DB_PREFIX."socpeople as p";
$sql .= " WHERE p.fk_soc = ".$soc->id;
if ( $db->query($sql) )
{
- $langs->load("companies");
-
$i = 0 ;
$numdest = $db->num_rows();
if ($numdest==0)
{
- print 'Cette societe n\'a pas de contact, veuillez en créer un avant de faire votre proposition commerciale ';
- print ''.$langs->trans("AddContact").'';
+ print 'Cette societe n\'a pas de contact, veuillez en créer un avant de faire votre proposition commerciale ';
+ print ''.$langs->trans("AddContact").'';
}
else
{
@@ -119,9 +127,11 @@ if ($_GET["action"] == 'create')
print '';
+ print '>'.$contact->firstname.' '.$contact->name;
+ if ($contact->email) { print ' <'.$contact->email.'>'; }
+ print '';
$i++;
}
print '';
@@ -129,54 +139,59 @@ if ($_GET["action"] == 'create')
$db->free();
}
- else
- {
- print $db->error();
- }
-
-
- print ' |
';
- /*
- *
- * Projet associé
- *
- */
- print '| Projet | ';
- print '';
-
- $sql = "SELECT p.rowid, p.title FROM ".MAIN_DB_PREFIX."projet as p WHERE p.fk_soc =".$soc->id;
-
- if ( $db->query($sql) )
- {
- $i = 0 ;
- $numprojet = $db->num_rows();
-
- if ($numprojet==0)
- {
- print 'Cette société n\'a pas de projet. ';
- print 'id.'&action=create>Créer un projet';
- }
- else
- {
- print '';
- }
- $db->free();
- }
else
{
dolibarr_print_error($db);
}
+
+ print ' |
';
+ print '';
+ if ($conf->projet->enabled) {
+
+ /*
+ * Projet associé
+ */
+ print '| '.$langs->trans("Project").' | ';
+ print '';
+
+ $sql = "SELECT p.rowid, p.title FROM ".MAIN_DB_PREFIX."projet as p WHERE p.fk_soc =".$soc->id;
+
+ if ( $db->query($sql) )
+ {
+ $i = 0 ;
+ $numprojet = $db->num_rows();
+
+ if ($numprojet==0)
+ {
+ print 'Cette société n\'a pas de projet. ';
+ print 'id.'&action=create>'.$langs->trans("AddProject").'';
+ }
+ else
+ {
+ print '';
+ }
+ $db->free();
+ }
+ else
+ {
+ dolibarr_print_error($db);
+ }
+
+ print ' | ';
+ }
+ else {
+ print ' | ';
+ }
- print '';
print 'Modèle | ';
print '';
$html = new Form($db);
@@ -184,46 +199,54 @@ if ($_GET["action"] == 'create')
$html->select_array("modelpdf",$modelpdf->liste_array(),PROPALE_ADDON_PDF);
print " |
";
- /*
- *
- * Liste des elements
- *
- */
- $sql = "SELECT p.rowid,p.label,p.ref,p.price FROM ".MAIN_DB_PREFIX."product as p ";
- $sql .= " WHERE envente = 1";
- $sql .= " ORDER BY ref DESC";
- if ( $db->query($sql) )
- {
- $opt = "