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 |
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>'; |
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; |
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').' '; |
197 |
$var=!$var; |
$var=!$var; |
198 |
|
|
199 |
print "</table>\n"; |
print "</table>\n"; |
200 |
$db->free(); |
$db->free($resql); |
201 |
} |
} |
202 |
else |
else |
203 |
{ |
{ |