Fix: Si une socit n'est ni cliente ni prospect, on n'affiche pas bouton facturer client

This commit is contained in:
Laurent Destailleur 2005-01-09 20:53:26 +00:00
parent 01f2d7669e
commit 3a68110e89

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -21,8 +21,7 @@
*
*/
/**
\file htdocs/compta/fiche.php
/** \file htdocs/compta/fiche.php
\ingroup compta
\brief Page de fiche compta
\version $Revision$
@ -342,7 +341,8 @@ if ($socid > 0)
if ($user->societe_id == 0)
{
if ($conf->facture->enabled && $user->rights->facture->creer) {
// Si société cliente ou prospect, on affiche bouton "Créer facture client"
if ($societe->client != 0 && $conf->facture->enabled && $user->rights->facture->creer) {
$langs->load("bills");
print "<a class=\"tabAction\" href=\"facture.php?action=create&socidp=$societe->id\">".$langs->trans("AddBill")."</a>";
}