/[dolibarr]/dolibarr/htdocs/compta/facture/prelevement.php
ViewVC logotype

Diff of /dolibarr/htdocs/compta/facture/prelevement.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by eldy, Wed Nov 30 23:57:13 2005 UTC revision 1.18 by eldy, Thu Dec 8 23:46:32 2005 UTC
# Line 29  Line 29 
29  */  */
30    
31  require("./pre.inc.php");  require("./pre.inc.php");
32    require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
33    require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
34    
35  $user->getrights('facture');  $user->getrights('facture');
36  if (!$user->rights->facture->lire)  if (!$user->rights->facture->lire)
# Line 38  $langs->load("bills"); Line 40  $langs->load("bills");
40  $langs->load("banks");  $langs->load("banks");
41  $langs->load("withdrawals");  $langs->load("withdrawals");
42    
 require_once(DOL_DOCUMENT_ROOT."/facture.class.php");  
   
43  // Sécurité accés client  // Sécurité accés client
44  if ($user->societe_id > 0)  if ($user->societe_id > 0)
45  {  {
# Line 61  if ($_GET["action"] == "new") Line 61  if ($_GET["action"] == "new")
61          if ($result > 0)          if ($result > 0)
62          {          {
63              Header("Location: prelevement.php?facid=".$fact->id);              Header("Location: prelevement.php?facid=".$fact->id);
64                exit;
65          }          }
66          else          else
67          {          {
# Line 99  if ($_GET["facid"] > 0) Line 100  if ($_GET["facid"] > 0)
100      $fac = New Facture($db);      $fac = New Facture($db);
101      if ( $fac->fetch($_GET["facid"], $user->societe_id) > 0)      if ( $fac->fetch($_GET["facid"], $user->societe_id) > 0)
102      {      {
   
103          if ($mesg) print $mesg.'<br>';          if ($mesg) print $mesg.'<br>';
104    
105          $soc = new Societe($db, $fac->socidp);          $soc = new Societe($db, $fac->socidp);
106          $soc->fetch($fac->socidp);          $soc->fetch($fac->socidp);
         $author = new User($db);  
         $author->id = $fac->user_author;  
         $author->fetch();  
107    
108          $h = 0;          $author = new User($db);
109          $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$fac->id;          if ($fac->user_author)
         $head[$h][1] = $langs->trans("CardBill");  
         $h++;  
   
         $head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$fac->id;  
         $head[$h][1] = $langs->trans('Contact');  
         $h++;  
   
         if ($conf->use_preview_tabs)  
         {  
             $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id;  
             $head[$h][1] = $langs->trans("Preview");  
             $h++;  
         }  
           
         if ($fac->mode_reglement_code == 'PRE')  
110          {          {
111              $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$fac->id;              $author->id = $fac->user_author;
112              $head[$h][1] = $langs->trans("StandingOrders");              $author->fetch();
             $hselected = $h;  
             $h++;  
113          }          }
114    
115          $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$fac->id;                  $head = facture_prepare_head($fac);
         $head[$h][1] = $langs->trans("Note");  
         $h++;  
   
         $head[$h][0] = DOL_URL_ROOT.'/compta/facture/info.php?facid='.$fac->id;  
         $head[$h][1] = $langs->trans("Info");  
         $h++;  
116    
117          dolibarr_fiche_head($head, $hselected, $langs->trans("Bill")." : $fac->ref");                  dolibarr_fiche_head($head, 2, $langs->trans('Bill').' : '.$fac->ref);
118    
119          /*          /*
120          *   Facture           *   Facture
121          */           */
122          print '<table class="border" width="100%">';          print '<table class="border" width="100%">';
123    
124                    // Reference du facture
125                    print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">';
126                    print $fac->ref;
127                    print "</td></tr>";
128    
129          // Societe          // Societe
130          print '<tr><td>'.$langs->trans("Company").'</td>';          print '<tr><td width="20%">'.$langs->trans("Company").'</td>';
131          print '<td colspan="5">';          print '<td colspan="5">';
132          print '<a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></td>';          print '<a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></td>';
133          print '</tr>';          print '</tr>';

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26