Les infos affichaées sur la page compta sont conditionnées par le module adequat (compte ou facture)

This commit is contained in:
Laurent Destailleur 2004-07-24 22:38:30 +00:00
parent 30e06d8bb1
commit bf52744c35
2 changed files with 26 additions and 6 deletions

View File

@ -154,26 +154,26 @@ if ($_GET["socid"] > 0)
if ($societe->client==1) if ($societe->client==1)
{ {
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$societe->id; $head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$societe->id;
$head[$h][1] = 'Fiche client'; $head[$h][1] = 'Client';
$h++; $h++;
} }
if ($societe->client==2) if ($societe->client==2)
{ {
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$societe->id; $head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$societe->id;
$head[$h][1] = 'Fiche prospect'; $head[$h][1] = 'Prospect';
$h++; $h++;
} }
if ($societe->fournisseur) if ($societe->fournisseur)
{ {
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id;
$head[$h][1] = 'Fiche fournisseur'; $head[$h][1] = 'Fournisseur';
$h++; $h++;
} }
if ($conf->compta->enabled) { if ($conf->compta->enabled) {
$hselected=$h; $hselected=$h;
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$societe->id; $head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$societe->id;
$head[$h][1] = 'Fiche compta'; $head[$h][1] = 'Comptabilité';
$h++; $h++;
} }

View File

@ -79,10 +79,11 @@ print "</table></form>";
if ($conf->facture->enabled) {
/* /*
* Factures brouillons * 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"; $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) ) if ( $db->query($sql) )
@ -114,6 +115,10 @@ else
print $sql; print $sql;
} }
}
if ($conf->compta->enabled) {
/* /*
* Charges a payer * Charges a payer
* *
@ -154,6 +159,9 @@ if ($user->societe_id == 0)
} }
} }
}
/* /*
* Bookmark * Bookmark
* *
@ -192,10 +200,11 @@ if ( $db->query($sql) )
*/ */
print '</td><td valign="top" width="70%">'; print '</td><td valign="top" width="70%">';
/* /*
* Commandes à facturer * 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 = "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"; $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 * Factures impayées
* *
@ -274,6 +285,9 @@ else
print $sql; print $sql;
} }
}
$result = 0; $result = 0;
if ( $result ) if ( $result )
{ {
@ -298,6 +312,9 @@ else
print $db->error(); print $db->error();
} }
if ($conf->facture->enabled) {
/* /*
* Factures a payer * Factures a payer
* *
@ -343,6 +360,9 @@ if ($user->societe_id == 0)
} }
} }
}
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';