mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
.
This commit is contained in:
parent
2fe9e8e42d
commit
bc37c0ad55
|
|
@ -190,14 +190,14 @@ $sql .= " WHERE a.fk_soc = $socid AND c.id=a.fk_action AND a.fk_user_author = u.
|
|||
print "<TR $bc[$var]>";
|
||||
|
||||
if ($oldyear == strftime("%Y",$obj->da) ) {
|
||||
print '<td align="center">|</td>';
|
||||
print '<td align="center"> </td>';
|
||||
} else {
|
||||
print "<TD>" .strftime("%Y",$obj->da)."</TD>\n";
|
||||
$oldyear = strftime("%Y",$obj->da);
|
||||
}
|
||||
|
||||
if ($oldmonth == strftime("%Y%b",$obj->da) ) {
|
||||
print '<td align="center">|</td>';
|
||||
print '<td align="center"> </td>';
|
||||
} else {
|
||||
print "<TD>" .strftime("%b",$obj->da)."</TD>\n";
|
||||
$oldmonth = strftime("%Y%b",$obj->da);
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ if ($action == 'create') {
|
|||
$smonth = 1;
|
||||
$syear = date("Y", time());
|
||||
print '<table border="0">';
|
||||
print '<tr><td>Société</td><td><a href="index.php3?socid='.$socidp.'">'.$objsoc->nom.'</a></td></tr>';
|
||||
print '<tr><td>Société</td><td><a href="fiche.php3?socid='.$socidp.'">'.$objsoc->nom.'</a></td></tr>';
|
||||
print "<tr><td>Date</td><td>";
|
||||
$cday = date("d", time());
|
||||
print "<select name=\"pday\">";
|
||||
|
|
@ -190,7 +190,7 @@ if ($action == 'create') {
|
|||
}
|
||||
print '</select>';
|
||||
if ($numdest==0) {
|
||||
print '<br><b>Cette societe n\'a pas de contact, veuillez en creer un avant de faire de propale</b><br>';
|
||||
print 'Cette societe n\'a pas de contact, veuillez en creer un avant de faire de propale</b><br>';
|
||||
print '<a href=people.php3?socid='.$socidp.'&action=addcontact>Ajouter un contact</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
|
@ -218,7 +218,7 @@ if ($action == 'create') {
|
|||
}
|
||||
print '</select>';
|
||||
if ($numprojet==0) {
|
||||
print '<br>Cette societe n\'a pas de projet.<br>';
|
||||
print 'Cette societe n\'a pas de projet.<br>';
|
||||
print '<a href=projet/fiche.php3?socidp='.$socidp.'&action=create>Créer un projet</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -113,8 +113,8 @@ if ($action == 'stcomm') {
|
|||
}
|
||||
}
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
|
||||
$offset = $conf->liste_limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ if ($mode == 'search') {
|
|||
$sortorder = "ASC";
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset);
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
|
|
|
|||
|
|
@ -182,8 +182,8 @@ if ($socid > 0) {
|
|||
* Propales
|
||||
*
|
||||
*/
|
||||
$var=!$var;
|
||||
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"1\">";
|
||||
|
||||
print '<TABLE border="0" width="100%" cellspacing="0" cellpadding="1">';
|
||||
$sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref, p.remise, ".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid";
|
||||
$sql .= " FROM societe as s, llx_propal as p, c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id";
|
||||
$sql .= " AND s.idp = $objsoc->idp ORDER BY p.datep DESC";
|
||||
|
|
@ -191,7 +191,7 @@ if ($socid > 0) {
|
|||
if ( $db->query($sql) ) {
|
||||
$num = $db->num_rows();
|
||||
if ($num >0 ) {
|
||||
print "<tr $bc[$var]><td colspan=\"4\"><a href=\"propal.php3?socidp=$objsoc->idp\">liste des propales ($num)</td></tr>";
|
||||
print "<tr $bc[$var]><td colspan=\"4\"><a href=\"propal.php3?socidp=$objsoc->idp\">Liste des propales ($num)</td></tr>";
|
||||
}
|
||||
$i = 0; $now = time(); $lim = 3600 * 24 * 15 ;
|
||||
while ($i < $num && $i < 4) {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ function llxHeader($head = "", $urlp = "") {
|
|||
|
||||
$menu->add("projet/", "Projets");
|
||||
|
||||
$menu->add("/comm/configuration/", "Configuration");
|
||||
|
||||
left_menu($menu->liste);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,21 +3,36 @@
|
|||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php3");
|
||||
require("./project.class.php3");
|
||||
|
||||
|
||||
llxHeader("","../");
|
||||
print_titre("Projets");
|
||||
print '<table width="100%">';
|
||||
print '<tr><td>Projets</td>';
|
||||
print '<tr>';
|
||||
|
||||
if($socidp) {
|
||||
print '<td>[<a href="fiche.php3?socidp='.$socidp.'&action=create">Nouveau projet</a>]</td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
|
||||
|
||||
|
||||
$db = new Db();
|
||||
/*
|
||||
* Traitements des actions
|
||||
|
|
@ -33,8 +48,6 @@ if ($action == 'create') {
|
|||
$pro->create( $user->id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Affichage
|
||||
|
|
@ -47,16 +60,12 @@ if ($sortorder == "") {
|
|||
$sortorder="ASC";
|
||||
}
|
||||
|
||||
$yn["t"] = "oui";
|
||||
$yn["f"] = "non";
|
||||
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = 26;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
|
|
@ -75,35 +84,18 @@ if ($socidp) { $sql .= " AND s.idp = $socidp"; }
|
|||
if ( $db->query($sql) ) {
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
print "<p><TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
print '<p><TABLE border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||
|
||||
$oldstatut = -1;
|
||||
$subtotal = 0;
|
||||
print "<TR bgcolor=\"#e0e0e0\">";
|
||||
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Societe</a></td>";
|
||||
print "<TD>Réf</TD><td>Titre</td>";
|
||||
print "</TR>\n";
|
||||
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object( $i);
|
||||
|
||||
if ($objp->statut <> $oldstatut ) {
|
||||
$oldstatut = $objp->statut;
|
||||
|
||||
if ($i > 0) {
|
||||
print "<tr><td align=\"right\" colspan=\"6\">Total : <b>".price($subtotal)."</b></td>\n";
|
||||
print "<td align=\"left\">Euros HT</td></tr>\n";
|
||||
}
|
||||
$subtotal = 0;
|
||||
|
||||
print "<TR bgcolor=\"#e0e0e0\">";
|
||||
print "<TD>[<a href=\"$PHP_SELF\">Tous</a>]</td>";
|
||||
print "<TD><a href=\"$PHP_SELF?sortfield=lower(p.label)&sortorder=ASC\">Societe</a></td>";
|
||||
print "<TD>Réf</TD><td>Titre</td>";
|
||||
print "<TD align=\"right\" colspan=\"2\">Date</TD>";
|
||||
print "<TD align=\"center\">Statut [<a href=\"$PHP_SELF?viewstatut=$objp->statutid\">Filtre</a>]</TD>";
|
||||
print "</TR>\n";
|
||||
$var=True;
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
print "<TR $bc[$var]>";
|
||||
print "<TD>[<a href=\"$PHP_SELF?socidp=$objp->idp\">Filtre</a>]</TD>\n";
|
||||
print "<TD><a href=\"../fiche.php3?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
||||
print "<TD><a href=\"fiche.php3?id=$objp->projectid\">$objp->ref</a></TD>\n";
|
||||
print "<TD><a href=\"fiche.php3?id=$objp->projectid\">$objp->title</a></TD>\n";
|
||||
|
|
|
|||
|
|
@ -36,21 +36,6 @@ llxHeader();
|
|||
|
||||
$db = new Db();
|
||||
|
||||
if ($sortfield == "") {
|
||||
$sortfield="lower(p.label)";
|
||||
}
|
||||
if ($sortorder == "") {
|
||||
$sortorder="ASC";
|
||||
}
|
||||
|
||||
$yn["t"] = "oui";
|
||||
$yn["f"] = "non";
|
||||
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = 26;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
if ($action == 'setstatut') {
|
||||
/*
|
||||
|
|
@ -116,10 +101,10 @@ if ($propalid) {
|
|||
|
||||
print "<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">";
|
||||
|
||||
print "<tr><td>Société</td><td><a href=\"fiche.php3?socid=$obj->idp\">$obj->nom</a></td><td align=\"right\"><a href=\"propal.php3?socidp=$obj->idp\">Autres propales</a></td>";
|
||||
print '<tr><td>Société</td><td colspan="2"><a href="fiche.php3?socid='.$obj->idp.'">'.$obj->nom.'</a></td>';
|
||||
print "<td valign=\"top\" width=\"50%\" rowspan=\"9\">Note :<br>". nl2br($obj->note)."</td></tr>";
|
||||
|
||||
print '<tr><td>date</td><td colspan="2">'.strftime("%A %d %B %Y",$obj->dp).'</td></tr>';
|
||||
print '<tr><td>Date</td><td colspan="2">'.strftime("%A %d %B %Y",$obj->dp).'</td></tr>';
|
||||
|
||||
if ($obj->fk_projet) {
|
||||
$projet = new Project();
|
||||
|
|
@ -441,6 +426,20 @@ if ($propalid) {
|
|||
*
|
||||
*
|
||||
*/
|
||||
|
||||
if ($sortfield == "") {
|
||||
$sortfield="p.fk_statut, datep ";
|
||||
}
|
||||
if ($sortorder == "") {
|
||||
$sortorder="ASC";
|
||||
}
|
||||
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = 26;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
print "<table width=\"100%\">";
|
||||
print "<tr><td><div class=\"titre\">Propositions commerciales</div></td>";
|
||||
print "</table>";
|
||||
|
|
@ -463,7 +462,7 @@ if ($propalid) {
|
|||
$sql .= " AND date_format(p.datep, '%Y') = $year";
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY p.fk_statut, datep DESC";
|
||||
$sql .= " ORDER BY $sortfield ASC";
|
||||
|
||||
if ( $db->query($sql) ) {
|
||||
$num = $db->num_rows();
|
||||
|
|
@ -485,9 +484,9 @@ if ($propalid) {
|
|||
$subtotal = 0;
|
||||
|
||||
print '<TR class="liste_titre">';
|
||||
print "<TD>Réf</TD>";
|
||||
print "<TD>Société</td>";
|
||||
print "<TD align=\"right\" colspan=\"2\">Date</TD>";
|
||||
print "<TD>Réf</TD><td>";
|
||||
print_liste_field_titre ("Société",$PHP_SELF,"s.nom");
|
||||
print "</td><TD align=\"right\" colspan=\"2\">Date</TD>";
|
||||
print "<TD align=\"right\">Prix</TD>";
|
||||
print "<TD align=\"center\">Statut <a href=\"$PHP_SELF?viewstatut=$objp->statutid\">";
|
||||
print '<img src="/theme/'.$conf->theme.'/img/filter.png" border="0"></a></td>';
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ function llxHeader($head = "") {
|
|||
$menu->add_submenu("comp.php3","Comparatif");
|
||||
|
||||
$menu->add_submenu("casoc.php3","Par société");
|
||||
$menu->add_submenu("pointmort.php3","Point mort");
|
||||
// $menu->add_submenu("pointmort.php3","Point mort");
|
||||
|
||||
$menu->add("tva/index.php3","TVA");
|
||||
|
||||
|
|
|
|||
|
|
@ -116,11 +116,11 @@ if ($propalid) {
|
|||
|
||||
print "<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">";
|
||||
|
||||
print "<tr><td>Société</td><td><a href=\"fiche.php3?socid=$obj->idp\">$obj->nom</a></td><td align=\"right\"><a href=\"propal.php3?socidp=$obj->idp\">Autres propales</a></td>";
|
||||
print '<tr><td>'.translate("Company").'</td><td colspan="2"><a href="fiche.php3?socid='.$obj->idp.'">'.$obj->nom.'</a></td>';
|
||||
print "<td valign=\"top\" width=\"50%\" rowspan=\"8\">Note :<br>". nl2br($obj->note)."</td></tr>";
|
||||
//
|
||||
|
||||
print '<tr><td>date</td><td colspan="2">'.strftime("%A %d %B %Y",$obj->dp).'</td></tr>';
|
||||
print '<tr><td>'.translate("Date").'</td><td colspan="2">'.strftime("%A %d %B %Y",$obj->dp).'</td></tr>';
|
||||
|
||||
if ($obj->fk_projet) {
|
||||
$projet = new Project();
|
||||
|
|
@ -221,7 +221,7 @@ if ($propalid) {
|
|||
print "</TD>\n";
|
||||
print "<TD>".strftime("%d %B %Y",$objp->df)."</TD>\n";
|
||||
print "<TD>$objp->author</TD>\n";
|
||||
print "<TD align=\"right\">$objp->amount</TD>\n";
|
||||
print '<TD align="right">'.price($objp->amount).'</TD>';
|
||||
print "</tr>";
|
||||
$total = $total + $objp->amount;
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ require("./pre.inc.php3");
|
|||
llxHeader();
|
||||
?>
|
||||
<h3>Dolibarr</h3>
|
||||
<?PHP print 'Utilisateur : <b>' . $user->prenom . ' ' . $user->nom .'</b> ['.$user->code.']';?>
|
||||
<?PHP print translate("User") . ' : <b>' . $user->prenom . ' ' . $user->nom .'</b> ['.$user->code.']';?>
|
||||
|
||||
<br><br>
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ llxHeader();
|
|||
<table width="100%" cellspacing="3">
|
||||
<tr>
|
||||
<td width="50%" class="dash" valign="top">
|
||||
<a href="/comm/">Commercial</a>
|
||||
<a href="/comm/"><?PHP print translate("Commercial"); ?></a>
|
||||
<ul>
|
||||
<li><a href="/comm/propal.php3">Propositions commerciales</a>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@
|
|||
* $Source$
|
||||
*
|
||||
*/
|
||||
//function translate($texte) {
|
||||
// return $texte;
|
||||
//}
|
||||
|
||||
function print_liste_field_titre($name, $file, $field, $begin="") {
|
||||
global $conf;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,29 +27,49 @@ require ($GLOBALS["DOCUMENT_ROOT"]."/product.class.php3");
|
|||
require ($GLOBALS["DOCUMENT_ROOT"]."/user.class.php3");
|
||||
require ($GLOBALS["DOCUMENT_ROOT"]."/menu.class.php3");
|
||||
require ($GLOBALS["DOCUMENT_ROOT"]."/societe.class.php3");
|
||||
|
||||
require ($GLOBALS["DOCUMENT_ROOT"]."/rtplang.class.php");
|
||||
|
||||
$conf = new Conf();
|
||||
|
||||
|
||||
$db = new Db();
|
||||
$user = new User($db);
|
||||
$user->fetch($GLOBALS["REMOTE_USER"]);
|
||||
$db->close();
|
||||
|
||||
$user = new User($db);
|
||||
|
||||
$user->fetch($GLOBALS["REMOTE_USER"]);
|
||||
|
||||
if ($user->limite_liste <> $conf->liste_limit) {
|
||||
$conf->liste_limit = $user->limite_liste;
|
||||
}
|
||||
|
||||
$db->close();
|
||||
/*
|
||||
*/
|
||||
if(!isset($application_lang))
|
||||
$application_lang = "fr";
|
||||
|
||||
$rtplang = new rtplang("langs", "en", "en", $application_lang);
|
||||
$rtplang->debug=1;
|
||||
/*
|
||||
*/
|
||||
$bc[0]="class=\"impair\"";
|
||||
$bc[1]="class=\"pair\"";
|
||||
|
||||
$a = setlocale("LC_TIME", "FRENCH");
|
||||
|
||||
function top_menu($head) {
|
||||
global $user, $conf;
|
||||
global $user, $conf, $rtplang;
|
||||
|
||||
print $rtplang->lang_header();
|
||||
|
||||
print "<HTML><HEAD>";
|
||||
print $head;
|
||||
print "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
print '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">';
|
||||
print '<LINK REL="stylesheet" TYPE="text/css" HREF="/'.$conf->css.'">';
|
||||
print "\n";
|
||||
print '<title>Dolibarr</title>';
|
||||
print "\n";
|
||||
|
||||
|
||||
print "</HEAD>\n";
|
||||
|
||||
print '<BODY TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">';
|
||||
|
|
@ -160,9 +180,9 @@ function llxFooter($foot='') {
|
|||
*
|
||||
*/
|
||||
print "</TABLE>\n";
|
||||
print "$foot<br>";
|
||||
print "<div>";
|
||||
print '[<a href="http://savannah.gnu.org/bugs/?group_id=1915">Bug report</a>] ';
|
||||
print '[<a href="http://savannah.gnu.org/projects/dolibarr/">Source Code</a>] ';
|
||||
print '[<a href="http://savannah.gnu.org/projects/dolibarr/">Source Code</a>] '.$foot.'</div>';
|
||||
print "</BODY></HTML>";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ if ($action == 'create') {
|
|||
print '<textarea name="desc" rows="8" cols="50">';
|
||||
print $product->description;
|
||||
print "</textarea></td></tr>";
|
||||
print '<tr><td> </td><td><input type="submit"></td></tr>';
|
||||
print '<tr><td> </td><td><input type="submit" value="Enregistrer"></td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,13 +210,5 @@ class Propal {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,12 +18,9 @@
|
|||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
* Classe Company
|
||||
*
|
||||
*/
|
||||
|
||||
class Societe {
|
||||
var $bs;
|
||||
var $db;
|
||||
|
||||
var $id;
|
||||
|
|
@ -35,9 +32,7 @@ class Societe {
|
|||
var $fax;
|
||||
var $url;
|
||||
var $siren;
|
||||
|
||||
var $client;
|
||||
|
||||
var $note;
|
||||
|
||||
Function Societe($DB, $id=0) {
|
||||
|
|
@ -48,7 +43,11 @@ class Societe {
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
Function create() {
|
||||
|
||||
$sql = "INSERT INTO societe (nom, datec, datea, client) ";
|
||||
|
|
@ -199,8 +198,5 @@ class Societe {
|
|||
|
||||
|
||||
}
|
||||
/*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
*/
|
||||
|
||||
class User {
|
||||
var $bs;
|
||||
var $db;
|
||||
|
||||
var $id;
|
||||
|
|
@ -36,11 +35,15 @@ class User {
|
|||
var $compta;
|
||||
var $webcal_login;
|
||||
|
||||
var $limite_liste;
|
||||
|
||||
Function User($DB, $id=0) {
|
||||
|
||||
$this->db = $DB;
|
||||
$this->id = $id;
|
||||
|
||||
$this->limite_liste = 20;
|
||||
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user