-
Notifications
You must be signed in to change notification settings - Fork 3
/
chercher_factures.php
executable file
·147 lines (147 loc) · 4.74 KB
/
chercher_factures.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?php
/*
* Factux le facturier libre
* Copyright (C) 2003-2005 Guy Hendrickx, 2017 Thomas Ingles
*
* Licensed under the terms of the GNU General Public License:
* http://opensource.org/licenses/GPL-3.0
*
* For further information visit:
* http://factux.free.fr
*
* File Name: chercher_factures.php
* formulaire de recherche des factures
*
* * * Version: 5.0.0
* * * * Modified: 07/10/2016
*
* File Authors:
* Guy Hendrickx
*.
*/
include_once("include/headers.php");
include_once("include/finhead.php");
?>
<table width="760" border="0" class="page" align="center">
<tr>
<td class="page" align="center">
<?php
include_once("include/head.php");
if ($user_fact == 'n') {
echo "<h1>$lang_facture_droit</h1>";
exit;
include_once("include/bas.php");
}
$rqSql = "SELECT num_client, nom FROM " . $tblpref ."client WHERE 1";
if ($user_fact == 'r') {
$rqSql = "SELECT num_client, nom FROM " . $tblpref ."client
WHERE " . $tblpref ."client.permi LIKE '$user_num,'
or " . $tblpref ."client.permi LIKE '%,$user_num,'
or " . $tblpref ."client.permi LIKE '%,$user_num,%'
or " . $tblpref ."client.permi LIKE '$user_num,%'
";
}
?>
<form name="formu" method="post" action="chercheur_factures.php">
<center>
<table class="page" border="0" align="center">
<caption><?php echo $lang_factures_chercher; ?></caption>
<tr>
<td class="texte1"><?php echo $lang_client; ?></td>
<td class="texte1" colspan="5">
<?php
if ($liste_cli!='y') {
$rqSql="$rqSql order by nom";
$result = mysql_query( $rqSql ) or die( "Exécution requête impossible.");
?>
<select name='listeclients'>
<option value=""><?php echo $lang_choisissez; ?></option>
<?php
while ( $row = mysql_fetch_array( $result)){
$numclient = $row["num_client"];
$nom = $row["nom"];
?>
<option value='<?php echo "$numclient" ?>'><?php echo $nom; ?></option>
<?php } ?>
</select>
<?php }else{ ?>
<script type="text/javascript" src="javascripts/montrer_cacher.js"></script>
<input type="checkbox" checked name="list_client" onclick="montrer_cacher(this,'cluster','cluster2')">
<?php
include_once("include/choix_cli.php");
}
?>
</td>
</tr>
<tr>
<td class="texte0"><?php echo $lang_num_fact; ?></td>
<td class="texte0" colspan="5"><input name="numero" type="text" id="numero" value="" size="2" ></td>
</tr>
<tr>
<td class="texte1"><?php echo $lang_jour; ?></td>
<td class="texte1"><input name="jour" type="text" id="jour" size="2"></td>
<td class="texte1"><?php echo $lang_mois; ?></td>
<td class="texte1"><input name="mois" type="text" id="mois" size="2" maxlength="2"></td>
<td class="texte1"><?php echo $lang_annee; ?></td>
<td class="texte1"><input name="annee" type="text" id="annee" size="4"></td>
</tr>
<tr>
<td class="texte0"><?php echo $lang_montant_ttc; ?></td>
<td class="texte0" colspan="5"><input name="montant" type="text" id="montant"></td>
</tr>
<tr>
<td class="texte1"><?php echo"$lang_status_pay"; ?></td>
<td class="texte1" colspan="5">
<?php if($use_payement == 'y'){ ?>
<select name="payement">
<option value=""><?php echo $lang_mode_paiement; ?></option>
<option value="Especes"><?php echo $lang_liquide; ?></option>
<option value="Cheque"><?php echo $lang_paypal; ?></option>
<option value="virement"><?php echo $lang_virement; ?></option>
<option value="carte"><?php echo $lang_carte_ban; ?></option>
<option value="visa"><?php echo $lang_visa; ?></option>
</select>
<?php }else{ ?>
<select name="payement">
<option value=""><?php echo $lang_choisissez; ?></option>
<option value="non"><?php echo $lang_non_pay; ?></option>
<option value="oui"><?php echo $lang_pay_ok; ?></option>
</select>
<?php } ?>
</td>
</tr>
<tr>
<td class="texte0"><?php echo $lang_tri ?></td>
<td class="texte0" colspan="5">
<select name="tri" id="tri">
<option value="nom"><?php echo $lang_client ?></option>
<option value="num"><?php echo $lang_num_fact; ?></option>
<option value="date_fact"><?php echo $lang_date ?></option>
<option value="total_fact_ttc"><?php echo $lang_montant_ttc; ?></option>
</select>
</td>
</tr>
<tr>
<td class="submit" colspan="6">
<input type="submit" name="submit" value="<?php echo $lang_rech ?>">
</td>
</tr>
</table>
</center>
</form>
</td>
</tr>
<tr>
<td>
<?php
$aide='facture';
include("help.php");
include_once("include/bas.php");
?>
</td>
</tr>
</table>
<?php if(basename($_SERVER['PHP_SELF'])==basename(__FILE__)){?>
</body>
</html>
<?php }