This commit is contained in:
Rodolphe Quiedeville 2005-09-06 10:24:22 +00:00
parent 0f3b33b501
commit 46d2e704a0

View File

@ -190,49 +190,55 @@ if ($_GET["facid"] > 0)
$fac = New Facture($db); $fac = New Facture($db);
if ( $fac->fetch($_GET["facid"], $user->societe_id) > 0) if ( $fac->fetch($_GET["facid"], $user->societe_id) > 0)
{ {
$soc = new Societe($db, $fac->socidp); $soc = new Societe($db, $fac->socidp);
$soc->fetch($fac->socidp); $soc->fetch($fac->socidp);
if (!$soc->perm_read)
{
print "Lecture non authorisée";
}
$author = new User($db); if ($soc->perm_read)
$author->id = $fac->user_author; {
$author->fetch(); $author = new User($db);
$author->id = $fac->user_author;
$h = 0; $author->fetch();
$head[$h][0] = DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$soc->id; $h = 0;
$head[$h][1] = $langs->trans("Fiche client");
$h++; $head[$h][0] = DOL_URL_ROOT.'/telephonie/client/fiche.php?id='.$soc->id;
$head[$h][1] = $langs->trans("Fiche client");
$head[$h][0] = DOL_URL_ROOT.'/telephonie/client/factures.php?id='.$soc->id; $h++;
$head[$h][1] = $langs->trans("Factures");
$h++; $head[$h][0] = DOL_URL_ROOT.'/telephonie/client/factures.php?id='.$soc->id;
$head[$h][1] = $langs->trans("Factures");
$head[$h][0] = DOL_URL_ROOT.'/telephonie/client/facture.php?facid='.$fac->id; $h++;
$head[$h][1] = $langs->trans("CardBill");
$hselected = $h; $head[$h][0] = DOL_URL_ROOT.'/telephonie/client/facture.php?facid='.$fac->id;
$h++; $head[$h][1] = $langs->trans("CardBill");
$hselected = $h;
dolibarr_fiche_head($head, $hselected, $langs->trans("Bill")." : $fac->ref"); $h++;
/* dolibarr_fiche_head($head, $hselected, $langs->trans("Bill")." : $fac->ref");
* Facture
*/ /*
print '<table class="border" width="100%">'; * Facture
print '<tr><td>'.$langs->trans("Company").'</td>'; */
print '<td colspan="3">'; print '<table class="border" width="100%">';
print '<b><a href="fiche.php?id='.$soc->id.'">'.$soc->nom.'</a></b></td>'; print '<tr><td>'.$langs->trans("Company").'</td>';
print '<td colspan="3">';
print "<td>Conditions de réglement</td><td>" . $fac->cond_reglement ."</td></tr>"; print '<b><a href="fiche.php?id='.$soc->id.'">'.$soc->nom.'</a></b></td>';
print '<tr><td>'.$langs->trans("Date").'</td>'; print "<td>Conditions de réglement</td><td>" . $fac->cond_reglement ."</td></tr>";
print "<td colspan=\"3\">".dolibarr_print_date($fac->date,"%A %d %B %Y")."</td>\n";
print '<td>'.$langs->trans("DateClosing").'</td><td>' . dolibarr_print_date($fac->date_lim_reglement,"%A %d %B %Y"); print '<tr><td>'.$langs->trans("Date").'</td>';
print "</td></tr>"; print "<td colspan=\"3\">".dolibarr_print_date($fac->date,"%A %d %B %Y")."</td>\n";
print '<td>'.$langs->trans("DateClosing").'</td><td>' . dolibarr_print_date($fac->date_lim_reglement,"%A %d %B %Y");
print '<tr>'; print "</td></tr>";
print '<tr>';
// Projet // Projet
if ($conf->projet->enabled) if ($conf->projet->enabled)
{ {
@ -729,12 +735,16 @@ if ($_GET["facid"] > 0)
print '<br>'; print '<br>';
} }
}
} }
else else
{ {
/* Facture non trouvée */ /* Facture non trouvée */
print $langs->trans("ErrorBillNotFound",$_GET["facid"]); print $langs->trans("ErrorBillNotFound",$_GET["facid"]);
} }
} }
$db->close(); $db->close();