New: Manage status on third party
This commit is contained in:
parent
d8075d8e66
commit
6ab2ecc10c
@ -87,7 +87,7 @@ $thirdpartystatic=new Societe($db);
|
|||||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||||
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
||||||
|
|
||||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.ville, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta,";
|
$sql = "SELECT s.rowid, s.nom as name, s.client, s.ville, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,";
|
||||||
$sql.= " s.datec, s.datea, s.canvas";
|
$sql.= " s.datec, s.datea, s.canvas";
|
||||||
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||||
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
|
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
@ -171,7 +171,7 @@ if ($result)
|
|||||||
if ($moreforfilter)
|
if ($moreforfilter)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre" colspan="5">';
|
print '<td class="liste_titre" colspan="6">';
|
||||||
print $moreforfilter;
|
print $moreforfilter;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
@ -182,6 +182,7 @@ if ($result)
|
|||||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$params,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -202,10 +203,13 @@ if ($result)
|
|||||||
print '<input type="text" class="flat" name="search_compta" value="'.$search_compta.'" size="10">';
|
print '<input type="text" class="flat" name="search_compta" value="'.$search_compta.'" size="10">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
print '</td><td> </td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
@ -222,13 +226,16 @@ if ($result)
|
|||||||
$thirdpartystatic->name=$obj->name;
|
$thirdpartystatic->name=$obj->name;
|
||||||
$thirdpartystatic->client=$obj->client;
|
$thirdpartystatic->client=$obj->client;
|
||||||
$thirdpartystatic->canvas=$obj->canvas;
|
$thirdpartystatic->canvas=$obj->canvas;
|
||||||
|
$thirdpartystatic->status=$obj->status;
|
||||||
print $thirdpartystatic->getNomUrl(1);
|
print $thirdpartystatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.$obj->ville.'</td>';
|
print '<td>'.$obj->ville.'</td>';
|
||||||
print '<td>'.$obj->code_client.'</td>';
|
print '<td>'.$obj->code_client.'</td>';
|
||||||
print '<td>'.$obj->code_compta.'</td>';
|
print '<td>'.$obj->code_compta.'</td>';
|
||||||
print '<td align="right">'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
print '<td align="right">'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
||||||
print "</tr>\n";
|
print '<td align="right">'.$thirdpartystatic->getLibStatut(3);
|
||||||
|
print '</td>';
|
||||||
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
//print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],'',$sortfield,$sortorder,'',$num);
|
//print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],'',$sortfield,$sortorder,'',$num);
|
||||||
|
|||||||
@ -99,9 +99,9 @@ class Prospect extends Societe
|
|||||||
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
|
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
|
||||||
* \return string Libelle
|
* \return string Libelle
|
||||||
*/
|
*/
|
||||||
function getLibStatut($mode=0)
|
function getLibProspStatut($mode=0)
|
||||||
{
|
{
|
||||||
return $this->LibStatut($this->stcomm_id,$mode);
|
return $this->LibProspStatut($this->stcomm_id,$mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -110,7 +110,7 @@ class Prospect extends Societe
|
|||||||
* \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
* \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||||
* \return string Libelle du statut
|
* \return string Libelle du statut
|
||||||
*/
|
*/
|
||||||
function LibStatut($statut,$mode=0)
|
function LibProspStatut($statut,$mode=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load('customers');
|
$langs->load('customers');
|
||||||
|
|||||||
@ -166,7 +166,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">'.$societe->getLibStatut(4).'</td>';
|
print '<tr><td>'.$langs->trans("StatusProsp").'</td><td colspan="2">'.$societe->getLibProspStatut(4).'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($societe->stcomm_id != -1) print '<a href="fiche.php?socid='.$societe->id.'&stcomm=-1&action=cstc">'.img_action(0,-1).'</a>';
|
if ($societe->stcomm_id != -1) print '<a href="fiche.php?socid='.$societe->id.'&stcomm=-1&action=cstc">'.img_action(0,-1).'</a>';
|
||||||
if ($societe->stcomm_id != 0) print '<a href="fiche.php?socid='.$societe->id.'&stcomm=0&action=cstc">'.img_action(0,0).'</a>';
|
if ($societe->stcomm_id != 0) print '<a href="fiche.php?socid='.$societe->id.'&stcomm=0&action=cstc">'.img_action(0,0).'</a>';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -158,7 +158,7 @@ if ($_GET["action"] == 'cstc')
|
|||||||
|
|
||||||
$htmlother=new FormOther($db);
|
$htmlother=new FormOther($db);
|
||||||
|
|
||||||
$sql = "SELECT s.rowid, s.nom, s.ville, s.datec, s.datea,";
|
$sql = "SELECT s.rowid, s.nom, s.ville, s.datec, s.datea, s.status as status,";
|
||||||
$sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,";
|
$sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,";
|
||||||
$sql.= " d.nom as departement";
|
$sql.= " d.nom as departement";
|
||||||
// Updated by Matelli (see http://matelli.fr/showcases/patchs-dolibarr/enhance-prospect-searching.html)
|
// Updated by Matelli (see http://matelli.fr/showcases/patchs-dolibarr/enhance-prospect-searching.html)
|
||||||
@ -278,19 +278,20 @@ if ($resql)
|
|||||||
if ($moreforfilter)
|
if ($moreforfilter)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre" colspan="9">';
|
print '<td class="liste_titre" colspan="8">';
|
||||||
print $moreforfilter;
|
print $moreforfilter;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Company"),"prospects.php","s.nom","",$param,"valign=\"center\"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),"prospects.php","s.nom","",$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Town"),"prospects.php","s.ville","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Town"),"prospects.php","s.ville","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("State"),"prospects.php","s.fk_departement","",$param,"align=\"center\"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("State"),"prospects.php","s.fk_departement","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateCreation"),"prospects.php","s.datec","",$param,"align=\"center\"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateCreation"),"prospects.php","s.datec","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("ProspectLevelShort"),"prospects.php","s.fk_prospectlevel","",$param,"align=\"center\"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("ProspectLevelShort"),"prospects.php","s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),"prospects.php","s.fk_stcomm","",$param,"align=\"center\"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("StatusProsp"),"prospects.php","s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print '<td class="liste_titre" colspan="4"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$params,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -335,12 +336,17 @@ if ($resql)
|
|||||||
print $langs->trans("To").' <select class="flat" name="search_level_to">'.$options_to.'</select>';
|
print $langs->trans("To").' <select class="flat" name="search_level_to">'.$options_to.'</select>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Print the search button
|
print '<td class="liste_titre" align="center">';
|
||||||
print '<td colspan="3" class="liste_titre" align="right">';
|
print ' ';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
// Print the search button
|
||||||
|
print '<td class="liste_titre" align="right">';
|
||||||
print '<input class="liste_titre" name="button_search" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input class="liste_titre" name="button_search" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -358,12 +364,13 @@ if ($resql)
|
|||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$prospectstatic->id=$obj->rowid;
|
$prospectstatic->id=$obj->rowid;
|
||||||
$prospectstatic->nom=$obj->nom;
|
$prospectstatic->nom=$obj->nom;
|
||||||
print $prospectstatic->getNomUrl(1);
|
$prospectstatic->status=$obj->status;
|
||||||
print '</td>';
|
print $prospectstatic->getNomUrl(1,'prospect');
|
||||||
|
print '</td>';
|
||||||
print "<td>".$obj->ville." </td>";
|
print "<td>".$obj->ville." </td>";
|
||||||
print "<td align=\"center\">$obj->departement</td>";
|
print "<td align=\"center\">$obj->departement</td>";
|
||||||
// Creation date
|
// Creation date
|
||||||
@ -374,11 +381,11 @@ if ($resql)
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
// Statut
|
// Statut
|
||||||
print '<td align="center" nowrap="nowrap">';
|
print '<td align="center" nowrap="nowrap">';
|
||||||
print $prospectstatic->LibStatut($obj->fk_stcomm,2);
|
print $prospectstatic->LibProspStatut($obj->fk_stcomm,2);
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
//$sts = array(-1,0,1,2,3);
|
//$sts = array(-1,0,1,2,3);
|
||||||
print '<td align="right" nowrap>';
|
print '<td align="right" nowrap="nowrap">';
|
||||||
foreach ($sts as $key => $value)
|
foreach ($sts as $key => $value)
|
||||||
{
|
{
|
||||||
if ($value <> $obj->fk_stcomm)
|
if ($value <> $obj->fk_stcomm)
|
||||||
@ -390,7 +397,11 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print '<td align="right">';
|
||||||
|
print $prospectstatic->getLibStatut(3);
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -66,12 +66,13 @@ $search_categ = isset($_GET["search_categ"])?$_GET["search_categ"]:$_POST["searc
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$htmlother=new FormOther($db);
|
$htmlother=new FormOther($db);
|
||||||
|
$thirdpartystatic=new Societe($db);
|
||||||
|
|
||||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||||
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
||||||
|
|
||||||
$sql = "SELECT s.rowid as socid, s.nom, s.ville, s.datec, s.datea, st.libelle as stcomm, s.prefix_comm";
|
$sql = "SELECT s.rowid as socid, s.nom, s.ville, s.datec, s.datea, st.libelle as stcomm, s.prefix_comm, s.status as status, ";
|
||||||
$sql.= " , code_fournisseur, code_compta_fournisseur";
|
$sql.= "code_fournisseur, code_compta_fournisseur";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
|
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";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st";
|
||||||
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_fournisseur as cf";
|
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_fournisseur as cf";
|
||||||
@ -141,6 +142,7 @@ if ($resql)
|
|||||||
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'align="left"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta_fournisseur","",$param,'align="left"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta_fournisseur","",$param,'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$params,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -157,6 +159,8 @@ if ($resql)
|
|||||||
print '<input class="flat" type="text" size="10" name="search_compta_fournisseur" value="'.$search_compta_fournisseur.'">';
|
print '<input class="flat" type="text" size="10" name="search_compta_fournisseur" value="'.$search_compta_fournisseur.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td> </td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -168,13 +172,20 @@ if ($resql)
|
|||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
|
$thirdpartystatic->id=$obj->rowid;
|
||||||
|
$thirdpartystatic->nom=$obj->nom;
|
||||||
|
$thirdpartystatic->status=$obj->status;
|
||||||
|
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td><a href="fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowSupplier"),"company").'</a>';
|
print '<td>';
|
||||||
print " <a href=\"fiche.php?socid=".$obj->socid."\">".$obj->nom."</a></td>\n";
|
print $thirdpartystatic->getNomUrl(1,'supplier');
|
||||||
|
print "</td>\n";
|
||||||
print "<td>".$obj->ville."</td>\n";
|
print "<td>".$obj->ville."</td>\n";
|
||||||
print '<td align="left">'.$obj->code_fournisseur.' </td>';
|
print '<td align="left">'.$obj->code_fournisseur.' </td>';
|
||||||
print '<td align="left">'.$obj->code_compta_fournisseur.' </td>';
|
print '<td align="left">'.$obj->code_compta_fournisseur.' </td>';
|
||||||
print '<td align="right">'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
print '<td align="right">';
|
||||||
|
print dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
||||||
|
print '<td align="right">'.$thirdpartystatic->getLibStatut(3).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -43,7 +43,7 @@ class box_actions extends ModeleBoxes {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur de la classe
|
* Constructor
|
||||||
*/
|
*/
|
||||||
function box_actions()
|
function box_actions()
|
||||||
{
|
{
|
||||||
@ -54,8 +54,8 @@ class box_actions extends ModeleBoxes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Charge les donnees en memoire pour affichage ulterieur
|
* Charge les donnees en memoire pour affichage ulterieur
|
||||||
* \param $max Nombre maximum d'enregistrements a charger
|
* @param $max Nombre maximum d'enregistrements a charger
|
||||||
*/
|
*/
|
||||||
function loadBox($max=5)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
@ -125,7 +125,7 @@ class box_actions extends ModeleBoxes {
|
|||||||
'text' => dol_print_date($datelimite, "dayhour"));
|
'text' => dol_print_date($datelimite, "dayhour"));
|
||||||
|
|
||||||
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
$this->info_box_contents[$i][5] = array('td' => 'align="right"',
|
||||||
'text' => $objp->percentage. "%");
|
'text' => ($objp->percentage>= 0?$objp->percentage.'%':''));
|
||||||
|
|
||||||
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
$this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"',
|
||||||
'text' => $actionstatic->LibStatut($objp->percentage,3));
|
'text' => $actionstatic->LibStatut($objp->percentage,3));
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -107,7 +107,7 @@ class box_prospect extends ModeleBoxes {
|
|||||||
'text' => dol_print_date($datem, "day"));
|
'text' => dol_print_date($datem, "day"));
|
||||||
|
|
||||||
$this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"',
|
$this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"',
|
||||||
'text' => str_replace('img ','img height="14" ',$prospectstatic->LibStatut($objp->fk_stcomm,3)));
|
'text' => str_replace('img ','img height="14" ',$prospectstatic->LibProspStatut($objp->fk_stcomm,3)));
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,4 +78,5 @@ ActionAC_EMAILING=Send mass email
|
|||||||
ActionAC_COM=Send customer order by mail
|
ActionAC_COM=Send customer order by mail
|
||||||
ActionAC_SUP_ORD=Send supplier order by mail
|
ActionAC_SUP_ORD=Send supplier order by mail
|
||||||
ActionAC_SUP_INV=Send supplier invoice by mail
|
ActionAC_SUP_INV=Send supplier invoice by mail
|
||||||
ActionAC_OTH=Other
|
ActionAC_OTH=Other
|
||||||
|
StatusProsp=Prospect status
|
||||||
@ -84,4 +84,5 @@ CAOrder=Chiffre d'affaire (Commandes validées)
|
|||||||
FromTo=du %s au %s
|
FromTo=du %s au %s
|
||||||
MargeOrder=Marge réalisée (Commandes validées)
|
MargeOrder=Marge réalisée (Commandes validées)
|
||||||
RecapAnnee=Récapitulatif de l'année
|
RecapAnnee=Récapitulatif de l'année
|
||||||
NoData=Aucune donnée
|
NoData=Aucune donnée
|
||||||
|
StatusProsp=Status prospection
|
||||||
@ -1405,6 +1405,58 @@ class Societe extends CommonObject
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return label of status (activity, closed)
|
||||||
|
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
|
||||||
|
* @return string Libelle
|
||||||
|
*/
|
||||||
|
function getLibStatut($mode=0)
|
||||||
|
{
|
||||||
|
return $this->LibStatut($this->status,$mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renvoi le libelle d'un statut donne
|
||||||
|
* @param statut Id statut
|
||||||
|
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||||
|
* @return string Libelle du statut
|
||||||
|
*/
|
||||||
|
function LibStatut($statut,$mode=0)
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
$langs->load('companies');
|
||||||
|
|
||||||
|
if ($mode == 0)
|
||||||
|
{
|
||||||
|
if ($statut==0) return $langs->trans("ActivityCeased");
|
||||||
|
if ($statut==1) return $langs->trans("InActivity");
|
||||||
|
}
|
||||||
|
if ($mode == 1)
|
||||||
|
{
|
||||||
|
if ($statut==0) return $langs->trans("ActivityCeased");
|
||||||
|
if ($statut==1) return $langs->trans("InActivity");
|
||||||
|
}
|
||||||
|
if ($mode == 2)
|
||||||
|
{
|
||||||
|
if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut9').' '.$langs->trans("ActivityCeased");
|
||||||
|
if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity");
|
||||||
|
}
|
||||||
|
if ($mode == 3)
|
||||||
|
{
|
||||||
|
if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut9');
|
||||||
|
if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4');
|
||||||
|
}
|
||||||
|
if ($mode == 4)
|
||||||
|
{
|
||||||
|
if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut9').' '.$langs->trans("ActivityCeased");
|
||||||
|
if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity");
|
||||||
|
}
|
||||||
|
if ($mode == 5)
|
||||||
|
{
|
||||||
|
if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut9');
|
||||||
|
if ($statut==1) return $langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"),'statut4');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return full address of third party
|
* Return full address of third party
|
||||||
|
|||||||
@ -144,7 +144,7 @@ print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
|||||||
* Last third parties modified
|
* Last third parties modified
|
||||||
*/
|
*/
|
||||||
$max=15;
|
$max=15;
|
||||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.fournisseur, s.canvas, s.tms as datem";
|
$sql = "SELECT s.rowid, s.nom as name, s.client, s.fournisseur, s.canvas, s.tms as datem, s.status as status";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (! $user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (! $user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE s.entity = ".$conf->entity;
|
$sql.= " WHERE s.entity = ".$conf->entity;
|
||||||
@ -170,7 +170,10 @@ if ($result)
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre"><td colspan="3">'.$transRecordedType.'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="2">'.$transRecordedType.'</td>';
|
||||||
|
print '<td> </td>';
|
||||||
|
print '<td align="right">'.$langs->trans('Status').'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
|
|
||||||
@ -187,6 +190,7 @@ if ($result)
|
|||||||
$thirdparty_static->client=$objp->client;
|
$thirdparty_static->client=$objp->client;
|
||||||
$thirdparty_static->fournisseur=$objp->fournisseur;
|
$thirdparty_static->fournisseur=$objp->fournisseur;
|
||||||
$thirdparty_static->datem=$db->jdate($objp->datem);
|
$thirdparty_static->datem=$db->jdate($objp->datem);
|
||||||
|
$thirdparty_static->status=$objp->status;
|
||||||
$thirdparty_static->canvas=$objp->canvas;
|
$thirdparty_static->canvas=$objp->canvas;
|
||||||
print $thirdparty_static->getNomUrl(1,'',16);
|
print $thirdparty_static->getNomUrl(1,'',16);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
@ -214,9 +218,9 @@ if ($result)
|
|||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print dol_print_date($thirdparty_static->datem,'day');
|
print dol_print_date($thirdparty_static->datem,'day');
|
||||||
print "</td>";
|
print "</td>";
|
||||||
// print '<td align="right" nowrap="nowrap">';
|
print '<td align="right" nowrap="nowrap">';
|
||||||
// print $product_static->LibStatut($objp->tobuy,5,1);
|
print $thirdparty_static->getLibStatut(3);
|
||||||
// print "</td>";
|
print "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -176,7 +176,7 @@ if ($_GET['delsoc']) print '<div class="warning">'.$langs->trans("CompanyDeleted
|
|||||||
$title=$langs->trans("ListOfThirdParties");
|
$title=$langs->trans("ListOfThirdParties");
|
||||||
|
|
||||||
$sql = "SELECT s.rowid, s.nom as name, s.ville, s.datec, s.datea,";
|
$sql = "SELECT s.rowid, s.nom as name, s.ville, s.datec, s.datea,";
|
||||||
$sql.= " st.libelle as stcomm, s.prefix_comm, s.client, s.fournisseur, s.canvas,";
|
$sql.= " st.libelle as stcomm, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,";
|
||||||
$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4";
|
$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4";
|
||||||
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||||
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
|
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
@ -333,6 +333,7 @@ if ($resql)
|
|||||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"),$textprofid[3],1,0),$_SERVER["PHP_SELF"],"s.ape","",$params,'nowrap="nowrap"',$sortfield,$sortorder);
|
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"),$textprofid[3],1,0),$_SERVER["PHP_SELF"],"s.ape","",$params,'nowrap="nowrap"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$params,'nowrap="nowrap"',$sortfield,$sortorder);
|
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$params,'nowrap="nowrap"',$sortfield,$sortorder);
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$params,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
@ -362,7 +363,7 @@ if ($resql)
|
|||||||
print '<input class="flat" size="8" type="text" name="search_idprof4" value="'.$search_idprof4.'">';
|
print '<input class="flat" size="8" type="text" name="search_idprof4" value="'.$search_idprof4.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Type (customer/prospect/supplier)
|
// Type (customer/prospect/supplier)
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td colspan="2" class="liste_titre" align="right">';
|
||||||
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||||
@ -380,6 +381,7 @@ if ($resql)
|
|||||||
$companystatic->name=$obj->name;
|
$companystatic->name=$obj->name;
|
||||||
$companystatic->canvas=$obj->canvas;
|
$companystatic->canvas=$obj->canvas;
|
||||||
$companystatic->client=$obj->client;
|
$companystatic->client=$obj->client;
|
||||||
|
$companystatic->status=$obj->status;
|
||||||
print $companystatic->getNomUrl(1,'',24);
|
print $companystatic->getNomUrl(1,'',24);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print "<td>".$obj->ville."</td>\n";
|
print "<td>".$obj->ville."</td>\n";
|
||||||
@ -387,7 +389,7 @@ if ($resql)
|
|||||||
print "<td>".$obj->idprof2."</td>\n";
|
print "<td>".$obj->idprof2."</td>\n";
|
||||||
print "<td>".$obj->idprof3."</td>\n";
|
print "<td>".$obj->idprof3."</td>\n";
|
||||||
print "<td>".$obj->idprof4."</td>\n";
|
print "<td>".$obj->idprof4."</td>\n";
|
||||||
print '<td colspan="2" align="center">';
|
print '<td align="center">';
|
||||||
$s='';
|
$s='';
|
||||||
if (($obj->client==1 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
|
if (($obj->client==1 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
|
||||||
{
|
{
|
||||||
@ -408,6 +410,8 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
print $s;
|
print $s;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
print '<td align="right">'.$companystatic->getLibStatut(3).'</td>';
|
||||||
|
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user