Enhancement in bookmark module
This commit is contained in:
parent
31fb99d450
commit
6254a6a217
@ -23,10 +23,10 @@
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
function printBookmarksList ($aDb, $aLangs)
|
||||
function printBookmarksList ($aDb, $aLangs)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
$db = $aDb;
|
||||
$langs = $aLangs;
|
||||
|
||||
@ -37,13 +37,22 @@ function printBookmarksList ($aDb, $aLangs)
|
||||
$langs->load("bookmarks");
|
||||
|
||||
$url= $_SERVER["PHP_SELF"].(! empty($_SERVER["QUERY_STRING"])?'?'.$_SERVER["QUERY_STRING"]:'');
|
||||
|
||||
|
||||
$ret = '';
|
||||
// Menu bookmark
|
||||
$ret.= '<div class="menu_titre"><a class="vmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a></div>';
|
||||
$ret.= '<div class="menu_titre">';
|
||||
$ret.= '<table class="nobordernopadding" width="100%"><tr class="no"><td>';
|
||||
$ret.= '<a class="vmenu" href="'.DOL_URL_ROOT.'/bookmarks/liste.php">'.$langs->trans('Bookm').'</a>';
|
||||
// $ret.='</div>';
|
||||
// Menu New bookmark
|
||||
$ret.= '<div class="menu_contenu"><a class="vsmenu" href="'.DOL_URL_ROOT.'/bookmarks/fiche.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url).'">';
|
||||
$ret.= $langs->trans('NewBookmark').'</a><br></div>';
|
||||
// $ret.= '<div class="menu_contenu">';
|
||||
$ret.= '</td><td align="right">';
|
||||
$ret.= '<a class="vsmenu" href="'.DOL_URL_ROOT.'/bookmarks/fiche.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url).'">';
|
||||
// $ret.= $langs->trans('NewBookmark');
|
||||
$ret.=img_object($langs->trans('AddThisPageToBookmarks'),'bookmark');
|
||||
$ret.= '</a>';
|
||||
$ret.= '</td></tr></table>';
|
||||
$ret.= '</div>';
|
||||
// Menu with all bookmarks
|
||||
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
||||
{
|
||||
@ -54,12 +63,12 @@ function printBookmarksList ($aDb, $aLangs)
|
||||
$ret.=' '.img_object($langs->trans("BookmarkThisPage"),'bookmark').' ';
|
||||
$ret.= dolibarr_trunc($obj->title, 30).'</a><br></div>';
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$ret .= '<div class="menu_fin"></div>';
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \file htdocs/bookmarks/fiche.php
|
||||
* \brief Page affichage/creation des bookmarks
|
||||
@ -41,15 +41,23 @@ $target=isset($_GET["target"])?$_GET["target"]:$_POST["target"];
|
||||
*/
|
||||
|
||||
if ($action == 'add' || $action == 'addproduct')
|
||||
{
|
||||
{var_dump($_POST);
|
||||
if ($_POST["cancel"])
|
||||
{
|
||||
$urlsource=isset($_GET["urlsource"])?$_GET["urlsource"]:(isset($url)?$url:DOL_URL_ROOT.'/bookmarks/liste.php');
|
||||
header("Location: ".$urlsource);
|
||||
exit;
|
||||
}
|
||||
|
||||
$mesg='';
|
||||
|
||||
|
||||
$bookmark=new Bookmark($db);
|
||||
$bookmark->fk_user=$user->id;
|
||||
$bookmark->title=$title;
|
||||
$bookmark->url=$url;
|
||||
$bookmark->target=$target;
|
||||
|
||||
|
||||
// TODO Remove because this test is now always false
|
||||
if ($action == 'add' && $_GET["socid"]) // Link to third party card
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/societe.class.php");
|
||||
@ -63,6 +71,7 @@ if ($action == 'add' || $action == 'addproduct')
|
||||
$title=$bookmark->title;
|
||||
$url=$bookmark->url;
|
||||
}
|
||||
// TODO Remove because this test is now always false
|
||||
if ($action == 'addproduct' && $_GET["id"]) // Link to product card
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
@ -76,14 +85,14 @@ if ($action == 'add' || $action == 'addproduct')
|
||||
$title=$bookmark->title;
|
||||
$url=$bookmark->url;
|
||||
}
|
||||
|
||||
|
||||
if (! $title) $mesg.=($mesg?'<br>':'').$langs->trans("ErrorFieldRequired",$langs->trans("BookmarkTitle"));
|
||||
if (! $url) $mesg.=($mesg?'<br>':'').$langs->trans("ErrorFieldRequired",$langs->trans("UrlOrLink"));
|
||||
|
||||
if (! $mesg)
|
||||
{
|
||||
$bookmark->favicon='none';
|
||||
|
||||
|
||||
$res=$bookmark->create();
|
||||
if ($res > 0)
|
||||
{
|
||||
@ -121,7 +130,7 @@ if ($_GET["action"] == 'delete')
|
||||
$bookmark->target=$user->id;
|
||||
$bookmark->title='xxx';
|
||||
$bookmark->favicon='xxx';
|
||||
|
||||
|
||||
$res=$bookmark->remove();
|
||||
if ($res > 0)
|
||||
{
|
||||
@ -165,9 +174,14 @@ if ($action == 'create')
|
||||
$liste=array(1=>$langs->trans("OpenANewWindow"),0=>$langs->trans("ReplaceWindow"));
|
||||
$html->select_array('target',$liste,1);
|
||||
print '</td><td>'.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'</td></tr>';
|
||||
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("CreateBookmark").'"></td></tr>';
|
||||
|
||||
print '<tr><td colspan="3" align="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("CreateBookmark").'" name="create"> ';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Cancel").'" name="cancel">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
@ -179,7 +193,7 @@ if ($_GET["id"] > 0 && ! eregi('^add',$_GET["action"]))
|
||||
*/
|
||||
$bookmark=new Bookmark($db);
|
||||
$bookmark->fetch($_GET["id"]);
|
||||
|
||||
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Bookmark"));
|
||||
|
||||
@ -195,7 +209,7 @@ if ($_GET["id"] > 0 && ! eregi('^add',$_GET["action"]))
|
||||
print '</table>';
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
|
||||
print "<div class=\"tabsAction\">\n";
|
||||
|
||||
// Supprimer
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -19,11 +19,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/fourn/index.php
|
||||
\ingroup fournisseur
|
||||
\brief Page accueil de la zone fournisseurs
|
||||
\version $Id$
|
||||
*/
|
||||
\file htdocs/fourn/index.php
|
||||
\ingroup fournisseur
|
||||
\brief Page accueil de la zone fournisseurs
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.commande.class.php');
|
||||
@ -40,8 +40,8 @@ $result = restrictedArea($user, 'societe',$socid,'');
|
||||
|
||||
|
||||
/*
|
||||
* Affichage page
|
||||
*/
|
||||
* Affichage page
|
||||
*/
|
||||
|
||||
$commandestatic=new CommandeFournisseur($db);
|
||||
$facturestatic=new FactureFournisseur($db);
|
||||
@ -55,34 +55,6 @@ print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||
|
||||
|
||||
/*
|
||||
* Liste des categories
|
||||
*/
|
||||
$companystatic->LoadSupplierCateg();
|
||||
|
||||
if (sizeof($companystatic->SupplierCategories))
|
||||
{
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">';
|
||||
print $langs->trans("Category");
|
||||
print "</td></tr>\n";
|
||||
$var=True;
|
||||
|
||||
foreach ($companystatic->SupplierCategories as $rowid => $label)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>\n";
|
||||
print '<td><a href="liste.php?cat='.$rowid.'">'.stripslashes($label).'</a>';
|
||||
print '</td><td align="right">';
|
||||
print '<a href="stats.php?cat='.$rowid.'">('.$langs->trans("Stats").')</a>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
print "<br>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
@ -121,9 +93,9 @@ if ($resql)
|
||||
print "<br>\n";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
@ -132,56 +104,56 @@ else
|
||||
*/
|
||||
if ($conf->fournisseur->enabled)
|
||||
{
|
||||
$langs->load("orders");
|
||||
$sql = "SELECT c.rowid, c.ref, c.total_ttc, s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c, ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid AND c.fk_statut = 0";
|
||||
if ($socid)
|
||||
{
|
||||
$sql .= " AND c.fk_soc = ".$socid;
|
||||
}
|
||||
$langs->load("orders");
|
||||
$sql = "SELECT c.rowid, c.ref, c.total_ttc, s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c, ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid AND c.fk_statut = 0";
|
||||
if ($socid)
|
||||
{
|
||||
$sql .= " AND c.fk_soc = ".$socid;
|
||||
}
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$total = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$total = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||
|
||||
$i = 0;
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr '.$bc[$var].'><td nowrap="nowrap">';
|
||||
$i = 0;
|
||||
$var = true;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr '.$bc[$var].'><td nowrap="nowrap">';
|
||||
$commandestatic->id=$obj->rowid;
|
||||
$commandestatic->ref=$obj->ref;
|
||||
print $commandestatic->getNomUrl(1,'',16);
|
||||
print '</td>';
|
||||
print '<td nowrap="nowrap">';
|
||||
print '<td nowrap="nowrap">';
|
||||
$companystatic->id=$obj->socid;
|
||||
$companystatic->nom=$obj->nom;
|
||||
$companystatic->client=0;
|
||||
print $companystatic->getNomUrl(1,'',16);
|
||||
print '</td>';
|
||||
print '<td align="right" nowrap="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
||||
$i++;
|
||||
$total += $obj->total_ttc;
|
||||
}
|
||||
if ($total>0)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
print '<td align="right" nowrap="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
||||
$i++;
|
||||
$total += $obj->total_ttc;
|
||||
}
|
||||
if ($total>0)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
print "<br>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -248,10 +220,6 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
print "</td>\n";
|
||||
print '<td valign="top" width="70%" class="notopnoleft">';
|
||||
|
||||
@ -260,7 +228,7 @@ print '<td valign="top" width="70%" class="notopnoleft">';
|
||||
*
|
||||
*/
|
||||
$max=10;
|
||||
$sql = "SELECT s.rowid as socid, s.nom, s.ville,".$db->pdate("s.datec")." as datec, ".$db->pdate("s.datea")." as datea, st.libelle as stcomm, s.prefix_comm";
|
||||
$sql = "SELECT s.rowid as socid, s.nom, s.ville, s.datec, s.datea, s.tms, st.libelle as stcomm, s.prefix_comm";
|
||||
$sql.= " , code_fournisseur, code_compta_fournisseur";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st";
|
||||
@ -268,7 +236,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFI
|
||||
$sql.= " WHERE s.fk_stcomm = st.id AND s.fournisseur=1";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql .= " AND s.rowid = ".$socid;
|
||||
$sql.= " ORDER BY s.datec DESC";
|
||||
$sql.= " ORDER BY s.tms DESC";
|
||||
$sql .= $db->plimit($max, 0);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
@ -281,7 +249,7 @@ if ($resql)
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("BoxTitleLastSuppliers",min($max,$num))."</td>\n";
|
||||
print '<td align="right">'.$langs->trans("DateCreation")."</td>\n";
|
||||
print '<td align="right">'.$langs->trans("DateModification")."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
@ -294,18 +262,47 @@ if ($resql)
|
||||
print '<td><a href="fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowSupplier"),"company").'</a>';
|
||||
print " <a href=\"fiche.php?socid=".$obj->socid."\">".$obj->nom."</a></td>\n";
|
||||
print '<td align="left">'.$obj->code_fournisseur.' </td>';
|
||||
print '<td align="right">'.dolibarr_print_date($obj->datec,'day').'</td>';
|
||||
print '<td align="right">'.dolibarr_print_date($obj->tms,'day').'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* List of categories
|
||||
*/
|
||||
$companystatic->LoadSupplierCateg();
|
||||
|
||||
if (sizeof($companystatic->SupplierCategories))
|
||||
{
|
||||
print '<br>';
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">';
|
||||
print $langs->trans("Category");
|
||||
print "</td></tr>\n";
|
||||
$var=True;
|
||||
|
||||
foreach ($companystatic->SupplierCategories as $rowid => $label)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>\n";
|
||||
print '<td><a href="liste.php?cat='.$rowid.'">'.stripslashes($label).'</a>';
|
||||
print '</td><td align="right">';
|
||||
print '<a href="stats.php?cat='.$rowid.'">('.$langs->trans("Stats").')</a>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
print "<br>\n";
|
||||
}
|
||||
|
||||
print "</td></tr>\n";
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
@ -62,12 +62,12 @@ class box_clients extends ModeleBoxes {
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->max=$max;
|
||||
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastCustomers",$max));
|
||||
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid, s.datec as dc";
|
||||
$sql = "SELECT s.nom, s.rowid as socid, s.tms";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -77,7 +77,7 @@ class box_clients extends ModeleBoxes {
|
||||
{
|
||||
$sql .= " AND s.rowid = $user->societe_id";
|
||||
}
|
||||
$sql .= " ORDER BY s.datec DESC ";
|
||||
$sql .= " ORDER BY s.tms DESC ";
|
||||
$sql .= $db->plimit($max, 0);
|
||||
|
||||
$result = $db->query($sql);
|
||||
@ -85,24 +85,24 @@ class box_clients extends ModeleBoxes {
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
|
||||
$i = 0;
|
||||
//$customerstatic=new Client($db);
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$datec=$db->jdate($objp->dc);
|
||||
|
||||
$datem=$objp->tms;
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid);
|
||||
|
||||
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->socid);
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => dolibarr_print_date($datec, "day"));
|
||||
'text' => dolibarr_print_date($datem, "day"));
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -61,12 +61,12 @@ class box_fournisseurs extends ModeleBoxes {
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->max=$max;
|
||||
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastSuppliers",$max));
|
||||
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid, s.datec as dc";
|
||||
$sql = "SELECT s.nom, s.rowid as socid, s.tms";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -76,21 +76,21 @@ class box_fournisseurs extends ModeleBoxes {
|
||||
{
|
||||
$sql .= " AND s.rowid = ".$user->societe_id;
|
||||
}
|
||||
$sql .= " ORDER BY s.datec DESC ";
|
||||
$sql .= " ORDER BY s.tms DESC ";
|
||||
$sql .= $db->plimit($max, 0);
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
|
||||
$i = 0;
|
||||
//$supplierstatic=new Fournisseur($db);
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$datec=$db->jdate($objp->dc);
|
||||
|
||||
$datem=$objp->tms;
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid);
|
||||
@ -98,9 +98,9 @@ class box_fournisseurs extends ModeleBoxes {
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'url' => DOL_URL_ROOT."/fourn/fiche.php?socid=".$objp->socid);
|
||||
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => dolibarr_print_date($datec, "day"));
|
||||
'text' => dolibarr_print_date($datem, "day"));
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ class box_prospect extends ModeleBoxes {
|
||||
|
||||
$this->db=$DB;
|
||||
$this->param=$param;
|
||||
|
||||
|
||||
$this->boxlabel=$langs->trans("BoxLastProspects");
|
||||
}
|
||||
|
||||
@ -66,12 +66,12 @@ class box_prospect extends ModeleBoxes {
|
||||
global $user, $langs, $db;
|
||||
|
||||
$this->max=$max;
|
||||
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastProspects",$max));
|
||||
|
||||
if ($user->rights->societe->lire)
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid as socid, s.fk_stcomm, s.datec as dc";
|
||||
$sql = "SELECT s.nom, s.rowid as socid, s.fk_stcomm, s.tms";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -81,7 +81,7 @@ class box_prospect extends ModeleBoxes {
|
||||
{
|
||||
$sql .= " AND s.rowid = ".$user->societe_id;
|
||||
}
|
||||
$sql .= " ORDER BY s.datec DESC";
|
||||
$sql .= " ORDER BY s.tms DESC";
|
||||
$sql .= $db->plimit($max, 0);
|
||||
|
||||
dolibarr_syslog("box_prospect::loadBox sql=".$sql,LOG_DEBUG);
|
||||
@ -89,14 +89,14 @@ class box_prospect extends ModeleBoxes {
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
|
||||
$i = 0;
|
||||
$prospectstatic=new Prospect($db);
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
$datec=$db->jdate($objp->dc);
|
||||
|
||||
$datem=$objp->tms;
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
'logo' => $this->boximg,
|
||||
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid);
|
||||
@ -104,16 +104,16 @@ class box_prospect extends ModeleBoxes {
|
||||
$this->info_box_contents[$i][1] = array('td' => 'align="left"',
|
||||
'text' => $objp->nom,
|
||||
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?socid=".$objp->socid);
|
||||
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => dolibarr_print_date($datec, "day"));
|
||||
'text' => dolibarr_print_date($datem, "day"));
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"',
|
||||
'text' => eregi_replace('img ','img height="14px" ',$prospectstatic->LibStatut($objp->fk_stcomm,3)));
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProspects"));
|
||||
}
|
||||
else
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Dolibarr language file - en_US - marque pages
|
||||
CHARSET=UTF-8
|
||||
Bookm=Bookmarks
|
||||
NewBookmark=New bookmark
|
||||
NewBookmark=New bookmark
|
||||
AddThisPageToBookmarks=Add this page to bookmarks
|
||||
@ -1,4 +1,5 @@
|
||||
# Dolibarr language file - fr_FR - marque pages
|
||||
CHARSET=UTF-8
|
||||
Bookm=Marque pages
|
||||
NewBookmark=Nouveau marque page
|
||||
NewBookmark=Nouveau marque page
|
||||
AddThisPageToBookmarks=Placer cette page dans les marques-pages
|
||||
@ -23,13 +23,13 @@ BoxTitleNbOfCustomers=Nombre de clients
|
||||
BoxTitleLastRssInfos=Les %s dernières infos de %s
|
||||
BoxTitleLastProducts=Les %s derniers produits/services enregistrés
|
||||
BoxTitleLastCustomerOrders=Les %s dernières commandes clients modifiées
|
||||
BoxTitleLastSuppliers=Les %s derniers fournisseurs enregistrés
|
||||
BoxTitleLastCustomers=Les %s derniers clients enregistrés
|
||||
BoxTitleLastSuppliers=Les %s derniers fournisseurs modifiées
|
||||
BoxTitleLastCustomers=Les %s derniers clients modifiées
|
||||
BoxTitleLastCustomersOrProspects=Les %s derniers clients ou prospects enregistrés
|
||||
BoxTitleLastPropals=Les %s dernières propositions enregistrés
|
||||
BoxTitleLastCustomerBills=Les %s dernières factures clients enregistrées
|
||||
BoxTitleLastSupplierBills=Les %s dernières factures fournisseurs enregistrées
|
||||
BoxTitleLastProspects=Les %s derniers prospects enregistrés
|
||||
BoxTitleLastProspects=Les %s derniers prospects modifiés
|
||||
BoxTitleLastProductsInContract=Les %s derniers produits/services contractés
|
||||
BoxTitleOldestUnpayedCustomerBills=Les %s plus anciennes factures clients impayées
|
||||
BoxTitleOldestUnpayedSupplierBills=Les %s plus anciennes factures fournisseurs impayées
|
||||
|
||||
@ -629,7 +629,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
/*
|
||||
* Fiche societe en mode edition
|
||||
*/
|
||||
print_titre($langs->trans("EditCompany"));
|
||||
print_fiche_titre($langs->trans("EditCompany"));
|
||||
|
||||
if ($socid)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user