/[dolibarr]/dolibarr/htdocs/compta/paiement/fiche.php
ViewVC logotype

Diff of /dolibarr/htdocs/compta/paiement/fiche.php

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

revision 1.30 by marc_ocebo, Wed Oct 5 01:48:01 2005 UTC revision 1.31 by eldy, Sat Oct 15 15:32:02 2005 UTC
# Line 79  if ($_POST['action'] == 'confirm_valide' Line 79  if ($_POST['action'] == 'confirm_valide'
79  }  }
80    
81    
82    
83  /*  /*
84   *   * Visualisation de la fiche
  *  
85   */   */
86    
87  llxHeader();  llxHeader();
88    
89    $paiement = new Paiement($db);
90    $paiement->fetch($_GET['id']);
91    
92  print '<div class="tabs">';  $html = new Form($db);
 print '<a href="fiche.php?id='.$_GET['id'].'" id="active" class="tab">'.$langs->trans('Payment').'</a>';  
 print '<a class="tab" href="info.php?id='.$_GET['id'].'">'.$langs->trans('Info').'</a>';  
 print '</div>';  
93    
94  print '<div class="tabBar">';  $h=0;
95    
96    $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$_GET["id"];
97    $head[$h][1] = $langs->trans("Card");
98    $hselected = $h;
99    $h++;      
100    
101  /*  $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/info.php?id='.$_GET["id"];
102   * Visualisation de la fiche  $head[$h][1] = $langs->trans("Info");
103   */  $h++;      
104    
105  $paiement = new Paiement($db);  
106  $paiement->fetch($_GET['id']);  dolibarr_fiche_head($head, $hselected, $langs->trans("Payment").": ".$paiement->ref);
 $html = new Form($db);  
107    
108  /*  /*
109   * Confirmation de la suppression du paiement   * Confirmation de la suppression du paiement
# Line 127  print '<tr><td valign="top" width="140"> Line 129  print '<tr><td valign="top" width="140">
129  if ($paiement->bank_account)  if ($paiement->bank_account)
130  {  {
131          // Si compte renseigné, on affiche libelle          // Si compte renseigné, on affiche libelle
         print '<tr><td valign="top" width="140">';  
132          $bank=new Account($db);          $bank=new Account($db);
133          $bank->fetch($paiement->bank_account);          $bank->fetch($paiement->bank_account);
134          print $langs->trans('BankAccount').'</td><td><a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$bank->id.'">'.$bank->label.'</a></td></tr>';  
135            print '<tr>';
136            print '<td valign="top" width="140">'.$langs->trans('BankAccount').'</td>';
137            print '<td><a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$bank->id.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$bank->label.'</a></td></tr>';
138  }  }
139  print '<tr><td valign="top" width="140">'.$langs->trans('Date').'</td><td>'.dolibarr_print_date($paiement->date).'</td></tr>';  print '<tr><td valign="top" width="140">'.$langs->trans('Date').'</td><td>'.dolibarr_print_date($paiement->date).'</td></tr>';
140  print '<tr><td valign="top">'.$langs->trans('Type').'</td><td>'.$paiement->type_libelle.'</td></tr>';  print '<tr><td valign="top">'.$langs->trans('Type').'</td><td>'.$paiement->type_libelle.'</td></tr>';
# Line 152  $sql = 'SELECT f.facnumber, f.total_ttc, Line 156  $sql = 'SELECT f.facnumber, f.total_ttc,
156  $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf,'.MAIN_DB_PREFIX.'facture as f,'.MAIN_DB_PREFIX.'societe as s';  $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf,'.MAIN_DB_PREFIX.'facture as f,'.MAIN_DB_PREFIX.'societe as s';
157  $sql .= ' WHERE pf.fk_facture = f.rowid AND f.fk_soc = s.idp';  $sql .= ' WHERE pf.fk_facture = f.rowid AND f.fk_soc = s.idp';
158  $sql .= ' AND pf.fk_paiement = '.$paiement->id;  $sql .= ' AND pf.fk_paiement = '.$paiement->id;
159                            $resql=$db->query($sql);                        
160  if ($db->query($sql))  if ($resql)
161  {  {
162          $num = $db->num_rows();          $num = $db->num_rows($resql);
163        
164          $i = 0;          $i = 0;
165          $total = 0;          $total = 0;
# Line 171  if ($db->query($sql)) Line 175  if ($db->query($sql))
175                
176                  while ($i < $num)                  while ($i < $num)
177                  {                  {
178                          $objp = $db->fetch_object();                          $objp = $db->fetch_object($resql);
179                          $var=!$var;                          $var=!$var;
180                          print '<tr '.$bc[$var].'>';                          print '<tr '.$bc[$var].'>';
181                          print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.img_object($langs->trans('ShowBill'),'bill').' ';                          print '<td><a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$objp->facid.'">'.img_object($langs->trans('ShowBill'),'bill').' ';
# Line 193  if ($db->query($sql)) Line 197  if ($db->query($sql))
197          $var=!$var;          $var=!$var;
198    
199          print "</table>\n";          print "</table>\n";
200          $db->free();              $db->free($resql);      
201  }  }
202  else  else
203  {  {

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

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