Les infos affichaes sur la page compta sont conditionnes par le module adequat (compte ou facture)
This commit is contained in:
parent
30e06d8bb1
commit
bf52744c35
@ -154,26 +154,26 @@ if ($_GET["socid"] > 0)
|
||||
if ($societe->client==1)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$societe->id;
|
||||
$head[$h][1] = 'Fiche client';
|
||||
$head[$h][1] = 'Client';
|
||||
$h++;
|
||||
}
|
||||
if ($societe->client==2)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$societe->id;
|
||||
$head[$h][1] = 'Fiche prospect';
|
||||
$head[$h][1] = 'Prospect';
|
||||
$h++;
|
||||
}
|
||||
if ($societe->fournisseur)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id;
|
||||
$head[$h][1] = 'Fiche fournisseur';
|
||||
$head[$h][1] = 'Fournisseur';
|
||||
$h++;
|
||||
}
|
||||
|
||||
if ($conf->compta->enabled) {
|
||||
$hselected=$h;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$societe->id;
|
||||
$head[$h][1] = 'Fiche compta';
|
||||
$head[$h][1] = 'Comptabilité';
|
||||
$h++;
|
||||
}
|
||||
|
||||
|
||||
@ -79,10 +79,11 @@ print "</table></form>";
|
||||
|
||||
|
||||
|
||||
if ($conf->facture->enabled) {
|
||||
/*
|
||||
* Factures brouillons
|
||||
*/
|
||||
|
||||
|
||||
$sql = "SELECT f.facnumber, f.rowid, s.nom, s.idp FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s WHERE s.idp = f.fk_soc AND f.fk_statut = 0";
|
||||
|
||||
if ( $db->query($sql) )
|
||||
@ -114,6 +115,10 @@ else
|
||||
print $sql;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($conf->compta->enabled) {
|
||||
|
||||
/*
|
||||
* Charges a payer
|
||||
*
|
||||
@ -154,6 +159,9 @@ if ($user->societe_id == 0)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Bookmark
|
||||
*
|
||||
@ -192,10 +200,11 @@ if ( $db->query($sql) )
|
||||
*/
|
||||
print '</td><td valign="top" width="70%">';
|
||||
|
||||
|
||||
/*
|
||||
* Commandes à facturer
|
||||
*/
|
||||
if ($user->comm > 0 && $conf->commercial )
|
||||
if ($user->comm > 0 && $conf->commercial->enabled )
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.ref, s.nom, s.idp FROM ".MAIN_DB_PREFIX."commande as p, ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " WHERE p.fk_soc = s.idp AND p.fk_statut >= 1 AND p.facture = 0";
|
||||
@ -229,6 +238,8 @@ if ($user->comm > 0 && $conf->commercial )
|
||||
}
|
||||
|
||||
|
||||
if ($conf->facture->enabled) {
|
||||
|
||||
/*
|
||||
* Factures impayées
|
||||
*
|
||||
@ -274,6 +285,9 @@ else
|
||||
print $sql;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$result = 0;
|
||||
if ( $result )
|
||||
{
|
||||
@ -298,6 +312,9 @@ else
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
|
||||
if ($conf->facture->enabled) {
|
||||
|
||||
/*
|
||||
* Factures a payer
|
||||
*
|
||||
@ -343,6 +360,9 @@ if ($user->societe_id == 0)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user