Look: Modif esthétique mineure
This commit is contained in:
parent
31d163238b
commit
dd546b402d
@ -26,7 +26,7 @@
|
|||||||
/**
|
/**
|
||||||
\file htdocs/comm/propal.php
|
\file htdocs/comm/propal.php
|
||||||
\ingroup propale
|
\ingroup propale
|
||||||
\brief Page liste des propales
|
\brief Page liste des propales (vision commercial)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('./pre.inc.php');
|
require('./pre.inc.php');
|
||||||
@ -42,10 +42,10 @@ if (!$user->rights->propale->lire)
|
|||||||
|
|
||||||
if ($conf->projet->enabled) require_once '../project.class.php';
|
if ($conf->projet->enabled) require_once '../project.class.php';
|
||||||
if($conf->commande->enabled) require_once '../commande/commande.class.php';
|
if($conf->commande->enabled) require_once '../commande/commande.class.php';
|
||||||
require('./propal_model_pdf.class.php');
|
require_once('./propal_model_pdf.class.php');
|
||||||
require('../propal.class.php');
|
require_once('../propal.class.php');
|
||||||
require('../actioncomm.class.php');
|
require_once('../actioncomm.class.php');
|
||||||
require(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sécurité accés client
|
* Sécurité accés client
|
||||||
|
|||||||
@ -710,26 +710,28 @@ if ($_GET["action"] == 'create')
|
|||||||
/*
|
/*
|
||||||
* Produits
|
* Produits
|
||||||
*/
|
*/
|
||||||
|
print '<br>';
|
||||||
print_titre($langs->trans("Products"));
|
print_titre($langs->trans("Products"));
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Ref").'</td><td>'.$langs->trans("Product").'</td>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Ref").'</td><td>'.$langs->trans("Product").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Price").'</td><td align="center">'.$langs->trans("Discount").'</td><td align="center">'.$langs->trans("Qty").'</td></tr>';
|
print '<td align="right">'.$langs->trans("Price").'</td><td align="center">'.$langs->trans("Discount").'</td><td align="center">'.$langs->trans("Qty").'</td></tr>';
|
||||||
|
|
||||||
|
// Lignes de propal produits prédéfinis
|
||||||
$sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, pt.qty, p.rowid as prodid, pt.remise_percent";
|
$sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, pt.qty, p.rowid as prodid, pt.remise_percent";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt, ".MAIN_DB_PREFIX."product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = ".$_GET["propalid"];
|
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt, ".MAIN_DB_PREFIX."product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = ".$_GET["propalid"];
|
||||||
$sql .= " ORDER BY pt.rowid ASC";
|
$sql .= " ORDER BY pt.rowid ASC";
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object();
|
$objp = $db->fetch_object($result);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]><td>[$objp->ref]</td>\n";
|
print "<tr $bc[$var]><td>".img_object($langs->trans(""),"product")." ".$objp->ref."</td>\n";
|
||||||
print '<td>'.$objp->product.'</td>';
|
print '<td>'.$objp->product.'</td>';
|
||||||
print "<td align=\"right\">".price($objp->price)."</td>";
|
print "<td align=\"right\">".price($objp->price)."</td>";
|
||||||
print '<td align="center">'.$objp->remise_percent.'%</td>';
|
print '<td align="center">'.$objp->remise_percent.'%</td>';
|
||||||
@ -737,18 +739,20 @@ if ($_GET["action"] == 'create')
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Lignes de propal non produits prédéfinis
|
||||||
$sql = "SELECT pt.rowid, pt.description as product, pt.price, pt.qty, pt.remise_percent";
|
$sql = "SELECT pt.rowid, pt.description as product, pt.price, pt.qty, pt.remise_percent";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt ";
|
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt ";
|
||||||
$sql .= " WHERE pt.fk_propal = ".$_GET["propalid"];
|
$sql .= " WHERE pt.fk_propal = ".$_GET["propalid"];
|
||||||
$sql .= " AND pt.fk_product = 0";
|
$sql .= " AND pt.fk_product = 0";
|
||||||
$sql .= " ORDER BY pt.rowid ASC";
|
$sql .= " ORDER BY pt.rowid ASC";
|
||||||
if ($db->query($sql))
|
$result=$db->query($sql);
|
||||||
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object();
|
$objp = $db->fetch_object($result);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]><td> </td>\n";
|
print "<tr $bc[$var]><td> </td>\n";
|
||||||
print '<td>'.$objp->product.'</td>';
|
print '<td>'.$objp->product.'</td>';
|
||||||
|
|||||||
@ -132,8 +132,8 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
|||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td><a href="facture.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"),"bill").' '.$obj->facnumber.'</a></td>';
|
print '<tr '.$bc[$var].'><td nowrap><a href="facture.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"),"bill").' '.$obj->facnumber.'</a></td>';
|
||||||
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.img_object($langs->trans("Showcompany"),"company").' '.dolibarr_trunc($obj->nom,50).'</a></td></tr>';
|
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.img_object($langs->trans("Showcompany"),"company").' '.dolibarr_trunc($obj->nom,44).'</a></td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,11 +19,12 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\todo Ce fichier ne semble plus utilisé. A virer ? NON Il est utilisé !
|
\file htdocs/compta/propal.php
|
||||||
|
\ingroup propale
|
||||||
|
\brief Page liste des propales (vision compta)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -31,7 +32,7 @@ require("./pre.inc.php");
|
|||||||
$user->getrights('facture');
|
$user->getrights('facture');
|
||||||
$user->getrights('propale');
|
$user->getrights('propale');
|
||||||
if (!$user->rights->propale->lire)
|
if (!$user->rights->propale->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||||
@ -39,9 +40,7 @@ require_once("../project.class.php");
|
|||||||
require_once("../propal.class.php");
|
require_once("../propal.class.php");
|
||||||
require_once("../actioncomm.class.php");
|
require_once("../actioncomm.class.php");
|
||||||
|
|
||||||
/*
|
// Sécurité accés client
|
||||||
* Sécurité accés client
|
|
||||||
*/
|
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
@ -59,10 +58,6 @@ if ($_GET["action"] == 'setstatut')
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ( $action == 'delete' )
|
if ( $action == 'delete' )
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."propal WHERE rowid = $propalid;";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."propal WHERE rowid = $propalid;";
|
||||||
@ -76,24 +71,24 @@ if ( $action == 'delete' )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $db->error();
|
dolibarr_print_error($db);
|
||||||
print "<p>$sql";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $db->error();
|
dolibarr_print_error($db);
|
||||||
print "<p>$sql";
|
|
||||||
}
|
}
|
||||||
$propalid = 0;
|
$propalid = 0;
|
||||||
$brouillon = 1;
|
$brouillon = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Mode fiche
|
* Mode fiche
|
||||||
*
|
*
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if ($_GET["propalid"])
|
if ($_GET["propalid"])
|
||||||
{
|
{
|
||||||
@ -119,11 +114,12 @@ if ($_GET["propalid"])
|
|||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if ( $result ) {
|
if ( $result )
|
||||||
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
if ($db->num_rows()) {
|
if ($db->num_rows())
|
||||||
|
{
|
||||||
$color1 = "#e0e0e0";
|
$color1 = "#e0e0e0";
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
@ -205,10 +201,9 @@ if ($_GET["propalid"])
|
|||||||
|
|
||||||
|
|
||||||
print "<table width=\"100%\" cellspacing=2>";
|
print "<table width=\"100%\" cellspacing=2>";
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
print "<td valign=\"top\" width=\"50%\">";
|
print "<td valign=\"top\" width=\"50%\">";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Factures associees
|
* Factures associees
|
||||||
*/
|
*/
|
||||||
@ -218,7 +213,7 @@ if ($_GET["propalid"])
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num_fac_asso = $db->num_rows();
|
$num_fac_asso = $db->num_rows($result);
|
||||||
$i = 0; $total = 0;
|
$i = 0; $total = 0;
|
||||||
print "<br>";
|
print "<br>";
|
||||||
if ($num_fac_asso > 1)
|
if ($num_fac_asso > 1)
|
||||||
@ -229,8 +224,8 @@ if ($_GET["propalid"])
|
|||||||
{
|
{
|
||||||
print_titre("Facture associée");
|
print_titre("Facture associée");
|
||||||
}
|
}
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr>";
|
print "<tr class=\"liste_titre\">";
|
||||||
print '<td>'.$langs->trans("Ref").'</td>';
|
print '<td>'.$langs->trans("Ref").'</td>';
|
||||||
print '<td>'.$langs->trans("Date").'</td>';
|
print '<td>'.$langs->trans("Date").'</td>';
|
||||||
print '<td>'.$langs->trans("Author").'</td>';
|
print '<td>'.$langs->trans("Author").'</td>';
|
||||||
@ -242,14 +237,14 @@ if ($_GET["propalid"])
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object();
|
$objp = $db->fetch_object();
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<TR bgcolor=\"#e0e0e0\">";
|
print "<tr $bc[$var]>";
|
||||||
print "<TD><a href=\"../compta/facture.php?facid=$objp->facid\">$objp->facnumber</a>";
|
print "<td><a href=\"../compta/facture.php?facid=$objp->facid\">$objp->facnumber</a>";
|
||||||
if ($objp->paye)
|
if ($objp->paye)
|
||||||
{
|
{
|
||||||
print " (<b>payée</b>)";
|
print " (<b>payée</b>)";
|
||||||
}
|
}
|
||||||
print "</TD>\n";
|
print "</td>\n";
|
||||||
print "<TD>".strftime("%d %B %Y",$objp->df)."</td>\n";
|
print "<td>".dolibarr_print_date($objp->df)."</td>\n";
|
||||||
if ($objp->fk_user_author <> $user->id)
|
if ($objp->fk_user_author <> $user->id)
|
||||||
{
|
{
|
||||||
$fuser = new User($db, $objp->fk_user_author);
|
$fuser = new User($db, $objp->fk_user_author);
|
||||||
@ -260,21 +255,22 @@ if ($_GET["propalid"])
|
|||||||
{
|
{
|
||||||
print "<td>".$user->fullname."</td>\n";
|
print "<td>".$user->fullname."</td>\n";
|
||||||
}
|
}
|
||||||
print '<TD align="right">'.price($objp->total).'</TD>';
|
print '<td align="right">'.price($objp->total).'</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$total = $total + $objp->total;
|
$total = $total + $objp->total;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "<tr><td align=\"right\" colspan=\"4\">".$langs->trans("TotalHT").": <b>$total</b> ".$conf->monnaie."</td></tr>\n";
|
print "<tr class=\"liste_total\"><td align=\"right\" colspan=\"3\">".$langs->trans("TotalHT")."</td><td align=\"right\">".price($total)."</td></tr>\n";
|
||||||
print "</table>";
|
print "</table>";
|
||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Que si le module commande est actif !
|
* Que si le module commande est actif !
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if($conf->commande->enabled) {
|
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)
|
||||||
{
|
{
|
||||||
@ -282,7 +278,6 @@ if ($_GET["propalid"])
|
|||||||
print '<br><table class="border" width="100%">';
|
print '<br><table class="border" width="100%">';
|
||||||
|
|
||||||
if ($nb_commande == 1)
|
if ($nb_commande == 1)
|
||||||
|
|
||||||
{
|
{
|
||||||
print "<tr><td>Commande rattachée : ";
|
print "<tr><td>Commande rattachée : ";
|
||||||
print '<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[$i].'">';
|
print '<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[$i].'">';
|
||||||
@ -337,9 +332,6 @@ if ($_GET["propalid"])
|
|||||||
}
|
}
|
||||||
print "</tr></table>";
|
print "</tr></table>";
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
print "Num rows = " . $db->num_rows();
|
print "Num rows = " . $db->num_rows();
|
||||||
@ -406,9 +398,6 @@ if ($_GET["propalid"])
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Voir le suivi des actions
|
* Voir le suivi des actions
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if ($suivi)
|
if ($suivi)
|
||||||
{
|
{
|
||||||
@ -436,36 +425,20 @@ if ($_GET["propalid"])
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
dolibarr_print_error($db);
|
||||||
print "<p><b>$sql";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
} else {
|
} else {
|
||||||
/*
|
|
||||||
|
/**
|
||||||
*
|
*
|
||||||
* Mode Liste des propales
|
* Mode Liste des propales
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($sortfield == "")
|
if (! $sortfield) $sortfield="p.datep";
|
||||||
{
|
if (! $sortorder) $sortorder="DESC";
|
||||||
$sortfield="p.datep";
|
if ($page == -1) $page = 0 ;
|
||||||
}
|
|
||||||
if ($sortorder == "")
|
|
||||||
{
|
|
||||||
$sortorder="DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($page == -1)
|
|
||||||
{
|
|
||||||
$page = 0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
@ -561,10 +534,10 @@ if ($_GET["propalid"])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $db->error();
|
dolibarr_print_error($db);
|
||||||
print "<br>$sql";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->close();
|
$db->close();
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
|
||||||
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -84,5 +84,5 @@ ToBill=
|
|||||||
RemainderToBill=Reste à facturer
|
RemainderToBill=Reste à facturer
|
||||||
SendBillByMail=Envoyer la facture par mail
|
SendBillByMail=Envoyer la facture par mail
|
||||||
SendReminderBillByMail=Envoyer une relance par mail
|
SendReminderBillByMail=Envoyer une relance par mail
|
||||||
RelatedCommercialProposals=Propositions commercials associées
|
RelatedCommercialProposals=Propositions commerciales associées
|
||||||
MenuToValid=A valider
|
MenuToValid=A valider
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user